Playing WAV file with Python
Steven Howe
howe.steven at gmail.com
Thu Mar 3 13:21:09 EST 2011
On 03/03/2011 01:32 AM, VGNU Linux wrote:
>
>
> On Thu, Mar 3, 2011 at 1:54 PM, Chris Rebert <clp2 at rebertia.com
> <mailto:clp2 at rebertia.com>> wrote:
>
> On Thu, Mar 3, 2011 at 12:17 AM, VGNU Linux <vgnulinux at gmail.com
> <mailto:vgnulinux at gmail.com>> wrote:
> > On Thu, Mar 3, 2011 at 1:26 PM, Chris Rebert <clp2 at rebertia.com
> <mailto:clp2 at rebertia.com>> wrote:
> >> On Tue, Mar 1, 2011 at 11:47 PM, VGNU Linux
> <vgnulinux at gmail.com <mailto:vgnulinux at gmail.com>> wrote:
> >> > How can I play WAV file in python without OS(like
> Linux/Windows/MAC) on
> >> > a
> >> > device ?
> >> > On Google I found lot of different solution but related to
> OS's like
> >> > winsound, ossaudiodev etc which are not useful.
> >>
> >> Do you mean you want your code to be cross-platform, or what?
> >> "Without OS" is rather vague. What are you trying to accomplish?
> >
> > I will be using WAVE on embedded devices, and the device will
> not have any
> > OS's. So I am looking for modules which can play WAVE sound without
> > underlying OS.
>
> What implementation of Python are you going to use? I don't personally
> know of any that can run on the "bare metal" without an OS.
>
>
> I am planning to use python-on-a-chip(PyMite) which can be run without
> an OS therefore I am looking for a module/library which can play sound
> files.
>
>
> Cheers,
> Chris
>
>
As you wont be calling the OS via subprocess, which is about the only
way to fire up some connect to the sound system, you probably should be
talking about the pymite issues on the pymite group over at google about
drivers (i.e. sound drivers), what data types (wav, mp3, ogg) they will
take and how to pass data to a driver. The
nbed.AnalogOut looks intriguing. Perhaps you can spool a wav file to a port, attach the
analog out to an external amplifier.
http://groups.google.com/group/python-on-a-chip?pli=1
Also, perhaps you should be looking atArduino and audio projects.
http://www.ladyada.net/make/waveshield/
Good luck,
Steven Howe
More information about the Python-list
mailing list