【尝试】基于openai-whisper进行语音转文字windows版本

1、下载ffmpeg

https://ffmpeg.org/download.html#build-windows

解压缩,并放置到指定位置

在环境变量中进行配置

运行试看是否成功

2、确认电脑CUDA版本

下载Nvidia app

https://www.nvidia.cn/software/nvidia-app/

安装完成后,在终端输入:

bash 复制代码
nvidia-smi

3、创建虚拟环境

(1)创建whisper虚拟环境

bash 复制代码
conda create -n whisper python=3.10 -y

(2)激活whisper环境

(3)安装pytorch等依赖

上pytorch官网:https://pytorch.org/get-started/locally/

bash 复制代码
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu126

(4)安装whisper

bash 复制代码
pip install -U openai-whisper -i https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple

安装完成后,创建一个whisper.py文件

python 复制代码
import whisper
model = whisper.load_model("base").to("cuda")  # 明确用 GPU
result = model.transcribe("your-audio-file.mp3")
print(result["text"])

运行,whisper.py文件

通过管理器,看GPU的运行情况

相关推荐
猫头虎3 天前
DeepSeek刚刚开源了一个3B的 OCR模型:什么是DeepSeek-OCR?单张A100-40G每天可以处理20万+页文档
人工智能·开源·whisper·prompt·aigc·ocr·gpu算力
星野云联AIoT技术洞察11 天前
2025年语音识别(ASR)与语音合成(TTS)技术趋势分析对比
whisper·语音识别·模型部署·tts·asr·嵌入式ai·naturalspeech3
共绩算力15 天前
OpenAI Whisper 语音识别模型:技术与应用全面分析
人工智能·whisper·语音识别·共绩算力
人工智能技术派18 天前
Whisper推理源码解读
人工智能·语言模型·whisper·语音识别
luoyayun36122 天前
PySide6调用OpenAI的Whisper模型进行语音ASR转写
whisper·pyside6·asr
学习是生活的调味剂22 天前
PEFT实战LoRA微调OpenAI Whisper 中文语音识别
人工智能·whisper·语音识别
qq7422349841 个月前
语音识别:PyAudio、SoundDevice、Vosk、openai-whisper、Argos-Translate、FunASR(Python)
python·whisper·语音识别
AI_Gump1 个月前
WhisperLiveKit上手及主观评测
人工智能·whisper
biubiubiu07061 个月前
faster-whisper + FastAPI安装
whisper
cwll20091 个月前
使用ffmpeg8.0的whisper模块语音识别
人工智能·whisper·语音识别