赞
踩
conda create -n whisper python==3.9 # 激活环境 conda activate whisper
pip install openai-whisper conda install ffmpeg pip install setuptools-rust
命令行:
whisper 录音文件地址 --model base
python代码运行:
- import whisper
-
- model = whisper.load_model("base")
- audio = "./audio/output.mp3"
- result = model.transcribe(audio, fp16=False, word_timestamps=True)
- print(result["text"])
-
运行结果:
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。