Audio files not working properly on Pavlovia

URL of experiment:
https://run.pavlovia.org/sammitchell/italian-abx

URL of experiment page:

Experiment Designed on PsychoPy v2021.2.3 on Ubuntu 18.

Description of the problem:

Sounds files are either overlaping or omitted in Pavlovia version. This issue does not occur when the experiment is run locally on PsychoPy.

The experiment is currently using .wav sound files. These have had their length calculated and are listed as a condition in a spreadsheet. Each loop retrievals the duration of the first sound and the second begins when the first has finished. The images attached show how this is currently structured.


Screenshot from 2022-03-31 17-32-33

This works very well offline, with all of the sounds playing smoothly and without any omissions (I have double checked to make sure this is not a product of inaccurate times on the database).

Online there are two manifestations of (presumably) the same underlying issue:

Using FireFox on Ubuntu OS a number of soundfiles overlap when the experiment is run on Pavlovia.

The problem is slightly different when running the experiment using Firefox, Google Chrome, and Brave on a Mac, instead of sounds overlapping, in many triplets one sound is omitted.

Are there any changes that can be made to the code or sound files to avoid these issues when running the experiments online? We intend to run the experiment on individuals online, who will often use different browsers and OS, so solutions that are not OS/Browser specific would be great!

Thank so much you for your help in advance!

(Sidenote: There are also often delays with keyboard component responses taking ages to end a routine in the online experiment. Similarly, this is not a problem offline- could the two issues be interrelated?)

1 Like

Overlapping is, I think, due to unavoidable sound latencies (though there may be ways to reduce this my pre-preparing the sound component as a silent sound in a previous routine).

However, instead of times for the start, you could use the sound_1_2 start condition as sound_1_1.status == FINISHED

I normally avoid using durations for sound components online.