> ## 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.

# Speech-to-Text FAQ

> Answers to common Speech-to-Text questions: which interface and model to use, empty or wrong transcripts, long audio, numbers, names, speaker labels, limits and errors.

## Getting started

### Which interface should I use: REST, Realtime or Batch?

| Your audio | Use |
| - | - |
| A recording of up to 30 seconds, and you want the transcript straight back | [REST](https://docs.gnani.ai/api/STT/speech-to-text.md) |
| Live audio, such as a phone call or a microphone | [Realtime streaming](https://docs.gnani.ai/api/STT/stt-websocket.md) |
| Recordings longer than 30 seconds, many files, or you need speaker labels | [Batch](https://docs.gnani.ai/api/STTBatch/Introduction.md) |

Any model works with any interface. See [Overview](https://docs.gnani.ai/api/STT/overview.md#choose-how-to-send-audio).

### Which model should I use?

**Prisma v3.0** for audio where the language is not known in advance, speech that mixes languages, and when you want to give hints such as names and topics. **Prisma v2.5** transcribes in the language you specify, and is the default when you leave out `model`. Send `model=prisma-v3.0` to use Prisma v3.0. See [Models](https://docs.gnani.ai/api/STT/models/overview.md).

### Does `/stt/v3` mean Prisma v3.0?

No. The `3` is the URL version. Both models are served from `/stt/v3`, and only the `model` value decides which one runs.

### Which languages are supported?

Hindi, English, Bengali, Gujarati, Kannada, Malayalam, Marathi, Punjabi, Tamil and Telugu, on both models and every interface. See [Supported languages](https://docs.gnani.ai/api/STT/languages.md) and [Building for Indian languages](https://docs.gnani.ai/resources/indian-languages.md).

## Transcripts

### Why is my transcript empty?

An empty `transcript` is not an error. It comes back when:

* **The clip has no speech,** or is shorter than 0.1 seconds.
* **On Realtime, voice activity was not detected.** Quiet or distant speech can fall below `x-vad-threshold`; lower it. A high `x-min-segment-ms` drops short answers without a transcript. See [VAD tuning](https://docs.gnani.ai/api/STT/stt-websocket.md#voice-activity-detection-vad-tuning).

A zero-byte file is different: it returns `400 EMPTY_AUDIO`.

### My audio is longer than 30 seconds. What can I do?

REST refuses it with `400 MAX_AUDIO_DURATION_EXCEEDED`. Send it to [Batch](https://docs.gnani.ai/api/STTBatch/Introduction.md) (up to 4 hours per file), or stream it on [Realtime](https://docs.gnani.ai/api/STT/stt-websocket.md) (sessions of up to 15 minutes).

### The Realtime transcript is garbled. Why?

Most often `x-sample-rate` does not match the audio: 8 kHz audio sent as `16000` plays to the model at double speed. Read the rate from your audio source. Also check that you send raw PCM, not a WAV or MP3 file, at real-time pace. See [Phone audio](https://docs.gnani.ai/api/STT/phone-audio.md).

### What does `truncated: true` mean?

Prisma v3.0 hit its output limit and the transcript was cut short. The field is only present when this happens. Send shorter clips, or use Batch.

### Why do I get slightly different results for the same audio?

With Prisma v3.0, results for identical audio can differ by a borderline word. Store the transcript if you need the same output every time. See [REST transcription](https://docs.gnani.ai/api/STT/speech-to-text.md).

### Why are numbers written as words, not digits?

The output style decides it. Send `format=transcribe` for digits. Prisma v2.5 uses `verbatim` (words) by default and formats numbers only for `hi-IN` and `en-IN`. Prisma v3.0 uses digits by default only when you send a single `hi-IN` or `en-IN`. The Python SDK sends `format="verbatim"` unless you set it. See [Format numbers](https://docs.gnani.ai/api/STT/format-numbers.md).

### Why are English words written in Hindi script?

With `verbatim`, English words are written in the script of the language. On Prisma v3.0, use `transcribe` or `codemix` to keep them in Latin letters, or `transliterate` for the whole transcript in Latin letters. See [Choose an output style](https://docs.gnani.ai/api/STT/output-styles.md).

### Names, brands and product terms come out wrong. How do I fix them?

Send them as `keyterms` on Prisma v3.0 (up to 200 words or short phrases), or as `bias_list` with `bias_score` on Prisma v2.5. For words that are always wrong in the same way, use [find-and-replace](https://docs.gnani.ai/api/STT/find-and-replace.md). Compare results with and without hints: on some audio they lower accuracy. See [Improve names and terms](https://docs.gnani.ai/api/STT/names-and-terms.md).

### The detected language is wrong. Why?

`detected_language_code` is judged from the script of the transcript. Hindi and Marathi share a script, so a very short Marathi utterance can be tagged `hi-IN`, and mostly-English speech with a short Hindi phrase can be tagged `en-IN`. If you know the language, send only that code. See [Detect the language](https://docs.gnani.ai/api/STT/detect-language.md).

### Can I tell who said what?

Yes, on [Batch](https://docs.gnani.ai/api/STTBatch/Introduction.md) only. Each segment has a `speaker_id`. REST and Realtime do not label speakers; for a phone call with one speaker per channel, stream each channel on its own Realtime connection. See [Label speakers](https://docs.gnani.ai/api/STT/label-speakers.md).

## Realtime streaming

### Can I connect to Realtime from a browser?

Not directly. The connection needs your API key in a header, which a browser cannot set and must never see. Stream from the browser to a small relay on your server instead. See [Stream from a browser](https://docs.gnani.ai/api/STT/stt-websocket.md#stream-from-a-browser).

### What audio does Realtime accept?

Raw 16-bit little-endian mono PCM with no header, in 1,024-byte frames, sent at real-time pace: one frame every 32 ms at 16 kHz, or every 64 ms at 8 kHz. Set `x-sample-rate` to the rate of your audio. See [PCM specification](https://docs.gnani.ai/api/STT/stt-websocket.md#pcm-specification).

### How do I get the last words before I hang up?

Send `{"type": "commit"}`. It ends the open utterance at once instead of waiting for silence.

### Why did my session close?

| Cause | What you see |
| - | - |
| No speech for 60 seconds (set `x-idle-timeout-sec`, 5 to 900) | The server closes the session |
| The session reached 15 minutes | The server closes the session |
| A bad header, such as a missing `language_code` | An `error` message, then close code `1008` |
| An invalid API key | The handshake is refused with `401` |
| Too many open connections | An `error` message that names the limit |

See the [Realtime error reference](https://docs.gnani.ai/api/STT/stt-websocket.md#error).

### How do I transcribe phone calls?

Send `x-sample-rate: 8000`, use the telephony voice-activity settings, and decode µ-law or A-law to 16-bit PCM first. See [Phone audio](https://docs.gnani.ai/api/STT/phone-audio.md).

## Batch

### My `transcript_url` stopped working.

It expires after 1 hour. Call [Get job files](https://docs.gnani.ai/api/STTBatch/Get_Job_Files.md) again for a fresh link.

### How large can Batch files be?

Up to 4 hours per file, and 100 files per upload job. Uploaded files can be up to 10 MB each, or up to 5 GiB with a presigned upload. See [Batch limits](https://docs.gnani.ai/api/STTBatch/Introduction.md#limits).

## Limits, errors and billing

### Why do I get `429 RATE_LIMITED`?

On the Free and Pay as you go plans, each API key and account can send 1 request per second and hold 20 Realtime connections at once. Batch jobs do not count. Wait and retry with backoff. See [Limits](https://docs.gnani.ai/api/STT/limits.md) and [Retrying](https://docs.gnani.ai/api/introduction/errors.md#retrying).

### Which audio formats does REST accept?

WAV, MP3, OGG, FLAC, AAC and M4A, detected from the file-name extension. An unsupported extension returns `400 UNSUPPORTED_AUDIO_FORMAT`; a file that cannot be decoded returns `400 AUDIO_CONVERSION_ERROR`.

### How much does Speech-to-Text cost?

₹20 per hour of audio, excluding GST, on REST, Realtime and Batch. See [Limits and billing](https://docs.gnani.ai/resources/limits-and-billing.md).

## Related

> [card] [Error Reference](https://docs.gnani.ai/api/introduction/errors.md)
>
> Every error code and what to do about it.

> [card] [Limits](https://docs.gnani.ai/api/STT/limits.md)
>
> Audio length, formats, rate limits and sessions.

> [card] [Building for Indian languages](https://docs.gnani.ai/resources/indian-languages.md)
>
> Language codes, mixed languages, scripts and numbers.

> [card] [Quickstart](https://docs.gnani.ai/api/STT/quickstart.md)
>
> Your first transcript in a few minutes.


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