http://docs.python.org/2/library/wave.html - stdlib for reading wav files. A simple example of using it.
Off the top of my head this is how I'd do it (pseudocode)
fmts = (None, "=B", "=h", None, "=l")
fmt = fmts[sampwidth]
dcs = (None, 128, 0, None, 0)
dc = dcs[sampwidth]
image_width = 600
image_height = 300
chunk_size = len(wavefile.getnframes()) / image_width
def unpacker(frame):
return struct.unpack(fmt, frame)[0]
for i in range(chunk_size):
value = math.avg([unpacker(x) for x in wavefile.read_frames(chunk_size)])
# and then use value * 300 to figure out the vertical position for the pixel.
There are a variety of libraries you could use instead of writing an image, svg for example.