I was trying to create a text-to-speech code like EVERYBODY ELSE but for some reason when I type in this code.
#pip3 install pyttsx3 import pyttsx3 as RVB text_speech = pyttsx3.init() answer = input(hello) text_speech.say(answer) text_speech.runAndWait()
it says this in the terminal
[Running] python -u "/var/folders/7_/5j5858n91nzbx2yqlpq_w07m0000gn/T/tempCodeRunnerFile.python" File "/var/folders/7_/5j5858n91nzbx2yqlpq_w07m0000gn/T/tempCodeRunnerFile.python", line 2 import pyttsx3 as RVB ^ SyntaxError: invalid syntax [Done] exited with code=1 in 0.087 seconds
I have tried and tried with this code and it has yet to run, so can someone please help.
also, I have already installed pyttsx3—— using this command in the terminal
pip3 install pyttsx3
Source: Python Questions