Tag Archives: fortune

festival (and fortune): Not quite from days past

I know we just tromped through espeak, but it’s so much fun to hear your computer speak out loud.

If you read that post, you might already have the syntax for festival worked out.

fortune | festival --tts

festival needs a little more attention than espeak did. For one, the tts flag lets it read from stdin, which is what we want for fortune’s output.

If you see this:

Linux: can't open /dev/dsp

don’t cry. It just means there’s a little more configuration to be done. Send a thank-you note to Aditya Arie Nugraha, who had the foresight to paste the fix into a blog post way back in 2008. In .festivalrc,

(Parameter.set 'Audio_Command "aplay -q -c 1 -t raw -f s16 -r $SR $FILE")
(Parameter.set 'Audio_Method 'Audio_Command)

And with that, it should sing like a bird for you. ­čśë

festival might be more attractive to you than espeak, since it has better speech output. festival also has some supplemental accents that you can install, for variety.

And I think that’s everything. Except maybe to remember not to listen to all the advice you get from your computer. It’s just a machine.

espeak (and fortune): One from days past

I’m pulling fortune out of retirement from bsd-gamesagain — to flesh out another console tool with an audio component: espeak.

I’ll be quick with this because I’ve been through it before; I find it amusing though, so bear with me.

espeak does basic text-to-speech conversion. fortune generates random passages of text. Mix them together and we have a random burst of wisdom from your erstwhile taciturn computer.

fortune | espeak

Of course, the wisdom it produces might be a little watered down; I’ve seen a lot of what fortune offers and it’s not always top-shelf advice.

So take your chances. If your computer mutters incomprehensible syllables, take it as a sign from the Computer God. If not, take it as a random twist of fate. ­čśë

P.S.: Take a look at the help flags, if the default voice for espeak is unintelligible.