Closed huangshizhi closed 4 years ago
Explicitly stating the API worked for me (Win 10, 1703):
engine = pyttsx3.init("sapi5")
Though now it does talk, but crash on engine.runAndWait()
about 20s after finishing the audio output ...
I got the same error as huangshizhi , only the last line says, 'Member not found.' in english. I left for about 15 minutes, and when I came back, the command seemed to work and the errors were gone, but I cannot get it to speak. The commands work, but no voice. I have uninstalled, reinstalled pyttsx3 AND pypiwin32.
This happened on Win 8.1 AND Win 10. Using the CLI as well.
A fresh install of Python 3.6.4 on Windows 10 64-bit with pyttsx3 installed. Works without issues.
Though, I am getting a similar error when I try compiling a test with pyinstaller. https://github.com/nateshmbhat/pyttsx3/issues/6
I resolved the issue with pyinstaller at least to my satisfaction. I posted the fix and workaround on the pyinstaller project, so hopefully that issue won't be an issue in the future.
It fixed 2 issues: 1.) pyttsx3 needed a hook in pyinstaller, or to just collect the submodules manually in the spec file. 2.) win32com had a hook in pyinstaller for genpy which made pyttsx3 not function corectly.
I would guess that Anaconda handles something differently than just a plain old Python install.
In any event, with current versions of Python, Win 10 64-bit, and pyttsx3, everything just works from the command line.