I am trying to read a .wav file into an array so that I can then plot the array and do a FFT. I got the file open with the wave module and now I am struggling. I was advised
You have confused SciPy's WAV module with Python's. Remove import wave
, use import scipy.io.wavfile
, and call scipy.io.wavfile.read
.
Example:
>>> import scipy.io.wavfile
>>> FSample, samples = scipy.io.wavfile.read('myfile.wav')
SciPy's module does the job of converting from a byte string to numbers for you, unlike Python's module. See the linked docs for more details.