Page 1 of 1

Festival - text to speech - help

Posted: Fri Aug 17, 2012 1:12 pm
by StevenP
I just got the festival text to speech package working with Raspbian (updated to latest packages 15-08-2012) - using the guide at: http://raspberrypipod.blogspot.co.uk/se ... /Tutorials
It sounds pretty good and says any text or text file I give it. I want to use it for a user interface, giving feedback to buttons pressed and status reports etc. on a Pi without display.

If anyone has more experience with Festival text to speech could you give some tips to these problems I have:
1) After saying a word or sentence, Festival needs a pause of approximately 5 seconds before accepting more text, otherwise I get an 'audio device not available' error. Is there a way to shorten this delay or to terminate the Festival/audio process?
2) Is it possible to use a different voice e.g. female
3) Can the speed of speech be changed - slower or faster?
Thanks, Steven

Re: Festival - text to speech - help

Posted: Sun Aug 19, 2012 6:56 am
by SteveDee
StevenP wrote:... could you give some tips to these problems I have:
2) Is it possible to use a different voice e.g. female
3) Can the speed of speech be changed - slower or faster?
Thanks, Steven
Sorry, I don't have any experience with "festival" but "espeak" will probably do what you need, and is easy to use.

Install:-
sudo apt-get install espeak

Terminal/command line example; English female voice, emphasis on capitals (-k), speaking slowly (-s) using direct text:-
espeak -ven+f3 -k5 -s60 "Hello, darling."

...and type "man espeak" for more info.

Re: Festival - text to speech - help

Posted: Sun Aug 19, 2012 7:08 am
by Jim JKla
Can you write this up and post it in the wiki? ;)

Even if it's just a link to the blog.

Re: Festival - text to speech - help

Posted: Tue Aug 21, 2012 1:41 pm
by StevenP
Jim JKla wrote:Can you write this up and post it in the wiki? ;)

Even if it's just a link to the blog.
Hi Jim,
yes - will do that. I will try all three methods I know of now (Festival, Epseak and also the google web API speech function) and write a brief summary of how to use them and any further links.
(It will be a month or so before I get round to it due to hols etc.)
Cheers, Steven

Re: Festival - text to speech - help

Posted: Tue Aug 21, 2012 3:58 pm
by perpe
StevenP wrote: I will try all three methods I know of now (Festival, Epseak and also the google web API speech function) and write a brief summary of how to use them and any further links.
Nice to read. What about Mary? It's an opensource tts engine, too.
Using Google's speech api should be easy, http://cranklin.wordpress.com/2012/01/1 ... ri-jarvis/ is a good introducing.

Re: Festival - text to speech - help

Posted: Sat Oct 13, 2012 8:30 pm
by StevenP
Hi All, I wrote up how to use Festival, Espeak and the Google Speech API in the RPi Wiki:
http://elinux.org/RPi_Text_to_Speech_(Speech_Synthesis)

I also describe the pros and cons of each approach, and what it sounds like.
Sorry I haven't tried Mary yet, but it looks interesting from what I read on their website.

Hope that is useful - all feedback welcome - let me know if you do any interesting projects with speech (StevenP) - cheers.

Re: Festival - text to speech - help

Posted: Sun Oct 14, 2012 9:21 am
by SteveDee
Great wiki entry, good job!

I've been using espeak to monitor a network ("app server 05, Down"), and also to let us know when new jobs are posted on our support site ("Unallocated jobs on help desk"). We call her "Monica the Monitor".

Written in Gambas (http://www.linuxbasic.net/applicationsc ... s-a-voice/) it runs on an old laptop....I must get around to moving it onto an RPi.

Re: Festival - text to speech - help

Posted: Sat Dec 22, 2012 7:32 pm
by ds18s20
Followed the wiki to the letter:

Code: Select all

pi@raspberrypi ~ $ espeak -ven+f3 -k5 -s150 "I've just picked up a fault in the AE35 unit"
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.front
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround40
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround41
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround50
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround51
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm_dmix.c:957:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
ALSA lib pcm_direct.c:877:(snd1_pcm_direct_initialize_slave) slave plugin does not support mmap interleaved or mmap noninterleaved access
ALSA lib pcm_dmix.c:1030:(snd_pcm_dmix_open) unable to initialize slave
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
Any help?

Re: Festival - text to speech - help

Posted: Sun Dec 23, 2012 8:16 am
by SteveDee
ds18s20 wrote:Followed the wiki to the letter......Any help?
The screen output you have is "normal". See if audio is working:-

Code: Select all

sudo aplay /usr/share/sounds/alsa/Front_Center.wav
If not try:-

Code: Select all

sudo amixer cset numid=3 0 80%
...then run aplay again.

Still no sound? you could try:-

Code: Select all

sudo modprobe snd_bcm2835
...but I don't think this is necessary with recent firmware.

Re: Festival - text to speech - help

Posted: Wed Dec 26, 2012 11:39 am
by nemo096
I tried what you SteveDee said but i Got the error
FATAL:Module snd_bcm2835 not found.

Any insight on why this is not there?

Re: Festival - text to speech - help

Posted: Tue Apr 09, 2013 4:50 pm
by Maine_guy
espeak didn't work for me until I added myself to the audio group.
My audio application involves a Bash script controlling a Zoom model 3095 USB modem. It announces who is calling on my land line.

http://mainstreetanswers.org/zoom_3095.php