scipy.io.wavfile gives “WavFileWarning: chunk not understood” error

前端 未结 4 1852
南笙
南笙 2021-01-02 04:21

I\'m trying to read a .wav file using scipy. I do this:

from scipy.io import wavfile

filename = \"myWavFile.wav\"
print \"Processing \" + filename

samples          


        
4条回答
  •  情书的邮戳
    2021-01-02 05:01

    I don't know anything about the WAV file format, but digging into the scipy code it looks like scipy isn't familiar with the chunk that's present towards the end of the file (chunk ID is bext, 2753632 bytes in, if that helps). That chunk is declared as 603 bytes long so it reads past it expecting another chunk ID 603 bytes later -- it doesn't find it (runs out of file) and falls over.

    Have you tried it on other WAV files successfully? How was this one generated?

提交回复
热议问题