Hitman Audio Converter

Just wanted to thank you profusely for the tool. There’s so much dialogue in the game that I knew I’d never hear otherwise, so I went looking for a way to extract it and your tool has worked marvelously. Thanks to you, I was able to hear all of the hilarious Santa dialogue. And thanks for the YouTube OST uploads as well!

One suggestion would be to automatically rename the files based on information in the original headers. Pretty much all of the dialogue files have descriptive labels in the headers (e.g. InCa_VIPDownAck_ABIATTI_CIVMALE06_CIVMALE06_002). Unfortunately, the music and SFX files don’t have descriptive headers for the most part, though some of the music files are labeled with “Tempo: xxx.x”

The regex I’ve been using for the labels is “adtllabl…(.*?)data” but I think it missed capturing some that I ended up having to manually rename. I’d try my hand at editing the .bat file myself but I’m a terrible programmer, lol. I ended up just using PowerShell to extract the labels to a .csv, and used a batch file renamer to rename everything that way.

2 Likes

Ah okay very nice! Thanks very much for the feedback! I will look into your idea :wink:

1 Like

I’ve been using bash myself with the exiftool tool to get the file names out of the headers

#!/bin/bash
old_file_name=$1
new_file_name=$(exiftool -U -b '-RIFF:Unknown_LIST_adtl' "${old_file_name}" | strings | tail -n +2 | awk 'FNR==1')

echo -e "$old_file_name $new_file_name"

It seems to work pretty well on all of the files:

1 Like

Audio modding is also possible.

Requires having Wwise installed for converting audio files into wem.

4 Likes

Version 2.2 is now out! See above. (^)

Changes include:

  • Adding developer features (will require a software key)
  • Upgrades to fetch and debug modes.
  • Trobleshooting menu has had an update too
2 Likes

THAT…is pretty damn cool!

2 Likes

Version 2.4 is now out! See above. (^)

Changes Include:

  • Added support for DLC Pack 15, Singapore
  • General patching
1 Like

If someone can make an audio mod to replace the H2 menu music with 2016’s, you will have a heart from me!

1 Like

Hey guys.
This is a great tool
But can someone provide some “tutorial” how to automatically rename the files?

I’ve tried to understand CovertCrooner and Notex replies, but I feel like I am missing some crucial information to make it work (heck, I might even misunderstood what tools they were using to make it work…).

2 Likes

hey there, Tried to download version 2.4 and link is dead. can someone re-post?

1 Like

Has anyone managed to find gunfire sounds with this tool? I’ve tried ‘chunk0’ so far but no luck. Other files seem like addons (‘patch 1’, etc.) and I don’t feel like I will find something there.

You would be able to find them and they are most likely in the chunk0 patches however the file size would be very small so therefore you would have a couple thousand files to go through

O, so patches eh? Thanks, will try!

Nope, check every last one of them twice - no gunfire sounds in chunk0 patches. Just voices. Tbh I highly doubt they are there. I think they are among the other files (not wwam) and possibly use a different in-game sound engine to play - they are pretty well made and that’s why I wanna find them.

I will check chunk0 again, but I have little hope at this point.

I wish you the best of luck dude!

WWEM contains only music and voice lines. WWEV contains all the sound effects. You’ll need to run this go program on them though to extract all the individual audio files from a single WWEV file. You will then need to use ww2ogg as usual on them.

Here is the program: https://cdn.discordapp.com/attachments/556235715634003979/571186375307821056/wwev.go
Credits go to @swixel

2 Likes

So can Wwise actually open/edit WWEM files? I’ve just downloaded it and it only has three types it seems to detect: AMB, MID, and WAV.

Also, I can’t even figure out how to convert something to WWEM in Wwise, that program’s so confusing. You google ‘wwise wwem’ and nothing actually comes up except this thread and one other which doesn’t tell you how to do anything :frowning:

You’d think it would be as easy as clicking “Convert” but it appears not, that doesn’t give you any options or choices, it seems to just output in a predetermined location as a ‘.akd’

If you want to play or edit the files from the WWEM folder, you have to convert them into a playable format with ww2ogg. Download it from here: https://github.com/hcs64/ww2ogg/releases

Move ww2ogg.exe and packed_codebooks_aoTuV_603.bin to the folder that contained the sound files and create a batch file with the following line:

FOR %%i in (*.WWEM) do ww2ogg %%i --pcb packed_codebooks_aoTuV_603.bin

When you execute the batch file, the program should convert all the .WWEM files into playable .ogg files.
You need a music player like foobar2000 in order to play them though, Windows or VLC Media Player won’t play them. I suggest sorting the sound files by size since the larger files are usually the music ones.

As for converting .wav files to .wem files, I suggest reading this guide from the Spyro modding GitHub wiki, the process is pretty much the same and should work for HITMAN 2:

Converting your sounds back to .wem format for import

Setting Up WWISE

Install Wwise launcher and open it Install by going to WWISE tab and on install page only select Authoring

Disable all the plugins

Make a new project and note the Project Folder location enter image description here

Go to Project -> Project Settings…

Select the Source Settings tab and press the ... button to open up audio quality options

Choose Vorbis Quality High

Press OK and close Project Settings window

Converting WAVS to WEM

To add your own sounds for .wem conversion go to: Project -> Import Audio Files…

Press Add Files… and choose the .wavs you want to convert, press Import to import them to your Wwise project

Go to Project -> Convert All Audio Files

Press OK

enter image description here

After pressing OK your sounds should be converted to .wem files.

You can find them in your Project Folder which by default located here: Documents\WwiseProjects\PROJECT_NAME.cache\Windows\SFX

Once you got your .wem files, move them to a folder where you put your modded files in.

1 Like

I got that first part (Otherwise I wouldn’t have been able to figure out which ones were the menu musics over at the other thread)

I was hoping there was a WWEM editor rather than a converter, as there seems to be specific information encoded in the WWEMs in relation to when and how to loop etc that is lost during conversion to OGG :frowning:
Though I haven’t 100% verified by trying to convert it back to WWEM and seeing what happens in game

Thank you for the second half of your answer; haven’t gone through it yet but I’m sure it explains everything I need to convert it back! :slight_smile: