Play Sound feature in Python

Play Sound feature in python

So you may know how Replit does not directly support playing sound in python. I know that there is a way to do it, but it does not work at all for me. I think that Replit should make a package for playing sound. Maybe you could type from replit import audio and the command to activate it should be audio.play([whatever file here]) to change the volume, you could type audio.volume([whatever volume percentage here])

An example program to play a file named sound.mp3 :

from replit import audio

audio.volume(100)
audio.play(‘sound.mp3’)

This would be great if Replit could add this!

1 Like