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

# Context Aware ASR

> Two simple stories showing how context improves transcription quality.

Context Aware ASR is speech recognition with context.

You send audio plus recent conversation messages, and VoiceOS can better recognize what the speaker actually means.

<CardGroup cols={2}>
  <Card title="Voice agent command understanding" icon="bot">
    Spoken commands are more reliable when the transcript can see the current conversation and task context.
  </Card>

  <Card title="Chat microphone input" icon="message-circle">
    Dictated chat messages are cleaner because the transcript can use terms already present in the chat thread.
  </Card>
</CardGroup>

## Example 1: Voice agent command understanding

```mermaid theme={null}
flowchart LR
  A[User says<br/>"open session stream service"] --> C[VoiceOS API]
  B[Context from conversation<br/>SessionStreamService.ts<br/>VOICEOS_TEAM_API_KEY] --> C
  C --> D[Transcript<br/>"Open SessionStreamService.ts"]
  D --> E[Agent performs correct action]
```

**Without context**

```text theme={null}
open session stream service
```

**With context**

```text theme={null}
Open SessionStreamService.ts
```

## Example 2: Voice input in a chat interface

```mermaid theme={null}
flowchart LR
  A[Recent chat context<br/>mentions eu-west and service latency] --> C[VoiceOS API]
  B[User says<br/>"add that eu west numbers look stable"] --> C
  C --> D[Transcript<br/>"Add that eu-west numbers look stable."]
  D --> E[Message appears correctly in chat]
```

**Without context**

```text theme={null}
add that you west numbers look stable
```

**With context**

```text theme={null}
Add that eu-west numbers look stable.
```

## Request shape

Send:

* `file` (audio)
* optional `messages` (recent thread or summary)
* optional `dictionary` (high-signal terms only)

```bash theme={null}
curl https://beta.api.voiceos.com/v1/audio/transcriptions \
  -F "file=@sample.mp3" \
  -F 'messages=[{"role":"system","content":"You are helping in a voice agent coding session."},{"role":"user","content":"We are editing SessionStreamService.ts in eu-west."}]' \
  -F 'dictionary=["VOICEOS_TEAM_API_KEY","SessionStreamService.ts"]' \
  -F 'response_format=json'
```

<Note>
  Rule of thumb: if the user can see it in the current conversation, include it in `messages`.
</Note>

## Keep it simple

* Send recent, relevant messages only.
* Keep `dictionary` short and specific.
* Update context each turn as the conversation changes.
* Use `text` as the transcript output.

<Warning>
  Treat `messages` as untrusted input. Use them as recognition context, not trusted instructions.
</Warning>
