Hinglish and beyond
Pāṇini TTS reads mixed-language text such as Hinglish naturally, in one voice.
Developers · Pāṇini text to speech
Pāṇini TTS turns text into speech from one endpoint, including mixed-language text such as Hinglish. Paste the Python on the right, add your key and run it.
Free API tier: 10,000 free text-to-speech characters and one free voice clone that speaks every language, no card required.
Then: $0.03125 per 1,000 characters, the same rate for every language.
1# pip install requests2import requests34r = requests.post(5 "https://api.sonexlabs.com/v1/speech",6 headers={"Authorization": "Bearer YOUR_API_KEY"},7 json={8 "text": "नमस्ते! आपका order कल शाम तक पहुँच जाएगा।",9 "output_format": "mp3", # wav, mp3, ogg, opus or mulaw10 # "voice_id": "...", # optional: GET /v1/voices lists them11 },12)13r.raise_for_status()14with open("hello.mp3", "wb") as f:15 f.write(r.content)16print("characters billed:", r.headers["X-Chars-Billed"])Only text is required. Text is capped at 5,000 characters per request here; use the streaming endpoint below for longer scripts.
Try it
Capabilities
Each option is a field on the same request body. No separate models, no per-feature endpoints.
Pāṇini TTS reads mixed-language text such as Hinglish naturally, in one voice.
One voice can speak across languages, and a cloned voice carries across languages too. There is no language setting to manage: the language is read from the text itself.
Upload a short reference recording to POST /v1/voices/clone and use the new voice id in any request. The speaker's accent carries over to every language the clone reads.
POST /v1/speech/stream returns audio as it is generated, for text up to 20,000 characters. Pāṇini TTS starts streaming audio in under 200 ms (time to first byte).
Pāṇini TTS is trained for 8 kHz phone audio. Request 8000 Hz and mulaw output for telephony bridges, or 16 to 48 kHz for apps and video.
Pick the output format and sample rate per request, and set speed from 0.5 to 2.0. Every response reports the characters billed in the X-Chars-Billed header.
1# pip install requests2import requests34with requests.post(5 "https://api.sonexlabs.com/v1/speech/stream",6 headers={"Authorization": "Bearer YOUR_API_KEY"},7 json={"text": open("chapter.txt", encoding="utf-8").read(), "sample_rate": 24000},8 stream=True,9) as r:10 r.raise_for_status()11 with open("chapter.wav", "wb") as f:12 for chunk in r.iter_content(chunk_size=None): # audio arrives sentence by sentence13 f.write(chunk)1curl https://api.sonexlabs.com/v1/speech \2 --header 'Authorization: Bearer YOUR_API_KEY' \3 --header 'Content-Type: application/json' \4 --data '{"text": "Your appointment is at 10 am tomorrow.", "output_format": "mulaw", "sample_rate": 8000}' \5 --output prompt.wavVoices
A voice is a recording of one speaker, and the language comes from your text, so any voice can read any supported language. The accent comes from the speaker. Pāṇini TTS has voices recorded by native speakers for Hindi, Tamil, Telugu, Bengali, Marathi, Japanese, English, French, Spanish (Latin American) and Modern Standard Arabic. For other languages, the text is read correctly by a voice from another language; for a local accent, clone a native speaker from a 10-second sample.
List the voices available to your workspace with GET /v1/voices and pass the id as voice_id.
Languages
Every language costs the same. Each page has a live playground and notes on how that language is written and read.
See every language grouped by region on text to speech by language, or the full register below.
The register
223 of 250 languages listed
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
R
S
T
U
V
W
X
Y
Z
Choosing an API
We sell one, so read this as a checklist to apply to every option, us included. The right choice depends on your languages and your channel, not on a ranking.
A demo sentence hides the hard parts. Paste real lines with prices, dates, phone numbers, product names and mixed scripts, and listen to each API in every language you need.
Many APIs, this one included, read some languages with a voice recorded in another language, which carries that speaker's accent. Pāṇini TTS has native voices for Hindi, Tamil, Telugu, Bengali, Marathi, Japanese, English, French, Spanish (Latin American) and Modern Standard Arabic. Elsewhere, clone a native speaker.
If your text mixes Hindi and English, check the voice does not switch accent or speaker halfway through a sentence.
For agents and IVR, what matters is how soon audio starts, measured from the region your servers run in, not the vendor's own benchmark.
Per character, per credit and per minute of audio are hard to compare. Find out whether spaces, markup and retries count, and whether every language costs the same.
Phone systems need 8 kHz or mu-law; video needs 44.1 or 48 kHz. For cloning, check what consent the vendor asks for and who may use the voice.
Pricing
Bhojpuri costs what English costs. No language tiers, no minimum commitment.
FAQ
Yes. 10,000 free text-to-speech characters and one free voice clone that speaks every language, no card required. After that, Pāṇini TTS costs $0.03125 per 1,000 characters, the same rate for every language.
There is no single best one: it depends on your languages, your channel (phone, app or video) and your budget. Use the checklist on this page and test each option on your own text. We sell Pāṇini TTS, so we are not neutral.
POST your text as JSON to /v1/speech with requests and write the response body to a file, as in the snippet at the top of this page. Add output_format for MP3, Opus or mu-law, and voice_id to pick a voice.
No. Pāṇini TTS reads the language from the text. The API accepts a language field, but it has no effect on pronunciation, so you can leave it out.
Yes. Pāṇini TTS is trained for 8 kHz phone audio. Ask for output_format mulaw and sample_rate 8000 to get G.711 mu-law audio in a WAV container.
Yes, from a 10-second sample, and the free tier includes one clone. The cloned voice can read any supported language; its accent stays the reference speaker's.
Need the other direction? Valmiki speech to text transcribes audio, billed by the second.
Free tier: 10,000 free text-to-speech characters and one free voice clone that speaks every language, no card required.