There is a link which will give detailed text to speech command line tools.
The first speech package I tried was Festival. It worked fine and produces a voice like a rough sounding robot.
Festival Text to Speech
Install Festival with:
sudo apt-get install festival
Try out Festival with:
echo “Just what do you think you're doing, Dave?” | festival --tts
Espeak Text to Speech
Espeak is a more modern speech synthesis package than Festival. It sounds clearer but does wail a little. If you are making an alien or a RPi witch then it’s the one for you! Seriously it is a good allrounder with great customisation options.
Install Espeak with:
sudo apt-get install espeak
Test Espeak with: English female voice, emphasis on capitals (-k), speaking slowly (-s) using direct text:-
espeak -ven+f3 -k5 -s150 "I've just picked up a fault in the AE35 unit"