POST
/
speech-to-text-translate

Headers

api-subscription-key
string
required

Your unique subscription key for authenticating requests to the Sarvam AI Speech-to-Text API. Here are the steps to get your api key

Body

multipart/form-data
file
file
required

The audio file to transcribe. Supported formats are wave (.wav) and MPEG-3 (.mp3). Works best at 16kHz. Multiple channels will be merged.

model
enum<string>

Model to be used for converting speech to text in target language

Available options:
saaras:v1,
saaras:v2
prompt
string | null

Conversation context can be passed as a prompt to boost model accuracy. However, the current system is at an experimentation stage and doesn’t match the prompt performance of large language models.

with_diarization
boolean
default:
false

Include diarization in the output.

Response

200 - application/json
language_code
enum<string> | null
required

This will return the BCP-47 code of language spoken in the input. If multiple languages are detected, this will return language code of most predominant spoken language. If no language is detected, this will be null

Available options:
hi-IN,
bn-IN,
kn-IN,
ml-IN,
mr-IN,
od-IN,
pa-IN,
ta-IN,
te-IN,
gu-IN,
en-IN
request_id
string | null
required
transcript
string
required

Transcript of the provided speech

diarized_transcript
object | null

Diarized transcript of the provided speech