User avatar
StevenP
Posts: 56
Joined: Tue Aug 14, 2012 7:55 pm
Location: Germany / UK

Festival - text to speech - help

Fri Aug 17, 2012 1:12 pm

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
"The time has come," the Walrus said,
"To talk of many things..."

User avatar
SteveDee
Posts: 343
Joined: Thu Dec 29, 2011 2:18 pm
Location: Sunny Southern England
Contact: Website

Re: Festival - text to speech - help

Sun Aug 19, 2012 6:56 am

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.

User avatar
Jim JKla
Posts: 2218
Joined: Sun Jan 29, 2012 11:15 pm
Location: Newcastle upon Tyne UK

Re: Festival - text to speech - help

Sun Aug 19, 2012 7:08 am

Can you write this up and post it in the wiki? ;)

Even if it's just a link to the blog.
Noob is not derogatory the noob is just the lower end of the noob--geek spectrum being a noob is just your first step towards being an uber-geek ;)

If you find a solution please post it in the wiki the forum dies too quick

User avatar
StevenP
Posts: 56
Joined: Tue Aug 14, 2012 7:55 pm
Location: Germany / UK

Re: Festival - text to speech - help

Tue Aug 21, 2012 1:41 pm

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
"The time has come," the Walrus said,
"To talk of many things..."

perpe
Posts: 30
Joined: Fri May 25, 2012 6:44 pm

Re: Festival - text to speech - help

Tue Aug 21, 2012 3:58 pm

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.

User avatar
StevenP
Posts: 56
Joined: Tue Aug 14, 2012 7:55 pm
Location: Germany / UK

Re: Festival - text to speech - help

Sat Oct 13, 2012 8:30 pm

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.
"The time has come," the Walrus said,
"To talk of many things..."

User avatar
SteveDee
Posts: 343
Joined: Thu Dec 29, 2011 2:18 pm
Location: Sunny Southern England
Contact: Website

Re: Festival - text to speech - help

Sun Oct 14, 2012 9:21 am

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.

User avatar
ds18s20
Posts: 81
Joined: Fri Dec 23, 2011 5:44 am
Location: San Francisco

Re: Festival - text to speech - help

Sat Dec 22, 2012 7:32 pm

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?

User avatar
SteveDee
Posts: 343
Joined: Thu Dec 29, 2011 2:18 pm
Location: Sunny Southern England
Contact: Website

Re: Festival - text to speech - help

Sun Dec 23, 2012 8:16 am

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.

nemo096
Posts: 26
Joined: Wed Dec 26, 2012 10:54 am

Re: Festival - text to speech - help

Wed Dec 26, 2012 11:39 am

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?

Maine_guy
Posts: 14
Joined: Thu Sep 13, 2012 12:44 am

Re: Festival - text to speech - help

Tue Apr 09, 2013 4:50 pm

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

Return to “Graphics, sound and multimedia”