From aab0c120d9742ffd4c8a9f8058150990c601dca3 Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Sun, 27 Oct 2024 19:36:40 -0400 Subject: [PATCH] Experimental support for voicing Doom through Cthulhu. --- .scripts/FreeDoom.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.scripts/FreeDoom.sh b/.scripts/FreeDoom.sh index c4fe689..e5ea3b9 100755 --- a/.scripts/FreeDoom.sh +++ b/.scripts/FreeDoom.sh @@ -7,6 +7,11 @@ launch_game() { } 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 while IFS= read -r line; do echo "$line" @@ -21,7 +26,7 @@ speak() { if [[ "$doomLanguage" != "en" ]]; then line=$(translate_text "$line") fi - echo "${line}" | spd-say -e ${spd_module} ${spd_pitch} ${spd_rate} ${spd_voice} ${spd_volume} -- > /dev/null 2>&1; + echo "${line}" | $speechProvider fi done } @@ -74,6 +79,7 @@ doomGames=( export antiGrepStrings=( '-E' '-v' + '-e' '^----+$' '-e' '^$' '-e' '^[0-9]' '-e' '^P_StartScript:'