psychopy.org | Reference | Downloads | Github

Experiment won't run when mic is plugged in

I’m building an experiment in which I need to record responses, and I’ve been having trouble getting the recording to work.

I’m running PsychoPy v3.1.5 on a Windows system. When I don’t have an external microphone plugged in (theoretically using my laptop’s built-in mic) the experiment will run and create .wav files like it’s supposed to, but they are always empty. When I plug in an external microphone (through a pre-amp connected by USB to my laptop), which is what I intend to use in the final version, the experiment will not run at all. It simply shows me a blank gray screen for a few seconds and then ends and shows me the output dialogue box, but with no error message. If I then unplug the mic and make no other changes, it goes back to working.

In my preferences, I have the audio library set to ‘pyo’ and the device set to ‘default’, which should be the external mic according to my computer’s settings. The mic itself does not appear on the device option list, even when plugged in.

This is a different issue than I was having with an older version of PsychoPy, in which the experiment crashed when it got to the part where it was supposed to begin recording. This crash happens right away and displays no error message.

Any suggestions about what might be going wrong here?

EDIT: Based on suggestions from other threads, I played around with the mic duration. Adding a fixed duration to the mic component resolves the issue of the empty .wav files, though like other users, the experiment crashes after a few trials if the recording has not finished before the key component force-ends the routine. However, simply plugging in an external mic still causes the experiment to crash before even starting, and the only message displayed after is the same message that appears after a successful run (just the running path). I can record through the mic in other programs, so I don’t think it’s an issue with the mic itself. I really have no idea what might be causing this.