OpenAI之Whisper及时语音分析转文字
1.安装ffmpeg2.安装python3.11
3.安装whisper
pip install whisper https://img-blog.csdnimg.cn/direct/6c7b94281d8740c0bf1a14b286973b1b.png
conda环境安装whisper
conda install whisper https://img-blog.csdnimg.cn/direct/7f8298cd09b740ec864b4f5770e2563c.png
命令行安装openai-whisper
pip install openai-whisper https://img-blog.csdnimg.cn/direct/2fd73634d88e42ab88cc98659474fea3.png
https://img-blog.csdnimg.cn/direct/5e781b6515db4090ae78e870fb88dbed.png
设置环境变量
https://img-blog.csdnimg.cn/direct/61983d81c60645648ddd73732ed6bf7a.png
4.分析语音并输出(默认使用GPU盘算,假如没有安装CUDA,请使用CPU)
whisper ./test.m4a --model small --output_format srt --language Chinese https://img-blog.csdnimg.cn/direct/a35c5c05024146919bf93a7fcde99122.png
5.使用CPU盘算分析音频并输出
whisper ./test.m4a --model small --output_format srt --language Chinese --device cpu CPU分析音频会比GPU慢https://img-blog.csdnimg.cn/direct/d253c5d00ced4c42a8bc8be2d1ce639c.png
使用python脚本操纵whisper:
https://img-blog.csdnimg.cn/direct/494d07064e37440482534057d89b8b38.png
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。
页:
[1]