3

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 :-) )

  • +1 But to be persnickety, "the native language of the pi" is not python, that's just a language recommended by the foundation because it is easy to use. The native language of the device would be machine code, and the native language of the operating system (GNU/liux) is C (which the python interpreter is written in). I'm just making this point to indicate that you might as well use any language supported by the platform (C, C++, python, perl, java, etc.) -- there is no particular advantage to python related to the nature of the device. – goldilocks Feb 28 '15 at 20:28
  • good point - I have made an edit to my original wording. 'native' was the wrong term here. – monojohnny Feb 28 '15 at 20:32
2

There was some bugs in audio firmware in some fairly recent RPIs, make sure you update the firmware to the latest (rpi-update) I had the same problem with stuttering in espeak, and after updating firmware it was gone.

Check out these topics for more info:

https://www.raspberrypi.org/forums/viewtopic.php?&t=47942

https://www.raspberrypi.org/forums/viewtopic.php?f=78&t=57035

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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