Instructions to use TBOGamer22/Brahvi-Whisper-Small with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use TBOGamer22/Brahvi-Whisper-Small with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("automatic-speech-recognition", model="TBOGamer22/Brahvi-Whisper-Small")# Load model directly from transformers import AutoProcessor, AutoModelForSpeechSeq2Seq processor = AutoProcessor.from_pretrained("TBOGamer22/Brahvi-Whisper-Small") model = AutoModelForSpeechSeq2Seq.from_pretrained("TBOGamer22/Brahvi-Whisper-Small", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Brahvi Whisper Small
Brahvi Whisper Small is a full-parameter fine-tune of
openai/whisper-small for automatic
speech recognition in Pakistani Brahvi (also known as Brahui). It produces
Perso-Arabic Brahvi transcriptions from real-world speech.
To the best of the author's knowledge as of September 16, 2026, this is the world's first publicly released automatic speech recognition model dedicated to the Brahvi language. This claim concerns dedicated, publicly documented model releases and does not exclude unpublished systems or broad multilingual models that may provide incidental Brahvi coverage.
The model was trained with
TBOGamer22/BrahuiSpeech-70H-V2.
Important Prompt Setting
Whisper does not provide a dedicated brh language prompt token. This model was
therefore trained with Whisper's Urdu token while the target text remained Brahvi.
Use language="ur" and task="transcribe". The model was not trained for speech
translation.
Usage
import math
import numpy as np
import soundfile as sf
import torch
from scipy.signal import resample_poly
from transformers import WhisperForConditionalGeneration, WhisperProcessor
model_id = "TBOGamer22/Brahvi-Whisper-Small"
use_cuda = torch.cuda.is_available()
dtype = torch.float16 if use_cuda else torch.float32
processor = WhisperProcessor.from_pretrained(model_id)
model = WhisperForConditionalGeneration.from_pretrained(
model_id,
dtype=dtype,
low_cpu_mem_usage=True,
use_safetensors=True,
).to("cuda" if use_cuda else "cpu")
audio, sample_rate = sf.read("brahvi_audio.wav", dtype="float32", always_2d=True)
audio = audio.mean(axis=1)
if sample_rate != 16000:
divisor = math.gcd(sample_rate, 16000)
audio = resample_poly(
audio,
16000 // divisor,
sample_rate // divisor,
).astype(np.float32, copy=False)
inputs = processor(
audio,
sampling_rate=16000,
return_tensors="pt",
)
input_features = inputs.input_features.to(model.device, dtype=dtype)
with torch.inference_mode():
predicted_ids = model.generate(
input_features,
language="ur",
task="transcribe",
)
text = processor.batch_decode(
predicted_ids,
skip_special_tokens=True,
clean_up_tokenization_spaces=False,
)[0]
print(text)
Training
- Base model:
openai/whisper-small - Training method: full-model fine-tuning
- Dataset:
TBOGamer22/BrahuiSpeech-70H-V2 - Training examples: 14,978 clips, 66 hours 39 minutes 29 seconds
- Held-out evaluation: 648 clips, 2 hours 52 minutes 43 seconds
- Split seed: 42
- Epochs: 5
- Final checkpoint: step 9,365
- Learning rate:
1e-5 - Scheduler: cosine with 500 warmup steps
- Per-device batch size: 8
- Precision: BF16 on an NVIDIA RTX 3090
- Objective: Brahvi transcription only
- Prompt: Whisper Urdu language token (
ur) with tasktranscribe - Augmentation: telephony/GSM-style augmentation, RIRS point-source noise, and 8 kHz bandwidth simulation
Evaluation
Results were measured on the fixed 648-clip held-out subset. WER and CER are case- and punctuation-sensitive after whitespace normalization. This is an in-domain held-out evaluation, not an independent external benchmark.
| Metric | Final result |
|---|---|
| Evaluation loss | 0.633087 |
| WER | 55.7108% |
| CER | 22.8336% |
| BLEU | 24.8540 |
| chrF++ | 54.7677 |
The complete per-epoch results and the released weight hash are provided in
training_results.json.
Intended Use
This model is intended for Brahvi ASR research, transcription experiments, low-resource speech technology, and continued fine-tuning. Predictions should be reviewed by a fluent Brahvi speaker before publication or use in consequential workflows.
Limitations
- Performance varies with dialect, recording quality, background noise, speaker, code-switching, and domain.
- The evaluation subset comes from the same dataset as the training split and may not represent unseen recording sources.
- The Urdu prompt token is a compatibility choice and does not mean the model is intended to transcribe Urdu.
- The model can omit, repeat, or hallucinate words, especially in silence or severely degraded audio.
- The training corpus contains diverse real-world media, so users should review the dataset card and applicable usage rights before deployment.
Release Integrity
The released weights are the epoch-5 final export and are byte-identical to
checkpoint-9365/model.safetensors from training.
- Downloads last month
- 49
Model tree for TBOGamer22/Brahvi-Whisper-Small
Base model
openai/whisper-smallDataset used to train TBOGamer22/Brahvi-Whisper-Small
Evaluation results
- WER on BrahuiSpeech-70H-V2 held-out evaluation setself-reported55.711
- CER on BrahuiSpeech-70H-V2 held-out evaluation setself-reported22.834
- BLEU on BrahuiSpeech-70H-V2 held-out evaluation setself-reported24.854
- chrF++ on BrahuiSpeech-70H-V2 held-out evaluation setself-reported54.768