Problems with saving sound recordings created in a loop

URL of experiment: Experiment M.1_Yao [PsychoPy]

Description of the problem:
I have a few loops in this experiment, and each loop contains a recording routine. The participant needs to use a mic on their computer to record a voice response in this recording routine. The experiment runs without a problem, but some issues arise when I download the data. First, there is only one recorded media file saved for each loop, because the filename follows the name of the recording routine, and each iteration of the loop overwrites the media file with new recording. So only the recording in the last iteration is saved. Second, the recorded file is in the webm format although I set the output file type to “wav” in PsychoPy.

I wonder if there’s any solution to the above two problems. Thanks.

Best,
Yao

Hi Yao,

Does this thread help?

Hi wakecarter,

Thanks for the pointer! Yes this is exactly the same issue that I encountered. I figured out a similar solution for my experiment.

I also tried upgrading to PsychoPy v2022.1.1 (previously v2021.2.3), and it seems that in v2022.1.1, a time stamp is appended to the recording file name from each iteration automatically, so the recording files are actually all saved separately. But you will still need to modify the JS code to update the recording file names logged in the data file as well or to use a different format of filename (e.g. thisN instead of the time stamp).

Best,
Yao