我测试了文本转语音模块,即 pyttsx3,它工作正常,但是在打印文本时我没有听到女声。关于将性别从男性更改为女性有什么建议吗?顺便说一下,我使用的是树莓派,并且使用的是 Linux 操作系统。
先感谢您
tts.py
engine = pyttsx.init()
voices = engine.getProperty('voices')
for voice in voices:
engine.setProperty('voice', voice.id)
engine.say('The quick brown fox jumped over the lazy dog.')
engine.runAndWait()
Run Code Online (Sandbox Code Playgroud)