One question of this type is previously asked but is not very helpful. I am using version Python3.6 in Windows 10 OS. I am getting an error, KeyError: 'sapi5' and During handling of the above exception, another exception occurred. My code is:
import pyttsx3
engine = pyttsx3.init('sapi5')
voices = engine.getProperty('voices')
print(voices)
And here is the stack trace:
File "c:/Users/farhe/OneDrive/Desktop/PYTHON/jarvis/ai.py.py", line 2, in <module>
engine = pyttsx3.init(sapi5)
NameError: name 'sapi5' is not defined
What should I do?
From the Github README:
If you recieve errors such as
No module named win32com.client
,No module named win32
, orNo module named win32api
, you will need to additionally installpypiwin32
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With