Downloads · 30 days
13
8% of all-time downloads
Svetozar1993/MultilingualSTT
MultilingualSTT is a automatic speech recognition model from Svetozar1993. Use it when you need speech turned into text. It is set up for transformers. The card lists the license as apache-2.0.
OpenAI's Whisper Large V3 model for multilingual speech-to-text transcription.
Downloads · 30 days
13
8% of all-time downloads
All-time downloads
158
Public
Parameters
1.5B
34 GB on disk
Likes
1
Public
Click a slice to open those files.
.bin9.3 GB · 37%
From the Hugging Face model README
OpenAI's Whisper Large V3 model for multilingual speech-to-text transcription.
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.
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"])
result = pipe(sample, generate_kwargs={"language": "french"})
result = pipe(sample, generate_kwargs={"task": "translate"})
result = pipe(sample, return_timestamps=True)
print(result["chunks"])
result = pipe(sample, return_timestamps="word")
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"
)
Svetozar1993