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

前端 未结 4 1812
南笙
南笙 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 04:53

    The files is no longer available (not surprising after 9 months!), but for future reference the most likely cause is that it had extra metadata which scipy can't parse.

    In my case, it was default metadata (copyright, track name etc) which was added by Audacity- you can open the file in Audacity and use File ... Open Metadata Editor to see it. Then use the 'Clear' button to strip it, and try again.

    The current version of scipy supports the following RIFF chunks - 'fmt', 'fact', 'data' and 'LIST'. The Wikipedia page on RIFF has a bit more detail on how a WAV file is structured, for example yours might have included an unsupported-but-popular INFO chunk

提交回复
热议问题