> This page is for Model APIs.

> Sarvam Voice Agents (Samvaad) is a voice AI agent platform for Indian languages: build, test and deploy AI calling agents on your own phone numbers, from ₹3 a minute. Start here: https://docs.sarvam.ai/voice-agents/why-voice-agents.
> For clean Markdown of any page, append `.md` to the page URL.
> For a complete documentation index, see https://docs.sarvam.ai/llms.txt. For a section index, append `/llms.txt` to any section URL (for example https://docs.sarvam.ai/voice-agents/llms.txt).
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.sarvam.ai/_mcp/server.

# Audio and Languages

> The audio formats, sizes and lengths Dictate accepts for a clip, a job and the live socket, and the 23 supported language codes.

What audio Dictate accepts on each route, and which language codes you can send.

## Audio limits

| Route                                | Length                     | Size                                            |
| ------------------------------------ | -------------------------- | ----------------------------------------------- |
| **Clip** `POST /v2/dictate`          | 30 s or less               | Up to 10,000,000 bytes                          |
| **Job** `POST /v2/dictate/jobs`      | Up to 1 hour               | About 100 MB. Use `audio_url` for a larger file |
| **Live socket** `GET /v2/dictate/ws` | A session of up to 3 hours | At most 1 s of audio in each message            |

The gateway refuses a clip body over about 12 MB.

## Audio formats

#### Clip and job

Send a file in any of these formats:

WAV, MP3, AAC, AIFF, OGG, Opus, FLAC, MP4/M4A, AMR, WMA and WebM.

Dictate finds the format from the MIME type or the file content, so you do not need to name it.

Bit depth, channels and sample rate do not matter. In testing, 8-bit, 24-bit, float32, stereo, 48 kHz, A-law and AU files all worked, on a clip and on a job.

#### Live socket

Send raw audio with no file header, as one of these encodings:

| Encoding               | Use it for                                      |
| ---------------------- | ----------------------------------------------- |
| `linear16`, `linear32` | Microphone audio                                |
| `mulaw`, `alaw`        | Phone audio, if that is what your carrier sends |

The audio must be mono, at 16 kHz or 8 kHz.

## Tips

> **Tip**
>
> **Long job?** Send compressed audio (MP3, M4A, Opus). It uploads faster.

> **Tip**
>
> **Phone audio on the socket?** Use 8 kHz: set `sample_rate="8000"`, with `mulaw` or `alaw`.

Each form field other than `file` can be at most 1 MiB.

## Languages

Send `language_code` with one of the 23 codes below. A known language is more reliable than `auto`.

| Language        | Code     | Language | Code     |
| --------------- | -------- | -------- | -------- |
| Assamese        | `as-IN`  | Manipuri | `mni-IN` |
| Bengali         | `bn-IN`  | Marathi  | `mr-IN`  |
| Bodo            | `brx-IN` | Nepali   | `ne-IN`  |
| Dogri           | `doi-IN` | Odia     | `or-IN`  |
| English (India) | `en-IN`  | Punjabi  | `pa-IN`  |
| Gujarati        | `gu-IN`  | Sanskrit | `sa-IN`  |
| Hindi           | `hi-IN`  | Santali  | `sat-IN` |
| Kannada         | `kn-IN`  | Sindhi   | `sd-IN`  |
| Kashmiri        | `ks-IN`  | Tamil    | `ta-IN`  |
| Konkani         | `kok-IN` | Telugu   | `te-IN`  |
| Maithili        | `mai-IN` | Urdu     | `ur-IN`  |
| Malayalam       | `ml-IN`  |          |          |

Send `auto` to let Dictate detect the language. The language it found comes back in `language_code`.

> **Warning**
>
> **Send the right code, as a form field.** A code that does not match the audio is not an error: English audio sent as
> `hi-IN` comes back as English words written in Devanagari, with no warning. A `language_code` in the query string is
> ignored, so Dictate uses `auto`.

```bash
# Right: language_code is a form field
curl -sS https://api.sarvam.ai/v2/dictate \
  -H "api-subscription-key: $SARVAM_API_KEY" \
  -F file=@note.wav -F language_code=hi-IN

# Ignored: the query string. Dictate falls back to auto
curl -sS "https://api.sarvam.ai/v2/dictate?language_code=hi-IN" \
  -H "api-subscription-key: $SARVAM_API_KEY" \
  -F file=@note.wav
```

> **Note**
>
> Outside Hindi, numbers as digits are best effort: some stay as words, and a converted value can be wrong. Check
> the text in the languages you ship.