Difference between revisions of "How to generate voice files by batch"

From the CreationKit Wiki
Jump to navigation Jump to search
imported>Jog
(May need a bit of tweaking, but at least it's documented now)
 
imported>Jog
(duh)
Line 44: Line 44:
When you start the batch file, it will first follow the directory structure to find the name of the topmost folder (which is equal to your mod's name) then it uses the Creation Kit to generate the lip files. The next step is to convert every WAV file in the folder to XWM, and finally all LIPs and XWMs in the folder are combined to FUZs.
When you start the batch file, it will first follow the directory structure to find the name of the topmost folder (which is equal to your mod's name) then it uses the Creation Kit to generate the lip files. The next step is to convert every WAV file in the folder to XWM, and finally all LIPs and XWMs in the folder are combined to FUZs.


[[Solutions]]
[[Category:Solutions]]

Revision as of 14:44, 20 March 2012

For a mod with a lot of dialogue it can be a pain to manually create all files in the CK. It may be easier to batch-generate some or all of the required files. Skyrim uses the FUZ format which combines the actual audio recording in XWM format and the LIP file. To generate these files by batch, a couple of tools are required:

LIP Files

LIP files contain the lipsync data and can be generated using the Creation Kit itself.

CreationKit.exe -GenerateLips:YourMod.esm

This will load the specified ESM and generate LIPs for every dialogue line for which there is a loose WAV file under Data/Sound/Voice/YourMod.ESM/

XWM Files

XWM is an audio format that can be generated from WAVs using Microsoft's xWMAEncode from the Direct X SDK (The download is a SFX ZIP-file, xWMAEncode.EXE can be found under Utilities/Bin/x86) http://www.microsoft.com/download/en/confirmation.aspx?id=6812

xwmaencode "my_voice_file.wav" "my voice file.xwm"

This will convert the WAV file into a XWM file.

To create XWM files outside a batch file you can use this tool instead: http://skyrim.nexusmods.com/downloads/file.php?id=3159

FUZ Files

FUZ is a container format that combines XWM and LIP it can be created using Agnahim's Voice File extractor. http://skyrim.nexusmods.com/downloads/file.php?id=950

fuz_extractor -c "my_voice_file.fuz" "my_voice_file.xwm" "my_voice_file.lip"

Will convert the XWM File and the WAV file into FUZ file as used by Skyrim,


Batch generation

With all tools available, all that is left is creating a batch file that will automatically generate all the FUZ files required by your mod.

Save all your WAV files into a sub-folder of Data/Sound/voice that is named like your mod. (e.g. Data/Sound/Voice/YourMod.ESM/)

Then create a new text file in that folder, copy/paste in the following code and rename it to "voice-tool.bat"

for /f "delims=\" %%a in ("%cd%") do set mod=%%~nxa
..\..\..\..\CreationKit.exe -GenerateLips:%mod%
FOR /R %%a IN (*.wav) DO xwmaencode "%%a" "%%~pa%%~na.xwm"
FOR /R %%a IN (*.xwm) DO fuz_extractor -c "%%~pa%%~na.fuz" "%%a" "%%~pa%%~na.lip"

When you start the batch file, it will first follow the directory structure to find the name of the topmost folder (which is equal to your mod's name) then it uses the Creation Kit to generate the lip files. The next step is to convert every WAV file in the folder to XWM, and finally all LIPs and XWMs in the folder are combined to FUZs.