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()
sudo pip install pyttsx3
sudo apt-get install espeak
import pyttsx
engine = pyttsx.init()
engine.say('hello world')
engine.say('你好吗')
engine.runAndWait()