Automatic Speech Recognition
Transformers
PyTorch
TensorFlow
JAX
Safetensors
whisper
audio
hf-asr-leaderboard
Eval Results (legacy)
Eval Results
Instructions to use openai/whisper-large with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use openai/whisper-large with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("automatic-speech-recognition", model="openai/whisper-large")# Load model directly from transformers import AutoProcessor, AutoModelForSpeechSeq2Seq processor = AutoProcessor.from_pretrained("openai/whisper-large") model = AutoModelForSpeechSeq2Seq.from_pretrained("openai/whisper-large") - Notebooks
- Google Colab
- Kaggle
WhisperProcessor class import doesn't work
#1
by mrJezy - opened
Pulled the latest version of transformers, but the class import won't work as seen in the example:
from transformers import WhisperProcessor, WhisperForConditionalGeneration
ImportError: cannot import name 'WhisperProcessor' from 'transformers'
This is normal as the model has not yet been merged, please wait a little bit!
All right! Thanks for the quick feedback! :)
I think its merged
I not tested this code, but maybe try something like this on error line:
input_features = processor(batch[0]["audio"]["array"], return_tensors="pt").input_features
I think problem in batch. You can check also like this:
print(list(batch[0].keys()))
If "audio" in keys - then I hope solution upper in my msg will work.
got same error today
