Skip to main content
Sarvam AI is a speech-to-text plugin tuned for Indian languages. It transcribes the caller’s audio into text over Sarvam’s streaming WebSocket API, with optional speech-to-text translation.

Setup

Set your Sarvam AI API key in the worker environment. Generate a key from the Sarvam AI dashboard:
The Python SDK requires scipy for audio resampling (pip install scipy).

Usage

Import the plugin and pass it to the pipeline’s stt slot.

Parameters

Constructor parameters for SarvamAISTT. The Python and Node JS SDKs share these field names.

Import paths

Transcribed text passes to the LLM once turn detection decides the caller has finished speaking.