xiaoxue85 发表于 2018-8-8 06:34:37

python 用pyttsx实现语音

  要用到pyttsx库 https://pypi.python.org/pypi/pyttsx
  示例:
  #coding:utf-8
  import pyttsx
  eng1 = pyttsx.init()
  eng1.say('Sally sells seashells by the seashore')
  eng1.say(u'不知道')
  eng1.runAndWait()
  eng1.say('Sally sells seashells by the seashore')
  eng1.say(u'不知道')
  eng1.runAndWait()
  多加空格不会有停顿效果
页: [1]
查看完整版本: python 用pyttsx实现语音