Whisper音频转文字

Whisper音频转文字

1、下载ffmepg并设置到系统路径

2、 提取音频

ffmpeg -i input.mp4 -vn -c:a copy output.aac

3、Whisper安装:

https://github.com/openai/whisper

pip install -U whisper

4、模型下载

参考:#bilibili专栏# undefined - 哔哩哔哩专栏 https://www.bilibili.com/read/cv23285680/
模型加速下载方式,参考:whisper large-v3 模型文件下载链接 https://blog.csdn.net/Deng_Xian_Sheng/article/details/134486589

下载aria2:

https://aria2.github.io/

下载模型:

aria2c.exe -x 15 https://openaipublic.azureedge.net/main/whisper/models/345ae4da62f9b3d59415adc60127b97c714f32e89e936602e85993674d08dcb1/medium.pt

5、音频转文字

Whisper cnn1.acc --model medium --model_dir [模型文件所在文件夹] --language Chinese --devicce cuda

whisper.exe .\cnn1.aac --model medium --model_dir D:\lybdir\whisper_models --language

posted @ 2024-05-06 16:00  LiYanbin  阅读(18)  评论(0)    收藏  举报