Expose the Half-Life voices and tidy the radio kit
This commit is contained in:
@@ -42,6 +42,7 @@ export MICROSLOP_BUILD="$WORK/build"
|
||||
export MICROSLOP_WINE="$WORK/bin/wine"
|
||||
export MICROSLOP_FFMPEG="${MICROSLOP_FFMPEG:-ffmpeg}"
|
||||
export DISPLAY=:99
|
||||
export WINEPREFIX="$WORK/prefix"
|
||||
export STUB_LOG="$WORK/host.log"
|
||||
export STUB_REG="$WORK/profile.reg"
|
||||
export STUB_SINE="$WORK/sine.wav"
|
||||
@@ -136,6 +137,14 @@ check "stream is decodable" "0" \
|
||||
check "stream has a gap per word break" "2" \
|
||||
"$("${MICROSLOP_FFMPEG:-ffmpeg}" -hide_banner -i "$WORK/out.wav" -af silencedetect=noise=-45dB:d=0.15 -f null - 2>&1 | grep -c silence_start)"
|
||||
|
||||
# The Half-Life voices carry their profile preset.
|
||||
VESKSLOP_TTS_VOICE=vox VESKSLOP_TTS_VOX=1 run_wrapper
|
||||
check "vox voice writes the VOX profile (both hives)" "2" "$(grep -c '"Pitch"=dword:00000003' "$STUB_REG")"
|
||||
check "vox voice runs VOX prosody" "1" "$(grep -c 'wH1' "$STUB_LOG")"
|
||||
VESKSLOP_TTS_VOICE=hev run_wrapper
|
||||
check "hev voice writes the HEV profile (both hives)" "2" "$(grep -c '"Pitch"=dword:0000000f' "$STUB_REG")"
|
||||
check "hev voice has no prosody" "0" "$(grep -c 'wH1' "$STUB_LOG")"
|
||||
|
||||
# Voice metadata follows the active preset.
|
||||
check "voices reflect hev" "1" \
|
||||
"$(VESKSLOP_TTS_PRESET=hev sh "$WRAP" --voices | tr ',' '\n' | grep -c 'keith-bell|Keith Bell|male|en|expression=59+defaults=pitch:15:rate:24')"
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
# VESKSLOP_TTS_HUM_MS leading low hum in ms, 0 = off (default 80)
|
||||
# VESKSLOP_TTS_HUM_HZ hum frequency, 30-200 (default 75)
|
||||
# VESKSLOP_TTS_HUM_DB hum peak level, -80..-6 (default -48)
|
||||
# voice `vox`/`hev` Half-Life profiles as first-class voices
|
||||
# VESKSLOP_TTS_PRESET vox | hev (Half-Life profiles, Keith Bell;
|
||||
# vox also enables VOX prosody)
|
||||
#
|
||||
@@ -44,9 +45,11 @@ ROOT=$MICROSLOP_ROOT
|
||||
|
||||
# The Keith Bell defaults follow the active preset so the UI's "default" snap points
|
||||
# match the values the preset actually writes.
|
||||
VOX_DEFAULTS="pitch:3:rate:17:prominences:22:head_size:52:lowering:40:expression:59"
|
||||
HEV_DEFAULTS="pitch:15:rate:24:prominences:22:head_size:52:lowering:40:expression:59"
|
||||
case "${VESKSLOP_TTS_PRESET:-}" in
|
||||
vox) KB_DEFAULTS="pitch:3:rate:17:prominences:22:head_size:52:lowering:40:expression:59" ;;
|
||||
hev) KB_DEFAULTS="pitch:15:rate:24:prominences:22:head_size:52:lowering:40:expression:59" ;;
|
||||
vox) KB_DEFAULTS="$VOX_DEFAULTS" ;;
|
||||
hev) KB_DEFAULTS="$HEV_DEFAULTS" ;;
|
||||
*) KB_DEFAULTS="pitch:27:rate:33:prominences:17:head_size:46:lowering:40:expression:59" ;;
|
||||
esac
|
||||
|
||||
@@ -54,7 +57,7 @@ esac
|
||||
# `expression=NN` marks a Flextalk voice with an Expression profile parameter and
|
||||
# its registry default. Expression is applied at voice load, so the wrapper writes
|
||||
# it into the Wine registry before synthesis.
|
||||
VOICES="sam|Sam|male|en,mary|Mary|female|en,mike|Mike|male|en,keith-bell|Keith Bell|male|en|expression=59+defaults=$KB_DEFAULTS,kerry-watson|Kerry Watson|female|en|expression=100+defaults=pitch:65:rate:32:prominences:17:head_size:45:lowering:40:expression:100,mike-telephone|Mike (for Telephone)|male|en,mary-telephone|Mary (for Telephone)|female|en,mike-hall|Mike in Hall|male|en,mike-stadium|Mike in Stadium|male|en,mike-space|Mike in Space|male|en,mary-hall|Mary in Hall|female|en,mary-stadium|Mary in Stadium|female|en,mary-space|Mary in Space|female|en"
|
||||
VOICES="sam|Sam|male|en,mary|Mary|female|en,mike|Mike|male|en,keith-bell|Keith Bell|male|en|expression=59+defaults=$KB_DEFAULTS,vox|VOX (Half-Life)|male|en|expression=59+defaults=$VOX_DEFAULTS,hev|HEV suit|male|en|expression=59+defaults=$HEV_DEFAULTS,kerry-watson|Kerry Watson|female|en|expression=100+defaults=pitch:65:rate:32:prominences:17:head_size:45:lowering:40:expression:100,mike-telephone|Mike (for Telephone)|male|en,mary-telephone|Mary (for Telephone)|female|en,mike-hall|Mike in Hall|male|en,mike-stadium|Mike in Stadium|male|en,mike-space|Mike in Space|male|en,mary-hall|Mary in Hall|female|en,mary-stadium|Mary in Stadium|female|en,mary-space|Mary in Space|female|en"
|
||||
|
||||
if [ "${1:-}" = "--voices" ]; then
|
||||
echo "$VOICES"
|
||||
@@ -82,6 +85,13 @@ 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 Half-Life voices are Keith Bell with a fixed profile preset; selecting one
|
||||
# stands in for VESKSLOP_TTS_PRESET.
|
||||
case "$VOICE" in
|
||||
vox) [ -n "$PRESET" ] || PRESET=vox ;;
|
||||
hev) [ -n "$PRESET" ] || PRESET=hev ;;
|
||||
esac
|
||||
# The VOX preset is the Half-Life announcement voice: it implies VOX prosody
|
||||
# unless the caller explicitly disables it.
|
||||
if [ "$PRESET" = "vox" ] && [ -z "${VESKSLOP_TTS_VOX:-}" ]; then
|
||||
@@ -96,6 +106,8 @@ case "$VOICE" in
|
||||
mary) ENGVOICE="Mary" ;;
|
||||
mike) ENGVOICE="Mike" ;;
|
||||
keith-bell) ENGVOICE="Keith Bell" ;;
|
||||
vox) ENGVOICE="Keith Bell" ;;
|
||||
hev) ENGVOICE="Keith Bell" ;;
|
||||
kerry-watson) ENGVOICE="Kerry Watson" ;;
|
||||
mike-telephone) ENGVOICE="Mike (for Telephone)" ;;
|
||||
mary-telephone) ENGVOICE="Mary (for Telephone)" ;;
|
||||
|
||||
Reference in New Issue
Block a user