Too Long; Didn't Read
import pyttsx3
engine = pyttsx3.init()
engine.setProperty('rate',125)
text = '''And I have been seeing an audio file embedded with
each article on the website which is auto-generated.
It’s kinda cool. At least I think it is.'''
engine.save_to_file(text,'text.mp3') # this command queues the text to be saved as an audio file
engine.runAndWait()
Share Your Thoughts