Audio components not stopping

URL of experiment:

Description of the problem:
The experiment was programmed in version 2022. Late December 2023, when I updated PsychoPy to the newest version, the codes for the audio task didn’t work anymore.

In the audio task (i.e., Digit span task), participants hear a series of digits and then proceed to type in their answer in the next routine.

After the version update, only the first audio was played, and subsequent audios were not played. I tried to figure out the problem by recreating a simpler version of digit span task. In the new version, the audio plays twice (i.e., during the sound component and during the next typing routine). I switched to the older 2022 version and the experiment worked as usual.

Question: May I know what is the recent changes are with sound component?

Here’s the simpler digit span task.
auditoryPract.xlsx (8.8 KB)
untitled_audio.psyexp (17.5 KB)

Hi all,

I have uploaded the experiment online and made the repository public. There are several issues that I could not figure out.

Version: v2023.2.1
Desktop: M2 Pro (Sonoma 14.2.1)

Description of the task: The task is the Digit Span task, and I want to present a fixation for 0.5 seconds, followed by an audio stimulus (with varying duration), and a typing routine.

Problem:

  1. On the PsychoPy, the same audio runs twice at each loop (i.e., once during the trial routine and once during the typre routine).
  2. However, on Pavlovia, the audio stimuli only run during the trial routine but not during the typre routine. The problem is that only the first audio stimulus is presented, and the rest of the stimuli are muted.

As mentioned above, I’m not sure what I did wrong when I upgraded from v2022 to v2023 as this experiment setup worked previously in v2022.

Anyone has any idea whether I should start looking at and any help will be appreciated.

  1. How do I force the trial routine to end when the audio stops during the trial routine?
  2. How do I play the audio only once during each loop?
  3. How do I present all the stimuli?

Here’s the link to the Pavlovia exp? demo_audio [PsychoPy]. This is a short demo of the problem that I have.

Gitlab link: Mei Ling / demo_audio · GitLab

Thanks all,
Mei

Hi @mayling, I can’t run your task on Pavlovia cause I’m getting an error that says secs is not defined but to answer your questions:

With point 1, you can try adding a code component in the trial routine where in the Each Frame tab:

if sound_component.status == FINISHED:
    continueRoutine = False

And for your sound component to play after the first trial, it should be fixed if you set the start time to 0.1 seconds.

Hope this helps,
Sue Lynn

1 Like

Hi Sue Lynn,

Thank you for the help. Setting the start_time for the sound component later fixed the problem. Now, all the audio is playing.

But, I’m just curious, why if the sound component’s start time is set to 0.0s, only the first trial will run? In older v2022, setting the start_time for sound component at 0.0 worked.

Hi @mayling, I’m glad to hear the issue is fixed. This is a known bug and we are in the process of investigating it.