[英]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. 1a.wav 采用 NIST SPHERE 格式。 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?我对 wav 格式没有太多经验,但无论如何我可以将其转换为 RIFF 格式,以便我可以使用“wave”库打开它?
Thank you in advance!先感谢您!
Use ffmpeg to convert.使用 ffmpeg 进行转换。 eg例如
ffmpeg -i test.wav -acodec pcm_s16le -ac 1 -ar 16000 out.wav
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.