简体   繁体   中英

Error: file does not start with RIFF id

This line of code is throwing an error:

import wave
...
wave.open('/path/to/wavfile/1a.wav', "rb")

The 1a.wav is in the NIST SPHERE format. I don't have much experience with the wav formats, but is there anyway I could transform it into RIFF format so that I can open it with the "wave" library?

Thank you in advance!

Use ffmpeg to convert. eg

ffmpeg -i test.wav -acodec pcm_s16le -ac 1 -ar 16000 out.wav

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM