Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

This is what I want my code to be:

import pyttsx3

engine = pyttsx3.init('sapi5')

text = "Hello how are you doing on this fine day today?"
engine.say(text)
engine.runAndWait()

but when I type engine = pyttsx3.init('sapi5')

this is the error:

graysAppDataLocalPackagesPythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0LocalCachelocal-packagesPython37site-packagespyttsx3driverssapi5.py", line 3, in <module>
    import win32com.client
  File "C:UsersgraysAppDataLocalPackagesPythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0LocalCachelocal-packagesPython37site-packageswin32com\__init__.py", line 5, in <module>
    import win32api, sys, os
ImportError: DLL load failed: The specified module could not be found.

I'm not exactly sure what to do, I tried to import the win32api, sys, and os. sys and os work but when I get to win32api it says module not found when I already did pip install win32api.

I ended up not posting full error because it was being stupid.

question from:https://stackoverflow.com/questions/65546362/pyttsx3-engine-pyttsx3-initsapi5-error

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
638 views
Welcome To Ask or Share your Answers For Others

1 Answer

Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...