Posts: 1
Joined: Thu Apr 16, 2015 4:46 pm

Audio cut off with festival and espeak

Thu Apr 16, 2015 5:08 pm


I am experiencing some rather strange problems with tts, tried festival directly and espeak, I end up getting the audio only for latter half.

Code: Select all

echo “Hello World” | festival --tts

Code: Select all

espeak -ven+f3 -k5 -s150 "Hello World"
give only the audio 'world', it sounds like its un-naturally clipped

I have followed the instruction to set this up from http://elinux.org/RPi_Text_to_Speech_%2 ... nthesis%29

I have seen a couple of post suggesting I fill in garbage leading what I want to output, this feels a little wrong, considering I recall getting this to work on the raspbian on a raspberry pi 1.

current setup is:
Raspbian 3.18, raspberry pi 2, HDMI audio (forced as I couldn't get the jack audio to work)

Any help or pointers appreciated.

Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5706
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: Audio cut off with festival and espeak

Thu Apr 16, 2015 5:38 pm

It's probably just the amount of time your tv takes to "warm up" before it can produce audio. I suspect with analogue (or a different tv) this wouldn't be an issue.

To work around this, you need the audio channel to remain open, not open/close every time you launch festival/espeak.
Try adding to config.txt

Code: Select all

and reboot. That may fix it. Alternatively play silence in the background (e.g. "aplay silence.wav &" and find a silent wav file) to keep the channel open.

Return to “Troubleshooting”