psychopy.org | Reference | Downloads | Github

Microphone not working as response device

#1

If this template helps then use it. If not then just delete and start from scratch.

OS (e.g. Win10): Os High Sierra
PsychoPy version (e.g. 1.84.x): Psychopy3
**Standard Standalone? (y/n): y
**What are you trying to achieve?: To use the microphone as the response device (i.e., have stimuli move forward when the microphone detects a response).

**What did you try to make it work?: I tried changing the audio driver as recommended online to ‘directsound’, and the audio library to ‘pyo’ (I had ‘sounddevice’ before but then it would complain that it needed ‘pyo’ ).

What specifically went wrong when you tried that?:
File “/Users/linglab/Desktop/Karen_Psychopy/Exp_Karen_lastrun.py”, line 493, in
mic_1.record(sec=0, block=False) # start the recording thread
File “/Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/psychopy/microphone.py”, line 398, in record
self.filename = self._record(sec, filename=filename, block=block)
File “/Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/psychopy/microphone.py”, line 249, in _record
self.recorder.run(self.savedFile, self.duration, **self.options)
File “/Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/psychopy/microphone.py”, line 117, in run
inputter = pyo.Input(chnl=chnl, mul=1)
File “/Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/pyolib/generators.py”, line 420, in init
pyoArgsAssert(self, “iOO”, chnl, mul, add)
File “/Applications/PsychoPy3.app/Contents/Resources/lib/python3.6/pyolib/_core.py”, line 502, in pyoArgsAssert
raise PyoArgumentTypeError(err % (i, name, expected, argtype))
pyolib._core.PyoArgumentTypeError: bad argument at position 0 to “Input” (integer expected, got <class ‘str’>)