Asterisk + Festival TTS in Italian
aprile 26th. Archive , Telephony April 26th. 2007, 9:08 pm I must confess: I am a newbie to Asterisk , the popular open source PBX. This does not mean it is not a skilled user of GNU / Linux
. Lately, my interest in this software is increased, since I'm trying to achieve an integration with the PBX currently in use in the company.
Coming from an experience made with GNU / Bayonne - a scripting system with which to make IVR - I had already tried the integration of telephony and Festival. For the uninitiated, is a software conversion Festival TTS (Text To Speech, ie from text to speech synthesis).
An IVR is basically an answering machine, or an interactive telephone system: normally have an IVR menu through which to perform actions (eg, press 1 to do this, press 2 to do that, etc. Etc.). These menus are essentially static and still require the use of pre-recorded voices. It 'obvious that having a TTS system that can translate the texts (for example, retrieved from a database), IVR allows you to create much more flexible and personalized.
The difficulty arises because the Festival is, like most software, in English. Fortunately, a group of researchers of the CNR of Padova has been modified to make the Italian and English voices.
Let's see how to install Ubuntu on the combination Asterisk + Festival TTS in Italian. Prerequisites:
- Ubuntu 6 or 7
- 1.2.xo Asterisk 1.4.x
Of course the instructions are for the Ubuntu distro, but they are easily adaptable to your favorite distro.
The steps are the following:
- Install Festival:
apt-get install festival - Install the Italian voices for festival:
apt-get install festvox-italp16k festvox-itapc16k - (Ubuntu) Edit the file
/etc/init.d/festival: remove anexit 0that prevents to start the service startup Festival - Edit the file
/usr/share/festival/voices.scm; it comes to adding the Italian male or female voice as the voice of default:
(defvar default-voice-priority-list
'(pc_diphone <- maschile
lp_diphone <- femminile
- Edit the file
/usr/share/festival/festival.scmto add a macro to integrate with Asterisk:
(define (tts_textasterisk string mode)
"(tts_textasterisk STRING MODE)
Apply tts to STRING. This function is specifically designed for use in server mode so
a single function call may synthesize the string. This function name may be added to
the server safe functions."
(let ((wholeutt (utt.synth (eval (list 'Utterance 'Text string)))))
(utt.wave.resample wholeutt 8000)
(utt.wave.rescale wholeutt 1.0)
(utt.send.wave.client wholeutt)))
This code must be inserted before the last line: (provide 'festival) File festival.scm
- Start the Festival server:
/etc/init.d/festival start
At this point, we can use in our extension.conf the function Festival:
exten => 100,1,Answer()
exten => 100,2,Festival(Ciao Mondo)
exten => 100,3,Hangup()
Happy Festival to You!
Tags: Call Center Systems | VoIP PBX | Asterisk Consultant Naples | PBX Phone | VoIP | Asterisk CTI | PBX | IP Phones | Networking | Linux
Development of IVR systems, call center, VoIP PBX.


Excellent guide!
I wanted to know if you can set a G.729 or G.723 codec as used by the festival to play sounds. For now, the VoIP phone is able to hear only messages Festival has set the G.711u ....
thanks
Andrea
Hello,
I have no idea, I've done more testing since the end of the festival was unsatisfactory. I tried other voices, Cepstral type that still are not the best but do not cost as much as other commercial items.
In theory, it should work because the conversion between one format to another are handled internally by asterisk.
Consider, however, that the G.729 codec is not free and therefore requires the payment of a separate license. It seems to me that among other things in the standard configuration of Asterisk is not even expected.
Hello,
Brown