【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"])
相关推荐
waterHBO8 天前
python + whisper 读取蓝牙耳机, 转为文字
python·whisper
代码骑士17 天前
基于whisper和ffmpeg语音转文本小程序
whisper
Luke Ewin1 个月前
一个基于OpenAI Whisper开发的音视频字幕文件生成工具
人工智能·whisper·音视频·语音识别·asr·语音转写·视频字幕生成
Encarta19931 个月前
【语音识别】vLLM 部署 Whisper 语音识别模型指南
人工智能·whisper·语音识别
JHC0000001 个月前
ubuntu 下调用系统麦克风,以及faster-whisper-medium 处理音频转写文本
ubuntu·whisper·音视频
西西弗Sisyphus1 个月前
whisper 语音识别
whisper·语音识别
JHC0000001 个月前
docker 中跑faster-whisper 教程(1050显卡)
docker·容器·whisper·语音识别
engchina1 个月前
vLLM 部署 openai whisper 模型实现语音转文字
人工智能·python·whisper
gs801401 个月前
Faster-Whisper —— 为语音识别加速的利器
人工智能·whisper·语音识别
charles_vaez2 个月前
开源模型应用落地-语音转文本-whisper模型-AIGC应用探索(五)
深度学习·whisper·aigc