Add the Half-Life VOX/HEV TTS presets

This commit is contained in:
Fisto
2026-09-21 11:20:24 +02:00
parent 293d131d2b
commit ac23ee712a
9 changed files with 85 additions and 10 deletions
+16
View File
@@ -18,6 +18,7 @@
# VESKSLOP_TTS_ECHO mono echo amount 0-100 (default 0)
# VESKSLOP_TTS_WORDS 1 = synthesize each word, merge (Flextalk)
# 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)
# VESKSLOP_TTS_VOX_CLEAN 1 = VOX without the \!wH1/\!wH0 stutter
#
@@ -52,6 +53,12 @@ WORDS=${VESKSLOP_TTS_WORDS:-0}
WORD_GAP=${VESKSLOP_TTS_WORD_GAP_MS:-120}
VOX=${VESKSLOP_TTS_VOX:-0}
VOX_CLEAN=${VESKSLOP_TTS_VOX_CLEAN:-0}
PRESET=${VESKSLOP_TTS_PRESET:-}
# The vox preset implies VOX prosody unless the caller set VESKSLOP_TTS_VOX explicitly.
if [ "$PRESET" = "vox" ] && [ -z "${VESKSLOP_TTS_VOX+x}" ]; then
VOX=1
fi
case "$VOICE" in
sam) ENGVOICE="Sam" ;;
@@ -173,6 +180,15 @@ if [ -n "$SPEAKER_GUID" ]; then
P_LOWER=40
P_EXPR=""
# Half-Life presets target Keith Bell only. Precedence: preset < VESKSLOP_TTS_PROFILE
# < VESKSLOP_TTS_EXPRESSION.
if [ "$ENGVOICE" = "Keith Bell" ]; then
case "$PRESET" in
vox) P_PITCH=3; P_RATE=17; P_PROM=22; P_HEAD=52; P_LOWER=40; P_VOLUME=70; P_EXPR=59 ;;
hev) P_PITCH=15; P_RATE=24; P_PROM=22; P_HEAD=52; P_LOWER=40; P_VOLUME=70; P_EXPR=59 ;;
esac
fi
if [ -n "$PROFILE" ]; then
OLDIFS=$IFS
IFS=','