TalhaAhmed/Urdu_kaani_TTS
šµš° Urdu Kaani TTS ā Talha Ahmed
High-Quality Urdu Text-to-Speech (Kaani Style) using KaniTTS + LoRA Fine-Tuning
This repository contains Urdu Kaani Text-to-Speech (TTS) fine-tuned on the KaniTTS 450M model using a custom Urdu dataset. The goal is to generate story-like, natural, expressive Urdu speech with high clarity.
š§ Demo Audio
Sample Output (TTS Prediction)
<audio controls src="https://cdn-uploads.huggingface.co/production/uploads/657abf6c53ffbdd1d6530f25/ituEC-6uRs7tEu2M8lm12.wav"></audio>
š¦ Model Details
| Base Model | nineninesix/kani-tts-450m-0.2-pt | | Fine-tuning Method | LoRA (rank=8) | | Dataset Used | TalhaAhmed/urdu-tts-nano-codec | | Language | Urdu | | Model Size | 0.4B parameters | | Format | Safetensors | | Use Case | Stories, narration, expressive reading, general TTS |
š Dataset
This model is trained on the following dataset:
š Dataset: https://huggingface.co/datasets/TalhaAhmed/urdu-tts-nano-codec
The dataset contains:
- Clean Urdu speech
- Corresponding text
- Balanced samples
- Perfect for narration / kahani style
š§ Training Configuration
ā Base Model
nineninesix/kani-tts-450m-0.2-ptā LoRA Settings
lora_r: 8
lora_alpha: 16
lora_dropout: 0.05
target_modules:
- q_proj
- k_proj
- v_proj
- out_projā Epochs & Optimizer
epochs: 2
optimizer: AdamW
learning_rate: 1e-4
warmup_steps: 500
batch_size: 2š How to Use
š§ Install Dependencies
pip install transformers datasets soundfile torchš¤ Inference Example (Generate Urdu Audio)
from transformers import pipeline
pipe = pipeline(
"text-to-speech",
model="TalhaAhmed/Urdu_kaani_TTS"
)
text = "Ų§ŪŚ© ŲÆŁ Ų§ŪŚ© ŲØŁŚŚ¾Ų§ Ų¢ŲÆŁ
Ū ŲØŲ§Ų²Ų§Ų± ŚÆŪŲ§ Ų§ŁŲ± Ų§Ų³ ŁŪ Ś©ŪŲ§ Ś©Ū Ų¢Ų¬ Ł
ŁŲ³Ł
ŲØŪŲŖ Ų®ŁŲ“ŚÆŁŲ§Ų± ŪŪŪ"
audio = pipe(text)
with open("output.wav", "wb") as f:
f.write(audio["audio"])š Repository Structure
Urdu_kaani_TTS/
āāā adapter_config.json
āāā model.safetensors
āāā README.md
āāā demo.wav (optional)
āāā config.jsonšÆ Intended Use Cases
- Story Narration (Kahani / Kaani style)
- Educational content
- Audiobooks
- Voiceovers
- Urdu assistant voices
- Conversational TTS
ā ļø Limitations
- Works best on Urdu script, not Roman Urdu
- Long paragraphs may reduce expressiveness
- Not optimized for singing or emotional extremes
š License
This model is released under the MIT License.
ā¤ļø Acknowledgements
Special thanks to:
- šµš° Urdu TTS research community
nineninesixfor the KaniTTS base model- Hugging Face for computational tools
- Fine-tuning setup created by Talha Ahmed
š Support & Contact
If you want help integrating Urdu TTS into FastAPI, Streamlit, or production apps:
š§ Email: talhahmedrk@gmail.com š¼ GitHub: EnggTalha
