psychopy.org | Reference | Downloads | Github

Using audio files online, error: unknown resource


#1

Hello everyone,

I’ve tried using audio files online, but when I start the experiment it says “error: unkown resource”. It works on the offline version though, and the audio file is uploaded onto my pavlovia account, so I don’t know what the problem is. I’m using the beta version 13, so audio files should work now, but I guess I get something wrong.
I’d be really grateful if someone could help me with this.

Thanks, Sabrina


#2

It looks like you’re trying to run your html file on your local machine, rather than pushing it to pavlovia?


#3

Dear Jon,

I did push the html file to pavlovia but when I use the online link for my experiment, this error occurs.


#4

The thing I’m struggling with is that it’s looking for your images on the C: drive and (naturally) doesn’t find them there when running in a browser. Did you maybe specify your sounds as the full c:\Users… rather than just using the relative file location?

(by the way, for an online experiment, it’s a great idea to provide a link to the study for us to check it)


#5

Dear Jon,
thanks for your reply. Yes I did use the full C:\User path but only because the relative path didn’t work and I though that might be the problem. However, I’ve tried it again with the relative path, and the same error occurs just displaying the relative path.

Here is the link to my experiment:

https://pavlovia.org/run/sabrinaa_kl/audio_test_short/html/

in fact, it is not the real experiment just a test to see how uploading audio files work. It is simply one sound routine containing the audio file (Audio01) which was defined with the relative path in the sound component. I created this experiment, checked if it worked offline (which it did), then I created an html file, pushed all the files to pavlovia and then started the experiment by clicking the online experiment running button. So, the above link opens and the error occurs as soon as I’ve entered the participant number.
I hope this information might make it easier for you to help me.

And thanks again for taking the time to help me, I really appreciate it.


#6

I’m also having exactly the same error.

LINK:
https://pavlovia.org/run/Jordan_Gallant/thesis-typing-task-2-0/html/

ERROR:
image

Everything is pushed to pavlovia. I’ve also tried adding and removing the .wav from the end of the path. That hasn’t had any effect. Should I be using a different audio file format?

Please advise.


#7

Ah, Ok, by sharing the link the problem is now more clear - you’ve called the audio file audio_01 in your experiment, but the file is actually audio_01.wav (windows hides the extension so you probably forgot it was there).

Use the relative path but you do need to provide the full name including extension (so audio_01.wav in this case)


#8

@unagi_pie that error is the same reason - you need .wav to be included. Are you sure you got the same when it was present?


#9

I have taken your advice and now it successfully starts the experiment, thanks a lot! :slight_smile:

However, there is a new problem. My audio file doesn’t sound the way it does offline, in fact, it sounds very weird. I have the link here again, probably you could check it and maybe you have an idea what the problem is here? Just in case it’s important, the sample file rate is 44100 Hz.

https://pavlovia.org/run/sabrinaa_kl/audio_test_short/html/

Thanks, I’d be really grateful…again :slight_smile:


#10

@jon I have the same issue with the .wav added to the end of the file. In the version above I was actually testing if removing it would solve the problem. Here is the error message with the .wav added:

I’m not sure if this is related. But, the experiment in question is not showing up when I search for the experiment on the pavlovia website, but it does appear on my dashboard. I’ve double checked the make sure the resource files are uploaded to gitlab and that they are named correctly. Any ideas?

LINK:
https://pavlovia.org/run/Jordan_Gallant/thesis-typing-task-2-0/html/


#11

@jon

Interesting development. So, I changed direction of the slashes in the conditions file, from forward slashes “/” to back slashes “”, because I noticed that in the resources file in gitlab back slashes were used. The file now plays, but it seems to get stuck playing the audio indefinitely with a noisy echo, as though it was spoken through a long steel tube (it’s kind of difficult to describe). I’ve included a link. It sounds very odd. Any ideas here?

LINK:
https://pavlovia.org/run/Jordan_Gallant/thesis-typing-task-2-0/html/

Jordan


#12

Ah OK, yes. You must use / not \ and I guess that might be affecting @Sabrina_Klaffenbock too. Windows uses \ (but “understands” / as well). Mac, Linux and all internet browsers only “understand” /(note that URLs always use / ). We’ll need to add a check for this because I imagine it’s going to catch many more users yet! Thanks

For the strange noise, that looks like a genuine bug at our end. My guess is that the sound is being started repeatedly (on every frame) rather than just once. I’ll look into it immediately.

cheers,
Jon


#13

Ah, I think the issue is that we’re only searching the Description, not the project Name. So if you search for “thesis” you won’t find it, but if you search for “Version of an” then you will! I’ll get that fixed so the name is searched as well :slight_smile: