# Overview

`lwk_control` is offline voice dispatch. Hold **H**, talk like you would on a real radio, and dispatch answers out loud: plate and name checks read back, units rolled, callouts handled, your status changed. Speech recognition runs on each player's own PC. Nothing goes to the cloud, and there are no API keys.

## What it does

- **Checks.** "Plate check" runs the car you stopped; "run plate Adam Boy Charles one two three" runs a plate you read out. "Name check" runs the last person you dealt with. The return is read back like a real one, with the vehicle, owner and one line per problem.
- **Units.** "Send me an ambulance", "I need a tow truck", "cancel the coroner". Dispatch says where they're headed: *"Copy, rolling an ambulance to Strawberry Avenue and Davis Avenue."*
- **Pursuits.** "Requesting backup code three", "air support".
- **Callouts.** "Attach me", "code four", "any calls", "hold my callouts".
- **Status.** In and out of service, 10-8, 10-6, on scene, "what's my status".
- **Around you.** Hold traffic, nearest hospital or station, nearest unit, have another unit meet you, time, weather.
- **The PA.** Hold **B** to speak to the people you've stopped. Dispatch never hears the PA.

The full list is on [Voice commands](/docs/lwk_control/voice-commands).

## It understands people, not phrases

You don't have to say a command word for word. Filler like "dispatch" and "can I get" is ignored. Extra words, missing small words, different endings, small slips ("ambulence") and common mishearings ("play check") are all understood. When a transmission only roughly sounds like a command, dispatch asks *"Did you mean plate check?"* instead of "say again". After a "say again", a retry that works teaches dispatch what it misheard, for that player.

## Two resources

| Resource | What it is |
|---|---|
| `lwk_control` | The code. Under 1 MB, so it restarts instantly |
| `lwk_control_assets` | The speech model (about 190 MB), its runtime, the voice clips and radio clicks: about 210 MB in all |

They're separate because FiveM re-sends a resource's whole client archive whenever any file in it changes. With everything in one resource, every code update would make players download 210 MB again. Now the big files download once.

> [!NOTE]
> The first time a player joins, they download the assets once, so that join is slower. After that the model loads in about a second.

## Requirements

- `c3r` (required): duty, stops, callouts and unit requests go through its [exports and events](/docs/c3r/api).
- `lwk_control_assets`, started before `lwk_control`. `ensure [c3r_core]` handles the order.

## When WebAssembly is blocked

Recognition runs in the game's built-in browser using WebAssembly. Some players have it switched off, usually by Windows Exploit Protection (Arbitrary Code Guard) or an antivirus applying exploit protection to FiveM. For them the server runs the same model instead:

- Their mic audio goes up only while they hold H (about 43 KB/s), and the text comes back.
- The server loads the model only when the first such player joins: about 500 MB of RAM and a 2-second stall, once.
- Each player is capped at 15 seconds per transmission and 30 transmissions a minute.
- It suits a handful of players, not a whole server.

## Callsign

Dispatch opens its replies with your callsign: *"One Adam Twelve, copy, tow truck en route."* It's the one you signed on with in the MDT's CAD; without the MDT, set it in `/control`. See [Settings and callsign](/docs/lwk_control/settings).
