How to play back wav files in python
Arild Hansen
arildh at stud.cs.uit.no
Mon Nov 20 08:37:42 EST 2000
"Jason F. McBrayer" wrote:
> >>>>> "AH" == Arild Hansen <arildh at stud.cs.uit.no> writes:
>
> AH> I'm trying to do some simple audio manipulation (play wav files etc.). I
> AH> know about the Snack Toolkit, but is there any simpler way to do this? It
> AH> seems like an overkill to install a complete toolkit just for playing a wav
> AH> file in a small application. I use python 2.0c1 under Linux (RedHat).
>
> Python 2.0 has a linuxaudiodev module. You can also use PyESD.
>
> --
> +----------------------------------------------------------------+
> | Jason F. McBrayer jmcbray at carcosa.net |
> | The scalloped tatters of the King in Yellow must hide Yhtill |
> | forever. R.W. Chambers _The King in Yellow_ |
Hmm, the linux audiodev modules (or simply audiomodule) shipped with python 2.0
does not support playback of soundfiles. Or this is at least what I think, but I'm
not a sound guru. It seems like the audiodev modules only support manipulating raw
audiodata. What I need is a simple way
to play back some wav files and I need to do this in a non-graphical environment.
This means that I cannot use the Snack toolkit. I would also like to avoid having
to use a systemcall and a third-party soundprogram such as "play". I can very
well use C-code with a simple python wrapper around it but ultimately I would like
to avoid having to install any code.
In other words:
I need some simple code that I can include directly into a non-gui python
application to allow me to play back wav files.
I run python 2.0c1 on Linux Redhat 7.0. All help is welcomed,
Arild
More information about the Python-list
mailing list