Microphone response sounds slowed down

Hi everyone!

Some system info

Windows 10, PsychoPy2022.2.4, Python version 3.8.10

I’m trying to set up a simple picture naming task and record the participants verbal responses using the microphone response. Basically, the participant sees an image (e.g. of an apple) and hears a question (e.g. what is this?) and then has to name the object in the picture.

My Problem

The experiment runs fine, however, when I listen to the recordings that are saved during the experiment, they sound like a slowed down version of a normal recording.
I previously had a similar issue when I lowered the sampling frequency of some files (this was completely unrelated to PsychoPy but it might be an indicator of what’s going wrong here).

Properties of my microphone response:

Basic

Start time: 1.0
duration: 10.0

Transcription

No transcription activated

Data

Save onset/offset times: yes
Sync timing with screen refresh: yes
Output file Type: wav
speaking start/stop times: yes
Trimm silent: no

Hardware

Channels: mono
Sample Rate (Hz): 48000
Max Recording size: 64000

All other settings are on default.

What I tried so far

  1. Double checked that my microphone works fine using another app to record sound → mic works fine
  2. ran the experiment on another computer (also Windows 10) → same issue
    I also tried to run it on MacOS but the experiment only showed an empty grey screen. My experience with PsychoPy on Linux (Ubuntu and Pop_OS 22.04) is a whole different matter :confused:
  3. Tried different sampling frequencies → issue remained
  4. Tried changing the following file preferences in the userPrefs.cfg-file
    4.1 Choice of audio library: the following choices are available: sounddevice, PTB, pyo, pygame. I tried to set each of them as the first problem. This resulted in either the issue described (sounddevice and PTB, pygame) or a silent recording (pyo).
    4.2 changed the latency mode for PsychToolBox to 4 instead of 3.
    4.3 changed audio driver “ASIO” to “WASAPI” (which I think is supposed to be standard on Windows(?)) and changed the preferences so that it has priority over “Primary Sound”
    → for all changes I made in the cfg-file, the issue still remained (after restarting PsychoPy and running the experiment again).
  5. I tried to look at anything in related to the Microphone class in the coder, however, my Python skills are only very basic so I didn’t find anything that could have caused the issue.

Note that I only tried all these steps AFTER I had this issue with the original experiment build.

Files for reproducing the problem

You can download all files related to the experiment (including the recordings made during a test run of the experiment) here:

I’m grateful for any suggestions on how to fix this problem!

Sincerely,
Moritz

PS: I did not get any error messages in the Runner-window but here is the output I got after/while running the experiment (it might be of help):

Output Runner-window

Running: C:\Users\User\Desktop\Experiment_1\Experiment_1\testExp\test1_lastrun.py

1323.6125 INFO Loaded monitor calibration from [‘2019_12_09 08:31’]
pygame 2.1.0 (SDL 2.0.16, Python 3.8.10)
Hello from the pygame community. Contribute - pygame wiki
PTB-INFO: Using modified PortAudio V19.7.0-devel, revision unknown
PTB-INFO: New audio device 6 with handle 0 opened as PortAudio stream:
PTB-INFO: For 1 channels Capture: Audio subsystem is Windows WASAPI, Audio device name is Microphone (Realtek(R) Audio)
PTB-INFO: Real samplerate 48000.000000 Hz. Input latency 10.000000 msecs, Output latency 0.000000 msecs.
1.8055 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 [‘sounddevice’, ‘PTB’, ‘pyo’, ‘pygame’] (in that order).
1.0895 WARNING Monitor specification not found. Creating a temporary one…
ioHub Server Process Completed With Code: 0
################ Experiment ended with exit code 0 [pid:13156] #################
1365.0864 INFO Loaded monitor calibration from [‘2019_12_09 08:31’]

I’m replying here to let you know that I have not been able to fix this problem so we went another way (Neurobs Presentation).

Should I ever find a fix to my issue it, I will update this post.