onex-voiceInteraction is a voice recognition and NPC interaction system for FiveM. Players hold a key to speak — the script transcribes their speech and maps it to in-game actions across seven addon modules.
| Feature | Detail |
|---|---|
| Default key | N (hold to speak) |
| Language | Auto-detect or fixed (en, es, fr, de, it, and more) |
| Transcript display | Optional on-screen text below audio spectrum |
| Translation | Pre-match translation with dual-match support |
A custom in-game UI renders during voice activation:
Seven addon modules extend the core voice system into specific gameplay areas. Each addon can be individually enabled or disabled in shared/config.lua.
| Addon | Description |
|---|---|
| NPC Interact | Speak to custom-defined NPCs to trigger server/client events |
| Shops | Buy items, check prices, and request inventory by voice at shop NPCs |
| Ambient NPC | Random world pedestrians respond to players who speak near them |
| Self-Expression | Voice-triggered /me animations for emotional states |
| NPC Lift | Hail passing drivers by voice for a taxi-style ride with automatic fares |
| NPC Robbery | Rob pedestrians at gunpoint using voice commands |
| Banking | Speak to bank teller NPCs to check balance, deposit, and withdraw |
| Hospital | Check in at hospital reception NPCs and pay treatment fees by voice |
When NetworkAudio.enabled is true, NPC text-to-speech responses are broadcast to nearby players as positional audio. Each addon also has its own networkAudio toggle.
The translation system allows servers running non-English communities to match voice commands in any language while preserving English config phrase definitions.
| Option | Behavior |
|---|---|
Translate.enabled = true | Translates player speech before command matching |
Translate.dualMatch = true | Matches against both raw and translated phrases |
Translate.priority | Controls which match wins: highest_score, raw_first, or translated_first |
Last updated 14 days ago