🐄 Sanskrit chant TTS on the command line — powered by Vāgdhenu
Project description
🐄 cowchant
Sanskrit chant TTS on the command line — powered by Vāgdhenu.
Turn Sanskrit verses into traditional metered chant. Paste a śloka, get audio.
MOS ~4.6 (expert listener). Handles all Sanskrit conjuncts including retroflex aspirates (ṣṭ, ḍḍh, …) with 100% accuracy.
Install
pip install cowchant
# With GPU support (recommended — 10x faster):
pip install cowchant[gpu]
# Full dependencies (includes transformers, accelerate):
pip install cowchant[full]
Note: First run downloads ~2GB of model weights from HuggingFace + clones IndicF5 and BigVGAN. Subsequent runs use the cached models.
Usage
# Basic — auto-detects meter, outputs to output.wav
cowchant "वसुदेवसुतं देवं कंसचाणूरमर्दनम् ।"
# Specify output file and meter
cowchant "शुक्लाम्बरधरं विष्णुं..." -o vishnu.wav --meter anuṣṭubh
# From file
cowchant --input verse.txt -o chant.wav
# From stdin
echo "गुरुर्ब्रह्मा गुरुर्विष्णुः..." | cowchant -o guru.wav
# List supported meters
cowchant --list-meters
# Force CPU (slower but works without GPU)
cowchant "verse..." --device cpu
# Change seed for a different take
cowchant "verse..." --seed 42
Supported scripts
Works with any Indian script — Devanagari, Kannada, Telugu, Malayalam, Bengali, Gujarati, Gurmukhi, Oriya, Grantha. Auto-detected.
Python API
from cowchant.engine import CowChant
engine = CowChant(device="cuda")
# Save to file
engine.chant("वसुदेवसुतं देवं...", output="chant.wav")
# Get raw audio
sr, audio = engine.chant("शुक्लाम्बरधरं विष्णुं...")
# List meters
print(engine.meters())
Options
| Flag | Default | Description |
|---|---|---|
-o, --output |
output.wav |
Output WAV path |
-m, --meter |
auto | Override meter (chandas) |
-s, --seed |
60 |
Random seed for variation |
-i, --input |
— | Read verse from file |
--device |
auto | cuda / mps / cpu |
--speed |
0.90 |
Chant speed |
--nfe |
64 |
DiT denoising steps |
--cfg |
3.0 |
CFG strength |
--list-meters |
— | List supported meters |
How it works
- Backbone: IndicF5 / F5-TTS (flow-matching DiT, ~337M params)
- Vocoder: NVIDIA BigVGAN-v2, fine-tuned
- Text frontend: Devanagari → SLP1 → Kannada routing, visarga sandhi, homorganic anusvāra, meter/gaṇa detection
- Reference bank: Per-meter reference audio clips for prosody control
Performance
| Device | Time per śloka |
|---|---|
| NVIDIA GPU (A100/4090) | ~5 seconds |
| Apple MPS (M1/M2) | ~20 seconds |
| CPU | ~60+ seconds |
Credits
- Engine: Vāgdhenu by Prof. Prathosh, IISc Bengaluru
- CLI: Hemanth HM
- License: Apache-2.0
Etymology
Vāgdhenu = vāk (speech) + dhenu (cow) — "the wish-cow of speech." cowchant = cowsay vibes + the dhenu from the project name. 🐄
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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 cowchant-0.1.0.tar.gz.
File metadata
- Download URL: cowchant-0.1.0.tar.gz
- Upload date:
- Size: 15.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cc3dfb259077d4a40cda0c3cdf7a61b807946663d5eec86cdff817ea627977d7
|
|
| MD5 |
a3ccd7693ad361bda19351411a945e39
|
|
| BLAKE2b-256 |
4057d27eccb65ddf03f405c410c6625c6cfbc5becc1b7bc9a637b5ba07af1550
|
File details
Details for the file cowchant-0.1.0-py3-none-any.whl.
File metadata
- Download URL: cowchant-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c880cbb2b11bf825acccbc5480c5de44650895b9399f7a16e3287d2ed7d7dd7c
|
|
| MD5 |
a8bb858d38bbfecf7bc9c8b8943621a4
|
|
| BLAKE2b-256 |
e5f2bd20cacd1294fbe79b516126a2d0aee003b41b4437f9c9f0e91f39018b57
|