Skip to main content

Sarvam (Beta)

Sarvam provides fast, reliable text-to-speech (TTS) with support for Indian languages and customizable voices.

Sample configuration

The following example shows a starting tts parameter configuration you can use when you Start a conversational AI agent.


_8
"tts": {
_8
"vendor": "sarvam",
_8
"params": {
_8
"api_subscription_key": "<SARVAM_API_KEY>",
_8
"speaker": "anushka",
_8
"target_language_code": "en-IN"
_8
}
_8
}

caution

The parameters listed on this page are validated for use with Conversational AI Engine. Required parameters must be provided as documented. Any additional parameters are passed through directly to the underlying vendor without validation. For a full list of supported options, refer to the Sarvam documentation.

Key parameters

paramsrequired
  • api_subscription_key stringrequired

    The API key used for authentication. Get your API key from the Sarvam dashboard.

  • speaker stringrequired

    The voice ID to use for speech generation.

    • Female voices: anushka, manisha, vidya, arya.
    • Male voices: abhilash, karun, hitesh.
  • target_language_code stringrequired

    The language code for speech synthesis. Supported values:

    • en-IN English (India)
    • hi-IN: Hindi
    • bn-IN: Bengali
    • ta-IN: Tamil
    • te-IN: Telugu
    • kn-IN: Kannada
    • ml-IN: Malayalam
    • mr-IN: Marathi
    • gu-IN: Gujarati
    • pa-IN: Punjabi
    • or-IN: Odia
  • pitch numbernullable

    Range: [-0.75, 0.75]

    The pitch adjustment for the voice. Positive values make the voice sharper; negative values make it deeper.

  • pace numbernullable

    Range: [0.3, 3.0]

    The speed of speech. 1.0 is the normal speed. Values less than 1.0 slow down the speech; values greater than 1.0 speed it up.

  • loudness numbernullable

    Range: [0.1, 3.0]

    The volume level of the speech. Higher values increase the loudness.

  • sample_rate numbernullable

    Possible values: 8000, 16000, 22050, 24000

    The audio sample rate in Hz.