AudioExporter is a Python 3.8 script that extracts VALORANT's audio files into a playable WAV files. There are four types of exports supported by AudioExporter:
.ubulk
files containing WEM content..uexp
files when a.ubulk
is expected but doesn't exist..uasset
files that contain references to audio files.- Exporting based on audio ID.
pip install git+https://github.com/NotToDisturb/AudioExporter.git#egg=AudioExporter
The following tools are also required:
AudioExporter
<AudioExporter instance>.export_audios
<AudioExporter instance>.export_ubulk
<AudioExporter instance>.export_uexp
<AudioExporter instance>.export_ip
<AudioExporter instance>.export_uasset
<AudioExporter instance>.find_ids
Creates an instace of AudioExporter, loading the config. If
game_path
is provided, it should be a path to aVALORANT-Win64-Shipping.exe
, see more in Example paths.Check the Config file section and the ConfigLoader repo to learn more about how the config file works.
files: list, audio_types: list = ["localized"], audio_paks_path: str = None,
output_path: str = None, archive=False
)
Exports and parses
files
by searching in each providedaudio_types
directory. It directs each file to its appropriate exporter based on the file extension.
- If provided,
audio_paks_path
will override the VALORANT path (valorant_path
in the config)- If provided,
output_path
it will override the output path (output_path
in the config)- If true,
archive
also copies the resulting WAV file to an archival path. See more in the Archiving section.Read more about
audio_types
.
file: str, output_path: str = None, parent: str = None, archive: bool = False
)
Parses a ubulk
file
by running it through vgmstream (vgmstream_path
in the config).
- If provided,
output_path
it will override the output path (output_path
in the config)- If provided,
parent
overrides the defaultubulk
parent.- If true,
archive
also copies the resulting WAV file to an archival path. See more in the Archiving section.
file: str, output_path: str = None, parent: str = None, archive: bool = False
)
Parses a uexp
file
by converting it to ubulk and running it through vgmstream (vgmstream_path
in the config).
- If provided,
output_path
it will override the output path (output_path
in the config)- If provided,
parent
overrides the defaultuexp
parent.- If true,
archive
also copies the resulting WAV file to an archival path. See more in the Archiving section.
audio_id: str, audio_type: str, audio_paks_path: str = None,
output_path: str = None, parent: str = None, archive: bool = False
)
Finds and exports
audio_id
from the givenaudio_type
folder and parses by ensuring it is ubulk and running it through vgmstream (vgmstream_path
in the config).
- If provided,
audio_paks_path
will override the VALORANT path (valorant_path
in the config)- If provided,
output_path
it will override the output path (output_path
in the config)- If provided,
parent
overrides the defaultaudioID
parent.- If true,
archive
also copies the resulting WAV file to an archival path. See more in the Archiving section.Read more about
audio_types
.
file: str, audio_type: str, audio_paks_path: str = None,
output_path: str = None, parent: str = None, archive: bool = False
)
Finds and exports all audio ids present in
file
from the givenaudio_type
folder and parses by ensuring it is ubulk and running it through vgmstream (vgmstream_path
in the config).
- If provided,
audio_paks_path
will override the VALORANT path (valorant_path
in the config)- If provided,
output_path
it will override the output path (output_path
in the config)- If provided,
parent
overrides the use offile
's filename as parent.- If true,
archive
also copies the resulting WAV file to an archival path. See more in the Archiving section.Read more about
audio_types
.
Returns a list with all the audio ids of
audio_type
infile
. Read more aboutaudio_types
.
AudioExporter uses a configuration file to know where the needed tools and other paths are:
Path | Validation type | Description |
---|---|---|
umodel_path | File | Path to the UModel executable. |
vgmstream | File | Path to the vgmstream executable. |
aes_path: | File | Path to the AES key, a text file containing only the key in 0x<key> format. |
valorant_path | Folder | Path to your VALORANT installation folder. See more on Example paths. |
working_path | Folder | Path where the extraction of audio files and its parsing to WE; will take place. |
output_path | Not empty path | Path where the parsed WAV files will be placed. Check out the available output path keywords. |
Type | Description |
---|---|
localized |
Audios that are present in /Game/WwsiseAudio/Localized/{folder_language}/Media/ |
general |
Audios that are present in /Game/WwsiseAudio/Localized/Media/ |
Found in | Path | Example |
---|---|---|
Code | game_path |
C:\Riot Games\VALORANT\live\ShooterGame\Binaries\Win64\VALORANT-Win64-Shipping.exe |
Code | audio_paks_path |
C:\Riot Games\VALORANT\live\ShooterGame\Content\Paks\ |
Config | valorant_path |
C:\Riot Games\VALORANT\live\ |
Keyword | Description |
---|---|
{pak_language} |
Replaced by the language of the audio file in xx_YY format. |
{folder_language} |
Replaced by the language of the audio file in xx-YY format. |
{game_version} |
Replaced by the game version on the provided executable. |
{audio_id} |
Replaced by the string of numbers identifying the audio in the game files. |
{parent} |
Replaced by one of four when a parent argument is not provided:
|
Here is an example of how to use AudioExporter:
from audioexporter import AudioExporter
NATURES_WRATH = "C:\\ProgramFiles\\UModel\\Saves\\Game\\WwiseAudio\\Localized\\en-US\\Media\\324031775.ubulk"
exporter = AudioExporter("en_US", "en-US")
exporter.export_files([NATURES_WRATH])
The first time this script is run, it will exit after generating audio_config.json
.
Subsequent runs will continue exiting until the configuration file is filled out correctly.
Once it is, the script will execute properly and the exported audio files will be in the output path (output_path
in the config).
AudioExporter features an archival feature that allows the user to automatically archive
every audio file exported. The first time a script that uses AudioExporter
is run with archive=True
, a new config file will be generated within the installation path
of AudioExporter (shown by the script upon generation).
That configuration can be identical to the one in your project folder, but in order to not overwrite audio files
from other versions, it is recommended that the filename of the path in output_path
be {parent} - {audio_id} - {folder_language}-{game_version}.wav
It is also possible to use AudioExporter as a standalone script:
- Download the latest release
- Extract the zip file
- Open a console inside the extracted folder
- Install the required packages using
pip install -r requirements.txt
- Run the script using
python audioexporter.py
In the first execution, the config file is created and needs to be filled out.
Check out Installation for the tools required and
Config file for more details on how to fill out the config.
Running the script after filling out the config, you will be asked for a list of files.
Once inputted, the audio files will be exported.