Replit Audio not Functioning

Question:
Why is from replit import audio module not working?
Repl link:

from replit import audio

audio.play_file('Le_Sombre.wav')

Hello,
try opening the hidden file .replit (click three dots then show hidden files),
and adding this near the top:

audio = true

Then, there will be a headphones checkbox in your output that enables audio.
If it still doesn’t work, it might be because of the browser you are using (or the docs are outdated).

https://docs.replit.com/tutorials/replit/playing-audio-replit

4 Likes

Hi @AMOGHSANGINENI !
Replit audio is known to be buggy and unreliable. It can work fine sometimes, but fail to play sound at other times.

5 Likes

For example, Repl Audio only works inside of the editor when you’re signed in and only with the right browser permissions and accepting the “we hear audio!” popup. Also, some files might not work out-of-the-box. I’d recommend not using audio for CLI Python.

5 Likes