深度学习系列56:使用whisper进行语音转文字

1. openai-whisper

这应该是最快的使用方式了。安装pip install -U openai-whisper,接着安装ffmpeg,随后就可以使用了。模型清单如下:

第一种方式,使用命令行:

复制代码
whisper japanese.wav --language Japanese  --model medium

另一种方式,使用python调用:

复制代码
import whisper
model = whisper.load_model("base")
result = model.transcribe("audio.mp3",initial_prompt='以下是普通话的句子。')
print(result["text"])

2. faster-whisper

安装也一样:pip install -U faster-whisper,速度对比:

3. whisper-jax

在GPU上的加速版本

首先安装库:

pip install jax jaxlib git+https://github.com/sanchit-gandhi/whisper-jax.git datasets soundfile librosa

调用代码为:

复制代码
from whisper_jax import FlaxWhisperPipline
import jax.numpy as jnp
pipeline = FlaxWhisperPipline("openai/whisper-tiny", dtype=jnp.bfloat16, batch_size=16)
%time text = pipeline('test.mp3')

4. whisper-openvino

在intel系列的cpu上加速的版本:

安装库:pip install git+https://github.com/zhuzilin/whisper-openvino.git

调用方法:whisper carmack.mp3 --model tiny.en --beam_size 3

相关推荐
Micheal_Dad23 天前
【尝试】基于openai-whisper进行语音转文字windows版本
whisper
Micheal_Dad23 天前
【尝试】本地部署openai-whisper,通过 http请求识别
whisper
andyguo1 个月前
语音识别的速度革命:从 Whisper 到 Whisper-CTranslate2,我经历了什么?
人工智能·学习·ai·whisper·语音识别·xcode·ai测评
番茄老夫子1 个月前
OpenAI推出的语音识别系统Whisper简析
人工智能·whisper·语音识别
A-刘晨阳1 个月前
语音转文字「本地化」新解!Whisper Web+cpolar实现零服务器部署与远程操作
服务器·前端·whisper
云空2 个月前
《Whisper模型版本及下载链接》
whisper
苗杨2 个月前
【Faster-Whisper】离线识别本地视频并生成字幕
python·whisper·音视频
云空2 个月前
《Whisper:OpenAI的先进语音识别模型》
人工智能·whisper·语音识别
企鹅侠客2 个月前
19|Whisper+ChatGPT:请AI代你听播客
人工智能·ai·chatgpt·whisper
落沐萧萧2 个月前
本地多语言 AI 字幕组:Whisper 实战教程
人工智能·whisper