Search code examples
python-3.xspeech-recognition

Tried to initialize sapi5, error


In[2]: import pyttsx
In[3]: import speech_recognition
In[4]: speech_engine = pyttsx.init("sapi5")
Traceback (most recent call last):
  File "C:\Users\Keshav\Anaconda3\lib\site-packages\pyttsx\__init__.py", line 37, in init
    eng = _activeEngines[driverName]
  File "C:\Users\Keshav\Anaconda3\lib\weakref.py", line 131, in __getitem__
    o = self.data[key]()
KeyError: 'sapi5'

I'm running Python 3.5(Anaconda) on Win10 64bit. Not sure if its a driver issue on my OS or something else. Kindly let me know the issue.


Solution

  • The issue is simple, pyttsx does work only with python 2+ :( #facepalm