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 JavaScript and Go SDKs read the key from SARVAM_API_KEY instead of SARVAMAI_API_KEY. 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 the Python SDK (SarvamAISTT). The JavaScript and Go SDKs expose equivalent options where supported, in their idiomatic form (camelCase / STTOptions struct).

Import paths

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