【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"])
相关推荐
数据饕餮7 天前
Faster-Whisper命令和意图识别程序设计调优:上下文感知和领域词汇增强
whisper
落淼喵_G8 天前
ubuntu部署whisper+speaker_large+qwen【一】
ubuntu·whisper
兔兔爱学习兔兔爱学习9 天前
浏览器端实时语音采集 + WebSocket 传输 + 后端 Whisper + GPT 翻译 + 实时字幕返回
gpt·websocket·whisper
兔兔爱学习兔兔爱学习9 天前
一个可本地运行的实时字幕翻译 Demo(Whisper + GPT + Streamlit),可以边说边出中英文字幕
gpt·whisper
数据饕餮10 天前
Faster-Whisper唤醒词检测程序设计实战1
whisper
说话的鲸鱼10 天前
‌Whisper模型在RTranslator中的实时语音识别优化:动态资源分配与负载均衡
whisper·负载均衡·语音识别
猫头虎18 天前
DeepSeek刚刚开源了一个3B的 OCR模型:什么是DeepSeek-OCR?单张A100-40G每天可以处理20万+页文档
人工智能·开源·whisper·prompt·aigc·ocr·gpu算力
星野云联AIoT技术洞察1 个月前
2025年语音识别(ASR)与语音合成(TTS)技术趋势分析对比
whisper·语音识别·模型部署·tts·asr·嵌入式ai·naturalspeech3
共绩算力1 个月前
OpenAI Whisper 语音识别模型:技术与应用全面分析
人工智能·whisper·语音识别·共绩算力
人工智能技术派1 个月前
Whisper推理源码解读
人工智能·语言模型·whisper·语音识别