Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

ModuleNotFoundError: No module named 'engine' while running pyttsx

When I run this code I always get this error: ModuleNotFoundError: No module named 'engine'.

import pyttsx

engine = pyttsx.init()
engine.say('hello world')

Does anyone know why this is happening and how to fix it?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Use pyttsx3 package instead that supports both python 2 and 3. You can install it for example with pip install pyttsx3 on your system.

import pyttsx3

engine = pyttsx3.init()
engine.say("hello world")
engine.runAndWait()
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading