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

# Choose an output style

> Choose how the transcript writes numbers and English words: verbatim, transcribe, codemix or transliterate (romanised).

Use this when you need to control how numbers and English words are written in the transcript, or want the transcript in Latin letters.

## Turn it on

Send `format` with the style you want. This example keeps the English words of the mixed Hindi and English sample clip in Latin letters:

```bash cURL theme={null}
curl -o mixed.wav https://docs.gnani.ai/audio/samples/hi-IN-en-IN-codemix.wav

curl --request POST \
  --url https://api.vachana.ai/stt/v3 \
  --header "X-API-Key-ID: $GNANI_API_KEY" \
  --form audio_file=@mixed.wav \
  --form model=prisma-v3.0 \
  --form language_code=hi-IN \
  --form format=codemix
```

```python Python theme={null}
import os

import requests

with open("mixed.wav", "rb") as f:
    r = requests.post(
        "https://api.vachana.ai/stt/v3",
        headers={"X-API-Key-ID": os.environ["GNANI_API_KEY"]},
        files={"audio_file": ("mixed.wav", f, "audio/wav")},
        data={"model": "prisma-v3.0", "language_code": "hi-IN", "format": "codemix"},
        timeout=60,
    )
r.raise_for_status()
print(r.json()["transcript"])
```

```javascript Node.js theme={null}
import { readFileSync } from "node:fs";

const form = new FormData();
form.append("audio_file", new Blob([readFileSync("mixed.wav")], { type: "audio/wav" }), "mixed.wav");
form.append("model", "prisma-v3.0");
form.append("language_code", "hi-IN");
form.append("format", "codemix");

const response = await fetch("https://api.vachana.ai/stt/v3", {
  method: "POST",
  headers: { "X-API-Key-ID": process.env.GNANI_API_KEY },
  body: form,
});
if (!response.ok) throw new Error(await response.text());
console.log((await response.json()).transcript);
```

```python Python SDK theme={null}
import os
from gnani.stt import GnaniSTTClient

client = GnaniSTTClient(api_key=os.environ["GNANI_API_KEY"])
result = client.transcribe("mixed.wav", model="prisma-v3.0", language_code="hi-IN", format="codemix")
print(result["transcript"])
```

The four styles:

| `format` | English words | Numbers | Models | Interfaces |
| - | - | - | - | - |
| `verbatim` | In the native script | As words | Both | REST, Realtime, Batch |
| `transcribe` | Prisma v3.0: kept in Latin letters. Prisma v2.5: in the native script. | As digits | Both | REST and Realtime. Batch: Prisma v3.0 only. |
| `codemix` | Kept in Latin letters | Mostly as words | Prisma v3.0 | REST, Realtime, Batch |
| `transliterate` | The whole transcript is in Latin letters (romanised) | As words | Prisma v3.0 | REST and Realtime |

## Examples

Two clips (synthetic, Timbre v3.0): one with numbers, one with English words.

| Clip | Listen | What is said |
| - | - | - |
| Numbers | <audio controls preload="none" src="https://docs.gnani.ai/audio/samples/output-styles-hi-IN.wav" aria-label="Sample clip with numbers, in Hindi" /> | मेरा account नंबर एक दो तीन चार पाँच है, और मुझे पाँच सौ रुपये transfer करने हैं। |
| English words | <audio controls preload="none" src="https://docs.gnani.ai/audio/samples/hi-IN-en-IN-codemix.wav" aria-label="Hindi and English mixed sample" /> | नमस्ते, मुझे अपना account balance check करना है, क्या आप मेरी help कर सकते हैं? |

**Numbers clip**, `language_code=hi-IN` (none with `transliterate`):

| Model | `format` | Transcript |
| - | - | - |
| Prisma v3.0 | `verbatim` | मेरा अकाउंट नंबर एक दो तीन चार पांच है और मुझे पांच सौ रुपये ट्रांसफर करने हैं। |
| Prisma v3.0 | `transcribe` | मेरा अकाउंट नंबर **12345** है और मुझे **500** रुपये ट्रांसफर करने हैं। |
| Prisma v3.0 | `codemix` | मेरा अकाउंट नंबर एक दो तीन चार पांच है और मुझे पांच सौ रुपये ट्रांसफर करने हैं। |
| Prisma v3.0 | `transliterate` | mera account number ek do teen chaar paanch hai aur mujhe paanch sau rupaye transfer karne hain. |
| Prisma v2.5 | `verbatim` | मेरा अकाउंट नंबर एक दो तीन चार पाँच है और मुझे पाँच सौ रुपये ट्रांसफ़र करने हैं। |
| Prisma v2.5 | `transcribe` | मेरा अकाउंट नंबर **1 2 3 4 5** है और मुझे **₹500** ट्रांसफ़र करने हैं। |

**English words clip**, `language_code=hi-IN` (none with `transliterate`):

| Model | `format` | Transcript |
| - | - | - |
| Prisma v3.0 | `verbatim` | नमस्ते, मुझे अपना अकाउंट बैलेंस चेक करना है, क्या आप मेरी हेल्प कर सकते हैं? |
| Prisma v3.0 | `transcribe` | नमस्ते, मुझे अपना **account balance check** करना है, क्या आप मेरी **help** कर सकते हैं? |
| Prisma v3.0 | `codemix` | नमस्ते, मुझे अपना **account balance check** करना है, क्या आप मेरी **help** कर सकते हैं? |
| Prisma v3.0 | `transliterate` | Namaste, mujhe apna account balance check karna hai, kya aap meri help kar sakte hain? |
| Prisma v2.5 | `verbatim` | नमस्ते, मुझे अपना अकाउंट बैलेंस चेक करना है, क्या आप मेरी हेल्प कर सकते हैं। |
| Prisma v2.5 | `transcribe` | नमस्ते, मुझे अपना अकाउंट बैलेंस चेक करना है, क्या आप मेरी हेल्प कर सकते हैं। |

Each request gave the same result both times it was run. In the numbers clip, the model wrote *account* and *transfer* in Devanagari in every native-script style: see [Things to watch for](#things-to-watch-for).

## By interface

> [tab] REST
>
> Form field `format` on [`POST /stt/v3`](https://docs.gnani.ai/api/STT/speech-to-text). All four styles on Prisma v3.0; `verbatim` and `transcribe` on Prisma v2.5.

> [tab] Realtime
>
> Header `format` on [`WS /stt/v3/stream`](https://docs.gnani.ai/api/STT/stt-websocket). All four styles on Prisma v3.0; a `transcribe` session returns the same text as REST. Change the style mid-session with `update_settings`; it applies from the next utterance:
>
> ```json theme={null}
> {"type": "update_settings", "format": "verbatim"}
> ```

> [tab] Batch
>
> `config.format` on [Create job](https://docs.gnani.ai/api/STTBatch/Create_Job.md): `verbatim`, `transcribe` or `codemix`, Prisma v3.0 only. `transliterate` is not available on Batch. With Prisma v2.5, sending `format` returns `400 INVALID_CONFIG`.
>
> ```json theme={null}
> "config": { "model": "prisma-v3.0", "language_code": "hi-IN", "format": "codemix" }
> ```

## By model

| | Prisma v3.0 | Prisma v2.5 |
| - | - | - |
| Styles | `verbatim`, `transcribe`, `codemix`, `transliterate` | `verbatim`, `transcribe` |
| When `format` is left out | Depends on the language: see the table below | Always `verbatim` |
| How numbers become digits | The model writes them in the style you ask for | A separate step after recognition ([ITN](https://docs.gnani.ai/api/STT/format-numbers.md)), for `hi-IN` and `en-IN` only |
| Digits in the native script (`itn_native_numerals`) | No effect | Yes, with `transcribe` |
| `output.literal` (text before number formatting) | Not returned | Returned when number formatting changed the text |
| Batch | `verbatim`, `transcribe`, `codemix` | `format` not accepted |

**Prisma v3.0 when `format` is left out:**

| You send | Style |
| - | - |
| One language, `hi-IN` or `en-IN` | `transcribe` |
| One language, any other | `verbatim` |
| `indic-auto` | `verbatim` |
| A list of languages | `verbatim` on REST and Realtime. Batch: `transcribe` if every language in the list is `hi-IN` or `en-IN`. REST behaviour for such a list: TBC. |

An explicit `format` always wins.

## Rules and limits

| | Rule |
| - | - |
| `format` values | `verbatim`, `transcribe`, `codemix`, `transliterate`, as the model and interface allow (tables above) |
| `transliterate` and `language_code` | Optional: left out or empty, it is treated as `indic-auto`. If you send one, it is still checked, so an unsupported code is an error. A list of languages is ignored. |
| `transliterate` and context | `keyterms`, `topic`, `previous_text` and `speaker_names` work as usual. Write them in Latin letters to match the output. |
| Mid-session changes (Realtime) | `format` accepts only the values the model supports. An invalid update is ignored as a whole. |

## Things to watch for

* **Whether a word counts as English is the model's call.** `transcribe` and `codemix` keep English words in Latin letters, but a word the model hears as part of the Hindi sentence is written in Devanagari. In the numbers clip above, *account* and *transfer* stayed in Devanagari in every native-script style, while in the second clip they were kept in Latin.
* **Prisma v3.0 changes the default** for a single `hi-IN` or `en-IN` to `transcribe` (digits). On Prisma v2.5 the default is `verbatim`. Send `format` explicitly when you move between models, to keep the same output.
* **Digits are written differently by the two models.** In the example, Prisma v3.0 wrote *12345* and *500 रुपये*; Prisma v2.5 wrote *1 2 3 4 5* and *₹500*. Test with your own numbers before you parse them.
* **`transliterate` returns no `detected_language_code`.** The text is always in Latin letters, so there is nothing to judge a language from. Its romanisation has not been measured for accuracy; check it on your own audio.
* **Prisma v3.0 ignores `itn_native_numerals`** and does not return `output.literal`, on REST or when streaming.
* **Python SDK.** The SDK sends `format="verbatim"` when you leave `format` out, so the API's own default never applies. Set `format` yourself.

## Related

> [card] [Format numbers](https://docs.gnani.ai/api/STT/format-numbers.md)
>
> How each model writes numbers, money, dates and times as digits.

> [card] [Detect the language](https://docs.gnani.ai/api/STT/detect-language.md)
>
> Let the model identify the language and report it.

> [card] [Output styles on Prisma v3.0](https://docs.gnani.ai/api/STT/models/prisma-v3.md#output-styles)
>
> The model page's reference, including streaming.

> [card] [Improve names and terms](https://docs.gnani.ai/api/STT/names-and-terms.md)
>
> Help the model spell names and domain words.


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