PyGameimport pygame
pygame.init()
song = pygame.mixer.Sound('file.mp3')
clock = pygame.time.Clock()
song.play()
while True:
clock.tick(60)
pygame.quit()
Pygletimport pyglet
song = pyglet.media.load('file.mp3')
song.play()
pyglet.app.run()
GStreamerimport pygst
pygst.require('0.10')
import gst
import gobject
import os
mainloop = gobject.MainLoop()
pl = gst.element_factory_make("playbin", "player")
pl.set_property('uri','file://'+os.path.abspath('file.mp3'))
pl.set_state(gst.STATE_PLAYING)
mainloop.run()
Еще можно попробовать
PyMedia и
PyAudio