raw audio input on Windows

Noah noah at noah.org
Tue Jan 27 19:50:53 CET 2004


I need to record raw 8-bit mono audio from a generic sound card on MS-Windows.
I need to do something like this:
    sound_device = open audio device
    buffer = sound_device.read ('1 second, 8 bit, mono, 8 KHz')
    process buffer

If possible I would also like to experiment with sampling the raw audio 
in my own loop. For example, something like this:
    open audio device
    while 1:
        read byte from audio device
        process byte
(I realize that Python is probably not ideal for this sort of DSP, but
I figure that it should handle 8KHz mono with no problem).

Does anyone have any experience with recording sound using the WIN32 API?
Can you point me in the right direction? 

The OSS stuff in Python looks ideal, but unfortunately that's
a UNIX only thing :-(
    http://www.python.org/doc/current/lib/module-ossaudiodev.html

Any hints are appreciated.

Yours,
Noah



More information about the Python-list mailing list