From 47b8bda044c851da777e448c36950da279837e12 Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Tue, 6 Jul 2021 13:53:41 -0400 Subject: [PATCH] Updated the installation for rhvoice to only occur if speechsdk is installed. --- audiogame-manager.sh | 12 +++++++----- speech/set-voice.sh | 7 +++---- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/audiogame-manager.sh b/audiogame-manager.sh index 22ef940..73732cd 100755 --- a/audiogame-manager.sh +++ b/audiogame-manager.sh @@ -457,15 +457,17 @@ install_wine_bottle() { geckoPath="${cache}/wine_gecko-2.40-x86.msi" fi if [[ "${WINEARCH}" == "win32" ]]; then - download "https://rhvoice.eu-central-1.linodeobjects.com/RHVoice-voice-English-Bdl-v4.1.9-setup.exe" # This is in a brace list to pipe through dialog. { DISPLAY="" wineboot -u wine msiexec /i z:"$monoPath" /quiet wine msiexec /i z:"$geckoPath" /quiet - winetricks -q win8 - wine "${cache}/RHVoice-voice-English-Bdl-v4.1.9-setup.exe" & - sleep 20 - wineserver -k + if [[ "${*}" =~ speechsdk ]]; then + download "https://rhvoice.eu-central-1.linodeobjects.com/RHVoice-voice-English-Bdl-v4.1.9-setup.exe" + winetricks -q win8 + wine "${cache}/RHVoice-voice-English-Bdl-v4.1.9-setup.exe" & + sleep 20 + wineserver -k + fi winetricks -q $@ ${winVer:-winxp} ${winetricksSettings}; } | dialog --progressbox "Installing wine bottle, please wait..." -1 -1 else # This is in a brace list to pipe through dialog. diff --git a/speech/set-voice.sh b/speech/set-voice.sh index 8a857b6..ab9872c 100755 --- a/speech/set-voice.sh +++ b/speech/set-voice.sh @@ -2,8 +2,7 @@ # Set Voice # Set the default wine voice based on installed options. # Rate can be specified as a numeric argument to this script, 1 through 9. -# The default rate is 5 -# Note that RHVoice will start chopping ends of words above rate 5 +# The default rate is 7 # # â– The contents of this file are subject to the Common Public Attribution @@ -142,10 +141,10 @@ set_voice() { # Remove any existing rate change for voices if [[ "$(uname)" == "Darwin" ]]; then gsed -i '/"DefaultTTSRate"=dword:/d' "${WINEPREFIX}/user.reg" - gsed -i -E -e 's/"DefaultTokenId"="HKEY_LOCAL_MACHINE\\\\(SOFTWARE|Software)\\\\(Wow6432Node\\\\|)Microsoft\\\\Speech\\\\Voices\\\\Token(Enum|)s\\\\[^"]+"/"DefaultTokenId"="HKEY_LOCAL_MACHINE\\\\'"${fullVoice//\\/\\\\}"'"\n"DefaultTTSRate"=dword:0000000'${2:-5}'/g' "${WINEPREFIX}/user.reg" + gsed -i -E -e 's/"DefaultTokenId"="HKEY_LOCAL_MACHINE\\\\(SOFTWARE|Software)\\\\(Wow6432Node\\\\|)Microsoft\\\\Speech\\\\Voices\\\\Token(Enum|)s\\\\[^"]+"/"DefaultTokenId"="HKEY_LOCAL_MACHINE\\\\'"${fullVoice//\\/\\\\}"'"\n"DefaultTTSRate"=dword:0000000'${2:-7}'/g' "${WINEPREFIX}/user.reg" else sed -i '/"DefaultTTSRate"=dword:/d' "${WINEPREFIX}/user.reg" - sed -i -E -e 's/"DefaultTokenId"="HKEY_LOCAL_MACHINE\\\\(SOFTWARE|Software)\\\\(Wow6432Node\\\\|)Microsoft\\\\Speech\\\\Voices\\\\Token(Enum|)s\\\\[^"]+"/"DefaultTokenId"="HKEY_LOCAL_MACHINE\\\\'"${fullVoice//\\/\\\\}"'"\n"DefaultTTSRate"=dword:0000000'${2:-5}'/g' "${WINEPREFIX}/user.reg" + sed -i -E -e 's/"DefaultTokenId"="HKEY_LOCAL_MACHINE\\\\(SOFTWARE|Software)\\\\(Wow6432Node\\\\|)Microsoft\\\\Speech\\\\Voices\\\\Token(Enum|)s\\\\[^"]+"/"DefaultTokenId"="HKEY_LOCAL_MACHINE\\\\'"${fullVoice//\\/\\\\}"'"\n"DefaultTTSRate"=dword:0000000'${2:-7}'/g' "${WINEPREFIX}/user.reg" fi }