Audio files playing in Builder but not online

URL of experiment: https://run.pavlovia.org/mc1585/intelligibility_testing/?__pilotToken=1f0e3dad99908345f7439f8ffabdffc4&__oauthToken=057f22696a0bd879884cc2cd5fc24a869f194d188614c81cc71dbbe22f2d8626

Description of the problem:
Hello, I am new to PsychoPy and therefore in need of some help. I have created a simple experiment, in which the participant will hear a set of words (presented as individual words from short .wav audiofiles), and will have to type what they hear in a response box. I have created a loop and also defined the files as playing randomly. The experiment works well on my computer, with good sound quality of the audiofiles. When I uploaded the experiment to pavlovia, the pilot version runs, but with only a beep sound instead of the audiofile. There is no error message at all, neither locally in psychopy builder, nor online, such that I am not sure what the source of the problem is.
Any advice would be greatly appreciated!

Might be due to WAV files not being very well-supported by browsers. You could try converting them to MP3. See this tutorial: https://staging.psychopy.org/temp/html/online/mediaFormats.html

NB - The page above is a prototype of improvements to our current documentation, so it will be moved to psychopy.org once it’s approved

Thank you for the suggestion.
I converted a few files to MP3 and tried running the experiment again. This time, it would not even run locally in psychopy on my computer, and I received the following error:
“RuntimeError: Error opening ‘ONFP2_3_post.mp3’: File contains data in an unknown format.”
Do you have any suggestion what to do in this case?
Thank you again!

That makes sense, PsychoPy doesn’t yet support MP3. Does it work online though?

Thank you for the prompt reply!
Unfortunately, it does not work online with the mp3 files. This time I do get errors when running online, as follows:

"Unfortunately we encountered the following error:

when importing condition: ON_FP2_ind_files_post/ONFP2_word_list_POST.xlsx
when getting the value of resource: ON_FP2_ind_files_post/ONFP2_word_list_POST.xlsx
unknown resource

Try to run the experiment again. If the error persists, contact the experiment designer."

I also hear the same beep/clicking noise as when using the .wav files.
Is there anything else I need to adjust/change?
Thank you!

As an update, I tried again with mp3 files instead of .wav files, and when I played it online, I heard the same beep/clicking noise, with no error message. Is there anything else that I can try to fix this issue?
Thank you again!

Could you share your experiment repo? My username is tpronk

Thank you, I just shared you on my repo.
URL: https://gitlab.pavlovia.org/mc1585/intelligibility_experiment
As an update, I’ve switched the audio files back to .wav files because after another attempt at running the experiment, the mp3 version would not even bring up the project.
Any advice would be appreciated!

When I try to open the psyexp file in builder, I get an exception :). Guess it might be a good idea to pull in the PsychoPy experts for that one. @TParsons, @jon, @Becca, might you know what’s up here? Perhaps useful to add that the experiment contains a text stimulus with Hebrew in it.

Looks like it’s hitting an error when it tries to draw the loops as there’s an attribute missing from one loop. I can’t access the file on Pavlovia, could you share the .psyexp directly? Then I’ll have a look at what’s going wrong with that specific loop.

1 Like

Thank you!
I tried running the experiment locally, and it seemed to work on my computer. I wonder if the problem I am having with pushing it to Pavlovia (and having the audio files play) is related to these errors.
I have attached the .psyexp file as well as shared the experiment repo online.
Any advice is much appreciated!
ONFP2_intell.psyexp (17.9 KB)

Opening this locally, it looks like there’s a loop (ONFP2_audio) with no routines in it - I’m not sure how to even get to that state, as removing the only routine in a loop deletes the loop usually, but that’s almost certainly why it’s crashing! If you can open it in Builder view, does it run when you delete the empty loop?

Thank you, that solved the problem - it now works online! I deleted the extra loop, and now the sound files play as they should, both locally and online.
Two other related questions, if possible. First, I tried downloading the results of the pilot experiment (“download results” button on the experiment page), but it only contained results from previous piloting trials, not the most current ones. Where would I find the current pilot results?
Second, the experiment (and results) contain Hebrew characters. On the results .csv files, the characters do not come up as Hebrew, rather as other, non-letter characters. Is there a way to transform these characters back into Hebrew?
Thank you again!

I think @thomas_pronk or @sotiri are better placed to help you with downloading results, but with regard to characters: Are they appearing as squares, or a weird sequence of numbers like U+05A3? If so then that’ll be to do with the fonts you have installed on your machine, the data is still there! Excel/whatever you are viewing them in just can’t render the characters as there’s no glyph for them in whatever font you’re using.

If you download and install any of these fonts from Google:

and then in Excel set the cells with Hebrew text to be in that font, it should be readable :slight_smile:

Thank you! Will give this a try!

Two possible explanations:

  • Maybe they are stored in files instead of the database? Then they’d be in your repo, folder data/.
  • Maybe the experiment wasn’t completed? You’ll know it’s completed if you see the message “Thank you for your patience”

Thank you for the suggestions!
The experiment works great in Builder and also online (all audio files are working, and the experiment is completed until the ‘thank you’ message), but the piloting still does not seem to save any of the result files in the repo (data folder). The data folder contains only the result files that were completed locally, from Builder, not the .csv files from the online piloting. Any further suggestions would be appreciated!
[https://gitlab.pavlovia.org/mc1585/intelligibility_single_word_participant2]
I do not know if this is relevant, but I am also having difficulty syncing the project from Builder to Pavlovia. When I made a small change to the experiment in Builder, and attempted to sync, it created a new project. Is this related? Is there anything further I need to do to allow syncing and result saving?
Thank you in advance!

I do notice there is a difference in your exported JS between the one on gitlab and the one on run.pavlovia.org; the former has 800 lines, while the latter has 782. What might help to clear this up is the following. The steps below are for creating a new project on Pavlovia:

  1. In the root folder of your experiment on your hard drive, delete the folder “.git”
  2. Then sync again with Pavlovia, it will ask you whether you’d like to make a new project. Do so

Also, about WAV files. They aren’t very well supported across browsers. I recommend using MP3 instead. See this doc (will later move to psychopy.org). Media formats suitable for online studies — PsychoPy v2020.2

Thank you! I will try your suggestion for creating a new project on Pavlovia.
Thank you as well for the suggestion for using MP3 files instead of .wav.

1 Like

Good luck getting your study on the road!