whisper,OpenAI开源的语音转文字大模型

简介

Whisper 是一种通用语音识别模型。它在一个包含各种音频的大型数据集上进行训练,同时也是一个多任务模型,可以执行多种语言的语音识别、语音翻译和语言识别。

源码:https://github.com/openai/whisper

安装

1
pip install -U openai-whisper

除此之外还需安装 ffmpeg

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# on Ubuntu or Debian
sudo apt update && sudo apt install ffmpeg

# on Arch Linux
sudo pacman -S ffmpeg

# on MacOS using Homebrew (https://brew.sh/)
brew install ffmpeg

# on Windows using Chocolatey (https://chocolatey.org/)
choco install ffmpeg

# on Windows using Scoop (https://scoop.sh/)
scoop install ffmpeg

使用方式

不带任何参数,默认使用模型 turbo

1
whisper audio.mp3

指定模型

1
whisper audio.mp3 --model small

指定音频的语言

1
whisper audio.mp3 --language Chinses

查看帮助

1
whisper --help
页面浏览量Loading
网站总访客数:Loading
网站总访问量:Loading

-->