psychopy.org | Reference | Downloads | Github

Only some audio files play

URL of experiment:

Description of the problem:
Hi there. I’m building a conditioning experiment with noise stimuli (3 noises in total: scratch, scream, and no sound [the no sound is a sound file itself]) using Psychopy. When I run the task, one of the noises (the scream) works while the other two cause the experiment to crash. They are all 1 second in duration .wav files and I have specified the files in the corresponding excel spreadsheet under the name ‘soundcontsound.’ In the sound component on the Builder view, I have specified the duration = 1.0s, the sound as $soundcontsound, and selected ‘set every repeat.’ The order of trials are as follows: a fixation toggled from 1000-1500ms > a visual cue for 2000ms > sound stimulus for 1000ms. At first I thought the issue was related to lag of some kind, but I ran the task in which it played two of scream sounds in a row but then then crashed in the next scratch condition trial. Any insight from the forum on how to resolve this matter would be greatly appreciated. Thanks in advance!

Try removing the duration from the sound component.

Thank you for your response. I’ve tried this but the same two sound files that caused the program to crash before are still causing the program to crash, unfortunately.

I use .mp3 for sound files online.

Thank you for your input! So I actually solved the problem by changing the sampling rate of the .wav files that didn’t work (using Audacity) to 44100kHz. It runs great now!

Ah yes – I know that error. All sounds in an experiment need to be at the same sampling rate.

1 Like