Python has not supported sound for quite a while now.
Are the developers planning to add sound?
When will this happen?
Will this even happen?
@Coder2195Text if you want an example I'm working on a chatroom project. when you send a message it makes a sound. It's in node.js https://repl.it/@YeetsaJr/TSP-Chatroom#index.js
If you want sound visit the repl docs site: https://docs.repl.it/repls/audio it gives a full in-depth explanation of how to add sound.
Hope this helps!
You've already received two good answers, though I'd just like to clarify: Python does not have a built-in sound library, and I doubt they will add one due to the issues with compatibility. Python has third-party libraries made by the community to support sound, some dedicated (such as
simpleaudio) which you can install from PyPi. Replit, however, runs your code remotely on a container in their servers, so any sound produced would not get to you, in the browser, if it was even produced. To combat this, Replit has created an API for playing sound, which allows you to bypass this and get Replit to play the sound directly in the browser. You can do this quite easily with the
replit module; see Bookie0's answer.
There's already sound in Python, use repl.it audio. Check this out for the full blog.
You'll probably need to be an explorer for that. To be an explorer, go to account:
And scroll down to roles and check 'explorer':
from replit import audio # imports library # replace audio_file.mp3 with the actual file # you can use .mp3, .wav, and .aiff source = audio.play_file("audio_file.mp3")
Good luck and have fun! :D