lilgoose7777/slr-combined-nepali-tts2
Viewer • Updated • 177k • 28
How to use himalaya-ai/whisper-large-v3-turbo with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("automatic-speech-recognition", model="himalaya-ai/whisper-large-v3-turbo") # Load model directly
from transformers import AutoProcessor, AutoModelForSpeechSeq2Seq
processor = AutoProcessor.from_pretrained("himalaya-ai/whisper-large-v3-turbo")
model = AutoModelForSpeechSeq2Seq.from_pretrained("himalaya-ai/whisper-large-v3-turbo", device_map="auto")Nepali fine-tune of openai/whisper-large-v3-turbo for transcribe.
| Metric | Value |
|---|---|
| Test WER | 15.44% |
| Test CER | 10.01% |
| Best eval WER | 16.97% |
| Steps trained | 9368 |
| Parameter | Value |
|---|---|
| Base model | openai/whisper-large-v3-turbo |
| Language / task | nepali / transcribe |
| Epochs | 1.0 |
| Learning rate | 1e-05 |
| LR schedule | linear with 5% warmup ratio |
| Per-device train batch | 8 |
| Grad accumulation steps | 8 |
| Effective batch size | 64 |
| Per-device eval batch | 8 |
| Precision | bf16 |
| Gradient checkpointing | False |
| Optimizer | adamw_torch |
| Weight decay | 0.0 |
| Max grad norm | 1.0 |
| Max label length | 448 tokens |
| Generation max length | 225 |
| Eval / save strategy | per epoch (best model by WER kept) |
| Seed | 42 |
| Parameter | Value |
|---|---|
| Dataset | lilgoose7777/slr-combined-nepali-tts2 |
| Rows requested | 0 |
| Split | 80% / 10% / 10% (train/val/test) |
| Train / val / test examples | 599608 / 74951 / 74951 |
| Per-epoch validation subset | 500 (test metrics use 2000 test examples) |
| Audio sampling rate | 16 kHz mono |
| Checkpoint backups | milanakdj/whisper-large-v3-turbo-nepali-checkpoints |
The training corpus is clean single-speaker studio audio, so expect degraded accuracy on noisy real-world recordings with background noise, multiple speakers, or strong accents.
import torch
from transformers import WhisperForConditionalGeneration, WhisperProcessor
model_id = "milanakdj/whisper-large-v3-turbo-nepali-final-corpus"
device = "cuda" if torch.cuda.is_available() else "cpu"
processor = WhisperProcessor.from_pretrained(model_id, language="nepali", task="transcribe")
model = WhisperForConditionalGeneration.from_pretrained(model_id).to(device)
# audio: 1-D float32 numpy array at 16kHz
inputs = processor(audio, sampling_rate=16000, return_tensors="pt").to(device)
with torch.inference_mode():
ids = model.generate(inputs.input_features, max_new_tokens=225)
print(processor.batch_decode(ids, skip_special_tokens=True)[0])
Base model
openai/whisper-large-v3