Hi, Iam working on the AsteriskNow version 1.4.2. I basically integrate AsteriskNow with RAGI (RUBY). For the text to speech (TTS) to work on Asterisk, i need to install Cepstral.
I have installed Cepstral and the app_swift-0.9.1.tar.gz swift package. The swift.agi file has been added to the directory /var/lib/asterisk/agi-bin.
When i try to make a call, i get an error message:
Syntax Error: unexpected end of file.
I would like to know if AsteriskNow 1.4.2 supports the cepstral engine. If it supports what might be the cause of the error.
I dont know if app_swift works on Asterisk 1.4 or not but AsteriskNOW and Asterisk 1.4 are the same thing. AsteriskNOW is just a linux distribution with Asterisk 1.4 already installed (with the GUI).
Thats great job marco, any idea about the sysntax error message which i get. I always get the eror message as Unexpected end of file from the swift.agi file.
#!/bin/sh
text = echo $*
stdin = "0"
while “$stdin” != ""
do
read stdin
if “$stdin” != ""
then
stdin2=echo $stdin | sed -e 's/: /=/' -e 's/"//g' -e 's/$/"/' -e 's/=/="/ '
eval echo $stdin2
fi
done
I don’t use AsteriskNOW so I can’t help more, I used the Cepstral tts on a standard * installation, I built the * sources myself on an opensuse 10.2 then downloaded and installed the cepstral voices and the dial plan application app_swift.
I have installed the asterisk version 1.4.9 on my linux machine, all the installation steps till cepstral is fine and good enough.
After untaring the app_cepstral.tgz, i got the app_cepstral.c file which i copied to the asterisk apps directory. when i try to use the command “make install” from the main asterisk directory i get the following error:
app_cepstral.c:36:19: error: swift.h: No such file or directory
app_cepstral.c:43: warning: data definition has no type or storage class
app_cepstral.c:43: warning: type defaults to ‘int’ in declaration of ‘STANDARD_LOCAL_USER’
app_cepstral.c:44: warning: data definition has no type or storage class
app_cepstral.c:44: warning: type defaults to ‘int’ in declaration of ‘LOCAL_USER_DECL’
app_cepstral.c:57: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘write_audio’
app_cepstral.c: In function ‘cepstral_speak’:
app_cepstral.c:130: error: ‘swift_engine’ undeclared (first use in this function)
app_cepstral.c:130: error: (Each undeclared identifier is reported only once
app_cepstral.c:130: error: for each function it appears in.)
app_cepstral.c:130: error: ‘engine’ undeclared (first use in this function)
app_cepstral.c:131: error: ‘swift_port’ undeclared (first use in this function)
app_cepstral.c:131: error: ‘port’ undeclared (first use in this function)
app_cepstral.c:132: error: ‘swift_voice’ undeclared (first use in this function)
app_cepstral.c:132: error: ‘voice’ undeclared (first use in this function)
app_cepstral.c:133: error: ‘swift_params’ undeclared (first use in this function)
app_cepstral.c:133: error: ‘params’ undeclared (first use in this function)
app_cepstral.c:158: warning: implicit declaration of function ‘SWIFT_FAILED’
app_cepstral.c:158: warning: implicit declaration of function ‘swift_engine_open’
app_cepstral.c:164: warning: implicit declaration of function ‘swift_params_new’
app_cepstral.c:165: warning: implicit declaration of function ‘swift_params_set_string’
app_cepstral.c:169: warning: implicit declaration of function ‘swift_port_open’
app_cepstral.c:174: warning: implicit declaration of function ‘swift_port_set_voice_by_name’
app_cepstral.c:181: warning: implicit declaration of function ‘swift_port_find_first_voice’
app_cepstral.c:187: warning: implicit declaration of function ‘swift_port_set_voice’
app_cepstral.c:202: error: ‘SWIFT_EVENT_AUDIO’ undeclared (first use in this function)
app_cepstral.c:203: warning: implicit declaration of function ‘swift_port_set_callback’
app_cepstral.c:203: error: ‘write_audio’ undeclared (first use in this function)
app_cepstral.c:204: warning: implicit declaration of function ‘swift_port_speak_text’
app_cepstral.c:208: warning: implicit declaration of function ‘swift_port_close’
app_cepstral.c:209: warning: implicit declaration of function ‘swift_engine_close’
app_cepstral.c: In function ‘cepstral_exec’:
app_cepstral.c:225: warning: implicit declaration of function ‘LOCAL_USER_ADD’
app_cepstral.c:233: warning: implicit declaration of function ‘LOCAL_USER_REMOVE’
app_cepstral.c: At top level:
app_cepstral.c:252: warning: no previous prototype for ‘unload_module’
app_cepstral.c: In function ‘unload_module’:
app_cepstral.c:253: error: ‘STANDARD_HANGUP_LOCALUSERS’ undeclared (first use in this function)
app_cepstral.c: At top level:
app_cepstral.c:258: warning: no previous prototype for ‘load_module’
app_cepstral.c:263: warning: no previous prototype for ‘description’
app_cepstral.c:268: warning: no previous prototype for ‘usecount’
app_cepstral.c: In function ‘usecount’:
app_cepstral.c:270: warning: implicit declaration of function ‘STANDARD_USECOUNT’
app_cepstral.c: At top level:
app_cepstral.c:305: warning: function declaration isn’t a prototype
make[1]: *** [app_cepstral.o] Error 1
make: *** [apps] Error 2
[quote=“mbruni”]App_swift works with Asterisk 1.4, I tried personally
Marco Bruni[/quote]
But it seems to have broken at 1.4.10
After I installed 1.4.10 the TTS voice is broken/chopping, badly and is unusable. Falling back to 1.4.9 it was OK - I tried with both 8 and 16 KHz voices… not happy :’(