How I fixed the stuttering text-to-speech on a Raspberry Pi
Hosted by Mike Ray on 2014-11-27 is flagged as Explicit and is released under a CC-BY-SA license.
Listen in ogg,
mp3 format. | Comments (7)
Since April last year the text-to-speech using eSpeak in the Raspberry Pi
console has stuttered very badly and regularly crashes the kernel.
Here's how I fixed it.
Cloning my github repo:
git clone https://github.com/cromarty/ttsprojects.git
Bingo! Speech should work.
This has only just been released and there is still work to do on the
Note: I am not connected to the Raspberry Pi Foundation in any way
and anything I say or do is not endorsed by them.
My email address is connected with a Freelists email list I set up and
an accompanying web site:
The 'VI' is for 'Visually Impaired' and I DID check with the
Foundation about the similarity of the web address before I created it.
To join our email list send an email to:
With 'subscribe' in the subject.
Comment #1 posted on 2014-11-27T10:07:06Z by Steve Bickle
Great episode, this is the kind of thing I really like to hear on HPR. It's a shame that the BMC driver can't be fixed, especially since this bug has introduced an accessibility issue. I guess the driver in question is not open source though.
Comment #2 posted on 2014-11-27T23:37:25Z by Mike Ray
Hello Steve. There is one guy at the Raspberry Pi Foundation who is aware of the problem and is going to try to get around to trying to fixing the sound driver. But as it is not broken for most applications and only seems to badly affect this accessibility issue I guess it is low priority. Personally I think using the GPU directly for tts is a good idea anyway as I have had all kinds of problems with ALSA and pulseaudio in the past
I'm now working on an Emacspeak server and then a speech-dispatcher module which also use my code library.
I think speech-dispatcher might already be ok but I suspect it is because the sd espeak module has the audio chunk size set so high that the stuttering doesn't occur but it eats up RAM as a result. My audio library is much leaner
I'm going to try to come up with an alternative to speech-dispatcher which will interface to Orca and run in a much smaller footprint.
Comment #3 posted on 2014-11-28T16:26:35Z by Tony Wood
Brilliant, Mike! I'm most impressed.
Comment #4 posted on 2014-11-29T17:10:33Z by Mike Ray
Over to you Tony
Hello Tony. What's the subject of your first HPR podcast going to be? Self-drive cars? I should explain that Tony has been kind enough to give me some lifts to our local Linux User Group in a car that almost, but not quite, drives itself
Comment #5 posted on 2014-12-02T13:09:28Z by gigasphere
Great episode Mike! It is really good to hear these kind of episodes. Also thanks for posting the links and how-to for us to do it ourselves. I had noticed the clipping recently whilst trying out espeak.
I completely agree about your point on accessable terminals.
Comment #6 posted on 2015-11-29T01:48:33Z by Steven
Question about your mods
Good evening, I have tried your mods to stop the stuttering, and so far it looks very good.
Unfortunately now eSpeak reads all the boot information as the computer boots. Is there a simple way to stop espeak from saying all the boot information?
Comment #7 posted on 2015-12-01T17:06:59Z by Mike Ray
I'm not sure why the boot messages should suddenly only start being heard when the audio code I wrote is employed.
But to silence them I think you can put ' quiet' at the end of the single line in /boot/cmdline.txt, with no quote of course
<< First, < Previous, Next >, Latest >>
Note to Verbose Commenters
If you can't fit everything you want to say in the comment below then you really should record a response show instead.
Note to Spammers
All comments are moderated. All links are checked by humans. We strip out all html. Feel free to record a show about yourself, or your industry, or any other topic we may find interesting. We also check shows for spam :).