| Reference | Downloads | Github

Audio Files not playing

I’m trying to play an audiofile on psyhcopy. It runs the experiment, but instead of playing the audiofile it makes a very loud beeeeping sound. The audiofile is in wav format, and I am sure that the file path is correct because if it isn’t it did give me an error before.

Any idea what could be causing this?
My entire experiment is based on these audio files, so it’s really disappointing to see this not work.

Thank you so much in advance!

No, because you haven’t given us a precise description of what you are doing. Please describe your situation fully.

Thanks for the quick reply Michael.

Please refer to the image attached.

So my f3 routine is just an audio file that is supposed to play music, and then the next routine is where the person has to rate the music excerpt.
There are several of these routines.

When I run the experiment, the first 3-4 music excerpts play, but after some time, the experiment I guess just crashes, because it doesn’t display anything after some random point. Every time i run the experiment, it does the same thing but not at any specific location, it stops randomly at different places everytime i run it.

Any idea what may be causing this?
Could it be because the audio files are too long? around 60 s e

Thank you!

Basically, the experiment stops running after a certain point.
I don’t understand why :confused:

  • List item

Indeed it could be the size of the audio files (although I have to say you need to clarify some points such as if it crashes during the audio routine or before/after, what you mean by “crashes”, any error you get e.t.c.).

I do not have a solution to your problem just a suggestion on how I would have approached/debuged such problem.

  1. Create another copy of your experiment.
  2. Remove the audio files and replace them with simple tones
  3. if they all work (try a few times) then go to the first routine that contains a tone and replace it with the first audio file of yours.
  4. If this plays fine i.e. first routine with your own audio file plus all the other tones, then replace your first audio file with your second audio file. Go this way to ensure that all of your audio files are playable.You see where this leads now. Do this with all the audio files.
  5. If they all work then put in your first audio routine your first audio file and in the second audio routine the second audio file. Try again.
  6. Start adding gradually audio files and see how it goes. Also, you may want to play with the duration of the audio files.

This way you may (or may not) find where the problem may be.

The length of an audio file in itself is not an issue for PsychoPy. At least the 60 seconds you mentioned. We presented audio files that were about 44 minutes in length without problems.

@frank.papenmeier you are right, psychopy does have issues with size of stimuli.

But hardware does and we do not have info on the OP’s machine.

I should have phrased it better.