V
V
Vlad Kokhovets2020-04-28 23:12:19
Python
Vlad Kokhovets, 2020-04-28 23:12:19

Error starting audio assistant?

5ea88e14b4be9503880275.png
Traceback (most recent call last):
File "C:\Users\rediz\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pyttsx3\__init__.py", line 20, in init
eng = _activeEngines [driverName]
File "C:\Users\rediz\AppData\Local\Programs\Python\Python38-32\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 "D:\Python\xa.py", line 2, in
engine= pyttsx3.init()
File "C:\Users\rediz\ AppData\Local\Programs\Python\Python38-32\lib\site-packages\pyttsx3\__init__.py", line 22, in init
eng = Engine(driverName, debug)
File "C:\Users\rediz\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pyttsx3\engine.py", line 30, in __init__
self.proxy = driver.DriverProxy(weakref.proxy (self), driverName, debug)
File "C:\Users\rediz\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pyttsx3\driver.py", line 52, in __init__
self._driver = self._module.buildDriver(weakref.proxy(self))
File "C:\Users\rediz\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pyttsx3\drivers\sapi5.py", line 30, in buildDriver
return SAPI5Driver(proxy)
File "C:\Users\rediz\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pyttsx3\drivers\sapi5.py", line 35, in __init__
self._tts = comtypes.client.CreateObject('SAPI.SPVoice')
File "C:\Users\rediz\AppData\Local\Programs\Python\Python38-32\lib\site-packages\comtypes\client\__init__.py", line 250, in CreateObject
return _manage(obj, clsid, interface= interface)
File "C:\Users\rediz\AppData\Local\Programs\Python\Python38-32\lib\site-packages\comtypes\client\__init__.py", line 188, in _manage
obj = GetBestInterface(obj)
File "C:\Users\rediz\AppData\Local\Programs\Python\Python38-32\lib\site-packages\comtypes\client\__init__.py", line 112, in GetBestInterface
interface = getattr(mod, itf_name)
AttributeError: module 'comtypes.gen.SpeechLib' has no attribute 'ISpeechVoice'

Answer the question

In order to leave comments, you need to log in

2 answer(s)
#
# ., 2020-04-30
@andro1

engine= pyttsx3.init()
You don't put a space after the engine:
engine = pyttsx3.init()
And yes, I also wrote this bot from the lessons from Howdy

V
Vlad Kokhovets, 2020-05-12
@redizkas

Not the first time I tried

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question