Skip to main content

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 Distribution

kala_tts-0.1.0.tar.gz (879.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kala_tts-0.1.0-py3-none-any.whl (895.5 kB view details)

Uploaded Python 3

File details

Details for the file kala_tts-0.1.0.tar.gz.

File metadata

  • Download URL: kala_tts-0.1.0.tar.gz
  • Upload date:
  • Size: 879.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for kala_tts-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a6222253b7f7b90556d3488a7069bff9db234633ef307dd6e8604df4a680bf95
MD5 3b580e12885f7de29fd081cff28d9856
BLAKE2b-256 fd1e5752ac8ea4a045d218d5420cca3a5f6a3d186c9e972071d00a688c2a8b32

See more details on using hashes here.

File details

Details for the file kala_tts-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: kala_tts-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 895.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for kala_tts-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f1893c33634b25ca9288613bd1d342be7968bd17cbeb609355a945b93eaaa73c
MD5 6bc38bea6e8666c88c542d2e0b467bfe
BLAKE2b-256 201155e3df4793b9d235cfc6288bfebf034f9763872150d6ab27a347a181074f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page