配置python虚拟环境,因为 Whisper 需要特定版本的 python。 condacreate --name whisper_env python=3.9.18 activate whisper_env 安装依赖库: pip installsetuptools-rustpip install -Uopenai-whisper 三、运行 命令行运行: whisper Haul.mp3 --model medium 其中“Haul.mp3” 是我测试用的音频文件。 “--model ...
运行pip install whisper来安装whisper,如果你渴望更新的功能,应前往GitHub的Whisper项目页面遵照Readme进行安装。 whisper第一次运行时会下载模型到模型文件夹,如果您觉得下载速度太慢,有以下方法:打开GitHub的whisper项目whisper/__init__.py,文件里有各模型的直链,您可以使用IDM等下载工具进行下载,放入您指定的模型文...
Windows: C:\Users\你的用户名\.cache\whisper/large-v2.pt Linux/MacOS: ~/.cache/whisper/large-v2.pt 然后重新运行程序即可得到转换结果。比如我们转换下面这个音频: 效果如下: # 公众号:Python实用宝典 # 转载请附带注释 import whisper whisper_model = whisper.load_model("large") result = whisper_mo...
whisper模块的load_model()方法在 Python 应用程序中加载一个 whisper 模型。您必须将模型名称作为参数传递给load_model()方法。 importwhisper model=whisper.load_model("base") 1. 2. 转录音频 使用Whisper,您只需几行代码即可转录音频文件。 模型对象中的transcribe()方法转录音频。该方法接受音频文件的路径作为...
Whisper 已经在真实数据以及其他模型上使用的数据以及弱监督下进行了训练。 模型的准确性针对人类听众进行了测试并评估其性能。 它能够检测清音区域并应用 NLP 技术在转录本中正确进行标点符号的输入。 模型是可扩展的,允许从音频信号中提取转录本,而无需将视频分成块或批次,从而降低了漏音的风险。
三、python的实现 准备环境 conda create -n whisper python=3.9 conda activate whisper #一 git clone https://gitee.com/mirrors/openai-whisper.git python setup.py install #二 pip install git+https://github.com/openai/whisper.git pip install --upgrade --no-deps --force-reinstall git+https://...
步骤2:安装openAI whisper Python库 在终端或命令提示符中运行以下命令来安装openAI whisper Python库: pipinstallopenai 1. 步骤3:导入必要的库 在你的Python脚本中,导入openai和json库: importopenaiimportjson 1. 2. 步骤4:连接到openAI API 使用你的openAI认证密钥连接到openAI API。你可以在openAI官方网站中找到...
Whisper models are free. You can use Whisper models in your Python applications without signing up for an OpenAI account. Getting Started with OpenAI Whisper Pay attention, folks! Here’s the great thing about Whisper: you don’t need an API key to use it in Python. All you have to do...
Whisper 是 OpenAI 研发的一个通用的语音识别模型,可以把语音转为文本。它在大量多样化的音频数据集上进行训练,同时还是一个多任务模型,可以执行多语言语...
Alternatively, the following command will pull and install the latest commit from this repository, along with its Python dependencies: pip install git+https://github.com/openai/whisper.git To update the package to the latest version of this repository, please run: ...