PCKExtractor for extracting audio and PCKPacker for creating modified PCKs.
PCKExtractor
Extracts WEM and BNK files from Wwise PCK archives.Constructor
Path to the PCK file to extract.
Methods
parse_header
Parses the PCK file header and indexes all files.List of file information dictionaries, each containing:
id(int): File ID (WEM ID)offset(int): Byte offset in PCKsize(int): File size in byteslang_id(int): Language ID (0=SFX, 1=English, 2=Chinese, etc.)lang_name(str): Language name string
extract_file
Extracts a single file from the PCK.File info dictionary from parse_header().
Directory to extract to (creates language subdirectories).
File extension to use (.wem or .bnk).
Path to the extracted file.
extract_all
Extracts all files from the PCK.Directory to extract files to.
If True, also extract BNK (soundbank) files.
- Creates subdirectories for each language (sfx, english, chinese, japanese, korean)
- Prints progress every 100 files
- Names files by their ID:
{file_id}.wem
Language Mapping
Example: Extract PCK
PCKPacker
Creates modified PCK files by replacing audio in existing PCKs.Constructor
Path to the original PCK file to modify.
Where to save the modified PCK.
Methods
load_original_pck
Loads and indexes the original PCK file.- Parses PCK structure
- Indexes all soundbanks, soundbank files, and stream files
- Detects language mappings
- Prints summary of loaded files
replace_file
Replaces a single WEM file by ID.WEM ID to replace.
Path to replacement WEM file.
Language ID (0=SFX, 1=English, etc.).
Section to replace in:
'soundbank_files', 'stream_files', or 'soundbank_titles'.replace_bnk_wems
Replaces multiple WEMs inside a BNK soundbank.BNK soundbank ID to modify.
Directory containing WEM files named by ID (e.g.,
12345.wem).Language ID of the BNK to modify.
- Extracts original BNK from PCK
- Replaces WEMs inside the BNK
- Re-embeds modified BNK into PCK
- Auto-detects correct lang_id if available
replace_files_from_directory
Batch replaces files from a directory structure.Directory containing replacement files.
Default language ID for replacements.
pack
Writes the modified PCK file.- If
True: Uses patching mode (faster, preserves original structure) - If
False: Rebuilds entire PCK from scratch
- Copies original PCK
- Patches replacement files in-place
- Fast and preserves original structure
- Handles size differences:
- Same size: Direct replacement
- Smaller: Pads with zeros
- Larger: Truncates (with warning)
- Rebuilds entire PCK structure
- Handles arbitrary size changes
- Slower but more flexible
close
Closes all open file handles.Section Types
PCK files contain three sections:- soundbank_titles: BNK soundbank files
- soundbank_files: WEM files embedded in soundbanks
- stream_files: Streamed WEM files (large audio)
Example: Modify PCK
Command-Line Usage
Extract PCK
Create Modified PCK
PCK File Format
PCK files use the Wwise AKPK format:Notes
- File IDs are 32-bit unsigned integers (except stream files which use 64-bit)
- Language ID 0 is always SFX (sound effects)
- BNK files contain multiple WEM files and must be modified using
BNKFileclass - Patching mode is recommended for mod distribution (preserves game structure)
- Always call
packer.close()when done to release file handles