Experimental support for voicing Doom through Cthulhu.

This commit is contained in:
Storm Dragon 2024-10-27 19:36:40 -04:00
parent de189828af
commit aab0c120d9

View File

@ -7,6 +7,11 @@ launch_game() {
} }
speak() { speak() {
if pgrep cthulhu ; then
speechProvider="socat - UNIX-CLIENT:/tmp/cthulhu.sock"
else
speechProvider="spd-say -e ${spd_module} ${spd_pitch} ${spd_rate} ${spd_voice} ${spd_volume} --"
fi
startSpeech=1 startSpeech=1
while IFS= read -r line; do while IFS= read -r line; do
echo "$line" echo "$line"
@ -21,7 +26,7 @@ speak() {
if [[ "$doomLanguage" != "en" ]]; then if [[ "$doomLanguage" != "en" ]]; then
line=$(translate_text "$line") line=$(translate_text "$line")
fi fi
echo "${line}" | spd-say -e ${spd_module} ${spd_pitch} ${spd_rate} ${spd_voice} ${spd_volume} -- > /dev/null 2>&1; echo "${line}" | $speechProvider
fi fi
done done
} }
@ -74,6 +79,7 @@ doomGames=(
export antiGrepStrings=( export antiGrepStrings=(
'-E' '-v' '-E' '-v'
'-e' '^----+$'
'-e' '^$' '-e' '^$'
'-e' '^[0-9]' '-e' '^[0-9]'
'-e' '^P_StartScript:' '-e' '^P_StartScript:'