【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"])
相关推荐
星野云联AIoT技术洞察6 天前
2025年语音识别(ASR)与语音合成(TTS)技术趋势分析对比
whisper·语音识别·模型部署·tts·asr·嵌入式ai·naturalspeech3
共绩算力11 天前
OpenAI Whisper 语音识别模型:技术与应用全面分析
人工智能·whisper·语音识别·共绩算力
人工智能技术派13 天前
Whisper推理源码解读
人工智能·语言模型·whisper·语音识别
luoyayun36117 天前
PySide6调用OpenAI的Whisper模型进行语音ASR转写
whisper·pyside6·asr
学习是生活的调味剂17 天前
PEFT实战LoRA微调OpenAI Whisper 中文语音识别
人工智能·whisper·语音识别
qq74223498422 天前
语音识别:PyAudio、SoundDevice、Vosk、openai-whisper、Argos-Translate、FunASR(Python)
python·whisper·语音识别
AI_Gump23 天前
WhisperLiveKit上手及主观评测
人工智能·whisper
biubiubiu070623 天前
faster-whisper + FastAPI安装
whisper
cwll200923 天前
使用ffmpeg8.0的whisper模块语音识别
人工智能·whisper·语音识别
小小ken23 天前
whisper-large-v3部署详细步骤,包括cpu和gpu方式,跟着做一次成功
ffmpeg·whisper·语音识别