📅  最后修改于: 2022-03-11 14:45:21.964000             🧑  作者: Mango
import pyttsx3.
# initialize Text-to-speech engine.
engine = pyttsx3.init()
# convert this text to speech.
text = "Python is a great programming language"
engine.say(text)
# play the speech.
engine.runAndWait()