psychopy.org | Reference | Downloads | Github

Microphone input not working in Windows on simple naming experiment

Dear all,

I cannot record audio from the microphone using the builder. It just crashes when it runs to the Microphone Component. I am not sure if it is a problem with my computer or the programming language. The error message is as below:

6.7153 WARNING User requested fullscreen with size [1366 768], but screen is actually [1920, 1080]. Using actual size
8.0611 WARNING Starting Microphone but sound lib preference is set to be [‘sounddevice’, ‘pyo’, ‘pygame’]. Clashes might occur since ‘pyo’ is not preferred lib but is needed for Microphone
8.0707 ERROR psychopy.sound.backend_pyo.init could not find speaker hardware; sound not available
Traceback (most recent call last):
File “E:\Research\Stimuli\Lexical\Taskswitch_lexical_lastrun.py”, line 1100, in
mic_cant = microphone.AdvAudioCapture(name=‘mic_cant’, saveDir=wavDirName, stereo=True, chnl=‘0’)
File “C:\Users\aml78\AppData\Local\PsychoPy3\lib\site-packages\psychopy\microphone.py”, line 386, in init
buffering=buffering, chnl=chnl, stereo=stereo)
File “C:\Users\aml78\AppData\Local\PsychoPy3\lib\site-packages\psychopy\microphone.py”, line 174, in init
raise AttributeError(‘pyo server not created’)
AttributeError: pyo server not created

Tested with Psychopy 3.1.2. Thanks a bunch!

Best,
Anthony

What are the settings in your PsychoPy preferences for the sound driver? Make sure that the directsound is listed (on Windows systems) as below

Thanks a lot, Jon. I tried using all the specification as shown on your screenshot (apart from the last item on ‘parallel ports’ since I can’t see this, although I am not sure it is critical), the same problem still remains:

Traceback (most recent call last):
File “C:\Users\Documents\PhD\Research\Stimuli\Lexical\Taskswitch_lexical_lastrun.py”, line 1138, in
mic_cant.record(sec=3, block=False) # start the recording thread
File “C:\Program Files (x86)\PsychoPy3\lib\site-packages\psychopy\microphone.py”, line 398, in record
self.filename = self._record(sec, filename=filename, block=block)
File “C:\Program Files (x86)\PsychoPy3\lib\site-packages\psychopy\microphone.py”, line 249, in _record
self.recorder.run(self.savedFile, self.duration, **self.options)
File “C:\Program Files (x86)\PsychoPy3\lib\site-packages\psychopy\microphone.py”, line 117, in run
inputter = pyo.Input(chnl=chnl, mul=1)
File “C:\Program Files (x86)\PsychoPy3\lib\site-packages\pyo\lib\generators.py”, line 420, in init
pyoArgsAssert(self, “iOO”, chnl, mul, add)
File “C:\Program Files (x86)\PsychoPy3\lib\site-packages\pyo\lib_core.py”, line 503, in pyoArgsAssert
raise PyoArgumentTypeError(err % (i, name, expected, argtype))
pyo.lib._core.PyoArgumentTypeError: bad argument at position 0 to “Input” (integer expected, got <class ‘str’>)