How do I play sounds with no latency?

How do I play sounds with no latency in python? I use replit audio to play sounds as it is the only working solution I have found, but nothing consistently plays on cue.

Repl link:

source = audio.play_file("sounds/gameboy_start.mp3")

Could you elaborate on this? Do you mean you want it to play continuously, or play when you want it? If it’s the latter, try removing the assignment to the variable, and just play it.

1 Like

i want it to play when i want it such as spund effects

removing the source variable did not work, is there another way to do this such as importing something

Does the sound even play, in this repl?
Does this not work?


Everything looks correct, could you go your .replit file and make sure that the line audio = true exists?


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.