For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
CommunityAPI StatusAPI PricingSign Up
DocumentationAPI ReferencesCookbookIntegrationDeveloper Tools
DocumentationAPI ReferencesCookbookIntegrationDeveloper Tools
  • Getting Started
    • Welcome
    • Quickstart
    • SDKs & Libraries
    • Building for Indian Languages
    • Models
    • Credits & Rate Limits
    • Errors & Troubleshooting
    • Talk to us
    • Pricing
    • Changelog
  • API Guides & Tutorials
      • Overview
      • Which API to Use
      • Rest API
      • Pronunciation Dictionary
      • Best Practices
        • Set the Language
        • Change the Speaker Voice
        • Adjust the Tone
        • Adjust the Speed
        • Adjust the Loudness
        • Set the Sample rate
        • Enable Text Preprocessing
        • Set audio format for output
        • Set bitrate for output
        • Set maximum length for sentence splitting
        • Set buffer size to start processing
LogoLogo
CommunityAPI StatusAPI PricingSign Up
On this page
  • Example Code
API Guides & TutorialsText to SpeechHow-to

How to adjust the pitch (tone)

||View as Markdown|
Was this page helpful?
Previous

How to adjust the pace (speed)

Next
Built with

Important: The pitch parameter is only supported for bulbul:v2. It is not available for bulbul:v3.

The pitch parameter controls the tone of the synthesized speech by making the voice deeper or sharper.

It is optional, and if omitted, the default value 0.0 (neutral pitch) is used.

  • Range: -0.75 (deeper voice) to 0.75 (sharper voice)
  • Default: 0.0 (neutral pitch)

Use this to make the voice sound either lower or higher depending on your preference or use case.

Example Code

Rest API
Streaming API
1from sarvamai import SarvamAI
2from sarvamai.play import save
3
4# Initialize the REST client
5client = SarvamAI(api_subscription_key="YOUR_SARVAM_API_KEY")
6
7# Generate speech using REST (pitch is only supported in bulbul:v2)
8audio = client.text_to_speech.convert(
9 text="Welcome to Sarvam AI!",
10 model="bulbul:v2",
11 target_language_code="en-IN",
12 speaker="anushka",
13 pitch=0.5 # Increase pitch for a sharper tone
14)
15save(audio, "output1.wav")