Python Forum
sound with python - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: Homework (https://python-forum.io/forum-9.html)
+--- Thread: sound with python (/thread-6821.html)



sound with python - yop - Dec-09-2017

Hello everyone !

First of all, sorry for my english level, It's not my native language.

For my assignment I need to be able to play a WAV or a MP3 sound with Python without downloading a new module (can't use pygame,pymedia,...)
I have been working on that school project for several hours now and I can't find the solution to play those kind of file.

Does somebody knows how to do it or how I should do it ?

Thank's


RE: sound with python - j.crater - Dec-09-2017

Hello! Can you use another program that is already installed on your system to play the audio?


RE: sound with python - Larz60+ - Dec-09-2017

Since this is a homework assignment, You need to do some footwork.
But a strong hint, is that search engines were built for this purpose, and
perhaps a search for 'python package search' would be in order.


RE: sound with python - j.crater - Dec-09-2017

@Larz60+ He says he can't use any extra modules. And I agree about usefuleness of search engines. It took me less than a minute to find several potential solutions.


RE: sound with python - yop - Dec-09-2017

(Dec-09-2017, 06:33 PM)j.crater Wrote: Hello! Can you use another program that is already installed on your system to play the audio?

No I can't

(Dec-09-2017, 06:39 PM)j.crater Wrote: @Larz60+ He says he can't use any extra modules. And I agree about usefuleness of search engines. It took me less than a minute to find several potential solutions.

Can you just send one or 2 that you found ? I'm still looking but don't find the right way to to it without the extra modules.

Thank you for your help


RE: sound with python - j.crater - Dec-09-2017

https://stackoverflow.com/questions/36347786/how-to-play-mp3
https://stackoverflow.com/questions/307305/play-a-sound-with-python
https://stackoverflow.com/questions/20021457/playing-mp3-song-on-python

Here are many answers, some overlapping, some requiring additional modules, and some not. See if you find something useful here. I admit I don't even fully understand the requirement, i.e. how the sound should be played.


RE: sound with python - Larz60+ - Dec-09-2017

mp3: https://pypi.python.org/pypi?%3Aaction=search&term=mp3&submit=search
simple sound: https://pypi.python.org/pypi?%3Aaction=search&term=simple+sound&submit=search
wav: https://pypi.python.org/pypi?%3Aaction=search&term=WAV&submit=search