> This page is for Model APIs.

> Sarvam Voice Agents (Samvaad) is a voice AI agent platform for Indian languages: build, test and deploy AI calling agents on your own phone numbers, from ₹3 a minute. Start here: https://docs.sarvam.ai/voice-agents/why-voice-agents.
> For clean Markdown of any page, append `.md` to the page URL.
> For a complete documentation index, see https://docs.sarvam.ai/llms.txt. For a section index, append `/llms.txt` to any section URL (for example https://docs.sarvam.ai/voice-agents/llms.txt).
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.sarvam.ai/_mcp/server.

# Bulbul

> Bulbul v4 Flash (latest) and Bulbul v3 - High-quality multilingual text-to-speech for Indian languages with natural prosody and a large catalog of speaker voices.

Bulbul v4 Flash is our latest text-to-speech model — 200+ persona voices and the same API contract as Bulbul v3. Bulbul v3 remains the API default when `model` is omitted and offers 30+ classic speaker names, improved audio quality, and up to 2500 characters per request.

> **Note**
>
> **Bulbul v4 Flash** is the latest model, offering the same request and response contract as `bulbul:v3` but with a much larger, persona-based voice catalog (200+ speaker voices across style and use case). **Bulbul v3** remains the API default when `model` is omitted. Both are available on the **Text-to-Speech endpoint** (`/text-to-speech`).

## At a Glance

|                       |                                                                                                                                                                                                                                 |
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Model ID**          | `bulbul:v4-flash` (latest, recommended for new integrations), `bulbul:v3` (stable; API default when `model` is omitted), `bulbul:v2` (legacy)                                                                                   |
| **What it does**      | Text-to-speech with natural speaker voices and pace control                                                                                                                                                                     |
| **Languages**         | 11 (10 Indian + English), [full list](#language-support)                                                                                                                                                                        |
| **APIs**              | [REST](/api/api-guides-tutorials/text-to-speech/rest-api), [HTTP streaming](/api/api-guides-tutorials/text-to-speech/streaming-api/http-stream), [WebSocket](/api/api-guides-tutorials/text-to-speech/streaming-api/web-socket) |
| **Input limits**      | 2,500 characters per REST request; sample rates up to 48 kHz (REST API only), [all limits](#limits)                                                                                                                             |
| **Pricing**           | [Pricing page](/api/getting-started/pricing)                                                                                                                                                                                    |
| **Best for**          | Voice agents, IVR prompts, narration and audio content                                                                                                                                                                          |
| **Known limitations** | [See below](#known-limitations)                                                                                                                                                                                                 |

## Bulbul v4 Flash vs v3

|                            | Bulbul v4 Flash                                                                                                                                                                     | Bulbul v3                                 |
| -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------- |
| **Status**                 | Latest, recommended for new integrations                                                                                                                                            | Stable (API default when `model` omitted) |
| **Speaker voices**         | 200+ persona voices (222 IDs), organized by language and style, see [Voices](/api/api-guides-tutorials/text-to-speech/voices#bulbul-v4-flash-voices)                                | 30+ named speakers                        |
| **Languages (voices)**     | Hindi, English, `enhi`, Bengali, Gujarati, Kannada, Marathi, Punjabi, Tamil, Telugu — see [v4 catalog note](/api/api-guides-tutorials/text-to-speech/voices#bulbul-v4-flash-voices) | 11 BCP-47 codes (incl. Malayalam, Odia)   |
| **Request/response shape** | Same                                                                                                                                                                                | Same                                      |
| **Endpoint**               | `/text-to-speech`                                                                                                                                                                   | `/text-to-speech`                         |

> **Tip**
>
> For new integrations, set `model="bulbul:v4-flash"` in any of the requests below along with a `speaker` value from the [Bulbul v4 Flash voice catalog](/api/api-guides-tutorials/text-to-speech/voices#bulbul-v4-flash-voices). The request/response shape is identical to `bulbul:v3`.

## Key Features

#### 200+ Persona Voices (v4 Flash)

222 persona voices on `bulbul:v4-flash`, organized by language and style (for example `simran_en_customer`, `ishita_hi_devotional`).

#### 30+ Speaker Voices (v3)

On `bulbul:v3`: natural-sounding voices including Shubh, Aditya, Ritu, Simran, Anand, Roopa, Priya, and more.

#### Extended Character Limit

Support for up to 2500 characters per request for longer content generation.

#### Sample Rate Options

REST accepts 8000–48000 Hz (see [Limits](#limits)). Streaming accepts 8000–24000 Hz. Omitted → 22050 Hz output.

#### Language Support (v3)

On `bulbul:v3`: support for 11 languages (10 Indian + English) with BCP-47 codes. The target language code is primarily used by the pre-TTS text normalization model.

#### Natural Prosody

Human-like speech patterns with natural intonation and emotional expression.

#### Pace Control

Adjustable speech speed from 0.5x to 2.0x for customized delivery.

## Language Support

### Bulbul v3

Bulbul v3 supports the following Indian languages:

Hindi (`hi-IN`), Bengali (`bn-IN`), Tamil (`ta-IN`), Telugu (`te-IN`), Gujarati (`gu-IN`), Kannada (`kn-IN`), Malayalam (`ml-IN`), Marathi (`mr-IN`), Punjabi (`pa-IN`), Odia (`od-IN`), English (`en-IN`)

### Bulbul v4 Flash

Bulbul v4 Flash voices cover Hindi, English, English–Hindi (`enhi`), Bengali, Gujarati, Kannada, Marathi, Punjabi, Tamil, and Telugu. Malayalam and Odia are not yet offered on v4 Flash.

## Available Speakers

### Bulbul v3

Bulbul v3 offers 30+ speaker voices:

**Speakers:** Shubh (default), Aditya, Ritu, Priya, Neha, Rahul, Pooja, Rohan, Simran, Kavya, Amit, Dev, Ishita, Shreya, Ratan, Varun, Manan, Sumit, Roopa, Kabir, Aayan, Ashutosh, Advait, Anand, Tanya, Tarun, Sunny, Mani, Gokul, Vijay, Shruti, Suhani, Mohit, Kavitha, Rehan, Soham, Rupali

### Bulbul v4 Flash

Bulbul v4 Flash offers 200+ persona voices (222 catalog IDs). Most IDs follow `<name>_<language>_<style>` (for example `ishita_hi_devotional`, `simran_en_customer`); some use the `enhi` tag for English–Hindi code-mixed styles. Browse the full catalog on the [Voices page](/api/api-guides-tutorials/text-to-speech/voices#bulbul-v4-flash-voices).

> **Note**
>
> Use the `speaker` parameter to select specific voices for your use case. For **bulbul:v4-flash**, omit `speaker` to use the default persona **`shubh_enhi_ads`**, or pick any ID from the v4 catalog. The v3 default `shubh` is not valid on this model.

> **Note**
>
> **REST output codec:** `wav`, `mp3`, `aac`, `flac`, and `linear16` work with **bulbul:v3** and **bulbul:v4-flash**. The `opus` value may appear in the schema but currently returns an error on `/text-to-speech`; prefer `mp3` for compressed audio.

## Key Capabilities

#### Basic Usage

Convert text to speech with Bulbul v4 Flash — recommended for new integrations.

#### Python

```python
from sarvamai import SarvamAI
from sarvamai.play import play, save

client = SarvamAI(
    api_subscription_key="YOUR_SARVAM_API_KEY"
)

response = client.text_to_speech.convert(
    text="Hello, how are you today?",
    language_code="en-IN",
    model="bulbul:v4-flash",
    speaker="simran_en_customer",
)

# Play the audio
play(response)

# Save the response to a file
save(response, "output.wav")
```

#### JavaScript

```javascript
import { SarvamAIClient } from "sarvamai";

const client = new SarvamAIClient({
  apiSubscriptionKey: 'YOUR_SARVAM_API_KEY'
});

async function main() {
  const response = await client.textToSpeech.convert({
    text: 'Hello, how are you today?',
    language_code: 'en-IN',
    model: 'bulbul:v4-flash',
    speaker: 'simran_en_customer',
  });

  console.log(response);
}

main();
```

#### cURL

```bash
curl -X POST https://api.sarvam.ai/text-to-speech \
  -H "api-subscription-key: <YOUR_SARVAM_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Welcome to Sarvam AI!",
    "language_code": "en-IN",
    "model": "bulbul:v4-flash",
    "speaker": "simran_en_customer"
  }'
```

#### Speaker Selection

On **bulbul:v4-flash**, pick a persona ID from the [v4 catalog](/api/api-guides-tutorials/text-to-speech/voices#bulbul-v4-flash-voices). For **bulbul:v3**, use short names such as `priya` or `shubh`.

#### Python

```python
from sarvamai import SarvamAI

client = SarvamAI(
    api_subscription_key="YOUR_SARVAM_API_KEY"
)

# Select a specific speaker
response = client.text_to_speech.convert(
    text="Hello, how are you today?",
    language_code="en-IN",
    model="bulbul:v4-flash",
    speaker="simran_en_customer",  # v4 persona ID; for v3 use short names like priya, shubh
)

print(response)
```

#### JavaScript

```javascript
import { SarvamAIClient } from "sarvamai";

const client = new SarvamAIClient({
  apiSubscriptionKey: 'YOUR_SARVAM_API_KEY'
});

async function main() {
  // Select a specific speaker
  const response = await client.textToSpeech.convert({
    text: 'Hello, how are you today?',
    language_code: 'en-IN',
    model: 'bulbul:v4-flash',
    speaker: 'simran_en_customer'
  });

  console.log(response);
}

main();
```

#### cURL

```bash
curl -X POST https://api.sarvam.ai/text-to-speech \
  -H "api-subscription-key: <YOUR_SARVAM_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Welcome to Sarvam AI!",
    "language_code": "en-IN",
    "model": "bulbul:v4-flash",
    "speaker": "simran_en_customer"
  }'
```

#### Sample Rate Control

Choose the audio quality that best fits your needs. Omitted `speech_sample_rate` → 22050 Hz output for v3 and v4-flash.

#### Python

```python
from sarvamai import SarvamAI

client = SarvamAI(
    api_subscription_key="YOUR_SARVAM_API_KEY"
)

# Control audio quality with sample rate
response = client.text_to_speech.convert(
    text="Hello, how are you today?",
    language_code="en-IN",
    model="bulbul:v4-flash",
    speech_sample_rate=48000  # Options: 8000, 16000, 22050, 24000, 32000, 44100, 48000. Above 24000 is REST only
)

print(response)
```

#### JavaScript

```javascript
import { SarvamAIClient } from "sarvamai";

const client = new SarvamAIClient({
  apiSubscriptionKey: 'YOUR_SARVAM_API_KEY'
});

async function main() {
  // Control audio quality with sample rate
  const response = await client.textToSpeech.convert({
    text: 'Hello, how are you today?',
    language_code: 'en-IN',
    model: 'bulbul:v4-flash',
    speech_sample_rate: 48000  // Options: 8000, 16000, 22050, 24000, 32000, 44100, 48000. Above 24000 is REST only
  });

  console.log(response);
}

main();
```

#### cURL

```bash
curl -X POST https://api.sarvam.ai/text-to-speech \
  -H "api-subscription-key: <YOUR_SARVAM_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Welcome to Sarvam AI!",
    "language_code": "en-IN",
    "model": "bulbul:v4-flash",
    "speech_sample_rate": 48000
  }'
```

> **Note**
>
> **`speech_sample_rate` values the API accepts**
>
> * **REST** (`POST /text-to-speech`): `8000`, `16000`, `22050`, `24000`, `32000`, `44100`, `48000` (all Bulbul models, including **bulbul:v3** and **bulbul:v4-flash**).
> * **Streaming** (HTTP stream and WebSocket): `8000`, `16000`, `22050`, `24000` only.
> * **Omitted:** the API returns **22050 Hz** audio.

## Limits

| Limit                             | Value                                                                                                                          |
| --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| Max characters per request (REST) | 2,500                                                                                                                          |
| `pace`                            | 0.5–2.0 (`bulbul:v3`, `bulbul:v4-flash`) / 0.3–3.0 (`bulbul:v2`)                                                               |
| `pitch`                           | -1.0 to 1.0; suitable range -0.75 to 0.75 (`bulbul:v2` only)                                                                   |
| `loudness`                        | 0.1–3.0 (`bulbul:v2` only)                                                                                                     |
| `speech_sample_rate`              | REST: 8000 / 16000 / 22050 / 24000 / 32000 / 44100 / 48000. Streaming: 8000 / 16000 / 22050 / 24000. Omitted → 22050 Hz output |
| Rate limits                       | See [Rate Limits](/api/getting-started/pricing#rate-limits)                                                                    |

## Known Limitations

| Limitation                                 | Detail                                                                                                | Workaround                                                                        |
| ------------------------------------------ | ----------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- |
| **No SSML support**                        | Bulbul does not support SSML tags for fine-grained prosody control                                    | Use `pace` for coarse control; split text at natural pause points                 |
| **Romanised Indic input degrades quality** | Transliterated input (e.g., `"Aapka order confirm ho gaya hai"`) significantly reduces output quality | Always use native script for Indic words (e.g., `"आपका order confirm हो गया है"`) |
| **High sample rates are REST-only**        | `32000`, `44100`, and `48000` are accepted on REST only; streaming accepts up to `24000`              | Use ≤ 24000 Hz for HTTP stream or WebSocket                                       |

## Next Steps

#### [Developer quickstart](/api/api-guides-tutorials/text-to-speech/overview)

Learn how to integrate the Bulbul v3 API within your application.

#### [API Reference](/api-reference/text-to-speech/convert)

Complete API documentation for text to speech endpoints.

#### [Cookbook](/api/api-guides-tutorials/text-to-speech/rest-api)

Step-by-step tutorial for text-to-speech implementation.