【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"])
相关推荐
andyguo19 小时前
语音识别的速度革命:从 Whisper 到 Whisper-CTranslate2,我经历了什么?
人工智能·学习·ai·whisper·语音识别·xcode·ai测评
番茄老夫子1 天前
OpenAI推出的语音识别系统Whisper简析
人工智能·whisper·语音识别
A-刘晨阳4 天前
语音转文字「本地化」新解!Whisper Web+cpolar实现零服务器部署与远程操作
服务器·前端·whisper
云空21 天前
《Whisper模型版本及下载链接》
whisper
苗杨25 天前
【Faster-Whisper】离线识别本地视频并生成字幕
python·whisper·音视频
云空1 个月前
《Whisper:OpenAI的先进语音识别模型》
人工智能·whisper·语音识别
企鹅侠客1 个月前
19|Whisper+ChatGPT:请AI代你听播客
人工智能·ai·chatgpt·whisper
落沐萧萧1 个月前
本地多语言 AI 字幕组:Whisper 实战教程
人工智能·whisper
码码哈哈爱分享1 个月前
[特殊字符] Whisper 模型介绍(OpenAI 语音识别系统)
人工智能·whisper·语音识别
Swift社区1 个月前
用 Whisper 打破沉默:AI 语音技术如何重塑无障碍沟通方式?
人工智能·whisper