How to change the speaker voice

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

🎤 Speaker Selection

Bulbul-v2 offers a variety of natural-sounding voices to suit different languages and use cases.
Specify the speaker using the speaker parameter in your request. It is an optional parameter — if omitted, the API uses the default voice Anushka.

Available Voices

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

You can customize the voice by selecting one of the available speakers using the speaker parameter.

Below is an example using the SarvamAI Python SDK to generate speech with the default voice Anushka, as well as with the voice of Manisha.

1# Import SarvamAI client and save helper
2from sarvamai import SarvamAI
3from sarvamai.play import save
1# Initialize the SarvamAI client with your API key
2client = SarvamAI(api_subscription_key="YOUR_API_SUBSCRIPTION_KEY")
1# example1: Generate speech with the default speaker voice
2audio = client.text_to_speech.convert(
3 text="Welcome to Sarvam AI!",
4 model="bulbul:v2",
5 target_language_code="en-IN",
6 speaker="anushka" # default speaker
7)
1# example2: Generate speech with the chosen speaker voice
2audio = client.text_to_speech.convert(
3 text="Welcome to Sarvam AI!",
4 model="bulbul:v2",
5 target_language_code="en-IN",
6 speaker="manisha" # Select the speaker voice here
7)
1# Save the generated audio to a file
2save(audio, "output1.wav")