-
Notifications
You must be signed in to change notification settings - Fork 344
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
modified registry / invalid voices causes crash #315
Comments
Possible solutions:-
Open regedit.
Hope this helps |
Yep. I"ve seen something similar here when you mess around with voices in the registry. Its really easily done (I was thinking of doing better exception handling here but its tricky). The key giveaway is this As well as editing HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SPEECH_OneCore\Voices\Tokens - also check also |
Hello, I"ve encountered a similar issue.
I don"t know if the registry is broken on my machine or I have to install SAPI5 separately. |
Nope. A fix is coming...infact I"ve merged the pr for this today. Try using this repo instead of a fixed release number to see if it"s fixed. Once a few things settle I think we will push a new release. pip install git+https://github.com/nateshmbhat/pyttsx3.git At least I hope it is! Let me know. Nb. If you come across and are using espeak. That"s coming too #363 |
this is the program which i tried
import pyttsx3
engine = pyttsx3.init("sapi5")
engine.setProperty("volume", 1.0)
voices = engine.getProperty("voices")
print(voices[0].id)
engine.setProperty("voices",voices[0].id)
pyttsx3.speak("hello world")
getting an error in getproperty line as
File "C:\Users\Nivetha Linda\PycharmProjects\testproject\demo.py", line 8, in
voices = engine.getProperty("voices")
File "C:\Users\Nivetha Linda\AppData\Local\Programs\Python\Python310\lib\site-packages\pyttsx3\engine.py", line 146, in getProperty
return self.proxy.getProperty(name)
File "C:\Users\Nivetha Linda\AppData\Local\Programs\Python\Python310\lib\site-packages\pyttsx3\driver.py", line 173, in getProperty
return self._driver.getProperty(name)
File "C:\Users\Nivetha Linda\AppData\Local\Programs\Python\Python310\lib\site-packages\pyttsx3\drivers\sapi5.py", line 88, in getProperty
return [self._toVoice(attr) for attr in self._tts.GetVoices()]
File "C:\Users\Nivetha Linda\AppData\Local\Programs\Python\Python310\lib\site-packages\pyttsx3\drivers\sapi5.py", line 88, in
return [self._toVoice(attr) for attr in self._tts.GetVoices()]
File "C:\Users\Nivetha Linda\AppData\Local\Programs\Python\Python310\lib\site-packages\pyttsx3\drivers\sapi5.py", line 77, in _toVoice
return Voice(attr.Id, attr.GetDescription())
_ctypes.COMError: (-2147200966, None, (None, None, None, 0, None))
could some one help!! initially i changed the voice registry according to this website https://www.ghacks.net/2018/08/11/unlock-all-windows-10-tts-voices-system-wide-to-get-more-of-them/
but it dint work!!
then tried to uninstall and reinstall pyttsx3
then tried to system restore too! nothing worked and im desperate!!!
The text was updated successfully, but these errors were encountered: