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

# Speech recognition

> Transcribe a recording, request word times or display live captions.

Use the file upload endpoint for a complete recording. Use Qwen3-ASR over a WebSocket when an application needs partial transcripts while someone is speaking.

## Choose a recognizer

| Need | Choose | What you get |
| - | - | - |
| Word or segment times | [Whisper large or large-v3-turbo](https://docs.m-star.org/models/whisper-qwen-asr.md) | Timestamps with each word or segment. For word times, keep the decoder on one GPU. |
| Live captions | [Qwen3-ASR 0.6B or 1.7B](https://docs.m-star.org/models/whisper-qwen-asr.md) | Partial and final transcripts in 30 languages. |
| Translation to or from English | [Canary](https://docs.m-star.org/models/fastconformer-asr.md) | Translation between English and the supported European languages. Canary-Qwen is English-only. |
| European languages or locale prompts | [Parakeet or Nemotron ASR](https://docs.m-star.org/models/fastconformer-asr.md) | Parakeet detects the language. Nemotron accepts a locale or `auto`. |
| Broad language coverage | [Omnilingual CTC](https://docs.m-star.org/models/omnilingual-asr.md) | Transcription across more than 1,600 languages without a language label. |
| Higgs Audio checkpoint | [Higgs Audio v3 STT](https://docs.m-star.org/models/higgs-audio.md) | Text transcription in 30-second windows. |

[Whisper file transcription and settings](https://docs.m-star.org/models/whisper-qwen-asr.md#options).

## Transcribe a file with word times

```bash theme={null}
uv pip install --torch-backend=auto "mstar-ai[asr]"
mstar serve whisper_large_v3_turbo
```

Once `/health` returns 200, upload a local recording from a second terminal:

```bash theme={null}
curl --fail http://localhost:8000/v1/audio/transcriptions \
  -F model=whisper_large_v3_turbo -F file=@speech.wav \
  -F response_format=verbose_json -F 'timestamp_granularities[]=word'
```

Read `text` for the transcript and `words` for start and end times in seconds. Other recognizers can return one segment per audio window in a timed response format. Those segment boundaries describe chunking rather than word alignment.

[Long recordings and window settings](https://docs.m-star.org/models/whisper-qwen-asr.md#options).

Uploads may be up to 30 minutes and 512 MiB. The endpoint splits long uploads into windows that end at quiet points. The native SDK’s `client.transcribe()` sends a single generation request instead. With Whisper it consumes only the first 30 seconds. Use the upload endpoint when you need the whole recording. Files such as M4A or WebM need TorchCodec and FFmpeg’s shared libraries.

[Live Qwen3-ASR sessions and settings](https://docs.m-star.org/models/whisper-qwen-asr.md#options).

## Read a live transcript

Start `mstar serve qwen3_asr_realtime` after stopping your file-transcription server. Connect to `ws://localhost:8000/v1/realtime?intent=transcription`. Both Qwen3-ASR keys accept this protocol.

1. Wait for `transcription_session.created`.
2. Send `input_audio_buffer.append` with the `audio` field containing base64 PCM16 audio. The default format is mono, 16 kHz. A `transcription_session.update` can select another supported rate or G.711.
3. Display `mstar.transcription.partial` as the current hypothesis. Its tail can change.
4. Send `input_audio_buffer.commit` at the end of the utterance. Read the `transcript` field on the `conversation.item.input_audio_transcription.completed` event.

An utterance can contain up to 300 seconds. With client turn detection, commit or clear before appending more. To let the server detect turns, install the `vad` extra and select `server_vad`. A [runnable client](https://github.com/mstar-project/mstar/blob/main/benchmark/asr_realtime_bench.py) shows concurrent audio upload and event handling.

## Tune window size and concurrency

The upload route normally windows Qwen3-ASR at 30 seconds. Omnilingual consumes up to 20 seconds whole and splits longer uploads into windows up to 16 seconds. Other adapters use their model clip limit. Set `window_seconds` on an upload to choose a window from 5 seconds up to the model limit. Large windows on Qwen3-ASR increase per-request KV usage.

The file-serving configs `whisper_large_v3_turbo.yaml` and `qwen3_asr.yaml` set `knobs.step_threads: serial`. Use the file benchmark below to compare changes on your host.

## Check accuracy and latency

From a source checkout, install the `asr` and `eval` extras, prepare the LibriSpeech test set and run against a live Whisper server:

```bash theme={null}
uv pip install --torch-backend=auto -e ".[asr,eval]"
python -m benchmark.asr_data --out data/asr
python -m benchmark.asr_bench --url http://localhost:8000 --model whisper_large_v3_turbo \
  --system "M*" --concurrency 1 8 32 --long-form --output-json results.json
```

Compare word error rate, throughput (RTFx), and p50/p95 latency. For live captions, run `benchmark.asr_realtime_bench` against Qwen3-ASR to measure partial-result latency.


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