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() {
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:'