I am trying to run a voice program in Python 3.5.2 and with pyttsx library. But I've faced up with lots of problems. First one is about engine. When I run the command import pyttsx
, compiler gave me the error like below:
ImportError: No module named 'engine'
Then I've found this answer. But it didn't work either. Eventually, I now have another - similar - error like below:
D:\Users\orcuny\Desktop\AVA>python ava.py
Traceback (most recent call last):
File "D:\Users\orcuny\AppData\Local\Continuum\Anaconda3\lib\site-packages\pyttsx\__init__.py", line 37, in init
eng = _activeEngines[driverName]
File "D:\Users\orcuny\AppData\Local\Continuum\Anaconda3\lib\weakref.py", line 131, in __getitem__
o = self.data[key]()
KeyError: None
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "ava.py", line 3, in <module>
engine = pyttsx.init()
File "D:\Users\orcuny\AppData\Local\Continuum\Anaconda3\lib\site-packages\pyttsx\__init__.py", line 39, in init
eng = Engine(driverName, debug)
File "D:\Users\orcuny\AppData\Local\Continuum\Anaconda3\lib\site-packages\pyttsx\engine.py", line 45, in __init__
self.proxy = driver.DriverProxy(weakref.proxy(self), driverName, debug)
File "D:\Users\orcuny\AppData\Local\Continuum\Anaconda3\lib\site-packages\pyttsx\driver.py", line 64, in __init__
self._module = __import__(name, globals(), locals(), [driverName])
ImportError: No module named 'drivers'
As far as I can get from the answers all over the SO, I assume that pyttsx library is written in Python 2.X.
My first question is, how can I solve this above problem? The second question is, I couldn't find pyttsx library which is written in Python 3.X. Can anybody enlighten me if there is any pyttsx library that is written in Python 3.X?
Thanks in advance.
EDIT: Adding site-packages to my PATH variables also didn't work.