0

如何更改 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()  

口音的变化。

4

1 回答 1

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()
于 2019-01-29T07:07:39.573 回答