如何更改pyttsx3中的重音符号?
我已经成功地尝试更改语音及其讲话的速度。
import pyttsx3
engine=pyttsx3.init()
voice=engine.getProperty('voices')[0]
engine.setProperty('voice',voice.id)
engine.setProperty('rate',100)
engine.say("Hello there!")
engine.runAndWait()
改变口音。
答案 0 :(得分:0)
您可以尝试以下代码:
import pyttsx3
engine = pyttsx3.init()
voices = engine.getProperty('voices')
for voice in voices:
print(voice, voice.id)
engine.setProperty('voice', voice.id)
engine.say("Hello World!")
engine.runAndWait()
engine.stop()