Iscriviti   Guestbook   Immagini   Forum   Download   Mappa   864 utenti on line 
Italiano
MENU
CONFIGURAZIONI
RISORSE
INFO
Login

DOWNLOAD
Device
Suggerimenti

 

How to install Festival for Asterisk usage

Festival is a text-to-speech application that is callable from within Asterisk. Voice is rather rough, but usable. The Festival source code requires a simple patch that is available in the standard /usr/src/asterisk distribution/cvs See Asterisk CVS?. Without the patch, festival will not function with asterisk at all.

Downloading Festival

URL: Festival can be downloaded from http://www.cstr.ed.ac.uk/projects/festival (cache)

What to download: check the readme files at the site for specific files associated with different countries. Be careful to watch the licensing, not every language file is allowed for commercial use.
For US/English, start with:
  • festival-1.4.3-release.tar.gz
  • festlex_CMU.tar.gz
  • festlex_POSLEX.tar.gz
  • festvox_kallpc16k.tar.gz
  • speech_tools-1.2.3-release.tar.gz

Redhat 9 Users Note: The Redhat-provided RPM's for Festival will not work out of the box with Asterisk. If these are installed, you should remove them with:
  • rpm -e festival-1.4.2-16
  • rpm -e festival-devel-1.4.2-16
You can then proceed with the download, patch, and installation of Festival as described here.

Installation steps:

 cd /usr/src ; assumes the downloaded files are located here
 tar xvzf speech_tools-1.2.3-release.tar.gz
 cd speech_tools
 ./configure
 make

 cd ..

 tar xvzf festival-1.4.3-release.tar.gz
 tar xvzf festlex_CMU.tar.gz
 tar xvzf festlex_POSLEX.tar.gz
 tar xvzf festvox_kallpc16k.tar.gz
 cd festival
 patch -p1 
 ./configure
 make

Note: The festival startup script can be run from the command line but it requires your path statement to include the location of the festival/bin directory, regardless from where you start it. To run festival from a system startup script, please review carefully the /usr/src/festival/bin/festival_server script and modify as needed.

 export PATH=$PATH:/usr/src/festival/bin

  • To start festival: /usr/src/festival/bin/festival_server

Note: regardless of where you are in your system when you issue the above command, that startup script will detect your exact location and write a festival_server.log file (and pid files) in that location.
The log file is useful for error messages, therefore pay attention to exactly which directory you happen to be in when you issue the above command. (Or, modify the startup script accordingly.)

Edit the /etc/asterisk/festival.conf file and ensure the following statements are uncommented (these are used by asterisk):

 [general]
 host=localhost
 port=1314
 usecache=yes 
 cachedir=/var/lib/asterisk/festivalcache/
 festivalcommand=(tts_textasterisk "%s" 'file)(quit)\n

Edit the extensions.conf file and include the following within your dial plan (for testing purposes):
 ; testing festival (text-to-speech app)
 exten => 555,1,Answer
 exten => 555,2,Festival(mary had a little lamb)  ; do NOT use quotes around the string!!
 exten => 555,3,Hangup  

  • Restart asterisk

Note: asterisk has to be started "after" festival.

Troubleshooting:

  • When a call is made to extension 555 (assuming you followed the above completely) and no voice is heard, check the contents of the festival_server.log file (wherever it is located on your system).
If you see a message such as:
 client(1) : rejected from myserver.mydomain.com not in access list
then edit the festival/bin/festival_server startup script to include that FQDM in the line with "localhost.*".

  • If the festival_server.log contains an entry like:
client(1) : accepted from myserver.mydomain.com 
after a place a call to extension 555, then asterisk is making the call to festival.

  • From the asterisk CLI interface, a properly executed and functional call to festival will look like this:


 -- Executing Answer("SIP/3000-46a1", "") in new stack
 -- Executing Festival("SIP/3000-46a1", "mary had a litte lamb") in new stack
 == Parsing '/etc/asterisk/festival.conf': Found
 WARNING1209269552: File app_festival.c, Line 304 (festival_exec): Text passed to  festival server : mary had a little lamb
 WARNING1209269552: File app_festival.c, Line 381 (festival_exec): Passing text to  festival...
 WARNING1209269552: File app_festival.c, Line 400 (festival_exec): Passing data to channel...
 WARNING1209269552: File app_festival.c, Line 410 (festival_exec): Festival WV command
 WARNING1209269552: File rtp.c, Line 374 (ast_rtp_read): RTP Read error: Resource temporarily unavailable
 WARNING1209269552: File app_festival.c, Line 202 (send_waveform_to_channel): Last frame
   -- Executing Hangup("SIP/3000-46a1", "") in new stack


For German voices in Festival see http://www.ims.uni-stuttgart.de/phonetik/synthesis/festival_opensource.html (cache)

 



 

Valid CSS!