I am an absolute beginner in python. I was trying to make jarvis from youtube videos. But they told to install pyttsx3 through pip and I also installed it but it is not working on visual studio code it is showing import error and syntax error. Can you guys help me out from this.
Asked
Active
Viewed 257 times
-3
-
Welcome to Stack Overflow! Please take the [tour], read [what's on-topic here](/help/on-topic), [ask], and the [question checklist](//meta.stackoverflow.com/q/260648/843953), and provide a [mre] that people can use to reproduce your problem. – Pranav Hosangadi Jun 28 '21 at 17:50
1 Answers
-2
Welcome to stack overflow!
At the command-line:
pip install pyttsx3
In your code:
import pyttsx3
engine = pyttsx3.init()
engine.say("I will speak this text")
engine.runAndWait()
More info: https://pypi.org/project/pyttsx3/
If you get a specific error message, please update the question with the full source code and the stack-trace.

Ezra
- 471
- 3
- 14
-
OP says they installed pyttsx3 using pip, so they presumably already did what you suggest. For questions like this that need details to be answerable, ask for details in the comments instead of posting an incomplete answer – Pranav Hosangadi Jun 28 '21 at 17:51
-
Because they mentioned import and syntax errors, I guessed that they had written their code wrong and failed to install properly. I think this answer has a decent shot at solving the problem outright, which is why I put it as an answer and not a comment. But I take your point-- let's see what OP says. – Ezra Jun 28 '21 at 17:55