hamiltron/py-simple-audio

mp3 support?

Closed this issue · 1 comments

I'm trying to make a terminal music player butcould not find out how to play a .mp3 file or .wav I understand if .mp3 is not supported I treid mp3_obj = sa.Mp3Object.from_mp3_file("SongSelected") and etc with no luck

@nonetrix, SimpleAudio doesn't support the decoding of formats like MP3. It can provide shortcuts for WAV files because Python already supports that in the standard library (and the data is already in a form that can be readily streamed to an audio device). Playing an MP3 requires converting the compressed audio data into a raw audio stream and you would need another library for that. For inspiration, you might look at (https://github.com/jiaaro/pydub).