Ask coding questions

← Back to all posts
2
Play sound in a repl with Python
RojerGS (3)

Hello everyone,

In light of the new challenge I was going to create something with Python (and pygame) and it would involve playing sounds, but turns out I cannot use the pygame.mixer module. Is it because I am a n00b?
Either way, is there any (relatively simple) way of playing audio in a Python repl?

Thanks!

Answered by 21natzil (692) [earned 5 cycles]
View Answer
Commentshotnewtop
2
21natzil (692)

Sorry, but repl.it does not support sound at the moment. Sorry for the inconvenience. This feature is planned and will be added in time.

2
RojerGS (3)

@21natzil Ok, then there is something I am missing; this music box has sound when I play it! But you said that repl.it does not support sound, so what is the distinction here?

2
21natzil (692)

@RojerGS When creating a website on repl.it, you're only restricted by your browser. When working with Python / Pygame repls, sound is not supported, sorry for the confusion.