Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there an equivalent to the Mac's terminal command "say" in Ubuntu 9.10?

share|improve this question
3  
As an aside: a nice list of English sentences in which Mac OS X understands the context quite well, like "My name is Dr. Smith and I live on Smith Dr.", "The soldier decided to desert his dessert in the desert", "The guard will permit you to pass if you show a valid permit" and "It is much rainier on the slopes of Mt. Rainier" at macosxhints.com/comment.php?mode=view&cid=107211 –  Arjan Jan 10 '10 at 10:36

4 Answers 4

up vote 35 down vote accepted

espeak should be installed by default as text-to-speech engine on Linux.

You should be able to get it to speak from command-line by doing something like this:

echo "Text to speak"|espeak

You can also start espeak by just entering espeak itself, and then enter each line of text you want spoken followed by enter.

Other TTS engines for Linux you could look at:

Espeak is available at (but should be installed by default!):

share|improve this answer
2  
If you wanted this to directly replace the say command you could use a function: function say() { echo "@" | espeak ; } –  Jason Axelson Jul 29 '10 at 4:25
alias say='echo "$1" | espeak -s 120 2>/dev/null'

Use:

say 'How are doing?'

Explanation:

-s 120 #to make it slower than default
2>/dev/null #to eliminate error masseges on the console
share|improve this answer

There are a number of speech synthesizers available to install in karmic, most of the ones I've tried have a console version.

Search for "Speech" in synaptic to get the full list. The espeak package works like say.

share|improve this answer

install speech-dispatcher along with a synthesizer (flite, festival, etc) then

alias say='echo "$1" | spd-say -p -25 -e'

that will use whatever synthesizer you have configured.

The -p -25 is setting the pitch lower... change as desired. -e uses stdin

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.