Text to Speech

Convert written text into natural-sounding, human-like speech across 22+ Indian languages with controllable voice genders and playback rates.

What it does

  • Natural Speech Synthesis: Generates high-fidelity spoken audio from text in 22+ Indian languages.
  • Voice Customization: Offers distinct male and female speaker profiles for major Indic languages.
  • Variable Playback Rate: Flexibly scale voice speed from 0.5x to 2.0x without pitch distortion.
  • High Sampling Fidelity: Supports 16 kHz, 22.05 kHz, and 48 kHz output waveforms for broadcast or telecom use.

1-Minute Quick Call

Generate Hindi speech audio from text using the Dhruva pipeline:

curl --location 'https://dhruva-api.bhashini.gov.in/services/inference/pipeline' \
  --header 'Accept: */*' \
  --header 'Authorization: <YOUR_INFERENCE_API_KEY>' \
  --header 'Content-Type: application/json' \
  --data '{
    "pipelineTasks": [
      {
        "taskType": "tts",
        "config": {
          "language": {
            "sourceLanguage": "hi"
          },
          "serviceId": "ai4bharat/indic-tts-hi-gpu--t4",
          "gender": "female"
        }
      }
    ],
    "inputData": {
      "input": [
        { "source": "नमस्ते, भाषिणी में आपका स्वागत है।" }
      ]
    }
  }'

Key Synthesis Options

ParameterTypeAllowed ValuesDefaultPurpose
genderstring"female", "male""female"Selects the speaker acoustic profile.
speednumber0.5 to 2.01.0Controls speech rate (e.g., 1.25 for faster playback).
samplingRatenumber22050, 48000Service defaultOutput audio fidelity in Hz.

Common Use Cases

  • Voice Assistants & IVR: Conversational voice bots that respond dynamically in regional dialects.
  • Accessibility & Screen Readers: Read aloud web articles, textbooks, and government portals for visually impaired citizens.
  • Audiobooks & E-Learning: Automated narration of educational material in native regional languages.

Developer Guides & References