【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"])
相关推荐
云空14 天前
《Whisper模型版本及下载链接》
whisper
苗杨17 天前
【Faster-Whisper】离线识别本地视频并生成字幕
python·whisper·音视频
云空20 天前
《Whisper:OpenAI的先进语音识别模型》
人工智能·whisper·语音识别
企鹅侠客21 天前
19|Whisper+ChatGPT:请AI代你听播客
人工智能·ai·chatgpt·whisper
落沐萧萧1 个月前
本地多语言 AI 字幕组:Whisper 实战教程
人工智能·whisper
码码哈哈爱分享1 个月前
[特殊字符] Whisper 模型介绍(OpenAI 语音识别系统)
人工智能·whisper·语音识别
Swift社区1 个月前
用 Whisper 打破沉默:AI 语音技术如何重塑无障碍沟通方式?
人工智能·whisper
dgiij1 个月前
openai-whisper-asr-webservice接入dify
docker·ai·node.js·whisper
allnlei1 个月前
whisper相关的开源项目 (asr)
whisper·asr
phper82 个月前
开源音视频转文字工具:基于 Vosk 和 Whisper 的多语言语音识别项目
whisper·音视频·语音识别