Ask coding questions

← Back to all posts
Can you now add sound to python
stubaduble (13)

I do know that it was impossible, as of last year, however i had heard mos rumours that you may be able to play sound in the future..
is that now possible?
if it is, how do you do it?

Answered by ash15khng (693) [earned 5 cycles]
View Answer
Commentshotnewtop
ash15khng (693)

You need to be an explorer (choose it in your user settings) and you can use modules such as playsound to play sounds. Example:

from playsound import playsound
playsound("sound_file.wav")
# reference: https://realpython.com/playing-and-recording-sound-python/

Hope this helps.