How to play a .wav sound?

Jesper Olsen jolsen at mailme.dk
Sun Jun 2 14:23:30 CEST 2002


I see that your question has already been answered.

An alternative solution is to install the snack toolkit:

http://www.speech.kth.se/snack/

and from python do this:

import tkSnack
tkSnack.initializeSnack(root)
sound=tkSnack.Sound(load="file.wav")
sound.play()

Cheers
Jesper




Bruno Bellamy <bellamy at neverland.net> wrote in message news:<ad8jo7$ohl$1 at wanadoo.fr>...
> I guess the question has probably been asked many times, sorry for 
> bothering...
> But I searched here and there, and I couldn't find how to do that, simply 
> play a .wav sound from a python program using Tkinter.
> 
> Moreover, I need to do that in a program that would run similarly under 
> Linux and Windows.
> 
> I saw there's a python module called wave, but it seems it can only read 
> .wav files. I coulnd't find a way to actually play the sound. Maybe it's 
> hidden somewhere?
> 
> If anybody can help me, that would be cool. :)



More information about the Python-list mailing list