tiny-urdu-tts: Small Urdu Text-to-Speech (TTS) Model 🇵🇰🎙️

tiny-urdu-tts is a small, open-source Urdu text-to-speech (TTS) model for Roman Urdu. It has only 4.5 million parameters (21 MB) and runs on a CPU or right in your web browser, with no GPU, server or API key.

اردو ٹیکسٹ ٹو اسپیچ: رومن اردو لکھیں اور سنیں

4.5M parameters · 21 MB · Urdu TTS · runs on CPU / in the browser

Type aap kaise hain? and it speaks it in Urdu.

Audio samples

Text Audio
aap kaise hain?
mujhe chai pasand hai.
shukriya, bohat shukriya!

Model details

  • Base model: tiny-voca by @n4ze3m, an English TTS model
  • Fine-tuning: full fine-tune (all 4.5M parameters) on 5,000 clips (about 8 hours) from UrduTTS, for 25,000 steps on a Kaggle GPU
  • Input: Roman Urdu text, converted to phonemes by a small rule-based phonemizer
  • Output: 24 kHz mono audio
  • Quality: word error rate (Whisper large-v3 on unseen sentences) 6.9%, down from 9.6% with 1,000 clips. Real recordings score 2.2%.
  • Voice: one male Urdu voice (M2)

Files

File Use
model.onnx Browser and CPU inference (onnxruntime / onnxruntime-web)
model.json / config.json Config: sample rate, voices, phoneme symbols
sample1-3.wav Audio samples
inference.pt PyTorch checkpoint, for further fine-tuning with tiny-voca

How to use

The model takes phoneme IDs, not raw text. The Roman Urdu phonemizer is in the GitHub repo:

  • Browser / JavaScript: web/lib/urdu.ts and web/app/page.tsx
  • Python: python urdu/run.py tiny_voca.infer --checkpoint inference.pt --voice M2 --text "aap kaise hain?" --output out.wav

ONNX inputs: tokens, stress (int64 [1, N]), voice (int64 [1]), speed, pitch_shift, pitch_range (float32 [1]). Output: audio (float32 [1, samples]).

Writing tips

  • Numbers work: mere 25 dost hain is read as Urdu words
  • Common English words are said the Urdu way: computer, mobile, doctor, hello, thanks
  • Write it the way you'd text: mujhe chai pasand hai, shukriya, bohat shukriya!
  • A capital T, D, R inside a word marks the retroflex sound: baRa (big) vs bura (bad)

Limitations

  • Trained on about 8 hours from a single speaker, so expect some mispronunciations and a slightly robotic tone.
  • English: only about 100 common loanwords are supported; other English words are read with Urdu spelling rules.
  • Roman Urdu spelling varies, so some words may be read wrong.
  • Urdu script (اردو) input is not supported yet.

Credits

Downloads last month
151
Safetensors
Model size
4.55M params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for zafar205/tiny-urdu-tts-4.5-million-parameters

Base model

n4ze3m/tiny-voca
Quantized
(14)
this model

Dataset used to train zafar205/tiny-urdu-tts-4.5-million-parameters