Final winespeak setup in place.

This commit is contained in:
Storm Dragon
2026-08-29 14:25:41 -04:00
parent 850cd37364
commit 4f11130369
3 changed files with 12 additions and 12 deletions
+5 -5
View File
@@ -72,15 +72,15 @@ winetricks() {
install_winespeak() { install_winespeak() {
local installerName="winespeak.exe" local installerName="winespeak.exe"
local installerPath="${cache}/${installerName}" local installerPath="${cache}/${installerName}"
local installerSha256="c8cda716739eaf883b5eb43dd97e8a1c827681e6c327375ad8a4fa8e996870b4" local installerSha256="8007004cd024b391e8f1962455ffe2a8b241cfdf52641a2bc1aa2274bc80f236"
local wrapperPath="${WINEPREFIX}/drive_c/Program Files (x86)/espeak-ng-sapi/EspeakSAPI.dll" local wrapperPath="${WINEPREFIX}/drive_c/Program Files (x86)/espeak-ng-sapi/EspeakSAPI.dll"
local wrapperSha256="855bbb8b3fb8e78d87170eb2ef931565df897441331281d36ef8f97660691b04" local wrapperSha256="2282da4a23f18b40e6601a4b9a880f484196bf2f5138881e76428be10d8dbe76"
local cscriptPath="${WINEPREFIX}/drive_c/windows/syswow64/cscript.exe" local cscriptPath="${WINEPREFIX}/drive_c/windows/syswow64/cscript.exe"
local verifyScriptPath="${WINEPREFIX}/drive_c/windows/temp/verify_winespeak.vbs" local verifyScriptPath="${WINEPREFIX}/drive_c/windows/temp/verify_winespeak.vbs"
local actualSha256 local actualSha256
local registryOutput local registryOutput
local voiceOutput local voiceOutput
local defaultToken='HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Speech\Voices\TokenEnums\eSpeak-NG\English (America)' local defaultToken='HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Speech\Voices\Tokens\Espeak-ng US English'
if [[ -z "${wineSpeakInstaller:-}" ]]; then if [[ -z "${wineSpeakInstaller:-}" ]]; then
echo "WineSpeak download URL is not configured." echo "WineSpeak download URL is not configured."
@@ -131,13 +131,13 @@ EOF
echo "$voiceOutput" echo "$voiceOutput"
return 1 return 1
fi fi
if ! grep -Fq "English (America)" <<< "$voiceOutput"; then if ! grep -Fq "Espeak-ng US English" <<< "$voiceOutput"; then
echo "WineSpeak's 32-bit SAPI verification returned an unexpected voice." echo "WineSpeak's 32-bit SAPI verification returned an unexpected voice."
echo "$voiceOutput" echo "$voiceOutput"
return 1 return 1
fi fi
echo "WineSpeak English (America) is the default SAPI voice." echo "WineSpeak US English is the default SAPI voice."
} }
install_rhvoice() { install_rhvoice() {
+1 -1
View File
@@ -333,7 +333,7 @@ ensure_wine_bottles() {
winetricks -q win10 winetricks -q win10
# Install and verify the default 32-bit SAPI voice. # Install and verify the default 32-bit SAPI voice.
echo "# Installing WineSpeak English (America)..." echo "# Installing WineSpeak US English..."
if ! install_winespeak; then if ! install_winespeak; then
echo "# WineSpeak installation or SAPI verification failed." echo "# WineSpeak installation or SAPI verification failed."
return 1 return 1
+6 -6
View File
@@ -6,15 +6,15 @@ export WINEDEBUG="${WINEDEBUG:--all}"
installerUrl="${WINESPEAK_INSTALLER_URL:-https://stormgames.wolfe.casa/downloads/winespeak.exe}" installerUrl="${WINESPEAK_INSTALLER_URL:-https://stormgames.wolfe.casa/downloads/winespeak.exe}"
installerName="winespeak.exe" installerName="winespeak.exe"
installerSha256="${WINESPEAK_INSTALLER_SHA256:-c8cda716739eaf883b5eb43dd97e8a1c827681e6c327375ad8a4fa8e996870b4}" installerSha256="${WINESPEAK_INSTALLER_SHA256:-8007004cd024b391e8f1962455ffe2a8b241cfdf52641a2bc1aa2274bc80f236}"
cacheDir="${XDG_CACHE_HOME:-${HOME}/.cache}/audiogame-manager" cacheDir="${XDG_CACHE_HOME:-${HOME}/.cache}/audiogame-manager"
installerPath="${cacheDir}/${installerName}" installerPath="${cacheDir}/${installerName}"
partialPath="${installerPath}.part" partialPath="${installerPath}.part"
wrapperPath="${WINEPREFIX}/drive_c/Program Files (x86)/espeak-ng-sapi/EspeakSAPI.dll" wrapperPath="${WINEPREFIX}/drive_c/Program Files (x86)/espeak-ng-sapi/EspeakSAPI.dll"
wrapperSha256="855bbb8b3fb8e78d87170eb2ef931565df897441331281d36ef8f97660691b04" wrapperSha256="2282da4a23f18b40e6601a4b9a880f484196bf2f5138881e76428be10d8dbe76"
cscriptPath="${WINEPREFIX}/drive_c/windows/syswow64/cscript.exe" cscriptPath="${WINEPREFIX}/drive_c/windows/syswow64/cscript.exe"
verifyScriptPath="${WINEPREFIX}/drive_c/windows/temp/verify_winespeak.vbs" verifyScriptPath="${WINEPREFIX}/drive_c/windows/temp/verify_winespeak.vbs"
voiceToken="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Speech\\Voices\\TokenEnums\\eSpeak-NG\\English (America)" voiceToken="HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Speech\\Voices\\Tokens\\Espeak-ng US English"
fail() { fail() {
printf 'Error: %s\n' "$*" >&2 printf 'Error: %s\n' "$*" >&2
@@ -76,7 +76,7 @@ install_winespeak() {
fail 'WineSpeak installed an unexpected 32-bit SAPI wrapper.' fail 'WineSpeak installed an unexpected 32-bit SAPI wrapper.'
fi fi
printf 'Setting English (America) as the default SAPI voice...\n' printf 'Setting WineSpeak US English as the default SAPI voice...\n'
if ! wine reg add 'HKCU\Software\Microsoft\Speech\Voices' \ if ! wine reg add 'HKCU\Software\Microsoft\Speech\Voices' \
/v DefaultTokenId /t REG_SZ /d "$voiceToken" /f > /dev/null; then /v DefaultTokenId /t REG_SZ /d "$voiceToken" /f > /dev/null; then
fail 'Could not set the default SAPI voice.' fail 'Could not set the default SAPI voice.'
@@ -98,11 +98,11 @@ install_winespeak() {
if ! voiceOutput="$(wine "$cscriptPath" //nologo 'c:\windows\temp\verify_winespeak.vbs' 2>&1)"; then 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}" fail "WineSpeak's 32-bit SAPI voice could not be created: ${voiceOutput}"
fi fi
if ! grep -Fq 'English (America)' <<< "$voiceOutput"; then if ! grep -Fq 'Espeak-ng US English' <<< "$voiceOutput"; then
fail "WineSpeak's 32-bit SAPI verification returned an unexpected voice: ${voiceOutput}" fail "WineSpeak's 32-bit SAPI verification returned an unexpected voice: ${voiceOutput}"
fi fi
printf 'WineSpeak is installed and English (America) is the default SAPI voice.\n' printf 'WineSpeak is installed and US English is the default SAPI voice.\n'
} }
if [[ ! -d "${WINEPREFIX}/drive_c" ]]; then if [[ ! -d "${WINEPREFIX}/drive_c" ]]; then