OS : Win 10 Pro
PsychoPy version : 2021 2.3
Standard Standalone? (y/n) : y 64
What are you trying to achieve?: I want to add a double response: a button press that will be done by the experimenter (either pressing ‘c’ or ‘v’) and a verbal response recorded by microphone and given by the participant. I was wondering whether you could help me figure out the issue I have with the mic component.
What did you try to make it work?: So far I was able to make the experiment work without the microphone component but when I add it I run into errors. I have been reading some older topics in the forum but I have not been able to solve the issue. I have changed my preferences to PTB, pygame, pyo and sound device but it still does not work. I had problems before getting to run experiments with the PTB library. For me latency is important.
What specifically went wrong when you tried that?:
Running: C:\Users\Utilisateur\Desktop\task_lastrun.py
1424.1988 INFO Loaded monitor calibration from [‘2020_01_06 17:28’]
pygame 1.9.6
Hello from the pygame community. Contribute - pygame wiki
PTB-INFO: Using modified PortAudio V19.6.0-devel, revision unknown
PTB-ERROR: Desired audio parameters for device 11 unsupported by audio device: Invalid sample rate
PTB-ERROR: Seems the requested audio sample rate 16000.000000 Hz is not supported by this combo of hardware and sound driver.
Error in function Open: Usage error
Failed to open PortAudio audio device due to unsupported combination of audio parameters.
PsychPortAudio:Open: Usage:
pahandle = PsychPortAudio(‘Open’ [, deviceid][, mode][, reqlatencyclass][, freq][, channels][, buffersize][, suggestedLatency][, selectchannels][, specialFlags=0]);
1.7966 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 [‘pygame’] (in that order).
6.4242 WARNING User requested fullscreen with size [1536 864], but screen is actually [1920, 1080]. Using actual size
11.1635 WARNING Hamming was requested using the ‘pygame’ sound library but hamming is not supported there.
Traceback (most recent call last):
File “C:\Users\Utilisateur\Desktop\task_lastrun.py”, line 130, in
sampleRateHz=16000, maxRecordingSize=24000.0
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\sound\microphone.py”, line 483, in init
channels=self._channels)
File “C:\Program Files\PsychoPy\lib\site-packages\psychtoolbox\audio.py”, line 101, in init
flags)
Exception: Failed to open PortAudio audio device due to unsupported combination of audio parameters.
Exception ignored in: <bound method Stream.del of <psychtoolbox.audio.Stream object at 0x000001C48FD21940>>
Traceback (most recent call last):
File “C:\Program Files\PsychoPy\lib\site-packages\psychtoolbox\audio.py”, line 236, in del
self.close()
File “C:\Program Files\PsychoPy\lib\site-packages\psychtoolbox\audio.py”, line 146, in close
raise err
File “C:\Program Files\PsychoPy\lib\site-packages\psychtoolbox\audio.py”, line 139, in close
PsychPortAudio(‘Close’, self.handle)
AttributeError: ‘Stream’ object has no attribute ‘handle’