Well it is possible.
However you will have to do some changes in registry so proceed below at your own risk.
It would be a good practice to backup your registry files or even your system.
STEP 1 Open registry editor:
Press: Windows Key + R
and run regedit as administrator.
STEP 2 Check for all the available languages:
You should follow this path: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Speech_OneCore\Voices\Tokens
and there you will see all installed voices on your system (except the cortana voices).
STEP 3 Export the voices:
Select the one you want and right click on the folder.
For an example:
Right click MSTTS_V110_elGR_Stefanos
and click export.
You can save the file with any name you want but the extension should finish as .reg
STEP 4 Modify the file:
You will need to modify it so that it's values are into two other locations in the registry.
Open the file with any text editor of your choice and do the following:
- Copy everything except the first line (Windows Registry Editor Version 5.00).
- Paste everything at the end of the file.
- Modify the location of first data set:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Speech_OneCore\Voices\Tokens\ MSTTS_V110_elGR_Stefanos(Your voice name here)]
to [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Speech\Voices\Tokens\ MSTTS_V110_elGR_Stefanos(Your voice name here)]
(Just change the Speech_OneCore to Speech)
And that goes to attributes location aswell ...\Speech\Voices\Tokens\(your voice name)\Attributes
- Replace the location of the second data set (The one you just copy-pasted at the end) with:
[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\SPEECH\Voices\Tokens\(your voice name)]
and it's attributes with [HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\SPEECH\Voices\Tokens\(your voice name)\Attributes
For an example:
Original File:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Speech_OneCore\Voices\Tokens\MSTTS_V110_elGR_Stefanos]
@="Microsoft Stefanos - Greek (Greece)"
"408"="Microsoft Stefanos - Greek (Greece)"
"CLSID"="{179F3D56-1B0B-42B2-A962-59B7EF59FE1B}"
"LangDataPath"=hex(2):25,00,77,00,69,00,6e,00,64,00,69,00,72,00,25,00,5c,00,53,\
00,70,00,65,00,65,00,63,00,68,00,5f,00,4f,00,6e,00,65,00,43,00,6f,00,72,00,\
65,00,5c,00,45,00,6e,00,67,00,69,00,6e,00,65,00,73,00,5c,00,54,00,54,00,53,\
00,5c,00,65,00,6c,00,2d,00,47,00,52,00,5c,00,4d,00,53,00,54,00,54,00,53,00,\
4c,00,6f,00,63,00,45,00,6c,00,47,00,52,00,2e,00,64,00,61,00,74,00,00,00
"VoicePath"=hex(2):25,00,77,00,69,00,6e,00,64,00,69,00,72,00,25,00,5c,00,53,00,\
70,00,65,00,65,00,63,00,68,00,5f,00,4f,00,6e,00,65,00,43,00,6f,00,72,00,65,\
00,5c,00,45,00,6e,00,67,00,69,00,6e,00,65,00,73,00,5c,00,54,00,54,00,53,00,\
5c,00,65,00,6c,00,2d,00,47,00,52,00,5c,00,4d,00,31,00,30,00,33,00,32,00,53,\
00,74,00,65,00,66,00,61,00,6e,00,6f,00,73,00,00,00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Speech_OneCore\Voices\Tokens\MSTTS_V110_elGR_Stefanos\Attributes]
"Age"="Adult"
"DataVersion"="11.0.2016.1016"
"Gender"="Male"
"Language"="408"
"Name"="Microsoft Stefanos"
"SayAsSupport"="spell=NativeSupported; alphanumeric=NativeSupported"
"SharedPronunciation"=""
"Vendor"="Microsoft"
"Version"="11.0"
Modified registry file:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Speech\Voices\Tokens\MSTTS_V110_elGR_Stefanos]
@="Microsoft Stefanos - Greek (Greece)"
"408"="Microsoft Stefanos - Greek (Greece)"
"CLSID"="{179F3D56-1B0B-42B2-A962-59B7EF59FE1B}"
"LangDataPath"=hex(2):25,00,77,00,69,00,6e,00,64,00,69,00,72,00,25,00,5c,00,53,\
00,70,00,65,00,65,00,63,00,68,00,5f,00,4f,00,6e,00,65,00,43,00,6f,00,72,00,\
65,00,5c,00,45,00,6e,00,67,00,69,00,6e,00,65,00,73,00,5c,00,54,00,54,00,53,\
00,5c,00,65,00,6c,00,2d,00,47,00,52,00,5c,00,4d,00,53,00,54,00,54,00,53,00,\
4c,00,6f,00,63,00,45,00,6c,00,47,00,52,00,2e,00,64,00,61,00,74,00,00,00
"VoicePath"=hex(2):25,00,77,00,69,00,6e,00,64,00,69,00,72,00,25,00,5c,00,53,00,\
70,00,65,00,65,00,63,00,68,00,5f,00,4f,00,6e,00,65,00,43,00,6f,00,72,00,65,\
00,5c,00,45,00,6e,00,67,00,69,00,6e,00,65,00,73,00,5c,00,54,00,54,00,53,00,\
5c,00,65,00,6c,00,2d,00,47,00,52,00,5c,00,4d,00,31,00,30,00,33,00,32,00,53,\
00,74,00,65,00,66,00,61,00,6e,00,6f,00,73,00,00,00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Speech\Voices\Tokens\MSTTS_V110_elGR_Stefanos\Attributes]
"Age"="Adult"
"DataVersion"="11.0.2016.1016"
"Gender"="Male"
"Language"="408"
"Name"="Microsoft Stefanos"
"SayAsSupport"="spell=NativeSupported; alphanumeric=NativeSupported"
"SharedPronunciation"=""
"Vendor"="Microsoft"
"Version"="11.0"
[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\SPEECH\Voices\Tokens\MSTTS_V110_elGR_Stefanos]
@="Microsoft Stefanos - Greek (Greece)"
"408"="Microsoft Stefanos - Greek (Greece)"
"CLSID"="{179F3D56-1B0B-42B2-A962-59B7EF59FE1B}"
"LangDataPath"=hex(2):25,00,77,00,69,00,6e,00,64,00,69,00,72,00,25,00,5c,00,53,\
00,70,00,65,00,65,00,63,00,68,00,5f,00,4f,00,6e,00,65,00,43,00,6f,00,72,00,\
65,00,5c,00,45,00,6e,00,67,00,69,00,6e,00,65,00,73,00,5c,00,54,00,54,00,53,\
00,5c,00,65,00,6c,00,2d,00,47,00,52,00,5c,00,4d,00,53,00,54,00,54,00,53,00,\
4c,00,6f,00,63,00,45,00,6c,00,47,00,52,00,2e,00,64,00,61,00,74,00,00,00
"VoicePath"=hex(2):25,00,77,00,69,00,6e,00,64,00,69,00,72,00,25,00,5c,00,53,00,\
70,00,65,00,65,00,63,00,68,00,5f,00,4f,00,6e,00,65,00,43,00,6f,00,72,00,65,\
00,5c,00,45,00,6e,00,67,00,69,00,6e,00,65,00,73,00,5c,00,54,00,54,00,53,00,\
5c,00,65,00,6c,00,2d,00,47,00,52,00,5c,00,4d,00,31,00,30,00,33,00,32,00,53,\
00,74,00,65,00,66,00,61,00,6e,00,6f,00,73,00,00,00
[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\SPEECH\Voices\Tokens\MSTTS_V110_elGR_Stefanos\Attributes]
"Age"="Adult"
"DataVersion"="11.0.2016.1016"
"Gender"="Male"
"Language"="408"
"Name"="Microsoft Stefanos"
"SayAsSupport"="spell=NativeSupported; alphanumeric=NativeSupported"
"SharedPronunciation"=""
"Vendor"="Microsoft"
"Version"="11.0"
STEP 5 Import the file:
Save the file and double click on it.
There will be a warning window press yes and proceed.
STEP 6 Check:
run the following code:
engine = pyttsx3.init()
voices = engine.getProperty("voices")
for voice in voices:
print(voice.id)
Output:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Speech\Voices\Tokens\TTS_MS_EN-US_DAVID_11.0 HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Speech\Voices\Tokens\MSTTS_V110_elGR_Stefanos HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Speech\Voices\Tokens\TTS_MS_EN-US_ZIRA_11.0