CoolFace
Modelpublic

chan4lk/piper-tts-sinhala

sourceHugging Facemitupdated 6mo agoView on Hugging Face
0likes137downloads
Model Card

Piper TTS — Sinhala (si_LK) Medium

A single-speaker Sinhala text-to-speech model trained with Piper using the VITS architecture.

Model Details

PropertyValue
LanguageSinhala (si)
RegionSri Lanka (LK)
QualityMedium
ArchitectureVITS
Sample Rate22050 Hz
Speakers1
PhonemizereSpeak-ng
FormatONNX
Model Size~60 MB

Training Data

Trained on OpenSLR 30 — Google's high-quality Sinhala multi-speaker TTS corpus.

Quick Start

CLI

bash
pip install piper-tts

echo 'ආයුබෝවන්, මම සිංහලෙන් කතා කරමි.' | piper \
  --model si_LK-sinhala-medium.onnx \
  --output_file output.wav

Python

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:

bash
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

TextAudio
ආයුබෝවන්, මම සිංහලෙන් කතා කරමි.sample.wav

Files

FileDescription
si_LK-sinhala-medium.onnxONNX model weights
si_LK-sinhala-medium.onnx.jsonModel config (phoneme map, inference params)
sinhala_tts.pyBatch TTS script for text files
MODEL_CARD.mdDetailed model card

Synthesis Parameters

ParameterDefaultDescription
noise_scale0.667Controls variation/expressiveness
length_scale1.0Controls speed (lower = faster)
noise_w0.8Controls 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