import pyttsx3
engine = pyttsx3.init()
rate = engine.getProperty('rate')
engine.setProperty('rate', 125)
voices = engine.getProperty('voices')
engine.setProperty('voice', voices[41].id)  #最好的发音:0、7、11、33、41
engine.say('world')
engine.say('wall')
engine.say('work')
engine.runAndWait()

标签: python, pyttsx3, 文本转语音, mac

添加新评论