I have the following code:
import pyttsx3
engine = pyttsx3.init()
engine.say("I will speak this text")
engine.runAndWait()
Note: I have already installed the pyttsx3 module using the command pip install pyttsx3
Errors:
1. Visual Studio
Traceback (most recent call last): File "c:/Users/Arashi__/.ipynb_checkpoints/jarvis.py", line 1, in <module> import pyttsx3 ModuleNotFoundError: No module named 'pyttsx3' ```
2.Jupyter notebook I executed the code line by line and got errors on the second line (around 100 lines of error of which, here, I show the last line for brevity sake):
KeyErrorTraceback (most recent call last) TypeError: item 2 in _argtypes_ passes a union by value, which is unsupported.** this large error ```
3.after using engine= pyttsx3.init('dummy') instead of the engine= pyttsx3.init() my error is resolved but no output is generated.
How can I fix the above issues?