Official Python SDK for Sarvam AI APIs, providing access to text-to-speech, speech-to-text, translation, and text generation models. Current version 0.1.28. Actively maintained with monthly releases.
pip install sarvamaiNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initialize client with API key and call TTS endpoint.
Export SARVAM_API_KEY environment variable or pass api_key to constructor.
Ensure text is already in the target language's script (e.g., Devanagari for Hindi).
Replace `client.tts(...)` with `client.text_to_speech(...)`.
Set SARVAM_API_KEY environment variable to a valid key from Sarvam AI dashboard.
Upgrade to >=0.1.0: pip install --upgrade sarvamai
Use `.text_to_speech()` instead.
No dependency data recorded yet.