> For the complete documentation index, see [llms.txt](https://kazescripts.gitbook.io/kazescripts/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kazescripts.gitbook.io/kazescripts/kaze_sound.md).

# kaze\_sound

Realistic 3D surround sound and proximity voice chat for FiveM. Replaces xSound and pma-voice.

kaze\_sound is a 3D audio engine and voice chat for FiveM. Music, sounds and voices come from a real position in the world: from the left or right, muffled behind walls, booming out of a club, thumping from a closed car. Everyone on the server hears the same track at the same moment.

It replaces both **xSound** and **pma-voice**. Existing scripts keep working: xSound calls after you change `exports.xsound` to `exports.kaze_sound`, and pma-voice calls without any change.

## Features

| Feature              | What players hear                                                                                                                                                                         |
| -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Surround panning** | A sound on your right plays in your right ear. Sounds behind you are duller, so front and back stay clear. Optional HRTF mode for binaural 3D on headphones.                              |
| **Distance falloff** | Volume drops naturally with distance and fades smoothly to silence at the sound's range.                                                                                                  |
| **Wall occlusion**   | Walls and objects between you and the source muffle the sound, leaving the bass.                                                                                                          |
| **Interiors**        | Standing outside an MLO, you hear the party inside as muffled bass plus echo.                                                                                                             |
| **Vehicle cabins**   | A car radio sounds muffled from outside a closed car. Each open door or window, a lowered convertible roof, or a bike or boat lets more through. Inside the same car, the radio is clear. |
| **Room acoustics**   | Ten room presets (club, bar, hall, warehouse, garage, room, bathroom, outdoor, car, dry), each with its own echo and tone.                                                                |
| **Server sync**      | Every player hears the same position in the track, including players who join late. Drift is corrected automatically.                                                                     |
| **Culling**          | Sounds out of range pause, and resume at the right position when you come back.                                                                                                           |
| **Sources**          | Local files, direct links (mp3, ogg, wav, m4a), live radio streams and YouTube.                                                                                                           |
| **Voice chat**       | Proximity voice with ranges, radio and phone calls. Voices are muffled through walls, interiors and closed cars too.                                                                      |
| **Player volume**    | Players set their own music volume with `/soundvolume` and radio and call volume with `/vol`. Both are saved.                                                                             |
| **Compatible**       | xSound-style exports, and full pma-voice compatibility.                                                                                                                                   |

## Requirements

| Requirement  | Notes                                                                                                                        |
| ------------ | ---------------------------------------------------------------------------------------------------------------------------- |
| FiveM server | A recent server build.                                                                                                       |
| Framework    | None. kaze\_sound is standalone and works with Qbox, QBCore, ESX or no framework.                                            |
| OneSync      | Required for voice chat and for synced sounds attached to vehicles or other entities. Enabled by default on current servers. |
| Native audio | `setr voice_useNativeAudio true` for 3D voices and voice effects.                                                            |

## How it works

```mermaid
flowchart LR
    A[Your script] -->|exports| B[kaze_sound client / server]
    B -->|synced to every player| C[Listener: camera position]
    C --> D[Occlusion: walls, interiors, car cabins]
    D --> E[Room reverb preset]
    E --> F[Surround panning]
    F --> G[Player's speakers or headphones]
```

Your script creates a sound with one export. kaze\_sound tracks where it is, where the player's camera is, and what's in between, many times per second, and shapes the audio to match. Voice chat uses the same occlusion rules on other players' voices.

## Next steps

* [Installation](/kazescripts/kaze_sound/installation.md): get it running and test it in two minutes.
* [Voice chat](/kazescripts/kaze_sound/voice-chat.md): set up proximity voice, radio and calls.
* [Client API](/kazescripts/kaze_sound/client-api.md), [Server API](/kazescripts/kaze_sound/server-api.md) and [Voice API](/kazescripts/kaze_sound/voice-api.md): use it from your own scripts.
* [Migrating from xSound](/kazescripts/kaze_sound/migrating-from-xsound.md) or [from pma-voice](/kazescripts/kaze_sound/migrating-from-pma-voice.md): switch over an existing server.
