Festival: SIOD ERROR: unbound variable : tts_textasterisk


I am running Asterisk on Cestos 5.3

I downloaded and installed the following Festival packages:

-rw-r----- 1 root root 731682 Jan 18 15:53 festival-1.96-beta.tar.gz
-rw-r----- 1 root root 242914 Jan 18 16:02 festlex_POSLEX.tar.gz
-rw-r----- 1 root root 1751206 Jan 18 16:02 festlex_CMU.tar.gz
-rw-r----- 1 root root 2318524 Jan 18 16:02 festvox_kedlpc8k.tar.gz
-rw-r----- 1 root root 4104056 Jan 18 16:02 festvox_kallpc16k.tar.gz
-rw-r----- 1 root root 1275015 Jan 18 16:02 speech_tools-1.2.96-beta.tar.gz
drwxr-xr-x 22 root root 4096 Jan 18 16:23 speech_tools
-rw-r----- 1 root root 11037 Jan 18 16:37 festvox_us2.tar.gz
-rw-r----- 1 root root 11040 Jan 18 16:37 festvox_us1.tar.gz
-rw-r----- 1 root root 11220 Jan 18 16:37 festvox_us3.tar.gz
-rw-r----- 1 root root 1472516 Jan 18 16:40 festlex_OALD.tar.gz
-rw-r----- 1 root root 4221528 Jan 18 16:40 festvox_kedlpc16k.tar.gz
-rw-r----- 1 root root 645583 Jan 18 16:47 festvox_don.tar.gz
-rw-r----- 1 root root 2505251 Jan 18 16:47 festvox-2.1-release.tar.gz
-rw-r----- 1 root root 5369001 Jan 18 16:48 festvox_rablpc16k.tar.gz

But when I try to test it I am getting the following error

[root@Xyz bin]# festival_server
SIOD ERROR: unbound variable : tts_textasterisk
SIOD ERROR: unbound variable : tts_textasterisk

I have the following in the extension.conf

exten => DIAL,1,Dial(${dial_string},${timeout})
exten => DIAL,n,Verbose(1,Dial failed with result ${DIALSTATUS})
exten => DIAL,n,Hangup()

exten => ANSWER,1,Verbose(1,Received an ANSWER)
exten => ANSWER,n,Festival(Hello asterisk user)
exten => ANSWER,n,Hangup()

I see the following error in the asterisk CONSOLE file

-- DAHDI/1-1 answered Local/DIAL@SBS3.0_text_2_speech_context-ea5b;2
   > Channel Local/DIAL@SBS3.0_text_2_speech_context-ea5b;1 was answered.
-- Executing [ANSWER@SBS3.0_text_2_speech_context:1] Verbose("Local/DIAL@SBS3.0_text_2_speech_context-ea5b;1", "1,Received an ANSWER") in new stack

Received an ANSWER
– Executing [ANSWER@SBS3.0_text_2_speech_context:2] Festival(“Local/DIAL@SBS3.0_text_2_speech_context-ea5b;1”, “Hello asterisk user How are you”) in new stack
== Parsing ‘/etc/asterisk/festival.conf’: == Found
== Spawn extension (SBS3.0_text_2_speech_context, ANSWER, 2) exited non-zero on ‘Local/DIAL@SBS3.0_text_2_speech_context-ea5b;1’
– Hungup ‘DAHDI/1-1’
== Spawn extension (SBS3.0_text_2_speech_context, DIAL, 1) exited non-zero on ‘Local/DIAL@SBS3.0_text_2_speech_context-ea5b;2’


[Jan 18 18:17:16] VERBOSE[21745] logger.c: – Executing [ANSWER@SBS3.0_text_2_speech_context:1] Verbose(“Local/DIAL@SBS3.0_text_2_speech_context-ea5b;1”, “1,Received an ANSWER”) in new stack
[Jan 18 18:17:16] DEBUG[31291] app_queue.c: Device ‘Local/DIAL@SBS3.0_text_2_speech_context’ changed to state ‘2’ (In use) but we don’t care because they’re not a member of any queue.
[Jan 18 18:17:16] VERBOSE[21745] logger.c: Received an ANSWER
[Jan 18 18:17:16] DEBUG[21745] pbx.c: Launching ‘Festival’
[Jan 18 18:17:16] VERBOSE[21745] logger.c: – Executing [ANSWER@SBS3.0_text_2_speech_context:2] Festival(“Local/DIAL@SBS3.0_text_2_speech_context-ea5b;1”, “Hello asterisk user How are you”) in new stack
[Jan 18 18:17:16] VERBOSE[21745] logger.c: == Parsing ‘/etc/asterisk/festival.conf’: [Jan 18 18:17:16] DEBUG[21745] config.c: Parsing /etc/asterisk/festival.conf
[Jan 18 18:17:16] VERBOSE[21745] logger.c: == Found
[Jan 18 18:17:16] DEBUG[21745] app_festival.c: Text passed to festival server : Hello asterisk user How are you
[Jan 18 18:17:16] DEBUG[21745] app_festival.c: Passing text to festival…
[Jan 18 18:17:16] DEBUG[21745] app_festival.c: Passing data to channel…
[Jan 18 18:17:16] DEBUG[21715] features.c: bridge answer set, chan answer set
[Jan 18 18:17:16] DEBUG[21715] chan_dahdi.c: Requested indication 20 on channel DAHDI/1-1
[Jan 18 18:17:16] WARNING[21745] app_festival.c: Festival returned ER
[Jan 18 18:17:16] DEBUG[21745] pbx.c: Spawn extension (SBS3.0_text_2_speech_context,ANSWER,2) exited non-zero on ‘Local/DIAL@SBS3.0_text_2_speech_context-ea5b;1’

I found some post indicating that a patch needs to be installed for 1.4.3 but I am using 1.9.6 so I guess the patch must have already included in this release.

Appreciate any help.

Thanks and Regards in Advance.
Irfan Lateef


I fixed this myself by reading the instructions for the 100th time at the following location:


And adding the following code segment in this file


[code];;; Command for Asterisk begin

(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 5)
(utt.send.wave.client wholeutt)))

;;; Command for Asterisk end[/code]

The main problem was I downloaded the latest version of Festival in /usr/local/src/Festival and built it.
And there is a festival.scm in the /usr/local/src/festival/lib and I was adding the above code in that file.
But Festival for some reason always picks up the scm file from /usr/share so you have to make the scm chnages there even if you downloaded a new Festival version.

Dont know why the Asterisk folks don’t keep this code in the by default festival.scm in the /usr/share location. It would have been just plug and play.
Can you someone explain the reason just for my FYI.