Downloads · 30 days
38
21% of all-time downloads
Ghost3454/translynx-pakistani-punjabi-whisper-small
translynx-pakistani-punjabi-whisper-small is a automatic speech recognition model from Ghost3454. Use it when you need speech turned into text. The card lists the license as apache-2.0.
A fine-tuned version of openai/whisper-small for Pakistani Punjabi speech recognition in Shahmukhi script (the Perso-Arabic script used to write Punjabi in Pakistan).
Downloads · 30 days
38
21% of all-time downloads
All-time downloads
179
Public
Parameters
242M
967 MB on disk
Likes
1
Trending 1
Click a slice to open those files.
.safetensors967 MB · 100%
From the Hugging Face model README
A fine-tuned version of openai/whisper-small for Pakistani Punjabi speech recognition in Shahmukhi script (the Perso-Arabic script used to write Punjabi in Pakistan).
This model transcribes spoken Pakistani Punjabi into written Shahmukhi text. It was fine-tuned from OpenAI's multilingual Whisper Small checkpoint, which had a baseline Word Error Rate (WER) of roughly 70% on this language before fine-tuning.
Because Shahmukhi shares its character set with Urdu, the model uses the Urdu language token (ur) internally rather than the Whisper pa token, which corresponds to Eastern Punjabi in Gurmukhi script. The language and task are baked into the generation config, so you do not need to pass them at inference time.
| Evaluation set | WER |
|---|---|
| Baseline (whisper-small, no fine-tuning) | ~70% |
| Validation (seen speakers) | 7.07% |
| Test (completely unseen speaker) | 11.50% |
The test WER is measured on a speaker whose voice was never seen during training, which reflects real-world generalization to new voices.
from transformers import WhisperProcessor, WhisperForConditionalGeneration
import librosa
import torch
REPO_ID = "Ghost3454/translynx-pakistani-punjabi-whisper-small"
processor = WhisperProcessor.from_pretrained(REPO_ID)
model = WhisperForConditionalGeneration.from_pretrained(REPO_ID)
device = "cuda" if torch.cuda.is_available() else "cpu"
model = model.to(device).eval()
# load a 16 kHz audio file
audio, _ = librosa.load("sample.wav", sr=16000)
inputs = processor(
audio, sampling_rate=16000, return_tensors="pt"
).input_features.to(device)
with torch.no_grad():
generated_ids = model.generate(inputs)
text = processor.batch_decode(generated_ids, skip_special_tokens=True)[0]
print(text)
The language token (ur), task (transcribe), and a repetition guard are already set in the generation config, so no extra generation arguments are required.
The model was fully fine-tuned (all parameters trained, no LoRA or quantization) on a single consumer GPU.
Key hyperparameters:
openai/whisper-smallur for stable generationno_repeat_ngram_size=3 to prevent decoding loopsDeveloped by the TransLynx team:
Thanks to all seven speakers who contributed recordings to the training dataset, without whom this model would not exist.
If you use this model, please credit the TransLynx Pakistani Punjabi ASR project.