Trouble getting mic component to work on v2024.2.3 and v2024.2.4

Hi everyone, I have a PsychoPy task designed to use in conjunction with fNIRS data collection. It was initially developed on PsychoPy-v2023.2.3 but we’re trying to move it onto v2024.2.3 now that the microphone component seems to work in the builder.

The main laptop that I need the task to work on is a Lenovo ThinkPad, but I’ve also tested the same .psyexp file on an HP Elitebook and a Dell Latitude. All devices presented me with different issues relating to the obtained audio files:

OS (e.g. Win10): Windows 11 on a Lenovo ThinkPad
PsychoPy version (e.g. 1.84.x): v2024.2.3 and v2024.2.4
Audio device Microphone Array, Realtek(R) Audio, 2 channels, 24bit, 48000Hz

What are you trying to achieve?:
I would like to obtain separate audio recordings of verbal responses per item trial (6s) that are not stretched out.

What did you try to make it work?: I’ve tried changing sound libraries, tried changing speaker settings from default to the specific hardware listed for the device, tried lowering the sampling rates, tried running from builder as well as the compiled .py file from the runner, checked the recording hardware built into the laptops (they work fine on other applications).

What specifically went wrong when you tried that?:

  • On the Lenovo when running v2024.2.4,
    • With mic component enabled, .psyexp exits with code ‘1’ after clicking ‘OK’ on dialogue box without reaching "measuring frame rate of screen’ and shows device error: “Could not find any device with index 5”
    • With mic component disabled, .psyexp freezes on a blank screen and the task has to be manually terminated to exit full-screen state
  • On the Lenovo when running v2024.2.3,
    • With mic component enabled, I received the same error as when I ran it in v2024.2.4
    • With the mic disabled, the task ran as intended.
  • On the HP with both PsychoPy versions,
    • Audio recordings obtained from the trials did not split into separate audio files, the only file I had as an output was 0KB, but the task otherwise ran normally
  • On the Dell with both PsychoPy versions,
    • Audio recordings from added microphone component are stretched out as if playing in slow motion
    • Trials are 6s long, but the exported audio files can range from 7 to 11s long; first block of 6 trials range between 7 to 8s, subsequent blocks are 11 to 12s.

If anyone wants access to the task to try it out, you can find it in this folder, saved in artih_v2_runs. I’ve also included an Excel file documenting the laptop specs and the issues when trying to run the tasks on them. I’ve also included the errors printed from the runners on some of the attempts, sorted by devices.

Although I’ve listed a bunch of issues here, my main focus is on getting the microphone component to work on the Lenovo. The other issues seem to suggest perhaps there’s a bug that affect different devices differently - just wanted to see if anyone else has encountered similar problems too. Any advice would be greatly appreciated, thank you!

On the Lenovo, before you run the task, can you select the correct microphone in the microphone component? Or select default microphone?

I’ve tried the following:

  • leaving the settings on “default”
  • selecting the Microphone Array that’s defult on the laptop
    • tried running it at 16kHz, 44.1kHz, and 48kHz
  • and also trying it with an external microphone

None of them have been successful attempts.

Do you always get this error or does it vary according to your approach?

It doesn’t vary with the Lenovo - it comes back with the index 5 error regardless of chosen device. I get an index 7 error, however, on the Dell (the laptop that returns with stretched/slowed down audio recordings).