Let word mode combine with the VOX preset

This commit is contained in:
Fisto
2026-09-21 11:47:38 +02:00
parent 7ad0a691db
commit 51d42b3a16
6 changed files with 44 additions and 16 deletions
+9 -5
View File
@@ -16,7 +16,8 @@
# prominences, head_size, lowering
# VESKSLOP_TTS_HIGHPASS high-pass Hz (40-400, default 40)
# VESKSLOP_TTS_ECHO mono echo amount 0-100 (default 0)
# VESKSLOP_TTS_WORDS 1 = synthesize each word, merge (Flextalk)
# VESKSLOP_TTS_WORDS 1 = synthesize each word, merge (Flextalk);
# combines with a preset and wins over VOX prosody
# VESKSLOP_TTS_WORD_GAP_MS silence between words in ms (0-500)
# VESKSLOP_TTS_PRESET vox | hev (Keith Bell profile preset; vox implies VOX)
# VESKSLOP_TTS_VOX 1 = VOX prosody, NetTTS-style (Flextalk)
@@ -305,9 +306,11 @@ fi
# SAPI4 is ANSI/CP1252. VOX mode (Flextalk only) first transforms the text into
# vendor tags (\!wH1/\!wH0, \!br, \!sfNN) with setup/vox_parser.py; the parser
# works on UTF-8, so it runs before the CP1252 transliteration.
# works on UTF-8, so it runs before the CP1252 transliteration. Word mode builds
# its own cadence from single-word instances, so the parser is skipped there: the
# VOX tags cannot survive a word split.
TEXT_SRC="$TEXT_IN"
if [ "$VOX" = "1" ] && [ -n "$SPEAKER_GUID" ]; then
if [ "$VOX" = "1" ] && [ -n "$SPEAKER_GUID" ] && [ "$WORDS" != "1" ]; then
if command -v "$MICROSLOP_PYTHON" >/dev/null 2>&1 && [ -f "$MICROSLOP_ROOT/setup/vox_parser.py" ]; then
if [ "$VOX_CLEAN" = "1" ]; then
"$MICROSLOP_PYTHON" "$MICROSLOP_ROOT/setup/vox_parser.py" --clean < "$TEXT_IN" > "$TMP/vox.txt"
@@ -356,8 +359,9 @@ try_run_host() {
# Word mode (Flextalk): synthesize each word and merge with silence gaps, which
# gives the staccato radio cadence the Half-Life VOX/HEV voices are known for.
# VOX mode takes precedence: it produces its own cadence with vendor tags.
if [ "$WORDS" = "1" ] && [ -n "$SPEAKER_GUID" ] && [ "$VOX" != "1" ]; then
# It combines with a preset (the profile is already written) and takes precedence
# over VOX prosody, which cannot survive a word split.
if [ "$WORDS" = "1" ] && [ -n "$SPEAKER_GUID" ]; then
GAP=$WORD_GAP
case "$GAP" in *[!0-9]*|"") GAP=120 ;; esac
[ "$GAP" -gt 500 ] && GAP=500