python3 使用语音库pyttsx3

python3 使用语音库pyttsx3

环境linux+python3.6

sudo pip install pyttsx3
 sudo apt-get install espeak

代码实例

import pyttsx
engine = pyttsx.init()
engine.say('hello world')
engine.say('你好吗')
engine.runAndWait()
原文地址:https://www.cnblogs.com/liubiyonge/p/9413057.html