Audio sample cut off

My audio samples are cutting off when I randomize them in my paradigm. If I put the longest speech sample first (they are all within a second in length from one another) and don’t randomize the loop then they are not cut off. How can I fix this so I can randomize my speech samples without cutting them off?

I’m having the same issue.

1 Like


I just figured this out, I’ve been having this problem since forever. Here is what I did :
1- In the main exp setting make sure you choose pygame as audio libary.

2- do not put a duration for the onset ( leave it empty)
3- make sure you press the “hamming window” option in the settings of the audio
4- you can try to add a code component at the end of the routine, and write “NameOfSoundStimuli.stop()” in the End Routine section of the code.


I’ve just been looking into this and I can replicate the issue but only in our sounddevice audio engine. I would strongly recommend the PTB backend for the best audio timing.

If anyone finds it’s a problem in the PTB backend then please post a Minimal Working Example of the issue with info about your platform so we can try and debug it