Fixing audio visual sync in PsychoPy

I am currently preparing a Go/No-Go experiment in PsychoPy for a class project. The task itself is functioning correctly, but I am experiencing difficulties adding audio stimuli in a way that aligns properly with the visual stimuli.

Specifically, when I add the sound component, the audio either plays before the trial begins or causes blank screens to appear between the letters. I have tried using loops and Excel files to control the timing, but I still cannot achieve the correct presentation order.

If possible, could you show me how to correctly add the sounds within the experiment routine?

In PsychoPy, your problem is almost always related to timing. Sounds and visuals run on different clocks. If the sound part isn’t anchored correctly, it either goes off too soon or stops the frame updates. To fix it quickly, set the sound to start “at routine start” and make sure the stop condition is either “end of routine” or “after the sound duration.”

Also, don’t use loops to trigger sounds unless you have to. Instead, put the sound in the same routine as the visual stimulus and use the trial handler to feed in your Excel parameters. This way, the sound and picture will line up perfectly without any blank screens.

Check your frame rate settings and make sure “play back asynchronously” isn’t turned on if you still see gaps. Syncing to the screen refresh is very important for Go/No-Go timing.