file does not start with RIFF id(python)
生活随笔
收集整理的这篇文章主要介绍了
file does not start with RIFF id(python)
小编觉得挺不错的,现在分享给大家,帮大家做个参考.
在使用语音识别API的时候出现报错
file does not start with RIFF id
参考链接如下:
https://stackoverflow.com/questions/25672289/failed-to-open-file-file-wav-as-a-wav-due-to-file-does-not-start-with-riff-id
所以最终解决方案如下:
apt-get install ffmpeg
然后
ffmpeg -i out_test7.mp3 out_test7.wav
也就是从mp3文件转化为wav文件
然后这个wav文件就可以在python代码中被识别。
当然,会有新问题存在,就是识别不准的问题,但是起码报错不见了。
总结
以上是生活随笔为你收集整理的file does not start with RIFF id(python)的全部内容,希望文章能够帮你解决所遇到的问题。
- 上一篇: python使用百度语音识别API注意事
- 下一篇: python与C、C++混编的四种方式