Hi Becca,
I have single physical microphone.
I’m going to make several recordings throughout my experiment in different routines. So I add one microphone component in one routine, add another microphone component in another routine, resulting in several microphones in my experiment.
But it works only when I include one microphone component in one routine, when I include more than one, it gives the error:
given audio library ptb:
PTB-ERROR: Failed to open audio device 7. PortAudio reports this error: Invalid device
PTB-ERROR: Desired audio parameters likely unsupported by audio device.
PTB-ERROR: This could be, e.g., due to an unsupported combination of audio sample rate, audio channel count/allocation, or audio sample format.
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]);
Traceback (most recent call last):
File “U:\psyuser\exp\mic\mic_testing\mic_testing_lastrun.py”, line 198, in
sampleRateHz=48000, 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 0x0000022CAFEDF320>>
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’
given audio library pyo:
PTB-INFO: Using modified PortAudio V19.6.0-devel, revision unknown
PTB-INFO: New audio device 7 with handle 0 opened as PortAudio stream:
PTB-INFO: For 2 channels Capture: Audio subsystem is Windows WASAPI, Audio device name is External Microphone (Synaptics HD Audio)
PTB-INFO: Real samplerate 48000.000000 Hz. Input latency 10.000000 msecs, Output latency 0.000000 msecs.
PTB-ERROR: Failed to open audio device 7. PortAudio reports this error: Invalid device
PTB-ERROR: Desired audio parameters likely unsupported by audio device.
PTB-ERROR: This could be, e.g., due to an unsupported combination of audio sample rate, audio channel count/allocation, or audio sample format.
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.7193 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 [‘pyo’] (in that order).
Traceback (most recent call last):
File “U:\psyuser\exp\mic\mic_testing\mic_testing_lastrun.py”, line 198, in
sampleRateHz=48000, 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 0x000001740D476978>>
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’