Automatic Speech Recognition
Transformers
PyTorch
JAX
Safetensors
whisper
audio
hf-asr-leaderboard
Eval Results
Instructions to use openai/whisper-large-v3 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use openai/whisper-large-v3 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("automatic-speech-recognition", model="openai/whisper-large-v3")# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForSpeechSeq2Seq processor = AutoProcessor.from_pretrained("openai/whisper-large-v3") model = AutoModelForSpeechSeq2Seq.from_pretrained("openai/whisper-large-v3", device_map="auto") - Inference
- Notebooks
- Google Colab
- Kaggle
Batched files with different languages
#30
by Oscaarjs - opened
Is it possible to set different languages for different files in when processing files in a batch?
I.e; I can do
pipe = pipeline(
"automatic-speech-recognition",
model=self.model,
tokenizer=self.processor.tokenizer,
feature_extractor=self.processor.feature_extractor,
torch_dtype=self.torch_dtype,
device=self.device,
)
and then
pipe(
files,
chunk_length_s=self.config.get("chunk_length_s", 30),
batch_size=self.config.get("batch_size", 24),
return_timestamps=True,
return_language=True,
generate_kwargs={"language": "en"},
)
Where files is a list of paths to files.
But this applies for all files. Is it possible to somehow set it individually for each file? I can ofc use a batch_size of 1 and just process it iteratively with different kwargs for each file, but I'd like to get the speed-up that the batching might entail.