python文字语音读取pyttsx3包使用

import pyttsx3
text = '你好,中文测试'
engine = pyttsx3.init()
engine.say(text)
# 设置当前的属性值engine.setProperty('voice', voice.id)
# 获取当前的属性值engine.getProperty('voice')
engine.runAndWait()
# 声音属性(音色处理)
# engine.setProperty('voice', voice.id)
# 语速属性(赫兹处理)
# engine.setProperty('rate', rate-150)
# 音量大小

 

你可能感兴趣的:(Python,ttsx3)