【whisper】使用whisper实现语音转文字

whisper需要ffmpeg支持

官网下载ffmpeg

cpp 复制代码
https://www.gyan.dev/ffmpeg/builds/

下载完毕后解压放到合适的位置

添加环境变量

在cmd中输入以下

cpp 复制代码
ffmpeg -version

出现下面结果代表成功

安装whisper

cpp 复制代码
pip install openai-whisper

在vscode中运行

测试代码

cpp 复制代码
import whisper

if __name__ == '__main__':
    # 加载模型
    model = whisper.load_model("large")
    audio_path = 'Asset2021_10_23\\test_audio_2024_09_01.aac'
    result = model.transcribe(audio_path, fp16=True, language="Chinese")
    print(result["text"])
相关推荐
weixin_4462608510 天前
本地WSL部署接入 whisper + ollama qwen3:14b 总结字幕校对增强版
whisper
青山师11 天前
Docker部署whisper转写模型
docker·容器·whisper
Micheal_Dad1 个月前
【尝试】基于openai-whisper进行语音转文字windows版本
whisper
Micheal_Dad1 个月前
【尝试】本地部署openai-whisper,通过 http请求识别
whisper
andyguo1 个月前
语音识别的速度革命:从 Whisper 到 Whisper-CTranslate2,我经历了什么?
人工智能·学习·ai·whisper·语音识别·xcode·ai测评
番茄老夫子1 个月前
OpenAI推出的语音识别系统Whisper简析
人工智能·whisper·语音识别
A-刘晨阳1 个月前
语音转文字「本地化」新解!Whisper Web+cpolar实现零服务器部署与远程操作
服务器·前端·whisper
云空2 个月前
《Whisper模型版本及下载链接》
whisper
苗杨2 个月前
【Faster-Whisper】离线识别本地视频并生成字幕
python·whisper·音视频
云空2 个月前
《Whisper:OpenAI的先进语音识别模型》
人工智能·whisper·语音识别