nateshmbhat / pyttsx3

Offline Text To Speech synthesis for python
Mozilla Public License 2.0
2.15k stars 336 forks source link

finish insatll,but cann't use #2

Closed huangshizhi closed 4 years ago

huangshizhi commented 7 years ago

2017-07-10_112709

E14 commented 7 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 ...

Ripcurl99983 commented 7 years ago

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.

josephalway commented 6 years ago

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

josephalway commented 6 years ago

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.