Tell me, please, the module for playing mp3-shnyh files, I will not find anything in Google.
3 answers
For example, The Snack Sound Toolkit
sound = Sound() sound.read('sound.mp3') sound.play() - from Tkinter import * sn = Sound () sn.read ('F: \ files \ 1te.mp3') sn.play () swears: NameError: name 'Sound' is not defined - Hdd out of range
- oneDo as in the documentation: import tkSnack tkSnack.initializeSnack (root) # Now you can use tkSnack commands and objects sn = tkSnack.Sound () sn.read ('F: \ files \ 1te.mp3') sn.play () - adv-tsk
|
You can see pygame . It is a set of libraries and is designed for writing computer games and multimedia applications.
|
What platform do you need? Under windows, it only works through ctypes:
from ctypes import * winmm = windll.winmm winmm.mciSendStringA('Open "test.mp3" Type MPEGVideo Alias theMP3',0,0,0) winmm.mciSendStringA('Play theMP3 Wait',0,0,0) Details Play MP3 Files with Python on Windows . There are no standard, reliably working cross-platform modules, especially for mp3. I tried pygame before - it seems like something is happening in the script, but there is no sound. There was another PyMedia module, it worked fine, but it seems that its development stopped at python-2.5.
|