# How to use Microphone component?

**URL:** <https://discourse.psychopy.org/t/how-to-use-microphone-component/24602>\
**Category:** Builder\
**Created:** [August 19, 2021, 2:34am UTC](https://discourse.psychopy.org/t/how-to-use-microphone-component/24602 "2021-08-19T02:34:47Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![Helen\_Hu](https://avatars.discourse-cdn.com/v4/letter/h/3d9bf3/32.png) [@Helen\_Hu](https://discourse.psychopy.org/u/Helen_Hu)\
**Post date:** [September 3, 2021, 8:02am UTC](https://discourse.psychopy.org/t/how-to-use-microphone-component/24602/5 "2021-09-03T08:02:43Z")

</div>

It goes like this:

## Running: /Users/helene/Desktop/psychopy demo/Feature Demos/microphone/microphone\_lastrun.py

PTB-INFO: Using modified PortAudio V19.6.0-devel, revision unknown  
||PaMacCore (AUHAL)|| Error on line 406: err=‘’!dat’‘, msg=Audio Device: Unsupported Format  
||PaMacCore (AUHAL)|| Error on line 406: err=’‘!dat’', msg=Audio Device: Unsupported Format  
PTB-INFO: New audio device 0 with handle 0 opened as PortAudio stream:  
PTB-INFO: For 2 channels Capture: Audio subsystem is Core Audio, Audio device name is Built-in Microphone  
PTB-INFO: Real samplerate 16000.000000 Hz. Input latency 9.000000 msecs, Output latency 0.000000 msecs.  
0.8275 WARNING We strongly recommend you activate the PTB sound engine in PsychoPy prefs as the preferred audio engine. Its timing is vastly superior. Your prefs are currently set to use [‘sounddevice’, ‘PTB’, ‘pyo’, ‘pygame’] (in that order).  
7.1402 WARNING User requested fullscreen with size [1024 768], but screen is actually [1280, 800]. Using actual size  
2021-09-03 16:01:00.173 python[18133:10130649] ApplePersistenceIgnoreState: Existing state will not be touched. New state will be written to (null)  
Alert 4615: Chosen transcriber ‘google’ requires an API key, please supply one in Preferences.  
For more info see [https://docs.psychopy.org/alerts/4615.htmlTraceback](https://docs.psychopy.org/alerts/4615.htmlTraceback) (most recent call last):  
File “/Users/helene/Desktop/psychopy demo/Feature Demos/microphone/microphone\_lastrun.py”, line 282, in   
language=‘en-US’, expectedWords=None  
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.6/psychopy/sound/microphone.py”, line 931, in bank  
engine=engine, \*\*kwargs)  
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.6/psychopy/sound/audioclip.py”, line 758, in transcribe  
config=config)  
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.6/psychopy/sound/transcribe.py”, line 351, in transcribe  
config=config)  
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.6/psychopy/sound/transcribe.py”, line 589, in recognizeGoogle  
'No application key specified for Google Cloud Services, ’  
psychopy.sound.exceptions.RecognizerAPICredentialsError: No application key specified for Google Cloud Services, specify the path to the key file with either the system environment variable `GOOGLE_APPLICATION_CREDENTIALS` or in preferences (General → appKeyGoogleCloud).

##### Experiment ended.

---

_[View the full topic](https://discourse.psychopy.org/t/how-to-use-microphone-component/24602)._
