mmirthula02 / AI-Personal-Voice-assistant-using-Python

429 stars 159 forks source link

KeyError: 'sapi5' when using pyttsx3 #22

Open Thayneee opened 3 years ago

Thayneee commented 3 years ago

I keep getting this error when running the code:

    19     try:
---> 20         eng = _activeEngines[driverName]
    21     except KeyError:

/opt/anaconda3/lib/python3.8/weakref.py in __getitem__(self, key)
   130             self._commit_removals()
--> 131         o = self.data[key]()
   132         if o is None:

KeyError: 'sapi5'

I've tried different versions of pyttsx3 and that didn't help.

yashrajput0508 commented 2 years ago

Use latest version of pyttsx3

RivardJR commented 2 years ago

Are you using Windows, or a different OS? Sapi5 only works with Windows. For Linux or Mac try using gTTS or espeak.