Downloads · 30 days
28
20% of all-time downloads
TBOGamer22/nemo-pashto-g2p-conformer
nemo-pashto-g2p-conformer is a text-to-speech model from TBOGamer22. Use it when you need text read aloud. It is set up for nemo. The card lists the license as mit.
Downloads · 30 days
28
20% of all-time downloads
All-time downloads
143
Public
Repo size
117 MB
Likes
0
Public
Click a slice to open those files.
.ckpt87.5 MB · 75%
From the Hugging Face model README
A lightweight Conformer CTC grapheme-to-phoneme model for converting Pakistani Pashto text into broad IPA-style phoneme strings.
Repository: TBOGamer22/nemo-pashto-g2p-conformer
</div>Pashto Conformer G2P is a character-level grapheme-to-phoneme model trained for Pakistani Pashto speech technology. It converts Pashto-script text into broad IPA-style phoneme strings and is designed for TTS preprocessing, phoneme-label generation, and pronunciation-quality auditing.
To the best of our knowledge, this is the first open-source G2P model specifically released for Pakistani Pashto, including local Pakistani Pashto writing patterns commonly seen in real-world speech datasets and TTS pipelines.
This repository is intended to be the first model in a broader multilingual G2P collection. Future language models can follow the same structure: one portable NeMo artifact, local tokenizers, a small inference script, and a clear evaluation summary.
| Feature | Details |
|---|---|
| Language | Pakistani Pashto |
| Task | Grapheme-to-phoneme conversion |
| Output | Broad IPA-style phoneme strings |
| Architecture | Conformer CTC |
| Framework | NVIDIA NeMo |
| Repository | TBOGamer22/nemo-pashto-g2p-conformer |
| Main use case | Pashto TTS data preparation |
| Author | Talha Bin Omar |
| License | MIT |
Install dependencies in an environment with PyTorch and NVIDIA NeMo:
Install dependencies in an environment with PyTorch and NVIDIA NeMo:
pip install -r requirements.txt
Run inference:
python inference.py --text "دا یو مثال دی"
Run inference with JSON output:
python inference.py --text "که موږ غواړو چې د پښتو ژبې لپاره يو قوي او باوري ټکنالوژيکي نظام جوړ کړو، نو اړينه ده چې د متن، غږ او تلفظ تر منځ اړيکې په ډېر دقت سره وڅېړو." --json
Example JSON output:
{
"text": "که موږ غواړو چې د پښتو ژبې لپاره يو قوي او باوري ټکنالوژيکي نظام جوړ کړو، نو اړينه ده چې د متن، غږ او تلفظ تر منځ اړيکې په ډېر دقت سره وڅېړو.",
"phonemes": "ka muŋ gwɑɽu t͡ʃe də paxto ʒəbe ləpɑra jəw qawi aw bɑwri ʈaknɑlod͡ʒiki nizɑm d͡ʒoɽ kɽu no aɽina da t͡ʃe də matan ɣag aw talafuz tar mand͡z aɽike pə ɖer daxt sara wat͡seɽo"
}
Batch inference from a text file with one Pashto sentence per line:
python inference.py --text-file inputs.txt --batch-size 32
The script automatically uses CUDA when available. To force CPU:
python inference.py --text "دا یو مثال دی" --device cpu
| File | Purpose |
|---|---|
pashto_conformer_g2p.nemo | Main packaged NeMo model artifact |
model_config.yaml | Portable architecture/config file with local tokenizer paths |
tokenizers/ | Character vocabularies for Pashto graphemes and IPA phonemes |
inference.py | Self-contained local inference script |
training_artifacts/pashto-conformer-g2p-epoch=10-val_per=0.0847.ckpt | Optional training checkpoint artifact |
This model is intended for:
This model is not intended to be:
| Component | Value |
|---|---|
| Framework | NVIDIA NeMo |
| Model family | Conformer CTC G2P |
| Input | Pakistani Pashto-script graphemes |
| Output | Broad IPA phoneme string |
| Encoder layers | 8 |
| Model dimension | 192 |
| Attention heads | 4 |
| Convolution kernel size | 15 |
| Source repeat for CTC | 2 |
| Maximum repeated source length | 768 |
The model was trained on a Human-Validated Pashto TTS G2P Dataset.
| Split / Metric | Count |
|---|---|
| Valid examples | 40,296 |
| Train examples | 39,089 |
| Validation examples | 805 |
| Test examples | 402 |
| Skipped rows during preparation | 40 |
The labels were cleaned through language filtering, G2P disagreement checks, and Gemini + human-assisted validation for suspicious rows.
The selected checkpoint is:
pashto-conformer-g2p-epoch=10-val_per=0.0847.ckpt
| Metric | Value |
|---|---|
| Validation PER | 0.0847 |
An additional external audit was run on a 5,000-row sample from the first four speakers of PLDST.
For this audit, Gemini generated IPA-style reference labels from audio plus Pashto text, while this model predicted phonemes from Pashto text only.
| Metric | Value |
|---|---|
| Evaluated rows | 4,749 |
| Weighted PER | 0.0421 |
| Mean row PER | 0.0583 |
| Median row PER | 0.0485 |
| P95 row PER | 0.1427 |
Per-speaker weighted PER:
| Speaker | Rows | Weighted PER |
|---|---|---|
| S1 - Laiba | 1,230 | 0.0389 |
| S2 - Saqlain | 8 | 0.0450 |
| S3 - Kiran | 1,605 | 0.0438 |
| S4 - Muanazza | 1,906 | 0.0429 |
The external audit is intentionally conservative because the reference labels were generated from audio-plus-text and may include pronunciation, dialect, recording, or Gemini-labeling effects that are not always recoverable from text alone.
Pakistani Pashto is underrepresented in open-source speech technology. Many existing tools either do not support Pashto well or do not target the writing patterns found in Pakistani Pashto speech datasets.
This model provides a practical open-source baseline for:
This model is intended for speech technology, dataset preparation, and linguistic tooling.
For production TTS, ASR, or research use, outputs should be reviewed carefully, especially for:
Developed and released by:
Talha Bin Omar
If you use this model, please cite it as:
@misc{binomar2026pashto_conformer_g2p,
title = {Pashto Conformer G2P: An Open-Source Grapheme-to-Phoneme Model for Pakistani Pashto},
author = {Bin Omar, Talha},
year = {2026},
howpublished = {\url{https://huggingface.co/TBOGamer22/nemo-pashto-g2p-conformer}},
note = {Conformer CTC G2P model for broad IPA phoneme generation}
}
This model is released under the MIT License.
Copyright (c) 2026 Talha Bin Omar