ablaze
ablaze

Reputation: 722

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 win32.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..

Upvotes: 3

Views: 3519

Answers (1)

Appleman1234
Appleman1234

Reputation: 16106

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

Upvotes: 0

Related Questions