> ## Documentation Index
> Fetch the complete documentation index at: https://www.bolna.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Kalpa Labs Voice Synthesis for Bolna Agents

> Configure Kalpa Labs text-to-speech in Bolna voice agents: models, voices, code-switched Hinglish, streaming, and telephony audio.

[Kalpa Labs](https://www.kalpalabs.ai/) is a text-to-speech provider whose conversational speech models render named voices and speak code-switched Hindi and English from a single model, with no language parameter. Speech streams over a persistent WebSocket, so audio starts playing while the model reply is still arriving.

***

## Quick config

```json theme={"system"}
"synthesizer": {
  "provider": "kalpa",
  "provider_config": {
    "voice": "Kiara",
    "model": "kalpa-tts-multilingual-beta-v0.1"
  },
  "stream": true,
  "buffer_size": 400
}
```

***

## Supported models

| Model                              | Languages                                                                             |
| ---------------------------------- | ------------------------------------------------------------------------------------- |
| `kalpa-tts-multilingual-beta-v0.1` | English and Hindi, including code-switched Hinglish. No language parameter (default). |
| `kalpa-tts-beta-v0.1`              | English only.                                                                         |

The multilingual model handles Hindi, English, and Hinglish in the same utterance on its own, so there is no `language` setting to configure.

***

## Voices

Voices are the named voices in Kalpa's catalog. The default is `Kiara`. Address a voice either by its display name (`voice`) or by its explicit id (`voice_id`); a display name is resolved to its id on the first connection of a call. Casing is normalized for you, so `voice: "kiara"` still resolves to `Kiara`.

***

## Key settings

| Setting                 | Type    | Default                            | Description                                                                                    |
| ----------------------- | ------- | ---------------------------------- | ---------------------------------------------------------------------------------------------- |
| `voice`                 | string  | `Kiara`                            | Voice display name from Kalpa's catalog                                                        |
| `voice_id`              | string  | none                               | Explicit Kalpa voice id, accepted alongside or instead of `voice`                              |
| `model`                 | string  | `kalpa-tts-multilingual-beta-v0.1` | One of the models above                                                                        |
| `stream`                | bool    | `false`                            | Enable streaming over the persistent WebSocket                                                 |
| `buffer_size`           | integer | `400`                              | Characters buffered before the first chunk is sent                                             |
| `chunk_length_schedule` | array   | `[50, 80, 120, 150]`               | Buffered-character thresholds for server-side segmentation, 1 to 10 values between 50 and 2000 |

`temperature`, `acoustic_temperature`, `max_new_tokens`, and `audio_quality` are optional tuning knobs. Only the ones you set are sent; anything left out uses Kalpa's tuned default for that model.

***

## How streaming works

A call runs on a single persistent WebSocket connection. Model output is forwarded to Kalpa as it arrives, and the `chunk_length_schedule` opts the connection into server-side segmentation: once buffered text crosses the next threshold and ends at a complete sentence, that part starts rendering while the rest is still streaming in. Bolna does no client-side chunking of the text.

The turn is closed with a flush at the end of the model reply, which renders whatever text remains. First audio can arrive well before that flush.

On interruption, Bolna cancels the open response and stops the audio, flushing first when needed so the connection always settles cleanly and is ready for the next turn.

***

## Audio output

Kalpa streams audio at 24 kHz. Bolna converts it depending on where the audio is going:

* **Telephony** - downsampled to 8 kHz and mu-law encoded
* **Web** - left at Kalpa's native 24 kHz, no resampling

Handoff and prewarm clips are generated with a one-shot HTTP call rather than the WebSocket.

***

## FAQ

<AccordionGroup>
  <Accordion title="Do I need to set a language for Hindi or Hinglish?">
    No. The default `kalpa-tts-multilingual-beta-v0.1` model speaks English, Hindi, and code-switched Hinglish from one model, with no language parameter. Use `kalpa-tts-beta-v0.1` if you want an English-only voice.
  </Accordion>

  <Accordion title="How do I pick a voice?">
    Pass a voice display name as `voice` (default `Kiara`), or an explicit `voice_id`. A display name is resolved to its id on the first connection, and casing does not matter.
  </Accordion>

  <Accordion title="Is Kalpa available for both telephony and web agents?">
    Yes. Bolna downsamples and mu-law encodes Kalpa's audio for telephony, and leaves it at native 24 kHz for web.
  </Accordion>

  <Accordion title="What does chunk_length_schedule do?">
    It sets the buffered-character thresholds at which Kalpa starts rendering each successive part of an utterance, which is what lets first audio start before the reply finishes. The default `[50, 80, 120, 150]` suits most agents; lower first values trade a little stability for faster time to first audio.
  </Accordion>
</AccordionGroup>

***

## Related

* [Audio Tab](/docs/agent-setup/audio-tab) - configure synthesizer in the dashboard
* [Maya](/docs/maya) - alternative Indian-language synthesizer
* [Sarvam](/docs/sarvam-voice) - Indian-language synthesizer with per-language voices
* [ElevenLabs](/docs/elevenlabs-voice) - Bolna's default English synthesizer
* [Latency](/docs/concepts/latency) - how synthesis affects response time
