fp = wave.open('./music.wav', 'rb')
assert fp.getnchannels() == 1, 'Assumed 1 channel'
assert fp.getsampwidth() == 2, 'Assuming int16 data'
numpy.frombuffer(fp.getnframes(fp.readframes()), 'i2')
Trying to Use FFT to Analyze Audio Signal in Python