Real-time Speech-to-Text API

Overview

The Real-time Speech-to-Text API is designed for processing short audio files synchronously with immediate response. It’s perfect for quick transcriptions and testing scenarios.

Features

Processing
  • Instant results
  • Simple integration
  • Maximum duration: 30 seconds
Audio Support
  • Multiple audio formats
  • High accuracy transcription
  • Multiple Indian languages and English support

Code Examples

1from sarvamai import SarvamAI
2
3client = SarvamAI(
4 api_subscription_key="YOUR_SARVAM_API_KEY",
5)
6
7response = client.speech_to_text.transcribe(
8 file=open("audio.wav", "rb"),
9 model="saarika:v2",
10 language_code="gu-IN"
11)
12
13print(response)

Next Steps

1

Get API Key

Sign up and get your API key from the dashboard.

2

Test Integration

Try the API with sample audio files.
3

Go Live

Deploy your integration and monitor usage.

Need help? Contact us on discord for guidance.