I have installed 'espeak' , 'Festival' and 'Flite' (the cut-down version of 'Festival' for ARM) ; and the former two seem to suffer from a very similar problem: they both start reading text files just fine - then the quality degrades.....
espeak starts to warble like a Dalek. Festival starts to Slllooowww down and get deeper - like HAL does at the end of 2001.
I'm using the headphone jack on a B-Plus.
I'm calling each program like this:
espeak -f poem.txt festival --tts poem.txt
Here's the inpt file I am testing with (I have edited out a 4-letter word from this well-known late 20th poem):
Fitter, happier, more productive, Comfortable, Not drinking too much, Regular exercise at the gym (Three days a week), Getting on better with your associate employee contemporaries, At ease, Eating well (No more microwave dinners and saturated fats), A patient better driver, A safer car (Baby smiling in back seat), Sleeping well (No bad dreams), No paranoia, Careful to all animals (Never washing spiders down the plughole), Keep in contact with old friends (Enjoy a drink now and then), Will frequently check credit at (moral) bank (hole in the wall), Favors for favors, Fond but not in love, Charity standing orders, On Sundays ring road supermarket (No killing moths or putting boiling water on the ants), Car wash (Also on Sundays), No longer afraid of the dark or midday shadows Nothing so ridiculously teenage and desperate, Nothing so childish, at a better pace, Slower and more calculated, No chance of escape, Now self-employed, Concerned (but powerless), An empowered and informed member of society (Pragmatism not idealism), Will not cry in public, Less chance of illness, Tires that grip in the wet (Shot of baby strapped in back seat), A good memory, Still cries at a good film, Still kisses with saliva, No longer empty and frantic like a cat tied to a stick, That's driven into frozen winter expletive-removed (The ability to laugh at weakness), Calm, Fitter, Healthier and more productive A pig in a cage on antibiotics.
Additionally: Festival takes a good 10 seconds before it starts speaking.....
espeak chucks out a load of 'ALSA' messages. (this has been noted by several other people on the Pi forums).
'flite' seems just fine here. (very slight pause at the start).
Anybody else getting this ?
And finally - since the Raspberry Pi Foundation recommends Python as a language for learners. : are there any 'official' or recommended Python libraries for speech-synthesis on the Pi (other than using 'os' to call-out to the underlying programs?)
For instance: the Pi Camera and GPIO both have nice Python APIs for them - it seems to me that Speech Synthesis is up there in the top-ten of fun-things-to-do-with-computers for beginners (at least it was for me back in the 8-bit days :-) )