0
How do i do text to speech translations in python
I want allow a user to input something and then whatever he inputs i change it to speech. I can only seem to do that with already written text not users input
5 odpowiedzi
+ 1
This is a very basic example to convert a user input to speech.
import pyttsx3
text = input('Text to speech: ')
engine = pyttsx3.init()
engine.say(text)
engine.runAndWait()
+ 1
The problem was my code editor. I was using sublime text 3.I switched back to python IDE and it worked. Thanks
0
I tried this it doesn't work for me
0
Where do you get the error?
0
After inputing the text the compiler just runs for a while and stops. No sound is played