🐄 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. 🐄
Metadata
Release files for cowchant 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cowchant-0.1.0.tar.gz | 15.4 kB | Without provenance | Details for cowchant-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cowchant-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for cowchant-0.1.0-py3-none-any.whl |
Total release size: 25.8 kB
Release files / cowchant-0.1.0.tar.gz
| Download URL | cowchant-0.1.0.tar.gz |
|---|---|
| Size | 15.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cc3dfb259077d4a40cda0c3cdf7a61b807946663d5eec86cdff817ea627977d7
|
|
BLAKE2b-256 checksum How to use checksums |
4057d27eccb65ddf03f405c410c6625c6cfbc5becc1b7bc9a637b5ba07af1550
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.5
|
Release files / cowchant-0.1.0-py3-none-any.whl
| Download URL | cowchant-0.1.0-py3-none-any.whl |
|---|---|
| Size | 10.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c880cbb2b11bf825acccbc5480c5de44650895b9399f7a16e3287d2ed7d7dd7c
|
|
BLAKE2b-256 checksum How to use checksums |
e5f2bd20cacd1294fbe79b516126a2d0aee003b41b4437f9c9f0e91f39018b57
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.5
|
Security for cowchant 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.