| Reference | Downloads | Github

"Unknown resource" when using wav files online

URL of experiment:

Description of the problem: when try to run i have the next menssage
Unfortunately we encountered the following error:

  • when getting the value of resource: sounds/diferentes_ga_la.wav
  • unknown resource

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

This has cropped up a few times and it’s generally an issue with the fact that you’re using wav files for your audio. While those are popular on windows they aren’t supported by most internet browsers (due to lack of audio compression).

You’ll need to convert your audio files to a different format (e.g. ogg or mp3).

Thanks but When i use ogg show a wrong
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\”, line 193, in setSound
raise ValueError(msg + value)
ValueError: setSound: could not find a sound file named sounds/Iguales_co

My guess is that your sound is actually called sounds/Iguales_co.ogg not just sounds/Iguales_co (but Windows and Mac both hide the extension by default but it is still there)

yes you are correct

i put both formats but dont work :(,

Was there a solution for this. I am running into the same issue now. I am getting an Unknown resource for my audio wav files. When I try to load the file’s url directly, I do see get them in the browser.

Same problem. I’d really like to use uncompressed audio, but I keep getting

  • when getting the value of resource: html/resources/adaptive_sounds/lblock_trial1_diff8.wav
  • unknown resource

The file structure is right and works locally.

Willing to use mp3 if necessary, but I’m skeptical about the hypothesis that Chrome somehow doesn’t support wav files.

UPDATE: Now I’ve replaced the wav files with mp3, but it seems to do the same thing:

  • when getting the value of resource: html/resources/adaptive_sounds/lblock_trial1_diff8.mp3
  • unknown resource

…so I must be running into a problem for a different reason. Here is the project:

Fixed it using another answer – put files straight into the resource folder and used filenames without path. Wav files turned out to work fine.

1 Like