import pyttsx3 engine = pyttsx3.init() engine.say('Sally sells seashells by the seashore.') engine.runAndWait() # 必须使用这行代码才能发出语音 engine.say('语音合成开始') engine.say('1,2,3必须使用这行代码才能发出语音') engine.runAndWait()