【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"])
相关推荐
蓝纹绿茶5 天前
音转文模型对比FunASR与Faster_whisper
whisper
SmartJavaAI5 天前
Java调用Whisper和Vosk语音识别(ASR)模型,实现高效实时语音识别(附源码)
java·人工智能·whisper·语音识别
菜鸟的日志8 天前
【音频字幕】构建一个离线视频字幕生成系统:使用 WhisperX 和 Faster-Whisper 的 Python 实现
python·whisper·音视频
AidLux13 天前
犀牛派A1上使用Faster Whisper完成音频转文字
人工智能·语言模型·whisper·音视频
ZHOU_WUYI14 天前
whisper-large-v3 模型
llm·whisper
llrraa201023 天前
python whisper生成字幕
开发语言·python·whisper
weixin_446260851 个月前
本地WSL部署接入 whisper + ollama qwen3:14b 总结字幕校对增强版
whisper
青山师1 个月前
Docker部署whisper转写模型
docker·容器·whisper
Micheal_Dad2 个月前
【尝试】基于openai-whisper进行语音转文字windows版本
whisper
Micheal_Dad2 个月前
【尝试】本地部署openai-whisper,通过 http请求识别
whisper