Audio issues in pavlovia with certain browsers

OS (e.g. Win10): Win11
PsychoPy version (e.g. 2024.2.4 Py 3.8): 24.2.4 Py
Standard Standalone Installation? (y/n) If not then what?: y
URL of experiment:
Do you want it to also run locally? (y/n) n

The problem

I am having trouble with sound while running my experiment, which gets participants to listen to excerpts of music while pressing number keys on their keyboard based on what they are hearing.

I have an audio file for a sound check, a video for a practice trial, an audio file for a practice trial (the same as for the sound check), and then there is a loop that goes through 20 trials based on a conditions file. I use sound components for all of the audio files and a movie component for the video practice trial. All of the sounds start at 0.5s.

The experiment was working as intended in the summer, and I successfully collected pilot data in August and September. I had other things that I had to do before I could collect my real data, and came back to run the experiment only to discover that I was having sound issues.

It seems like the problem is browser dependent. Most of the troubles I’ve had are using the Edge browser – and I’m not sure if they’re related to changes in Pavlovia or in Edge. I have tried the experiment in the past week on Edge on Windows 11, Firefox on Windows 11, Firefox on Linux Mint, and Chrome on a Chromebook. I had some minor issues with audio quality on the Firefox on Linux Mint, but it was different than what I am experiencing on Edge and I am not ruling out an issue with audio drivers on that device – just some crackling in the audio in a couple of trials.

From here, I describe the problems I am having in the Edge browser:

The problems were a bit inconsistent, so it is a bit hard to get a clear picture of it, but there are a couple of things that seem to be happening fairly consistently: the sound drops out for part of the video practice trial and then comes back (and sometimes drops out and returns again)–when in the video and for how long seems to be variable, but always in the second half (the video is 64s), and fairly often, the sound would drop out completely after the opening of the second trial in the loop. This is similar to a problem that I remember having in the summer, which was fixed then by adding the 0.5s delay on the start. Sometimes the sound is also delayed starting, for the audio practice trial or in the audio trials in the loop – with delays of several seconds up to a minute or slightly longer than a minute. Sometimes I would have trials where the sound cut out somewhere in the middle.

The sound check is the only routine involving audio that did not give me any audio issues in any of my test runs.

When I first noticed the issue, I was also getting an error on some runs:

Unfortunately we encountered the following error:

  • when uploading participant’s results for experiment: my/experiment
  • Upload canceled by throttling

I turned off “save periodically” and after that I did not get any more error messages.

The times that I could get to the end of the experiment without experiencing sound dropping out–or losing the sound for trials completely–was when I just listened and only used the keyboard to advance from one routine to the next where necessary, and I did not use the number keys to do the task. Not using the number keys does not seem to guarantee that the sound will keep working, but using them seems to increase the likelihood that I lose sound.

What next?

Ideally, the experiment could run on any desktop browser. I’m not counting on that.

Since I don’t understand this problem – or browsers – well enough to understand what’s causing it or how to prevent it (other than from the limited times I was able to try it myself on a limited selection of browsers and devices), I am not feeling confident about how to direct potential participants about what browser to use for the experiment. I will be asking participants to use a computer (not a phone or tablet), and I can see requiring the browser to be from a specific approved set (or to exclude a certain browser or browsers, such as Edge) – is there a way that I can be certain that a given browser will work when another one doesn’t?

Edit to add: any time I used the same browser for multiple tests, I cleared the cache between runs