x64 Registry Fix for TTS Windows Speech Choices

Get help with using AutoHotkey and its commands and hotkeys
User avatar
WeedTrek
Posts: 20
Joined: 22 Mar 2019, 14:29
Location: Cache Creek BC Canada
Contact:

x64 Registry Fix for TTS Windows Speech Choices

31 Mar 2019, 20:09

Hey, it's Aaron Bewza again and I have a problem with some reg writes.

Problem:
I am doing some registry edits to get a Windows voice working on x64 Windows (TTS en-GB Hazel), and everything seems to line up ok. But when I try selecting Hazel from Control Panel/Speech Recognition/Text to Speech it says "This voice cannot be played. Please try selecting another voice..."
It works just fine as long as I use "Weed Trek Computor Voice" to say stuff. Which is weird.

Question:
How do I make the necessary reg writes for Windows "Text to Speech" function to work with the installed Hazel voice?

What I've tried:
-looking around for a similar issue
-Writing to both available "correct" places in the registry, just in case that worked... it didn't. Technically it works just writing to the Wow6432Node part of the registry, but it is unclear to me.
-leaving default names on all the keys, doesn't seem to make a difference at all.

But yah, works in my Computor Voice script :shock:

Requirements:
Windows x64 system
Aaron's Weed Trek Computor Voice https://www.autohotkey.com/boards/viewtopic.php?f=6&t=62996
SpeechPlatformRuntime x86.msi https://www.microsoft.com/en-ca/download/details.aspx?id=27225
MSSpeech_TTS_en-GB_Hazel.msi https://www.microsoft.com/en-us/download/details.aspx?id=27224

Code: Select all

;-- This script makes keys in the registry which allows system speech choices on a 64-bit Windows system
;-- (primarily for "Weed Trek Computor Voice", as it doesn't seem to work from the Windows system speech UI)
;-- To remove the leftover keys, delete these two completely:
;-- HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Speech\Voices\Tokens\TTS_MS_en-GB_Hazel_11.0
;-- and
;-- HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Speech\Voices\Tokens\TTS_MS_en-GB_Hazel_11.0

;-- runs as administrator, necessary for registry edits
full_command_line := DllCall("GetCommandLine", "str")
if not (A_IsAdmin or RegExMatch(full_command_line, " /restart(?!\S)"))
{
    try
    {
        if A_IsCompiled
            Run *RunAs "%A_ScriptFullPath%" /restart
        else
            Run *RunAs "%A_AhkPath%" /restart "%A_ScriptFullPath%"
    }
    ExitApp
}

MsgBox, 68, Caution`!, You are about to change your registry`.`nContinue`?
IfMsgBox No
    ExitApp

SetRegView, 64 ;-- presuming x64 system, I don't think this matters at all?


;-- The next part assumes "SpeechPlatformRuntime x86.msi" and "MSSpeech_TTS_en-GB_Hazel.msi"
;-- has been installed on 64-bit Windows, copies the following keys to correct places

;-- FROM regular area of registry
RegRead, Default, HKLM\SOFTWARE\Microsoft\Speech Server\v11.0\Voices\Tokens\TTS_MS_en-GB_Hazel_11.0 ;-- (Default) key, contains long name of voice
RegRead, 809, HKLM\SOFTWARE\Microsoft\Speech Server\v11.0\Voices\Tokens\TTS_MS_en-GB_Hazel_11.0, 809
RegRead, CLSID, HKLM\SOFTWARE\Microsoft\Speech Server\v11.0\Voices\Tokens\TTS_MS_en-GB_Hazel_11.0, CLSID
RegRead, LangDataPath, HKLM\SOFTWARE\Microsoft\Speech Server\v11.0\Voices\Tokens\TTS_MS_en-GB_Hazel_11.0, LangDataPath
RegRead, VoicePath, HKLM\SOFTWARE\Microsoft\Speech Server\v11.0\Voices\Tokens\TTS_MS_en-GB_Hazel_11.0, VoicePath
RegRead, AttributesDefault, HKLM\SOFTWARE\Microsoft\Speech Server\v11.0\Voices\Tokens\TTS_MS_en-GB_Hazel_11.0\Attributes ;-- (Default) key
RegRead, Age, HKLM\SOFTWARE\Microsoft\Speech Server\v11.0\Voices\Tokens\TTS_MS_en-GB_Hazel_11.0\Attributes, Age
RegRead, AudioFormats, HKLM\SOFTWARE\Microsoft\Speech Server\v11.0\Voices\Tokens\TTS_MS_en-GB_Hazel_11.0\Attributes, AudioFormats
RegRead, Gender, HKLM\SOFTWARE\Microsoft\Speech Server\v11.0\Voices\Tokens\TTS_MS_en-GB_Hazel_11.0\Attributes, Gender
RegRead, Language, HKLM\SOFTWARE\Microsoft\Speech Server\v11.0\Voices\Tokens\TTS_MS_en-GB_Hazel_11.0\Attributes, Language
RegRead, Name, HKLM\SOFTWARE\Microsoft\Speech Server\v11.0\Voices\Tokens\TTS_MS_en-GB_Hazel_11.0\Attributes, Name
RegRead, Vendor, HKLM\SOFTWARE\Microsoft\Speech Server\v11.0\Voices\Tokens\TTS_MS_en-GB_Hazel_11.0\Attributes, Vendor
RegRead, Version, HKLM\SOFTWARE\Microsoft\Speech Server\v11.0\Voices\Tokens\TTS_MS_en-GB_Hazel_11.0\Attributes, Version

;-- TO regular area of registry
RegWrite, REG_SZ, HKLM\SOFTWARE\Microsoft\Speech\Voices\Tokens\TTS_MS_en-GB_Hazel_11.0,, en-GB Hazel ;-- (Default) key, "en-GB Hazel" is shorter than default
RegWrite, REG_SZ, HKLM\SOFTWARE\Microsoft\Speech\Voices\Tokens\TTS_MS_en-GB_Hazel_11.0, 809, en-GB Hazel
RegWrite, REG_SZ, HKLM\SOFTWARE\Microsoft\Speech\Voices\Tokens\TTS_MS_en-GB_Hazel_11.0, CLSID, %CLSID%
RegWrite, REG_SZ, HKLM\SOFTWARE\Microsoft\Speech\Voices\Tokens\TTS_MS_en-GB_Hazel_11.0, LangDataPath, %LangDataPath%
RegWrite, REG_SZ, HKLM\SOFTWARE\Microsoft\Speech\Voices\Tokens\TTS_MS_en-GB_Hazel_11.0, VoicePath, %VoicePath%
RegWrite, REG_SZ, HKLM\SOFTWARE\Microsoft\Speech\Voices\Tokens\TTS_MS_en-GB_Hazel_11.0\Attributes,, %AttributesDefault% ;-- (Default) key
RegWrite, REG_SZ, HKLM\SOFTWARE\Microsoft\Speech\Voices\Tokens\TTS_MS_en-GB_Hazel_11.0\Attributes, Age, %Age%
RegWrite, REG_SZ, HKLM\SOFTWARE\Microsoft\Speech\Voices\Tokens\TTS_MS_en-GB_Hazel_11.0\Attributes, AudioFormats, %AudioFormats%
RegWrite, REG_SZ, HKLM\SOFTWARE\Microsoft\Speech\Voices\Tokens\TTS_MS_en-GB_Hazel_11.0\Attributes, Gender, %Gender%
RegWrite, REG_SZ, HKLM\SOFTWARE\Microsoft\Speech\Voices\Tokens\TTS_MS_en-GB_Hazel_11.0\Attributes, Language, %Language%
RegWrite, REG_SZ, HKLM\SOFTWARE\Microsoft\Speech\Voices\Tokens\TTS_MS_en-GB_Hazel_11.0\Attributes, Name, en-GB Hazel
RegWrite, REG_SZ, HKLM\SOFTWARE\Microsoft\Speech\Voices\Tokens\TTS_MS_en-GB_Hazel_11.0\Attributes, Vendor, %Vendor%
RegWrite, REG_SZ, HKLM\SOFTWARE\Microsoft\Speech\Voices\Tokens\TTS_MS_en-GB_Hazel_11.0\Attributes, Version, %Version%


;-- FROM Wow6432Node area of registry
RegRead, Default, HKLM\SOFTWARE\Wow6432Node\Microsoft\Speech Server\v11.0\Voices\Tokens\TTS_MS_en-GB_Hazel_11.0 ;-- (Default) key, contains long name of voice
RegRead, 809, HKLM\SOFTWARE\Wow6432Node\Microsoft\Speech Server\v11.0\Voices\Tokens\TTS_MS_en-GB_Hazel_11.0, 809
RegRead, CLSID, HKLM\SOFTWARE\Wow6432Node\Microsoft\Speech Server\v11.0\Voices\Tokens\TTS_MS_en-GB_Hazel_11.0, CLSID
RegRead, LangDataPath, HKLM\SOFTWARE\Wow6432Node\Microsoft\Speech Server\v11.0\Voices\Tokens\TTS_MS_en-GB_Hazel_11.0, LangDataPath
RegRead, VoicePath, HKLM\SOFTWARE\Wow6432Node\Microsoft\Speech Server\v11.0\Voices\Tokens\TTS_MS_en-GB_Hazel_11.0, VoicePath
RegRead, AttributesDefault, HKLM\SOFTWARE\Wow6432Node\Microsoft\Speech Server\v11.0\Voices\Tokens\TTS_MS_en-GB_Hazel_11.0\Attributes ;-- (Default) key
RegRead, Age, HKLM\SOFTWARE\Wow6432Node\Microsoft\Speech Server\v11.0\Voices\Tokens\TTS_MS_en-GB_Hazel_11.0\Attributes, Age
RegRead, AudioFormats, HKLM\SOFTWARE\Wow6432Node\Microsoft\Speech Server\v11.0\Voices\Tokens\TTS_MS_en-GB_Hazel_11.0\Attributes, AudioFormats
RegRead, Gender, HKLM\SOFTWARE\Wow6432Node\Microsoft\Speech Server\v11.0\Voices\Tokens\TTS_MS_en-GB_Hazel_11.0\Attributes, Gender
RegRead, Language, HKLM\SOFTWARE\Wow6432Node\Microsoft\Speech Server\v11.0\Voices\Tokens\TTS_MS_en-GB_Hazel_11.0\Attributes, Language
RegRead, Name, HKLM\SOFTWARE\Wow6432Node\Microsoft\Speech Server\v11.0\Voices\Tokens\TTS_MS_en-GB_Hazel_11.0\Attributes, Name
RegRead, Vendor, HKLM\SOFTWARE\Wow6432Node\Microsoft\Speech Server\v11.0\Voices\Tokens\TTS_MS_en-GB_Hazel_11.0\Attributes, Vendor
RegRead, Version, HKLM\SOFTWARE\Wow6432Node\Microsoft\Speech Server\v11.0\Voices\Tokens\TTS_MS_en-GB_Hazel_11.0\Attributes, Version

;-- TO Wow6432Node area of registry
RegWrite, REG_SZ, HKLM\SOFTWARE\Wow6432Node\Microsoft\Speech\Voices\Tokens\TTS_MS_en-GB_Hazel_11.0,, en-GB Hazel ;-- (Default) key, "en-GB Hazel" is shorter than default
RegWrite, REG_SZ, HKLM\SOFTWARE\Wow6432Node\Microsoft\Speech\Voices\Tokens\TTS_MS_en-GB_Hazel_11.0, 809, en-GB Hazel
RegWrite, REG_SZ, HKLM\SOFTWARE\Wow6432Node\Microsoft\Speech\Voices\Tokens\TTS_MS_en-GB_Hazel_11.0, CLSID, %CLSID%
RegWrite, REG_SZ, HKLM\SOFTWARE\Wow6432Node\Microsoft\Speech\Voices\Tokens\TTS_MS_en-GB_Hazel_11.0, LangDataPath, %LangDataPath%
RegWrite, REG_SZ, HKLM\SOFTWARE\Wow6432Node\Microsoft\Speech\Voices\Tokens\TTS_MS_en-GB_Hazel_11.0, VoicePath, %VoicePath%
RegWrite, REG_SZ, HKLM\SOFTWARE\Wow6432Node\Microsoft\Speech\Voices\Tokens\TTS_MS_en-GB_Hazel_11.0\Attributes,, %AttributesDefault% ;-- (Default) key
RegWrite, REG_SZ, HKLM\SOFTWARE\Wow6432Node\Microsoft\Speech\Voices\Tokens\TTS_MS_en-GB_Hazel_11.0\Attributes, Age, %Age%
RegWrite, REG_SZ, HKLM\SOFTWARE\Wow6432Node\Microsoft\Speech\Voices\Tokens\TTS_MS_en-GB_Hazel_11.0\Attributes, AudioFormats, %AudioFormats%
RegWrite, REG_SZ, HKLM\SOFTWARE\Wow6432Node\Microsoft\Speech\Voices\Tokens\TTS_MS_en-GB_Hazel_11.0\Attributes, Gender, %Gender%
RegWrite, REG_SZ, HKLM\SOFTWARE\Wow6432Node\Microsoft\Speech\Voices\Tokens\TTS_MS_en-GB_Hazel_11.0\Attributes, Language, %Language%
RegWrite, REG_SZ, HKLM\SOFTWARE\Wow6432Node\Microsoft\Speech\Voices\Tokens\TTS_MS_en-GB_Hazel_11.0\Attributes, Name, en-GB Hazel
RegWrite, REG_SZ, HKLM\SOFTWARE\Wow6432Node\Microsoft\Speech\Voices\Tokens\TTS_MS_en-GB_Hazel_11.0\Attributes, Vendor, %Vendor%
RegWrite, REG_SZ, HKLM\SOFTWARE\Wow6432Node\Microsoft\Speech\Voices\Tokens\TTS_MS_en-GB_Hazel_11.0\Attributes, Version, %Version%

MsgBox, Registry writes completed.`nComputer Voice "en-GB Hazel"`nis now functional.
ExitApp
Thanks very much for any insight you might have.
User avatar
WeedTrek
Posts: 20
Joined: 22 Mar 2019, 14:29
Location: Cache Creek BC Canada
Contact:

Re: x64 Registry Fix for TTS Windows Speech Choices

01 Apr 2019, 01:10

I made a messed up post earlier today, it was some kind of blank duplicate of this thread... sorry about that, I probably pressed Enter while I was starting to type. I deleted it and nothing was lost at all.
I should (while I'm still in this comment) clarify and condense the first main post a little:
There's a reg fix that can allow old TTS 32-bit Windows voices to work on Windows 64-bit systems, but it seems to leave the Windows Control Panel speech interface unable to use them, although it displays them. Looking for the correct place to mangle the registry so Windows can use the voice choices on the menu. The reason? Then it's more likely the reg fix will work for EVERYTHING windows and it will be super easy to use all those old voices again.
Great Britain Hazel is still my fave.
I must have been guzzling coffee earlier :D this post makes a lot more sense.
My Weed Trek video archive: http://weedtrek.ca

Return to “Ask For Help”

Who is online

Users browsing this forum: BNOLI, F4Jonatas, Google [Bot], mrvette134, Smile_, yogurtpixel and 173 guests