Skip to navigation

Svara

Speed, pronunciation dictionaries, eager streaming and sampling controls for Svara TTS.

Svara is a text-to-speech service from Kenpath Labs, covering Hindi and other Indic languages along with English and many more. Svara tuning is passed in synthesizer.options.

{
"verb": "say",
"text": "नमस्ते, आपकी booking confirm हो गई है।",
"synthesizer": {
"vendor": "svara",
"language": "hi",
"voice": "sv_fhn6tfve",
"options": {
"speed": 1.0
}
}
}

You can also set these in the portal under Extra Options on the speech credential, in which case they apply to every request that uses that credential. Settings supplied on the verb take precedence.

Voices and languages

Voice ids start with sv_. The portal lists each voice under its native language, using Svara’s language codes (en, hi, ta, …). language is passed to Svara as-is; if you leave it out, Svara detects the language from the script of the text. Svara handles mixed Hindi-English text without any markup.

Svara serves a single model, svara-tts-turbo, which is the default.

Options

speed
number

Speech speed, 0.7 – 1.5. Defaults to 1.0. Pitch is preserved.

pronunciation_dictionary_id
string

The id of a pronunciation dictionary created in your Svara account, applied to every utterance. An unknown id is not an error — the text is spoken without the dictionary.

Every option is optional. An option you don’t set is not sent, so Svara’s own default applies.

Streaming

These apply when Svara is driven by TTS streaming, for example from the agent verb.

mode
string

sentence (Svara’s default) waits for a sentence boundary before speaking. eager starts speaking a few words into the text, for the lowest latency.

chunk_words
number

eager only. Words per synthesis chunk. Defaults to 4, which is also the minimum.

peek_words
number

eager only. Lookahead words held back so each chunk knows what comes next, 1 – 5. Defaults to 2.

max_chunk_words
number

eager only. Upper bound on a chunk once text has queued up. Defaults to 20.

Sampling

Svara’s defaults are tuned by Svara, and it recommends leaving these unset unless you have measured a reason to change them. They apply to both say and streaming.

temperature
number

0 – 2.

top_p
number

0 – 1.

top_k
number

-1 or more.

min_p
number

0 – 1.

repetition_penalty
number

1 – 2.

presence_penalty
number

0 – 2.

Non-streaming say

These apply to a say that is not streamed.

normalize
boolean

Speak numbers, dates, currency and units in words for the request’s language. On by default, and only takes effect when language is set.

max_tokens
number

Audio token budget, 1 – 8192 (50 tokens is one second). Sized from the text when unset.

chunk_size
number

Maximum characters per synthesis chunk, 50 – 2000.

buffer_ms
number

Audio Svara buffers before it starts sending, 0 – 5000 ms.

chunk_codes
number

Send audio after every N generated codes, 1 – 200 (50 codes is one second).

On the streaming connection Svara does not validate option values: an out-of-range value is ignored rather than rejected. A non-streaming say with an out-of-range value fails.

Endpoint override

Svara credentials have no API base URL field in the portal. If you need to point at a non-default endpoint — a proxy, for example — set api_uri in Extra Options alongside the tuning fields:

{
"api_uri": "my-proxy.example.com",
"speed": 1.0
}

Leave it out to use Svara’s standard endpoint (api.kenpathlabs.com).

Streaming

Svara supports TTS streaming, so it can be driven token-by-token from an LLM using tts:tokens. Svara does not return word-level timestamps, so on barge-in jambonz cannot trim the assistant’s turn to the words the caller actually heard.

Each call that streams to Svara holds one of your Svara account’s concurrent streams for the length of the call. Check your Svara plan’s concurrency limit against the number of simultaneous calls you expect.