深度学习系列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

相关推荐
码码哈哈爱分享13 小时前
[特殊字符] Whisper 模型介绍(OpenAI 语音识别系统)
人工智能·whisper·语音识别
Swift社区4 天前
用 Whisper 打破沉默:AI 语音技术如何重塑无障碍沟通方式?
人工智能·whisper
dgiij14 天前
openai-whisper-asr-webservice接入dify
docker·ai·node.js·whisper
allnlei15 天前
whisper相关的开源项目 (asr)
whisper·asr
phper820 天前
开源音视频转文字工具:基于 Vosk 和 Whisper 的多语言语音识别项目
whisper·音视频·语音识别
AI360labs_atyun21 天前
使用 Whisper 生成视频字幕:从提取音频到批量处理
人工智能·科技·ai·whisper·音视频·教育
waterHBO1 个月前
python + whisper 读取蓝牙耳机, 转为文字
python·whisper
代码骑士1 个月前
基于whisper和ffmpeg语音转文本小程序
whisper
Luke Ewin2 个月前
一个基于OpenAI Whisper开发的音视频字幕文件生成工具
人工智能·whisper·音视频·语音识别·asr·语音转写·视频字幕生成
Encarta19932 个月前
【语音识别】vLLM 部署 Whisper 语音识别模型指南
人工智能·whisper·语音识别