Piper TTS — Sinhala (si_LK) Medium
A single-speaker Sinhala text-to-speech model trained with Piper using the VITS architecture.
Model Details
| Property | Value |
|---|---|
| Language | Sinhala (si) |
| Region | Sri Lanka (LK) |
| Quality | Medium |
| Architecture | VITS |
| Sample Rate | 22050 Hz |
| Speakers | 1 |
| Phonemizer | eSpeak-ng |
| Format | ONNX |
| Model Size | ~60 MB |
Training Data
Trained on OpenSLR 30 — Google's high-quality Sinhala multi-speaker TTS corpus.
Quick Start
CLI
pip install piper-tts
echo 'ආයුබෝවන්, මම සිංහලෙන් කතා කරමි.' | piper \
--model si_LK-sinhala-medium.onnx \
--output_file output.wav
Python
from piper import PiperVoice
import wave
voice = PiperVoice.load(
"si_LK-sinhala-medium.onnx",
config_path="si_LK-sinhala-medium.onnx.json"
)
with wave.open("output.wav", "w") as wav_file:
voice.synthesize("ආයුබෝවන්, මම සිංහලෙන් කතා කරමි.", wav_file)
Batch Script
A convenience script is included for converting text files:
python sinhala_tts.py input.txt -o output.wav
python sinhala_tts.py input.txt --speed 0.9 --silence 0.5
echo "ආයුබෝවන්" | python sinhala_tts.py -
Sample Outputs
| Text | Audio |
|---|---|
| ආයුබෝවන්, මම සිංහලෙන් කතා කරමි. | sample.wav |
Files
| File | Description |
|---|---|
si_LK-sinhala-medium.onnx |
ONNX model weights |
si_LK-sinhala-medium.onnx.json |
Model config (phoneme map, inference params) |
sinhala_tts.py |
Batch TTS script for text files |
MODEL_CARD.md |
Detailed model card |
Synthesis Parameters
| Parameter | Default | Description |
|---|---|---|
noise_scale |
0.667 | Controls variation/expressiveness |
length_scale |
1.0 | Controls speed (lower = faster) |
noise_w |
0.8 | Controls phoneme duration variation |
Requirements
piper-tts(pip install)espeak-ng(system package — provides Sinhala G2P)
Training
Trained on Google Colab (T4 GPU). Training notebook: piper-tts-sinhala-training.ipynb
License
MIT