Try to fix setting default voice if not available.

This commit is contained in:
Storm Dragon 2024-02-15 10:52:59 -05:00
parent bef82cb96e
commit 7736b3a8a1

View File

@ -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