Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
12 lines (10 sloc) 254 Bytes
import wave, struct, pdb
f = wave.open('snippet.wav', 'r')
print '[',
length = f.getnframes()
rate = f.getframerate()
for i in xrange(0, length):
wd = f.readframes(1)
d1 = struct.unpack('<h', wd[:2])
print int(d1[0]), ',',
print ']'