Only attempt to set default voice for the bottle if speechsdk or sapi gets installed.

This commit is contained in:
stormdragon2976 2023-05-01 02:23:50 -04:00
parent bd70fd8c56
commit cf85fef828

View File

@ -618,7 +618,7 @@ install_wine_bottle() {
echo "WINE=\"${WINE}\"" > "$HOME/.local/wine/${bottle}/agm.conf" echo "WINE=\"${WINE}\"" > "$HOME/.local/wine/${bottle}/agm.conf"
echo "WINESERVER=\"${WINESERVER}\"" >> "$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 default voice is set, change it for the bottle
if [[ -n "${defaultVoice}" ]]; then if [[ -n "${defaultVoice}" ]] && [[ "${*}" =~ (speechsdk|sapi) ]]; then
echo "Setting default voice for bottle \"${bottle}\" to \"${defaultVoice}\"." echo "Setting default voice for bottle \"${bottle}\" to \"${defaultVoice}\"."
"${0%/*}/speech/set-voice.sh" -b "${bottle}" -r "${defaultRate:-7}" -v "${defaultVoice}" "${0%/*}/speech/set-voice.sh" -b "${bottle}" -r "${defaultRate:-7}" -v "${defaultVoice}"
fi fi