From 7736b3a8a117f802ea9bdfe5c516f55f81fde25b Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Thu, 15 Feb 2024 10:52:59 -0500 Subject: [PATCH] Try to fix setting default voice if not available. --- audiogame-manager.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/audiogame-manager.sh b/audiogame-manager.sh index 3029197..d3b5a2a 100755 --- a/audiogame-manager.sh +++ b/audiogame-manager.sh @@ -677,7 +677,7 @@ install_wine_bottle() { echo "WINE=\"${WINE}\"" > "$HOME/.local/wine/${bottle}/agm.conf" echo "WINESERVER=\"${WINESERVER}\"" >> "$HOME/.local/wine/${bottle}/agm.conf" # If default voice is set, change it for the bottle - if [[ -n "${defaultVoice}" ]] && [[ "${*}" =~ (speechsdk|sapi) ]]; then + if [[ ${#defaultVoice} -ge 2 ]] && [[ "${*}" =~ (speechsdk|sapi) ]]; then echo "Setting default voice for bottle \"${bottle}\" to \"${defaultVoice}\"." "${0%/*}/speech/set-voice.sh" -b "${bottle}" -r "${defaultRate:-7}" -v "${defaultVoice}" fi