Sarvam Bulbul v3 TTS API

Text-to-speech in 11 Indian languages with 37 voices.

PlaygroundAPI
Pricing
~4.89s
POST /v2/sarvam-bulbul-v3-tts · submit + poll
 1# pip install "segmind>=1.1.0"
 2# export SEGMIND_API_KEY="YOUR_API_KEY"
 3import segmind
 4
 5# Async (v2): submit to the queue and block until COMPLETED.
 6# run() returns the final result dict (600s deadline, 1.0s poll by default).
 7result = segmind.run(
 8    "sarvam-bulbul-v3-tts",
 9    text="नमस्ते! सेगमाइंड में आपका स्वागत है। आज हम भारतीय भाषाओं के लिए natural text-to-speech का demo देखेंगे।",
10    language_code="hi-IN",
11    speaker="shubh",
12    pace=1,
13    temperature=0.6,
14    output_audio_codec="wav",
15    speech_sample_rate=24000,
16)
17print(result["status"])                      # COMPLETED
18print(result.get("output"))                  # model output (e.g. media URL)
19print(result["metrics"]["inference_time"])   # server compute seconds
20
21# --- Or submit + poll manually (track request_id, control the cadence) ---
22from segmind import SegmindClient, InferenceFailed, InferenceTimeout
23
24client = SegmindClient()                      # reads SEGMIND_API_KEY
25payload = {
26    "text": "नमस्ते! सेगमाइंड में आपका स्वागत है। आज हम भारतीय भाषाओं के लिए natural text-to-speech का demo देखेंगे।",
27    "language_code": "hi-IN",
28    "speaker": "shubh",
29    "pace": 1,
30    "temperature": 0.6,
31    "output_audio_codec": "wav",
32    "speech_sample_rate": 24000,
33}
34job = client.submit_async("sarvam-bulbul-v3-tts", **payload)
35print(job.request_id)                         # available immediately
36try:
37    result = job.wait(timeout=600, interval=1.0)
38except InferenceTimeout as e:
39    print("still running:", e.request_id)
40except InferenceFailed as e:
41    print("failed:", e.detail)

API Endpoint

POSThttps://api.segmind.com/v1/sarvam-bulbul-v3-tts

Parameters

language_coderequired
string

Language of the input text as a BCP-47 code. Match the script's language so Hindi and Marathi (both Devanagari) are not confused.

Default: "hi-IN"
Allowed values (11 total):
Hindi (hi-IN)→"hi-IN"
Bengali (bn-IN)→"bn-IN"
Tamil (ta-IN)→"ta-IN"
Telugu (te-IN)→"te-IN"
Kannada (kn-IN)→"kn-IN"
Malayalam (ml-IN)→"ml-IN"
Marathi (mr-IN)→"mr-IN"
Gujarati (gu-IN)→"gu-IN"
Punjabi (pa-IN)→"pa-IN"
Odia (od-IN)→"od-IN"
+1 more
textrequired
string

Text to synthesize, up to 2,500 characters; write Indic words in native script, code-mixed English is fine. Comma-format long numbers for accurate reading.

output_audio_codecoptional
string

Audio container of the response. Use wav for editing, mp3 for web delivery, mulaw or alaw for telephony.

Default: "wav"
Allowed values :
"wav""mp3""aac""flac""opus""linear16""mulaw""alaw"
paceoptional
number

Speaking speed multiplier, from 0.5 to 2.0. Keep 1.0 for natural delivery; lower for narration, higher for brisk alerts.

Default: 1Range: 0.5 - 2
speakeroptional
string

Voice used for synthesis, chosen from 37 studio speakers with lowercase names. Every speaker voices all eleven languages; pick per brand, gender, or region.

Default: "shubh"
Allowed values (37 total):
Shubh (male)→"shubh"
Aditya (male)→"aditya"
Rahul (male)→"rahul"
Rohan (male)→"rohan"
Amit (male)→"amit"
Dev (male)→"dev"
Ratan (male)→"ratan"
Varun (male)→"varun"
Manan (male)→"manan"
Sumit (male)→"sumit"
+27 more
speech_sample_rateoptional
integer

Output sample rate in Hz. Use 8000 for telephony, 24000 as default, 44100 or 48000 for studio-quality output.

Default: 24000
Allowed values :
8000 Hz→8000
16000 Hz→16000
22050 Hz→22050
24000 Hz→24000
32000 Hz→32000
44100 Hz→44100
48000 Hz→48000
temperatureoptional
number

Expressiveness of the delivery, from 0.01 to 2.0. Lower is flat and consistent; higher is varied and emotive.

Default: 0.6Range: 0.01 - 2

Response Type

Returns: Audio

Asynchronous requests (v2)

Use Async for video, long-running (>~60s), or high-concurrency workloads; Sync is simplest for fast image & LLM calls. Async submits a request and you poll it to completion.

  1. 1
    POST /v2/sarvam-bulbul-v3-tts

    Submit — returns request_id, status_url, response_url

  2. 2
    GET /v2/requests/{id}/status

    Poll — until COMPLETED or FAILED

  3. 3
    GET /v2/requests/{id}

    Result — final response body

Status states

QUEUED— Accepted, waiting for a worker
PROCESSING— Running on a worker
COMPLETED— Done — result body is ready
FAILED— Errored (incl. content/RAI blocks)
  • A FAILED request is served as HTTP 422 — the body still carries the error detail.
  • An unknown or expired request_id returns HTTP 404.
  • Results are retained for 1 hour, then expire.
  • Content / RAI blocks surface as FAILED, not a separate state.
  • Track completion by polling the status endpoint.

Common Error Codes

The API returns standard HTTP status codes. Detailed error messages are provided in the response body.

400

Bad Request

Invalid parameters or request format

401

Unauthorized

Missing or invalid API key

403

Forbidden

Insufficient permissions

404

Not Found

Model or endpoint not found

406

Insufficient Credits

Not enough credits to process request

429

Rate Limited

Too many requests

500

Server Error

Internal server error

502

Bad Gateway

Service temporarily unavailable

504

Timeout

Request timed out