Open ill13 opened 1 year ago
That's more of an OS thing. Your OS needs the language packs installed
So this: https://support.microsoft.com/en-us/windows/download-language-pack-for-speech-24d06ef3-ca09-ddcc-70a0-63606fd16394 and this: https://stackoverflow.com/questions/65977155/change-pyttsx3-language . Can address that issue on Windows 10.
After you've installed the Hungarian language pack -and in your current and specific case all you'd likely have to do is change the 0 at line 35 in voices[0]
to 1 or 2.
self.engine.setProperty('voice', voices[0].id) # Set playback to the default voice
This is assuming you only have the default win10 language packs + Hungarian installed.
I'll look into adding a dropdown to enumerate and list the available voices that are installed on the given OS.
It looks exciting! There is only one voice in Hungarian (Szabolcs), no female voice, so 0 is supposed to be good. Unfortunately I don't understand the Stackoverflow link, because I'm not a programmer, but maybe there is something wrong there?
Ok, the ability to select a voice from the hosts installed voices has been added.
Let me know if it works for you
This is very interesting. I only see English. While in the Windows I have Hungarian installed:
and here is my sound settings:
This might be a Microsoft quirk. I think you may have to add some languages.
The solution was different because Hungarian was added by default, but the registry entry was missing. I'm adding this to the Hungarian language here.
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Speech\Voices\Tokens\TTS_MS_HU-HU_SZABOLCS_11.0]
@="Microsoft Szabolcs - Hungarian (Hungary)"
"40E"="Microsoft Szabolcs - Hungarian (Hungary)"
"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,68,00,75,00,2d,00,48,00,55,00,5c,00,4d,00,53,00,54,00,54,00,53,00,\
4c,00,6f,00,63,00,48,00,75,00,48,00,55,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,68,00,75,00,2d,00,48,00,55,00,5c,00,4d,00,31,00,30,00,33,00,38,00,53,\
00,7a,00,61,00,62,00,6f,00,6c,00,63,00,73,00,00,00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Speech\Voices\Tokens\TTS_MS_HU-HU_SZABOLCS_11.0\Attributes]
"Version"="11.0"
"Language"="40E"
"Gender"="Male"
"Age"="Adult"
"SharedPronunciation"=""
"Name"="Microsoft Szabolcs"
"Vendor"="Microsoft"
[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\SPEECH\Voices\Tokens\TTS_MS_HU-HU_SZABOLCS_11.0]
@="Microsoft Szabolcs - Hungarian (Hungary)"
"40E"="Microsoft Szabolcs - Hungarian (Hungary)"
"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,68,00,75,00,2d,00,48,00,55,00,5c,00,4d,00,53,00,54,00,54,00,53,00,\
4c,00,6f,00,63,00,48,00,75,00,48,00,55,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,68,00,75,00,2d,00,48,00,55,00,5c,00,4d,00,31,00,30,00,33,00,38,00,53,\
00,7a,00,61,00,62,00,6f,00,6c,00,63,00,73,00,00,00
[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\SPEECH\Voices\Tokens\TTS_MS_HU-HU_SZABOLCS_11.0\Attributes]
"Version"="11.0"
"Language"="40E"
"Gender"="Male"
"Age"="Adult"
"SharedPronunciation"=""
"Name"="Microsoft Szabolcs"
"Vendor"="Microsoft"
True, the sound is still not perfect, but it is more intelligible, thank you! One more suggestion: if you have several languages to choose from, you might want to add a regenerate last comment voice button so that when I switch, it will regenerate the sound again. Useful in case I forgot to switch.
I'll look into adding the ability to change the mp3 bitrate.
It would be very good if it could improve the sound quality, because now it is still distorted here and there and does not "read" clearly.
moved to issue #4
Originally posted by @mykeehu in https://github.com/ill13/SpeakLocal/issues/2#issuecomment-1721465119