Psychopy version: 2025.1.1
Standalone: No
OS: Windows 11 Version 23H2 for x64 systems.
I have been working on this for a few days now and can’t seem to get psychopy to take my microphone as a microphone, psychopy thinks it’s a keyboard. I have a script from 2023 that I am adapting to upgrade for the 2025 version on a new system, and it gives me an issue when I initialize and attempt to record like so:
mic = sound.microphone.Microphone(device=None, channels=2, sampleRateHz=44100)
later on in my script I want to record audio with the microphone at a precise time, so within some conditional logic I call:
mic.start()
resulting in the error:
File “C:\Users\****\anaconda3\envs\psychopy\lib\site-packages\psychopy\sound\microphone.py”, line 185, in start
return self.device.start(
TypeError: KeyboardDevice.start() got an unexpected keyword argument 'when'
I have been troubleshooting this for a few days now. I tried using sounddevice to discover the correct index for the microphone in the inputs and the name of my microphone as well (these do appear in python as an input with the correct number of channels). The return from manually putting in the correct index or string with the name of the microphone both return that an input device does not exist there. I also tried inputting indices 0-15 in it and got the same result every time.
I tried adding the microphone using psychopy.hardware and did not get that to work.
I have gone through my windows settings to ensure the microphone is selected as the default and that psychopy is allowed to access it.
I have ensured directaudio is accessible to psychopy.
I am using PTB as the audio library.
I have tried the above using standalone psychopy 2024.2.5 including the compatibility version.
I have tried fresh reinstallations of psychopy.