Mic recording problem: AudioStreamError: Cannot stop a stream that has not been started

Hello!
I am having a problem recording audio responses on builder.
I have been searching the forum for an answer but I could not find any.

I get the result folder reads “audio_recording”, but it is always empty.
I tried to make the recording limited to specific seconds, but it does not solve the problem. I also added a keyboard key that forces to stop the routine, and that also does not work!

Any idea? Thank you in advance!

Hi there, it sounds like the mic and keyboard might be separate issues - may I ask if you get any error messages?
What operating system are you on?
What version of psychopy are you using?

Hi and thank you for your quick response!
I am using Psychopy v2021.2.3
I have a MacBook (Catalina, 10.15.7)
And I get this message:

Traceback (most recent call last):
File “/Users/Documents/audio recording_lastrun.py”, line 227, in
mic.stop()
File “/Applications/PsychoPy.app/Contents/Resources/lib/python3.6/psychopy/sound/microphone.py”, line 803, in stop
“Cannot stop a stream that has not been started.”)
psychopy.sound.exceptions.AudioStreamError: Cannot stop a stream that has not been started.

Experiment ended.

If anyone tried the mic before, could you share your builder screen so I can follow your steps?
Also, what is the maximum duration of verbal responses that Psychopy can record.
:slight_smile:

Hi There,

I think I might know the problem here - in your mic component under “Hardware” please can you try changing the Sampling Rate to DVD Audio?

Thanks!
Becca

Thank you, Becca!

I tried that but unfortunately it does not solve the problem. However, I did few things that result in getting an audio file with .wav extension. However, it does not include any voice. It just plays blank.

  1. go to setting and change “Audio” to “ptb”.
  2. go to the mic component and disable “transcribe audio” or change it to “built-in”.

These two steps resulted in a start of the recording process, yet no voice yet inside the outcome .wav folder.
I will keep you updated whenever I get something as I am working on it.

Best regards!

1 Like

Check the number of channels in your mic properties and whether “Force stereo” is checked in the Audio tab of the experiment’s properties menu.