Updated the installation for rhvoice to only occur if speechsdk is installed.

This commit is contained in:
Storm Dragon 2021-07-06 13:53:41 -04:00
parent ee9c7502a5
commit 47b8bda044
2 changed files with 10 additions and 9 deletions

View File

@ -457,15 +457,17 @@ install_wine_bottle() {
geckoPath="${cache}/wine_gecko-2.40-x86.msi" geckoPath="${cache}/wine_gecko-2.40-x86.msi"
fi fi
if [[ "${WINEARCH}" == "win32" ]]; then 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. # This is in a brace list to pipe through dialog.
{ DISPLAY="" wineboot -u { DISPLAY="" wineboot -u
wine msiexec /i z:"$monoPath" /quiet wine msiexec /i z:"$monoPath" /quiet
wine msiexec /i z:"$geckoPath" /quiet wine msiexec /i z:"$geckoPath" /quiet
if [[ "${*}" =~ speechsdk ]]; then
download "https://rhvoice.eu-central-1.linodeobjects.com/RHVoice-voice-English-Bdl-v4.1.9-setup.exe"
winetricks -q win8 winetricks -q win8
wine "${cache}/RHVoice-voice-English-Bdl-v4.1.9-setup.exe" & wine "${cache}/RHVoice-voice-English-Bdl-v4.1.9-setup.exe" &
sleep 20 sleep 20
wineserver -k wineserver -k
fi
winetricks -q $@ ${winVer:-winxp} ${winetricksSettings}; } | dialog --progressbox "Installing wine bottle, please wait..." -1 -1 winetricks -q $@ ${winVer:-winxp} ${winetricksSettings}; } | dialog --progressbox "Installing wine bottle, please wait..." -1 -1
else else
# This is in a brace list to pipe through dialog. # This is in a brace list to pipe through dialog.

View File

@ -2,8 +2,7 @@
# Set Voice # Set Voice
# Set the default wine voice based on installed options. # Set the default wine voice based on installed options.
# Rate can be specified as a numeric argument to this script, 1 through 9. # Rate can be specified as a numeric argument to this script, 1 through 9.
# The default rate is 5 # The default rate is 7
# Note that RHVoice will start chopping ends of words above rate 5
# #
# ■The contents of this file are subject to the Common Public Attribution # ■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 # Remove any existing rate change for voices
if [[ "$(uname)" == "Darwin" ]]; then if [[ "$(uname)" == "Darwin" ]]; then
gsed -i '/"DefaultTTSRate"=dword:/d' "${WINEPREFIX}/user.reg" 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 else
sed -i '/"DefaultTTSRate"=dword:/d' "${WINEPREFIX}/user.reg" 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 fi
} }