CPU-native Nepali TTS — real_nepali G2P + VITS ONNX inference
Project description
kala-tts
CPU-native Nepali text-to-speech. The first open-source Nepali TTS built without eSpeak.
pip install kala-tts
import kala_tts
kala_tts.synthesize_to_file("नमस्कार, कसरी हुनुहुन्छ?", "out.wav")
What makes it different
eSpeak-ng maps Nepali affricates to alveolar labels (ts, tsh) that do not match
how Kathmandu speakers actually produce च and छ. kala-tts uses the
real_nepali G2P — built from Khatiwada (2009) and a 48 000-entry curated lexicon —
which outputs palatal ch/chh as the acoustic target.
| Feature | eSpeak ne |
kala-tts |
|---|---|---|
| च / छ | ts / tsh (alveolar) | ch / chh (palatal) |
| Gemination | often lost | explicit ː tokens |
| Schwa deletion | heuristic | rule-based, audited |
| Latin code-switch | undefined | letter-by-letter + lexicon |
| Lexicon | none | 48 000 entries |
API
import kala_tts
# Returns WAV bytes (16-bit PCM mono, 22050 Hz)
wav: bytes = kala_tts.synthesize("नेपाल सुन्दर देश हो।", speaker="kala")
# Write directly to file
kala_tts.synthesize_to_file("नमस्कार", "output.wav", speaker="barsha")
# Speed control
wav = kala_tts.synthesize("राम्रो दिन!", speed=0.85) # slower
# List speakers
print(kala_tts.list_speakers())
# ('kala', 'barsha', 'slr143_F', 'slr43_0546', 'slr43_2099')
CLI
kala-tts "नमस्कार, कसरी हुनुहुन्छ?" --speaker kala -o out.wav
kala-tts --list-speakers
echo "नेपाल सुन्दर देश हो।" | kala-tts -o out.wav
Speakers
| Name | Data | Notes |
|---|---|---|
kala |
human studio | recommended |
barsha |
human recording | most data |
slr143_F |
OpenSLR-143 | neutral prosody |
slr43_0546 |
OpenSLR-43 | read speech |
slr43_2099 |
OpenSLR-43 | read speech |
Model
The first call auto-downloads the ONNX model (~60 MB) from
ampixa/real-nepali-v0.2-kala
via huggingface_hub and caches it locally. No internet needed after first run.
No GPU required.
- Architecture: VITS (ONNX FP32)
- Sample rate: 22050 Hz
- CPU RTF: ~0.020 (50× real-time on a laptop)
License
MIT (code) — CC-BY-SA 4.0 (model weights and training data). See LICENSES.md for full attribution.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file kala_tts-0.1.1-py3-none-any.whl.
File metadata
- Download URL: kala_tts-0.1.1-py3-none-any.whl
- Upload date:
- Size: 897.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b073d1555b2c086a5e5738146a2bd6bbeb8dabdb2713464b879ac317036e12d6
|
|
| MD5 |
ba17fda6b1107021df29f79681f868e3
|
|
| BLAKE2b-256 |
d1861e615c29af06d01e3ba633862ab4e17ec531ab3475cdde8d6e3b7927e52a
|