> 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 full documentation content in one file, see https://docs.sarvam.ai/llms-full.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.sarvam.ai/_mcp/server.

# How to change the speaker voice

> Learn how to choose specific voices for text-to-speech output using the speaker parameter. Explore Bulbul v3's 30+ natural-sounding voices for different languages and use cases.

The `speaker` parameter lets you choose a specific voice for the speech output.

Speaker names are case-sensitive and must be lowercase (e.g., `shubh`, not `Shubh`).

### **Speaker Selection**

Specify the speaker using the `speaker` parameter in your request. It is an optional parameter — if omitted, the API uses the default voice (**shubh** for bulbul:v3, **anushka** for bulbul:v2).

### Available Voices — Bulbul v3

Bulbul v3 offers 30+ natural-sounding voices:

**Male:** shubh (default), aditya, rahul, rohan, amit, dev, ratan, varun, manan, sumit, kabir, aayan, ashutosh, advait, anand, tarun, sunny, mani, gokul, vijay, mohit, rehan, soham

**Female:** ritu, priya, neha, pooja, simran, kavya, ishita, shreya, roopa, tanya, shruti, suhani, kavitha, rupali

### Production-Recommended Speakers (Bulbul v3)

Speakers are evaluated by **Critical Error Rate (CER)** — the percentage of words with critical pronunciation errors. Lower CER = higher reliability.

| Tier                   | CER Range  | Recommendation                                 |
| ---------------------- | ---------- | ---------------------------------------------- |
| **Tier 1 — Excellent** | ≤ 0.20%    | First choice for all production use            |
| **Tier 2 — Good**      | 0.21–0.40% | Safe for production use                        |
| **Tier 3 — Moderate**  | 0.41–0.60% | Acceptable; test per language before deploying |

| Speaker  | Gender | CER   | Quality Tier           |
| -------- | ------ | ----- | ---------------------- |
| mani     | Male   | 0.00% | Tier 1 — Excellent     |
| priya    | Female | 0.13% | Tier 1 — Excellent     |
| ishita   | Female | 0.13% | Tier 1 — Excellent     |
| varun    | Male   | 0.06% | Tier 1 — Special Use ★ |
| roopa    | Female | 0.26% | Tier 2 — Good          |
| shubh    | Male   | 0.30% | Tier 2 — Good          |
| pooja    | Female | 0.30% | Tier 2 — Good          |
| sunny    | Male   | 0.33% | Tier 2 — Good          |
| ratan    | Male   | 0.33% | Tier 2 — Good          |
| rehan    | Male   | 0.33% | Tier 2 — Good          |
| ashutosh | Male   | 0.40% | Tier 2 — Good          |
| amit     | Male   | 0.40% | Tier 2 — Good          |
| rahul    | Male   | 0.40% | Tier 2 — Good          |
| aditya   | Male   | 0.46% | Tier 3 — Moderate      |
| simran   | Female | 0.46% | Tier 3 — Moderate      |
| suhani   | Female | 0.46% | Tier 3 — Moderate      |
| shreya   | Female | 0.46% | Tier 3 — Moderate      |
| anand    | Male   | 0.46% | Tier 3 — Moderate      |
| rupali   | Female | 0.50% | Tier 3 — Moderate      |
| neha     | Female | 0.53% | Tier 3 — Moderate      |
| ritu     | Female | 0.53% | Tier 3 — Moderate      |
| manan    | Male   | 0.53% | Tier 3 — Moderate      |
| dev      | Male   | 0.60% | Tier 3 — Moderate      |

**★ Note on varun:** Despite having a very low CER (0.06%), `varun` carries a deep, dramatic villain/suspense character. He is **not** suitable as a neutral default. Reserve `varun` exclusively for thriller, drama, or suspense content.

### Recommended Speakers by Language

Not all speakers perform equally across all languages. Always use these language-specific picks over arbitrary selection:

| Language  | Code    | Recommended Male | Recommended Female |
| --------- | ------- | ---------------- | ------------------ |
| English   | `en-IN` | ratan            | ishita             |
| Hindi     | `hi-IN` | shubh, ashutosh  | priya, suhani      |
| Telugu    | `te-IN` | shubh, ratan     | neha, priya        |
| Kannada   | `kn-IN` | shubh, ratan     | neha, ishita       |
| Bengali   | `bn-IN` | rehan            | roopa, suhani      |
| Tamil     | `ta-IN` | ratan, rohan     | ishita, ritu       |
| Odia      | `od-IN` | shubh            | ritu, pooja        |
| Malayalam | `ml-IN` | shubh            | pooja              |
| Marathi   | `mr-IN` | ratan            | priya, ritu        |
| Punjabi   | `pa-IN` | mani             | roopa, suhani      |
| Gujarati  | `gu-IN` | ratan            | priya, ritu        |

**Top picks:** `priya` & `ishita` (best female — use across Hindi, Telugu, Kannada, Tamil, Marathi, Gujarati, English) · `mani` (best male overall, Punjabi) · `shubh` (best male for hi, te, kn, od, ml) · `ratan` (best male for en, te, kn, ta, mr, gu).

### Available Voices — Bulbul v2

#### Female Voices

* **anushka:** Clear and professional
* **manisha:** Warm and friendly
* **vidya:** Articulate and precise
* **arya:** Young and energetic

#### Male Voices

* **abhilash:** Deep and authoritative
* **karun:** Natural and conversational
* **hitesh:** Professional and engaging

Listen to voice samples on our dashboard: [Voice Samples – Sarvam TTS](https://dashboard.sarvam.ai/text-to-speech)

### Example Code

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

# Initialize the REST client
client = SarvamAI(api_subscription_key="YOUR_SARVAM_API_KEY")

# Generate speech using REST
audio = client.text_to_speech.convert(
    text="Welcome to Sarvam AI!",
    model="bulbul:v3",
    target_language_code="en-IN",
    speaker="shubh"
)
save(audio, "output1.wav")

```

```python
import asyncio
import base64
from sarvamai import AsyncSarvamAI, AudioOutput
import websockets

async def tts_stream():
    client = AsyncSarvamAI(api_subscription_key="YOUR_SARVAM_API_KEY")

    async with client.text_to_speech_streaming.connect(model="bulbul:v3") as ws:
        await ws.configure(
            target_language_code="hi-IN", 
            speaker="shubh"
        )
        print("Sent configuration")

        long_text = (
            "भारत की संस्कृति विश्व की सबसे प्राचीन और समृद्ध संस्कृतियों में से एक है।"
            "यह विविधता, सहिष्णुता और परंपराओं का अद्भुत संगम है, "
            "जिसमें विभिन्न धर्म, भाषाएं, त्योहार, संगीत, नृत्य, वास्तुकला और जीवनशैली शामिल हैं।"
        )

        await ws.convert(long_text)
        print("Sent text message")

        await ws.flush()
        print("Flushed buffer")

        chunk_count = 0
        with open("output.mp3", "wb") as f:
            async for message in ws:
                if isinstance(message, AudioOutput):
                    chunk_count += 1
                    audio_chunk = base64.b64decode(message.data.audio)
                    f.write(audio_chunk)
                    f.flush()

        print(f"All {chunk_count} chunks saved to output.mp3")
        print("Audio generation complete")

        
        if hasattr(ws, "_websocket") and not ws._websocket.closed:
            await ws._websocket.close()
            print("WebSocket connection closed.")


if __name__ == "__main__":
    asyncio.run(tts_stream())

# --- Notebook/Colab usage ---
# await tts_stream()

```