import pyttsx3
engine = pyttsx3.init()
engine.setProperty('rate', 150)
engine.setProperty('volume', 0.9)
engine.setProperty('voice', 'zh-CN')  # 选择中文语音风格
text = '你好，世界！'
engine.say(text)
engine.runAndWait()