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
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