diff --git a/speech/set-voice.sh b/speech/set-voice.sh index bd60d08..593c8da 100755 --- a/speech/set-voice.sh +++ b/speech/set-voice.sh @@ -194,6 +194,10 @@ for x in "${voiceListFullName[@]}" ; do done oldVoice="$($grep -P '"DefaultTokenId"="HKEY_LOCAL_MACHINE\\\\(SOFTWARE|Software)\\\\(Wow6432Node\\\\|)Microsoft\\\\Speech\\\\Voices\\\\Token(Enum|)s\\\\[^"]+"' "${WINEPREFIX}/user.reg" | $sed -E -e 's/"DefaultTokenId"="([^"]+)"/\1/g')" exit=1 +if [[ "${voiceList[@]}" -eq 0 ]]; then +dialog --msgbox "No voices found." -1 -1 +exit 1 +fi while [[ $exit -ne 0 ]] ; do voice="$(menulist "${voiceList[@]}")"