Skip to main content

Whisper

Whisper is a multilingual speech recognition encoder–decoder (seq2seq) model family from OpenAI, available across sizes from tiny to large-v3 / turbo variants on the Hub.

Adapted for this playbook from the 🤗 Transformers documentation by Hugging Face. Official page: https://huggingface.co/docs/transformers/model_doc/whisper. Images © Hugging Face (documentation-images) unless noted. This is not a substitute for the upstream docs — verify against the current version.

Covers Hugging Face pages: model_doc/whisper

Quick usage​

from transformers import pipeline

asr = pipeline(
task="automatic-speech-recognition",
model="openai/whisper-large-v3",
)
print(asr("https://huggingface.co/datasets/Narsil/asr_dummy/resolve/main/mlk.flac"))
from transformers import AutoProcessor, WhisperForConditionalGeneration

processor = AutoProcessor.from_pretrained("openai/whisper-large-v3-turbo")
model = WhisperForConditionalGeneration.from_pretrained(
"openai/whisper-large-v3-turbo", device_map="auto"
)

Tips​

  • Match audio sample rate to the processor (typically 16 kHz)
  • Use timestamps parameters for meeting notes
  • See Audio tasks

Official API​

Whisper model doc.

Discussion

Comments​

Share feedback or questions about this page. No account required.

Loading comments…