Tools¶
Three tools live in the repo beside the plugin. All work outside the game.
| Tool | Folder | For |
|---|---|---|
| The probe | tools/probe |
Checking a model and hearing a voice without starting the game |
| The voice training kit | tools/voicetrain |
Making a voice of your own from recordings |
| The voice pack gap filler | tools/dbvo |
Generating the player lines a recorded voice pack lacks |
The probe¶
probe.exe is a small console program that runs the same speech core as the plugin. Use it to check a model before it goes into a load order, to hear a voice, and to time a line on your machine.
Build it once (see Building from Source):
Speak one line¶
It prints how long the line took to generate and writes out.lip beside the wav: the mouth animation a dialogue line with that audio would get. AudioUtil's LipSim plays the pair.
voice defaults to 0, out.wav to probe.wav, threads to 2. On a Pocket model voice may also be the name of one of its recordings, or the path of any .wav: the line is then spoken like that recording, as a voice sample SkyrimNet sends is with voice cloning on.
Speak a whole list¶
Speaks a list with the model loaded once. The list is UTF-8, one line each: a file name, a tab, the text. It writes <out dir>\<file name>.wav and .lip. A line whose wav is already there is skipped, so a stopped run resumes.
Other modes¶
| Command | Does |
|---|---|
probe --text <file> |
Reads the file's bytes as a line of game text and prints, in hex and as text, what the speech runtime would be handed. For checking how encoded text is cleaned up |
probe --rest out.lip |
Writes the closed-mouth placeholder lip alone |
Why check a model here first
The speech runtime exits on some malformed model files. In the probe that closes a console window; in the game it closes the game.
The voice training kit¶
Scripts in tools/voicetrain. They fine-tune Kokoro on recordings of one speaker and export a model folder the plugin loads, in four commands: setup once, then prepare, train and export for each voice.
The training runs under Linux with an NVIDIA card; on Windows the kit drives WSL 2 for you. Training a Voice is the guide.
The voice pack gap filler¶
Scripts in tools/dbvo. Dragonborn Voice Over plays a recorded file for each player line its voice pack has, and stays silent for the rest. These scripts find the lines of a load order that no installed pack covers and generate a voice file for each, in the pack's own layout and format, so that mod plays them like any recorded line.
Made for legacy packs (Sound\DBVO\<pack>\<line>.fuz) under Mod Organizer 2.
What you need¶
probe.exeand a model folder, as above- Python 3 with
lz4andnumpy xwmaencode.exefrom the Creation Kit (Tools\Audioin the game folder)
Steps¶
python dbvo_gaps.py <MO2 instance> <profile> <game Data> <pack id> out
python prep_lines.py out\all_lines.tsv out\pack_names.txt out
python generate.py out\jobs.tsv <probe.exe> <model dir> <voice> wav "<new mod folder>\Sound\DBVO\<pack id>" <xwmaencode.exe> 3 5
dbvo_gaps.pyreads the dialogue topics of every active plugin and lists the player's lines (all_lines.tsv) and the files the enabled packs hold (pack_names.txt).summary.txtsays how much is covered, per plugin.prep_lines.pywrites the work list: a line's file name, and what is spoken for it. A direction such as(Persuade)or[Attack]is not spoken, and a line that is nothing else is skipped. Lines with text the game fills in at run time (<Alias=...>) cannot be made ahead.generate.pyspeaks the list on several processes (here 3, with 5 threads each), then packs each line: xWMA at 44.1 kHz mono 48 kbit/s plus the mouth animation, as recorded packs are. It can be stopped and started again.
Put the result in a mod folder of its own and enable it. It only holds file names no other pack has, so its place in the mod order does not matter.
Notes¶
- Voice. Pick the voice nearest the pack's.
- Loudness. The generated voice is quieter than a recorded pack. Write the difference in dB into
wav\_gain_db.txtbefore the packing step and each line is raised by that much. - After changing the mod list, run the three steps again: only the new lines are generated.
The README in that folder has the details, including the file name rule.