Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Playing MP3 files with Python

I'm trying to write my own media player (like Foobar), and I'm having trouble tracking down a Python library that'll play MP3s. I know Pymedia does mp3s, but it looks outdated - the latest installer is for Python version 2.4, and I'm using 2.6. I've never had much success with Pygame, and Pyglet doesn't look like it has too much in the way of documentation. Are there any other alternatives?

like image 993
Enrico Tuvera Jr Avatar asked Nov 26 '09 15:11

Enrico Tuvera Jr


People also ask

Can Python read mp3 files?

This works for many formats, such as WAV, FLAC, and OGG. However, MP3 is not supported.

Can Python play audio files?

It is an easy task to play sound using Python script, because this language contains many modules to use script in order to to play or record sound. By using these modules, you can play audio files such as mp3, wav, and other audio file types.

How do I listen to an audio file in Python?

The play() method is used to play the audio files.


1 Answers

There is http://pyglet.org/ and also have you tried http://code.google.com/p/mp3play/? It's also available from PyPi (http://pypi.python.org/pypi/mp3play/) However, I think mp3play is Win32 only for now.

Looking at the updates, there were commits within last couple of months.

like image 67
Terry Felkrow Avatar answered Sep 21 '22 19:09

Terry Felkrow