You can create a wav file of a written text using this command
echo "It's such a beautiful day! Why are you in front of the computer?" | festival --tts
echo "It's such a beautiful day! Why are you in front of the computer?" | text2wave -scale 50 -o beautiful_day.wav