Vāgdhenu TTS on Segmind: Sanskrit verse, chanted in its meter

Paste a Sanskrit verse in any Indian script and hear it chanted in the melody and pace of its meter. Vāgdhenu is the open model by Prof. Prathosh A P of IISc Bengaluru, now on Segmind.

Vāgdhenu TTS turns a Sanskrit verse into a chant. Paste a śloka in any Indian script and it comes back recited in the melody and pace of its meter, not read aloud as a sentence. Vāgdhenu is an open model by Prof. Prathosh A P of the Indian Institute of Science, Bengaluru. Segmind now hosts it as he released it, so it runs from a browser or with one API call.

ModelVāgdhenu TTSChant Sanskrit verses in their traditional meter, any script.

Chant is not speech

A Sanskrit verse is written in a meter (chandas): a fixed pattern of light and heavy syllables. A heavy syllable is held about twice as long as a light one, and each meter is traditionally recited to its own melodic line. Reciters learn these by ear, usually from a teacher.

An ordinary text-to-speech model treats the same verse as prose. The syllable lengths even out and the melody is gone. The words are right and the verse is not.

Here is one verse rendered both ways. Switch between them while it plays.

Now hearing

Meter: auto-detect

Vasudeva-sutam verse chanted in the anuṣṭubh meter

One verse, chanted in its meter and read as prose

Who it is for

Devotional audio and video. Daily recitation (pārāyaṇa) tracks, apps and channels need hours of consistent chant. The model's author has used it to chant the whole Mahābhārata Tātparya Nirṇaya (5,183 verses in 32 videos, about 17.5 hours) and the Śrīmad Bhāgavatam (about 18,000 verses across its 12 books).

Auto-detects a long meter: śārdūlavikrīḍita, 19 syllables a linefor Vāgdhenu TTS
या कुन्देन्दुतुषारहारधवला या शुभ्रवस्त्रावृता
या वीणावरदण्डमण्डितकरा या श्वेतपद्मासना ।
या ब्रह्माच्युतशङ्करप्रभृतिभिर्देवैः सदा वन्दिता
सा मां पातु सरस्वती भगवती निःशेषजाड्यापहा ॥
Try it

The Saraswati invocation went in with the meter on auto. The response named it śārdūlavikrīḍita, counted 76 syllables and returned 21.5 seconds of chant.

Students and teachers. Hear how a verse sounds in its meter before you try it yourself, or set the meter by hand and compare two readings of the same line.

Publishers and digital libraries. Many Sanskrit texts have never been recorded. A verse that exists as text can now have audio beside it, in the script your readers use.

Reads the meter from Kannada scriptfor Vāgdhenu TTS
ಗುರುರ್ಬ್ರಹ್ಮಾ ಗುರುರ್ವಿಷ್ಣುಃ ಗುರುರ್ದೇವೋ ಮಹೇಶ್ವರಃ ।
ಗುರುಃ ಸಾಕ್ಷಾತ್ ಪರಂ ಬ್ರಹ್ಮ ತಸ್ಮೈ ಶ್ರೀಗುರವೇ ನಮಃ ॥
Try it

The guru verse, pasted in Kannada script, was detected as anuṣṭubh (32 syllables, 10 seconds). There is no transliteration step: paste the verse in the script you have it in.

Accessibility. Listeners who cannot read the script, or cannot read at all, can still follow a text.

Developers. A verse of the day, a learning app, a recitation companion: one request per verse, and the audio comes back as a file.

Set the meter yourself: mālinī, delivered as MP3for Vāgdhenu TTS
हठलुठ दल घिष्टोत्कण्ठदष्टोष्ठ विद्युत्
सटशठ कठिनोरः पीठभित्सुष्ठुनिष्ठाम् ।
पठतिनुतव कण्ठाधिष्ठ घोरान्त्रमाला
दह दह नरसिंहासह्यवीर्याहितं मे ॥
Try it

A Narasiṃha verse dense with conjuncts, with the meter named as mālinī: 60 syllables, 16 seconds, returned as an MP3. Name the meter for a partial verse, or when auto-detect picks the wrong one.

It is not built for everything. It chants classical verse in one voice. It does not render Vedic accents, hold a conversation, or speak other languages.

How the model works

This is the author's design, described in his published report. In brief:

  • It continues from a recording. The model is given a short reference clip of chant and the new verse, and generates the audio that would come next in the same voice.
  • Each meter has its own reference clip. The clip carries the melody and the pace, which is why the meter is the one control that matters. Fifteen classical meters are covered, from the 8-syllable anuṣṭubh to the 21-syllable sragdharā, plus prose.
  • Sanskrit is prepared the way a reciter pronounces it. A text front end applies the sound changes at word boundaries and routes the verse through Kannada script internally, which keeps the short vowels that Hindi-trained speech models tend to drop.
  • A vocoder tuned for held vowels. Long sustained vowels expose any wobble in the final audio stage, so the author fine-tuned that stage on chant.
  • Hard clusters come out whole. The author reports that dense conjuncts, including retroflex aspirates such as ṣṭ and ḍḍh, render correctly.

The model builds on AI4Bharat's IndicF5 and NVIDIA's BigVGAN-v2. The full account is in the Vāgdhenu technical report.

From a research release to an API anyone can call

Vāgdhenu was published openly: code, weights and a demo. Running it yourself still takes a GPU, a working setup and some patience. That is routine for a researcher and a real barrier for a teacher, a publisher or an app developer.

Hosting it on Segmind removes that step.

  • Nothing to install. Try it in the browser playground, then call the same model from one endpoint.
  • An API shaped around the model. The meter is a picker with auto-detect, the verse can be in any of ten Indian scripts (Devanagari, Kannada, Telugu, Malayalam, Bengali, Gujarati, Gurmukhi, Odia, Tamil, Grantha), and a verse the model cannot render is turned away with a clear message and no charge.
  • The model as its author released it. The same weights, at the author's recommended settings, with his name and licence on the page.
  • Everything else you already use. One API key, immediate and background requests, pay per use, and capacity that follows demand. The same key reaches hundreds of other models.
  • A building block, not an island. Vāgdhenu TTS can be one step in a Pixelflow beside image and video models, for example a chant paired with generated visuals.

Bring your model

An open release was all it took to put this model in front of developers. If you have published a model, in any domain, we can do the same for yours. You keep the name, the credit and the licence. Segmind provides the endpoint, the playground, the billing and the scale, in a catalog developers already build on.

Tell us about your model.

Use it from the API

Send one verse. The response is the audio file, and its headers report the meter used, whether it was requested or detected, the syllable count and the cost.

APIChant one verseAPI reference
# pip install "segmind>=1.1.0"
# export SEGMIND_API_KEY="YOUR_API_KEY"
import segmind

result = segmind.run(
    "vagdhenu-tts",
    text="वसुदेवसुतं देवं कंसचाणूरमर्दनम् ।\nदेवकीपरमानन्दं कृष्णं वन्दे जगद्गुरुम् ॥",
    meter="auto",
    format="mp3",
)
print(result.get("output"))
# 1. Submit the request; the reply carries its request_id
REQUEST_ID=$(curl -s -X POST "https://api.segmind.com/v2/vagdhenu-tts" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "text": "वसुदेवसुतं देवं कंसचाणूरमर्दनम् ।\nदेवकीपरमानन्दं कृष्णं वन्दे जगद्गुरुम् ॥",
  "meter": "auto",
  "format": "mp3"
}' | jq -r .request_id)

# 2. Check its status until it is COMPLETED
curl -s "https://api.segmind.com/v2/requests/$REQUEST_ID/status" \
  -H "x-api-key: YOUR_API_KEY"

# 3. Fetch the result
curl -s "https://api.segmind.com/v2/requests/$REQUEST_ID" \
  -H "x-api-key: YOUR_API_KEY"

Recommended settings

SettingValueWhen
meterautoA complete verse or a half-verse.
metera named meterA partial verse, or when auto-detect picks the wrong one.
seed0 to 2147483647You want the same chant again. Change it for a different take; leave it empty or -1 for a random one.
formatwav or mp3wav for editing, mp3 for delivery.

Good to know

  • Pricing is per character of input: $0.0002 a character. A two-line anuṣṭubh verse (74 characters) costs $0.0148, and the longest common verse, a four-line sragdharā (227 characters), costs $0.0454. A rejected verse is not charged.
  • A two-line verse takes about 13 seconds and the longest verse about 47. The first request after a quiet spell can wait about 20 seconds more.
  • One verse per request: up to 4 lines, 100 syllables and 1,000 characters, with no line longer than 48 syllables.
  • Write the verse in an Indian script. Romanised (IAST) text is not accepted.
  • There is one voice, and it is the author's own. Use it responsibly and do not use it to impersonate him.
  • Classical (laukika) verse only. Vedic accents are not rendered.
  • Auto-detect needs a complete verse or a half-verse. Keep each half-verse on its own line, or separate the halves with a daṇḍa (।).
  • Output is 24kHz mono audio, WAV or MP3.

Resources

  • #text-to-speech
  • #sanskrit
  • #audio
  • #open-source
AM

Abhilash Mirji

@abhilashmirji

Product engineer at Segmind, shipping new AI models faster than my cats can knock things off the desk. 11+ years turning ambiguous problems into dependable products. Off-call: drumming, scuba diving, and getting outvoted by four cats and two dogs.

View profile

Posts

More from Abhilash Mirji

Make your own with Segmind

Run every model and Pixelflow in this post, and build your own workflows.

Start creating