We're back after a server migration that caused effbot.org to fall over a bit harder than expected. Expect some glitches.

The wave module

This module reads and writes Microsoft WAV audio files.

Example: Using the wave module
# File: wave-example-1.py

import wave

w = wave.open("samples/sample.wav", "r")

if w.getnchannels() == 1:
    print "mono,",
    print "stereo,",

print w.getsampwidth()*8, "bits,",
print w.getframerate(), "Hz sampling rate"

mono, 16 bits, 44100 Hz sampling rate