I think I finally solved the long standing problem of speech-dispatcher calls gobbling up all the output to the terminal. Now it should speak and still print things to the terminal.

This commit is contained in:
Storm Dragon 2023-11-29 23:38:10 -05:00
parent 851a5dbf01
commit 35a8a851d8

View File

@ -58,6 +58,7 @@ if [[ -e "${doomPath}/DoomMetalVol6.wad" ]]; then
gameOption+=" ${doomPath}/DoomMetalVol6.wad"
fi
set -o pipefail
case ${buttonCode} in
1)
# Death match setup
@ -115,10 +116,10 @@ case ${buttonCode} in
'-extratic' '-dup' '3'
)
fi
exec stdbuf -oL ${gzdoom} ${gameOption} "${flags[@]}" | stdbuf -oL grep "${grepStrings[@]}" | stdbuf -oL sed "${sedStrings[@]}" | spd-say -e
exec stdbuf -oL ${gzdoom} ${gameOption} "${flags[@]}" | while IFS= read -r l ; do echo "$l" | { grep "${grepStrings[@]}" | sed "${sedStrings[@]}" | spd-say -e; } || echo "$l";done
;;
0)
exec stdbuf -oL ${gzdoom} ${gameOption} | stdbuf -oL grep "${grepStrings[@]}" | stdbuf -oL sed "${sedStrings[@]}" | spd-say -e
exec stdbuf -oL ${gzdoom} ${gameOption} | while IFS= read -r l ; do echo "$l" | { grep "${grepStrings[@]}" | sed "${sedStrings[@]}" | spd-say -e; } || echo "$l";done
;;
esac