Jump to content

God of War Ragnarök .audiopack file


krzyywyy
Go to solution Solved by ponaromixxx,

Recommended Posts

The program works very well. What I really want to do is replace some recorded dialogues of the game's screen reader. I found the .wem files and imported the converted files using the Wwise application, but in the game, the file in question is silent. What should I do to make the conversion work?

Link to comment
Share on other sites

  • 2 months later...

For those who still want to know,
I did a little snooping on ponaromixxx's posts about the subject (sorry, but your zips are always taken down) and I managed to reverse engineer a solution from their explanations on various other sites.

From what I've understood

  • The .Audiopack files are RIFF files (open them in a hex editor and you'll see the first line),
  • and they extract as .wem files (you can convert them OR install an addon to make foobar read those. Check VMGStream on Github )

Here is a LLM'ed python script that works the treat

Enjoy ! 
🌟

import os
import tkinter as tk
from tkinter import filedialog

def extract_wem_files():
    # Initialize Tkinter
    root = tk.Tk()
    root.withdraw()  # Hide the root window

    # Ask for the input .audiopack file
    print("Please select the .audiopack file.")
    input_file = filedialog.askopenfilename(filetypes=[("Audio Pack Files", "*.audiopack")])
    if not input_file:
        print("No file selected. Exiting.")
        return

    # Ask for the output folder name
    destination_folder = input("Enter the name of the destination folder: ").strip()
    if not destination_folder:
        print("No folder name provided. Exiting.")
        return

    # Create the folder if it doesn't exist
    if not os.path.exists(destination_folder):
        os.makedirs(destination_folder)
        print(f"Created folder: {destination_folder}")

    # Read the input file and extract .wem files
    with open(input_file, "rb") as f:
        data = f.read()

    # Search for "RIFF" headers and extract chunks
    index = 0
    file_count = 0
    while index < len(data):
        riff_index = data.find(b"RIFF", index)
        if riff_index == -1:
            break

        # Extract the size of the RIFF chunk
        chunk_size = int.from_bytes(data[riff_index + 4:riff_index + 8], "little")
        chunk_end = riff_index + 8 + chunk_size

        # Write the extracted chunk to a .wem file
        output_file = os.path.join(destination_folder, f"extracted_{file_count}.wem")
        with open(output_file, "wb") as out_f:
            out_f.write(data[riff_index:chunk_end])

        print(f"Extracted: {output_file}")
        file_count += 1
        index = chunk_end

    print(f"Extraction complete. {file_count} files saved to {destination_folder}.")

# Run the script
if __name__ == "__main__":
    extract_wem_files()

 

Edited by JCaver
Tired af, typos, syntax
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...