Updated the winespeak fix to use a shorter delay. Currently speech is still not cut off.
This commit is contained in:
+2
-2
@@ -72,9 +72,9 @@ winetricks() {
|
||||
install_winespeak() {
|
||||
local installerName="winespeak.exe"
|
||||
local installerPath="${cache}/${installerName}"
|
||||
local installerSha256="187d4db69f3af7c1bca1c100a04489b76732048be7c38449781da360ed7b2d66"
|
||||
local installerSha256="c8cda716739eaf883b5eb43dd97e8a1c827681e6c327375ad8a4fa8e996870b4"
|
||||
local wrapperPath="${WINEPREFIX}/drive_c/Program Files (x86)/espeak-ng-sapi/EspeakSAPI.dll"
|
||||
local wrapperSha256="8009750dad82ca6665871814033dcee6844bb424f033130c109f47e188c5364b"
|
||||
local wrapperSha256="855bbb8b3fb8e78d87170eb2ef931565df897441331281d36ef8f97660691b04"
|
||||
local cscriptPath="${WINEPREFIX}/drive_c/windows/syswow64/cscript.exe"
|
||||
local verifyScriptPath="${WINEPREFIX}/drive_c/windows/temp/verify_winespeak.vbs"
|
||||
local actualSha256
|
||||
|
||||
@@ -4,14 +4,16 @@ set -euo pipefail
|
||||
export WINEPREFIX="${WINEPREFIX:-${HOME}/.local/wine64}"
|
||||
export WINEDEBUG="${WINEDEBUG:--all}"
|
||||
|
||||
installerUrl="https://stormgames.wolfe.casa/downloads/winespeak.exe"
|
||||
installerUrl="${WINESPEAK_INSTALLER_URL:-https://stormgames.wolfe.casa/downloads/winespeak.exe}"
|
||||
installerName="winespeak.exe"
|
||||
installerSha256="187d4db69f3af7c1bca1c100a04489b76732048be7c38449781da360ed7b2d66"
|
||||
installerSha256="${WINESPEAK_INSTALLER_SHA256:-c8cda716739eaf883b5eb43dd97e8a1c827681e6c327375ad8a4fa8e996870b4}"
|
||||
cacheDir="${XDG_CACHE_HOME:-${HOME}/.cache}/audiogame-manager"
|
||||
installerPath="${cacheDir}/${installerName}"
|
||||
partialPath="${installerPath}.part"
|
||||
wrapperPath="${WINEPREFIX}/drive_c/Program Files (x86)/espeak-ng-sapi/EspeakSAPI.dll"
|
||||
wrapperSha256="8009750dad82ca6665871814033dcee6844bb424f033130c109f47e188c5364b"
|
||||
wrapperSha256="855bbb8b3fb8e78d87170eb2ef931565df897441331281d36ef8f97660691b04"
|
||||
cscriptPath="${WINEPREFIX}/drive_c/windows/syswow64/cscript.exe"
|
||||
verifyScriptPath="${WINEPREFIX}/drive_c/windows/temp/verify_winespeak.vbs"
|
||||
voiceToken="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Speech\\Voices\\TokenEnums\\eSpeak-NG\\English (America)"
|
||||
|
||||
fail() {
|
||||
@@ -57,9 +59,11 @@ download_installer() {
|
||||
|
||||
install_winespeak() {
|
||||
local registryOutput
|
||||
local voiceOutput
|
||||
|
||||
download_installer
|
||||
|
||||
wineserver -k || true
|
||||
printf 'Installing WineSpeak into %s...\n' "$WINEPREFIX"
|
||||
if ! wine "$installerPath" /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-; then
|
||||
fail 'WineSpeak installation failed.'
|
||||
@@ -83,10 +87,29 @@ install_winespeak() {
|
||||
fail 'Could not verify the default SAPI voice.'
|
||||
fi
|
||||
|
||||
if [[ ! -f "$cscriptPath" ]]; then
|
||||
fail "Wine's 32-bit cscript.exe was not found. Install speechsdk in this prefix first."
|
||||
fi
|
||||
mkdir -p "${verifyScriptPath%/*}"
|
||||
printf '%s\n' \
|
||||
'dim speechobject' \
|
||||
'set speechobject=createobject("sapi.spvoice")' \
|
||||
'wscript.echo speechobject.voice.getdescription' > "$verifyScriptPath"
|
||||
if ! voiceOutput="$(wine "$cscriptPath" //nologo 'c:\windows\temp\verify_winespeak.vbs' 2>&1)"; then
|
||||
fail "WineSpeak's 32-bit SAPI voice could not be created: ${voiceOutput}"
|
||||
fi
|
||||
if ! grep -Fq 'English (America)' <<< "$voiceOutput"; then
|
||||
fail "WineSpeak's 32-bit SAPI verification returned an unexpected voice: ${voiceOutput}"
|
||||
fi
|
||||
|
||||
printf 'WineSpeak is installed and English (America) is the default SAPI voice.\n'
|
||||
}
|
||||
|
||||
for commandName in curl wine sha256sum awk grep; do
|
||||
if [[ ! -d "${WINEPREFIX}/drive_c" ]]; then
|
||||
fail "Wine prefix does not exist: ${WINEPREFIX}"
|
||||
fi
|
||||
|
||||
for commandName in curl wine wineserver sha256sum awk grep; do
|
||||
require_command "$commandName"
|
||||
done
|
||||
|
||||
|
||||
Reference in New Issue
Block a user