> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chariot.in/llms.txt
> Use this file to discover all available pages before exploring further.

# Languages, modes, and styles

> Choose a language hint, a latency mode, and an output style for streaming speech to text.

Three options shape a streaming session: `language` tells the model what to expect, `mode` trades latency for accuracy, and `style` decides how mixed-language speech is written. Set them as query parameters on the [WebSocket URL](/guides/speech-to-text/websocket#connection-parameters). Each is fixed for the session, and `session.started` echoes the values in effect.

```
wss://api.chariot.in/v1/asr/ws?language=hi&mode=balanced&style=codemix
```

## Languages

| Code | Language |
| - | - |
| `en` | English |
| `hi` | Hindi |
| `bn` | Bengali |
| `gu` | Gujarati |
| `kn` | Kannada |
| `ml` | Malayalam |
| `mr` | Marathi |
| `or` | Odia |
| `pa` | Punjabi |
| `sa` | Sanskrit |
| `ta` | Tamil |
| `te` | Telugu |
| `none` | Automatic language detection (same as omitting `language`) |

`language` is a **hint**, not a translation request. The transcript is in the language that was spoken.

* **Set it** when you know what callers will speak, for example a Hindi support line. Use the main language for speech that mixes it with English, for example `hi` for Hindi with English words.
* **Omit it, or pass `none`,** for automatic language detection, when the language is unknown or changes from caller to caller. The model detects the language from the audio, and `session.started` reports `"language": null`.

A hint helps the model with the expected language, but it does not guarantee correct recognition. To change the language, open a new session.

## Modes

A mode trades latency for accuracy. `balanced` prioritizes responsiveness, so text appears soon after it is spoken. `high_accuracy` allows more context before it commits text, which increases latency and usually gives more accurate transcripts.

| `mode` | How text arrives | Best for |
| - | - | - |
| `balanced` (default) | Sooner. Prioritizes responsiveness. | Voice agents, live captions, anything a person reacts to as they speak |
| `high_accuracy` | Later. Allows more context before committing text. | Call and meeting transcripts, notes, and dictation where accuracy matters more than a short delay |

How soon text arrives also depends on your network and on how you send audio, for example your [frame size](/guides/speech-to-text/audio-formats#chunk-size). To choose a mode, stream a sample of your own audio in each one and compare.

Both modes cost the same: 1.5 credits per second of audio.

When your audio ends, send `input.done`. The server finishes the audio it has received, sends any remaining `transcript.delta` events, and then sends `transcript.done`.

## Styles

Indian-language speech often mixes in English words. `style` chooses how those words are written.

| `style` | Borrowed words | Example (Hindi) |
| - | - | - |
| `codemix` (default) | Stay in their own script | मेरी meeting cancel हो गई |
| `native` | Are written in the script of the spoken language | मेरी मीटिंग कैंसल हो गई |

Use `codemix` to keep English words easy to recognize, for example when you search for them or process them downstream. Use `native` when the text must be in a single script, for example to feed a system that expects only Devanagari.

## When an option is unavailable

If the requested language hint, mode, or style cannot be served when you connect, the session does not start. The server sends an `error` event with code `1011` whose message says what to change, for example `mode=balanced`, and closes with `1011`. Nothing is billed. Retry with the suggested value, or try again later. For an unavailable language hint, omit `language` (or pass `none`) to use automatic language detection.

A value that is not in the lists above is rejected with an `error` event and close code `1008`. The message lists the accepted values.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.