MultilingualSTT

OpenAI's Whisper Large V3 model for multilingual speech-to-text transcription.

Model Description

Whisper Large V3 is a state-of-the-art automatic speech recognition (ASR) model that supports 99+ languages. It provides highly accurate transcription across a wide range of languages and acoustic conditions.

Key Features

  • 99+ Languages: Supports English, Chinese, German, Spanish, Russian, Korean, French, Japanese, Portuguese, Turkish, Polish, Italian, Hindi, Arabic, and many more
  • Speech Translation: Can translate speech to English
  • Timestamps: Supports word-level and sentence-level timestamps
  • Robust: Excellent handling of accents, background noise, and technical language

Usage

import torch
from transformers import AutoModelForSpeechSeq2Seq, AutoProcessor, pipeline

device = "cuda:0" if torch.cuda.is_available() else "cpu"
torch_dtype = torch.float16 if torch.cuda.is_available() else torch.float32

model_id = "Svetozar1993/MultilingualSTT"

model = AutoModelForSpeechSeq2Seq.from_pretrained(
    model_id, torch_dtype=torch_dtype, low_cpu_mem_usage=True, use_safetensors=True
)
model.to(device)

processor = AutoProcessor.from_pretrained(model_id)

pipe = pipeline(
    "automatic-speech-recognition",
    model=model,
    tokenizer=processor.tokenizer,
    feature_extractor=processor.feature_extractor,
    torch_dtype=torch_dtype,
    device=device,
)

result = pipe("audio.mp3")
print(result["text"])

Advanced Usage

Specify Language

result = pipe(sample, generate_kwargs={"language": "french"})

Speech Translation (to English)

result = pipe(sample, generate_kwargs={"task": "translate"})

Get Timestamps

result = pipe(sample, return_timestamps=True)
print(result["chunks"])

Word-Level Timestamps

result = pipe(sample, return_timestamps="word")

Flash Attention 2

For faster inference:

pip install flash-attn --no-build-isolation
model = AutoModelForSpeechSeq2Seq.from_pretrained(
    model_id,
    torch_dtype=torch_dtype,
    low_cpu_mem_usage=True,
    attn_implementation="flash_attention_2"
)

Model Details

  • Architecture: Whisper Large V3
  • Parameters: 1.55B
  • Languages: 99+
  • License: Apache 2.0

Author

Svetozar1993

Downloads last month
22
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support