V
V
Volodya2021-12-21 19:52:59
Python
Volodya, 2021-12-21 19:52:59

Error in pycharm _ctypes.COMError: (-2147200967, None, (None, None, None, 0, None))?

Wrote a mini program that should translate text into speech

import pyttsx3

engine=pyttsx3.init()
a = 'hello word'
engine.say(a)
engine.runAndWait()


During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\HOME\PycharmProjects\ProjectBotKeha\mainint.py", line 3, in <module>
    engine=pyttsx3.init()
  File "C:\Users\HOME\PycharmProjects\ProjectBotKeha\venv\lib\site-packages\pyttsx3\__init__.py", line 22, in init
    eng = Engine(driverName, debug)
  File "C:\Users\HOME\PycharmProjects\ProjectBotKeha\venv\lib\site-packages\pyttsx3\engine.py", line 30, in __init__
    self.proxy = driver.DriverProxy(weakref.proxy(self), driverName, debug)
  File "C:\Users\HOME\PycharmProjects\ProjectBotKeha\venv\lib\site-packages\pyttsx3\driver.py", line 52, in __init__
    self._driver = self._module.buildDriver(weakref.proxy(self))
  File "C:\Users\HOME\PycharmProjects\ProjectBotKeha\venv\lib\site-packages\pyttsx3\drivers\sapi5.py", line 30, in buildDriver
    return SAPI5Driver(proxy)
  File "C:\Users\HOME\PycharmProjects\ProjectBotKeha\venv\lib\site-packages\pyttsx3\drivers\sapi5.py", line 47, in __init__
    self.setProperty('voice', self.getProperty('voice'))
  File "C:\Users\HOME\PycharmProjects\ProjectBotKeha\venv\lib\site-packages\pyttsx3\drivers\sapi5.py", line 100, in setProperty
    token = self._tokenFromId(value)
  File "C:\Users\HOME\PycharmProjects\ProjectBotKeha\venv\lib\site-packages\pyttsx3\drivers\sapi5.py", line 80, in _tokenFromId
    tokens = self._tts.GetVoices()
_ctypes.COMError: (-2147200967, None, (None, None, None, 0, None))

Process finished with exit code 1

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alan Gibizov, 2021-12-21
@phaggi

Pycharm has nothing to do with it.
Better see what versions of python pyttsx3 supports - max 3.7; what is yours? Try version 3.7 - should work.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question