Skip to main content
Lehar is provider-pluggable. You pick the LLM, STT (speech-to-text), and TTS (text-to-speech) by name — on the agent’s config, which every call with that agent runs as saved. Cloud, local, and self-hosted providers are interchangeable.

Capabilities

Set them in config:
config takes only the keys listed under Agent config keys; any other key is rejected with a 400.

Realtime (audio-to-audio) models

Some Gemini models (Live / native-audio) do integrated voice input and output — there is no separate STT or TTS stage. When a realtime model is selected, STT/TTS settings are ignored, and Lehar skips estimated STT/TTS billing for that session. Set gemini_realtime_language to the language a Gemini Live model speaks: en-IN, hi-IN, bn-IN, gu-IN, kn-IN, ml-IN, mr-IN, ta-IN or te-IN. Leave it unset for the platform default, en-IN. It applies to Live models that aren’t native-audio; native-audio models choose the language themselves. Any other value is rejected with a 400 when the agent is saved.

Voices

  • Sarvam — pick a Bulbul model version with sarvam_tts_model (bulbul:v3, the default, or bulbul:v2), then a speaker (Sarvam doesn’t use voice). Speakers are specific to the model version and the two sets are disjoint — a v2 speaker on v3 is rejected at save time. Speaking pace is configurable (0.5–2.0 on bulbul:v3, 0.3–3.0 on bulbul:v2), and tts_language (the spoken output language) is separate from the STT input language. On bulbul:v3, sarvam_tts_temperature (0.01–1.0) sets how much the delivery varies: lower is steadier, higher is more expressive. Leave it unset for the platform default, 0.6.
  • Murf — voice is a Murf {locale}-{name} id (e.g. en-IN-anisha), with an optional murf_tts_style (Conversational, Promo, Narration) and signed murf_tts_speed / murf_tts_pitch in −50…50. murf_tts_locale makes the voice speak another language Murf lists for it — see Murf languages. Real-time streaming only; there is no model selector.
  • ElevenLabs — voice is an ElevenLabs voice id and elevenlabs_tts_model selects the model: eleven_flash_v2_5 (default, lowest latency), eleven_turbo_v2_5, eleven_multilingual_v2, or eleven_v3. Flash and Turbo bill at half the per-character rate of the other two. Optional elevenlabs_tts_language plus voice settings elevenlabs_tts_stability, elevenlabs_tts_similarity_boost and elevenlabs_tts_style in 0…1, elevenlabs_tts_speed in 0.8…1.2, and elevenlabs_tts_use_speaker_boost. Leave a setting unset to use the voice’s own.
  • Edge — voices use Edge TTS voice names (e.g. en-IN-NeerjaNeural).
  • Kokoro (local) — English and Hindi voices; the pipeline language is derived from the voice name, so use only the voices the catalog lists.
  • Qwen3 (self-hosted) — a model size (0.6b fast / 1.7b quality) plus a voice, selected with the voice field. Lehar hosts its own fine-tuned voices manish and shail (Hinglish), plus reference-clip clones ojas, shruti, happy and sad. The language selector has no Hindi entry — use a Hinglish voice instead.
  • LiveKit — livekit_tts_model picks the model from the catalog’s tts.livekit_models (the editor selects tts.default_livekit_model); any other model is rejected with a 400 when the agent is saved. voice is a LiveKit TTS voice ID that belongs to that model.

Murf languages

A Murf voice also speaks the other languages Murf lists for it. Set murf_tts_locale to one of them, such as hi-LATN for Hinglish (Hindi and English written in Latin script); leave it unset for the voice’s own language (en-IN for every voice below). A language the voice doesn’t list is rejected with a 400 when the agent is saved. In the dashboard, the Voice list offers each voice once per language, such as “Anisha · Hinglish”. The catalog carries the same lists in tts.murf_voice_locales and the language names in tts.murf_locales. A Murf voice ID that isn’t in the catalog may use any language in tts.murf_locales.

Pronunciation

Attach a pronunciation dictionary to an agent (via pronunciation_dictionary_id) to control how it says specific words — brand names, places, acronyms. The rules are applied as a text substitution just before speech, so they behave identically across every TTS provider. GET /catalog/models advertises this with pronunciation_dictionary_supported, and names the providers that additionally accept IPA entries in pronunciation_dictionary_ipa_providers.

Sarvam LLM reasoning

Sarvam LLMs reason by default, which costs voice latency and bills reasoning tokens as completion tokens. Set sarvam_llm_reasoning_effort to low (recommended for voice), medium, high, or off to disable chain-of-thought entirely. Leave it unset to inherit the deployment’s default.

Sarvam speech-to-text

  • Language — set language to the language your callers speak, such as hi-IN, te-IN or ta-IN (Sarvam’s 22 Indian languages plus en-IN). The call is transcribed in that language. unknown (auto-detect) keeps the platform’s default language, Hindi, on the realtime models (saaras:v3-realtime, the default, and saaras:v4), because auto-detect on saaras:v3-realtime translates callers into English.
  • Mode — sarvam_stt_mode sets what the caller’s speech becomes before the agent reads it: codemix (English words stay in English, the rest in the caller’s script), transcribe (everything in the caller’s script), translate (English), translit (romanised) or verbatim (word for word, fillers kept). Leave it unset to inherit the deployment’s default, codemix. Any other value is rejected with a 400 when the agent is saved.
  • Keyterms (saaras:v4 only) — sarvam_stt_keyterms lists names, brands, places or jargon your callers are likely to say, one term per item, such as ["PhonePe", "Visakhapatnam"]. They bias recognition toward those terms for the whole call, but don’t guarantee them. saaras:v4 is opt-in: set stt_model to saaras:v4 (saaras:v3-realtime stays the default); on any other model the keyterms are not sent. Use at most 50 distinct terms of up to 64 characters each, with no comma, semicolon or control character inside a term (put a multi-word name in one item), and keep the keyterms plus any sarvam_stt_prompt within 7,500 bytes once encoded (an Indic-script character counts as 8). A list that breaks a rule is rejected with a 400 when the agent is saved. Pair keyterms with codemix mode to keep a Latin-script name such as “PhonePe” in Latin script.

Agent config keys

An agent’s config holds only the settings the dashboard’s agent editor sets for the agent’s channel. POST /agent and PUT /agent/{agent_id} reject any other key with a 400 that names it: other spellings of these keys, nested sections such as tts or stt, prompt text, placeholder values and keys the platform sets itself. Prompt text belongs in the agent’s objective, instruction, task, faqs and sample_conversations fields, and per-call values in custom_variables. Publishing a draft whose config still holds another key returns 422.

Voice agents

WhatsApp agents

llm_provider, llm_model, language, tone, use_emoji, max_message_length, and whatsapp (the opening and reminder templates; the follow-up cadence is set on the campaign).

Discover what’s available

GET /catalog/models (scope sessions:read) returns the live catalog that powers the dashboard’s agent editor: LLM/STT/TTS providers, their models and defaults, Gemini voices and Gemini Live languages (llm.gemini_realtime_languages, default llm.gemini_default_realtime_language), Edge voices, Sarvam speakers, Murf voices and the languages each one speaks (tts.murf_voice_locales, named in tts.murf_locales), the LiveKit TTS models (tts.livekit_models, default tts.default_livekit_model), and Sarvam STT modes, plus which Sarvam STT models are realtime (stt.sarvam_realtime_models), which take keyterms (stt.sarvam_keyterm_models) and the keyterm limits (stt.sarvam_keyterm_limits). Read it at runtime rather than hard-coding lists.
Provider selection is one direction only: it flows to the agent worker as session metadata at dispatch time. If your deployment restricts which providers are configured, unavailable ones simply won’t appear in the catalog.

Agents

Set them on the agent.

Sessions

Try the agent on a test call.