Some audio files don't play on pavlovia, instead play a click sound

Hi everyone. I’m trying to make a serial order reconstruction task (participants hear words, and then click on the words in the order they heard them in) on psychopy and publish it on pavlovia. however, I’m doing a modified version where after the initial list (list 1), there will either be a question cue, or a forget cue (indicating for them to forget the list that they just saw). If there is a forget cue, a list2 will be presented (either audio or visual) and they are tested on that.

I’ve managed to code a majority of the experiment, and it works locally on psychopy. However, I’ve run into an issue when testing it on pavlovia.

in some of the audio ‘reset’ trials (list1, forget cue, auditory list2), the sound files for list 2 will not play. instead, a clicking/crackling sound plays. There is no issue when playing the sound files for the initial list1, the issue is only in some reset trials.

all the sound files are .ogg (however, when i tested it with .wav the same issue also occured). Any help is greatly appreciated :slight_smile:

here is the url of the experiment on pavlovia: **https://run.pavlovia.org/Yilmazozy/auditoryactual

made on psychopy version v2025.1.1 :)**

auditoryactual.psyexp (208.1 KB)

Dear yilmazozy,

A couple things.

  1. You have a blank sound in your list 1 sound presentation, and no blank sound in your list2 sound presentation.
  2. I looking at the code there is nothing that stands out. Although to make things cleaner, you can use the skip function in the routine settings, instead of putting it as a code component. That way your data will be a bit cleaner in the output.
  3. Don’t use .ogg sounds files. AFAIK that’s a no-no ( https://docs.google.com/document/d/183xmwDgSbnJZHMGf3yWpieV9Bx8y7fOCm3QKkMOOXFQ/edit?tab=t.0#heading=h.niu1u15qj037 )

I would try:

a) Taking this and and create a new pavlovia “study” just to make sure the one online is indeed the same as this one.

b) adding some print/console log functions to make sure variables are being set properly and files are being grabbed.

c) Refer to the crib sheet PsychoPy Python to Javascript crib sheet to make sure there isn’t any other possible issues.

Issac

Hi Issac, thank you for your response.

i’ve now changed all the .ogg files back to .wav, and added a blank sound to list 2 as well.

i also tried adding the skip function in the routine settings, rather than adding it as a code, however, that led to some issues where the experiment would now be stuck on init on pavlovia.
i tried adding Forget_cue == “off” or visual_audio == “Visual” to the skip function, and when I tried that, the browser console would give an error saying Uncaught SyntaxError: missing ) in parenthetical auditoryactual.js:3723:67

when I removed the skip function as a whole both from code and the routine settings, the sound files seemed to work properly, however, i need a skip function to ensure that audio list2 only plays in the correct scenarios (when Forget_cue is on, and visual_audio is audio).

I would really appreciate further guidance on how to solve this issue :slight_smile:

By skip function, do you mean in Routine Settings? If so, then you can’t use an extended statement so you should set a variable in code, e.g.

skipAudio == True
if Forget_cue == 'on' and visual_audio == 'Audio':
     skipAudio == False

then put skipAudio in the Routine settings

Thank you for the response :slight_smile:

I tried adding that code in, and now the skip functions do work from the routine settings, however the click sound is still there for the audio list2 trials.

the first audio list2 trial that played seemed to work fine, however the second one on it played the clicking sound instead of the words :frowning:

i’ve uploaded the psyexp version after I changed some of the code. please let me know if you see anything else that is wrong, as it seems to work perfectly on psychopy, but only breaks on pavlovia.

thank you so much for all your help <3

https://run.pavlovia.org/Yilmazozy/auditoryactual

auditoryactual.psyexp (209.7 KB)