Automatic Speech Recognition
Transformers
PyTorch
TensorFlow
JAX
Safetensors
whisper
audio
hf-asr-leaderboard
Eval Results
Instructions to use openai/whisper-large-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use openai/whisper-large-v2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("automatic-speech-recognition", model="openai/whisper-large-v2")# Load model directly from transformers import AutoProcessor, AutoModelForSpeechSeq2Seq processor = AutoProcessor.from_pretrained("openai/whisper-large-v2") model = AutoModelForSpeechSeq2Seq.from_pretrained("openai/whisper-large-v2") - Notebooks
- Google Colab
- Kaggle
Using pipeline with language and task set
#54
by jonfv - opened
Hello!
How to usepipe = pipeline("automatic-speech-recognition", model="openai/whisper-large-v2")
and setmodel.config.forced_decoder_ids = WhisperProcessor.get_decoder_prompt_ids(language="portuguese", task="transcribe")
when I try to do this, return this error:TypeError: WhisperProcessor.get_decoder_prompt_ids() missing 1 required positional argument: 'self'
Thx a lot!!!
Solution:
pipe = pipeline(
"automatic-speech-recognition",
model="openai/whisper-large-v2",
generate_kwargs={"language": "br", "task": "transcribe"},
device="cpu",
chunk_length_s=60
)
jonfv changed discussion status to closed