native-audio-tool converts audio files into GTA/FiveM native audio resources. It creates the intermediate WAV files, generates AWC audio containers directly in Node.js, and writes the REL XML metadata used by SimpleAudio and custom native radio resources.
- Converts
mp3,wav, andogginputs to mono 16-bit WAV files. - Generates
.awcaudio containers directly; no CodeWalker build step is required for AWCs. - Generates REL XML data for
simpleandradioaudio types. - Supports either an explicit comma-separated file list or an input folder.
-
Install dependencies:
bun install
-
Run one of the generators:
bun run makeSounds -- --folder=input --samplerate=32000
bun run makeRadio -- --folder=input --samplerate=48000 --trackid=5000
Use makeSounds for SimpleAudio/native frontend sounds.
--samplerate- Required. Output WAV sample rate, for example32000or48000.--file- Comma-separated list of input audio files. Supported extensions:mp3,wav,ogg.--folder- Folder containing input audio files. Use either--fileor--folder, not both.--soundset- Optional. Sound set name used in the generated REL XML. Defaults tospecial_soundset.--audiobank- Optional. Audio bank/folder name. Defaults tocustom_sounds.--codec- Optional. Usepcmfor best quality oradpcmfor smaller files. Defaults topcm.
Use makeRadio for custom native radio resources.
--samplerate- Required. Output WAV sample rate, for example48000.--trackid- Required. Starting track ID for generated radio track metadata.--file- Comma-separated list of input audio files. Supported extensions:mp3,wav,ogg.--folder- Folder containing input audio files. Use either--fileor--folder, not both.
Generate a simple audio bank from two files:
bun run makeSounds -- --file=lock.mp3,unlock.ogg --samplerate=32000 --soundset=special_soundsetGenerate a simple audio bank from a folder with a custom audio bank name:
bun run makeSounds -- --folder=input --samplerate=32000 --soundset=js5m_soundset --audiobank=js5m_audiobank --codec=adpcmGenerate radio resources:
bun run makeRadio -- --file=track01.mp3,track02.mp3 --samplerate=48000 --trackid=5000Generated files are written under output/:
output/audiodirectory/<audiobank>.awcforsimpleaudio.- Simple-audio WAV files are generated temporarily under
output/audiodirectory/<audiobank>/and removed after the.awcis written. output/audiodirectory/<track>.awcfor eachradiotrack.output/audiodirectory/<track>/*.wavfor generatedradioWAV files.output/data/*.dat54.relbinary sound metadata forsimpleandradioaudio.output/data/*.dat151.relbinary game/radio metadata forradioaudio.output/data/*.rel.xmldebug/import REL XML metadata.output/audiodirectory/*.awc.xmldebug/import AWC XML files.output/fxmanifest.luaready-to-copy FiveM manifest with generated file paths and simple sound script names.
After generation, copy the generated output/audiodirectory/ and output/data/ folders into your FiveM resource's stream/ folder. You can also copy output/fxmanifest.lua to the root of a new resource. Do not include the generated .xml files unless you want to keep them for debugging.
Example for bun run makeSounds -- --audiobank=joe_sounds:
my_audio_resource/
├─ fxmanifest.lua
└─ stream/
├─ audiodirectory/
│ └─ joe_sounds.awc
└─ data/
└─ joe_sounds.dat54.relExample fxmanifest.lua:
fx_version 'cerulean'
game 'gta5'
files {
'stream/audiodirectory/joe_sounds.awc',
'stream/data/joe_sounds.dat54.rel'
}
data_file 'AUDIO_WAVEPACK' 'stream/audiodirectory'
data_file 'AUDIO_SOUNDDATA' 'stream/data/joe_sounds.dat'Notes:
AUDIO_WAVEPACKpoints to the folder that contains the generated.awcfiles, preserving theaudiodirectory/folder.AUDIO_SOUNDDATApoints to the.dat54.relpath without the54.relsuffix, preserving thedata/folder, sostream/data/joe_sounds.dat54.relbecomesstream/data/joe_sounds.dat.- The sound set name defaults to
special_soundset, or whatever you passed with--soundset.
For makeRadio, copy the generated output/audiodirectory/ and output/data/ folders into stream/:
my_radio_resource/
├─ fxmanifest.lua
└─ stream/
├─ audiodirectory/
│ ├─ track01.awc
│ └─ track02.awc
└─ data/
├─ dlccustomsongs_sound.dat54.rel
└─ dlccustomsongs_game.dat151.relExample fxmanifest.lua:
fx_version 'cerulean'
game 'gta5'
files {
'stream/audiodirectory/track01.awc',
'stream/audiodirectory/track02.awc',
'stream/data/dlccustomsongs_sound.dat54.rel',
'stream/data/dlccustomsongs_game.dat151.rel'
}
data_file 'AUDIO_WAVEPACK' 'stream/audiodirectory'
data_file 'AUDIO_SOUNDDATA' 'stream/data/dlccustomsongs_sound.dat'
data_file 'AUDIO_GAMEDATA' 'stream/data/dlccustomsongs_game.dat'Use one AUDIO_WAVEPACK line for the stream/audiodirectory/ folder containing the generated .awc files.
-
CodeWalker is optional and useful for inspecting generated AWC files or working with REL XML, but it is not required to generate AWCs.
