开发者

Linux > Python > TTS, STT & voice reconization

Text to Speech

I had been trying to run pyttsx in windows as well as Linux environment...

Linux Environment:

import pyttsx
engine = pyttsx.init()

the python just hangs up after executing the first line. I've verified the above statement by running both the lines in a interactive shell prompt.

windows Environment:

import pyttsx
engine = pyttsx.init()
engine.say('Sally sells seashells by the seashore.')
engine.say('The quick brown fox jumped over the lazy dog.')
engine.runAndWait()

Runs perfectly, and gives the desired output after installing pyttsx 1.0 win3开发者_如何学编程2.exe (from here) and pywin for my verisn of windows (from here)

so actually in Linux version where I am actually lacking ???

Speech to text and voice recolonization

So , can pyttsx do both of the tasks ? if not, please suggest some efficient library..


In Windows pyttsx uses the sapi5 driver.

In Linux pyttsx uses the espeak driver.

What version of espeak is installed on your Linux system ?

espeak and pulseaudio don't play nice together.

Try disabling pulseaudio if it is enabled on your system, if that doesn't prevent the hang, then try downgrading or upgrading your version of espeak, as that has solved other users issues (crash rather than hang).

pyttsx only does Text to Speech.

Alternate solutions include

  • Festival TTS
  • Julius STT
  • CMU Sphinx STT
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜