Automatic Speech Recognition
Transformers
PyTorch
TensorFlow
JAX
Safetensors
English
whisper
audio
hf-asr-leaderboard
Eval Results (legacy)
Eval Results
Instructions to use openai/whisper-small.en with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use openai/whisper-small.en with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("automatic-speech-recognition", model="openai/whisper-small.en")# Load model directly from transformers import AutoProcessor, AutoModelForSpeechSeq2Seq processor = AutoProcessor.from_pretrained("openai/whisper-small.en") model = AutoModelForSpeechSeq2Seq.from_pretrained("openai/whisper-small.en") - Notebooks
- Google Colab
- Kaggle
Fix typo (forgotten parenthesis)
#2
by YaYaB - opened
README.md
CHANGED
|
@@ -115,7 +115,7 @@ The "<|en|>" token is used to specify that the speech is in english and should b
|
|
| 115 |
>>> input_features = processor(ds[0]["audio"]["array"], return_tensors="pt").input_features
|
| 116 |
|
| 117 |
>>> # Generate logits
|
| 118 |
-
>>> logits = model(input_features, decoder_input_ids = torch.tensor([[50258]]).logits
|
| 119 |
>>> # take argmax and decode
|
| 120 |
>>> predicted_ids = torch.argmax(logits, dim=-1)
|
| 121 |
>>> transcription = processor.batch_decode(predicted_ids)
|
|
|
|
| 115 |
>>> input_features = processor(ds[0]["audio"]["array"], return_tensors="pt").input_features
|
| 116 |
|
| 117 |
>>> # Generate logits
|
| 118 |
+
>>> logits = model(input_features, decoder_input_ids = torch.tensor([[50258]])).logits
|
| 119 |
>>> # take argmax and decode
|
| 120 |
>>> predicted_ids = torch.argmax(logits, dim=-1)
|
| 121 |
>>> transcription = processor.batch_decode(predicted_ids)
|