Audio / openai

whisper base

whisper base from openai. Source-based hardware guidance from its published configuration.

EstimatedRepository opened Sep 26, 2022Source checked 9/23/2026Version: e37978b9
LOCALRENTED GPUOPEN WEIGHTS

At a glance

Parameters
0.07B
Architecture
whisper
License
apache-2.0
Software
Transformers
View the model source
MY HARDWARE

Will it run on your machine?

Save your machine to see a personalized rating and its reasoning.

Add my hardware

Ways to run it

Transformers · See official guide

Repository-specific example documented in the publisher model card; confirm dependencies and platform in the source.

>>> from transformers import WhisperProcessor, WhisperForConditionalGeneration >>> from datasets import load_dataset >>> # load model and processor >>> processor = WhisperProcessor.from_pretrained("openai/whisper-base") >>> model = WhisperForConditionalGeneration.from_pretrained("openai/whisper-base") >>> model.config.forced_decoder_ids = None >>> # load dummy dataset and read audio files >>> ds = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation") >>> sample = ds[0]["audio"] >>> input_features = processor(sample["array"], sampling_rate=sample["sampling_rate"], return_tensors="pt").input_features >>> # generate token ids >>> predicted_ids = model.generate(input_features) >>> # decode token ids to text >>> transcription = processor.batch_decode(predicted_ids, skip_special_tokens=False) ['<|startoftranscript|><|en|><|transcribe|><|notimestamps|> Mr. Quilter is the apostle of the middle classes and we are glad to welcome his gospel.<|endoftext|>'] >>> transcription = processor.batch_decode(predicted_ids, skip_special_tokens=True) [' Mr. Quilter is the apostle of the middle classes and we are glad to welcome his gospel.']
Official instructions

Explore its uses

SAFETENSORS

Keep exploring