Asterisk cmd swift

Swift


Synopsis


Swift is an Asterisk application module that uses the Cepstral Swift engine library to provide native
text-to-speech (TTS) capabilities in Asterisk without the typical file input / output slow down and
delay associated with AGI or script based implementations (i.e. keeping the caller waiting in silence
while the secondary app generates the entire text-to-speech output to an audio file). The module
can listen for or ignore DTMF while streaming the audio from the Cepstral Swift Engine.

In addition, the Swift module now supports multi-digit DTMF detection along with timeout and
maximum digit options (similar to the AGI get data command). If these options are specified and
no DTMF is detected while the text-to-speech audio is being streamed, the module will use the
timeout value and pause after the text-to-speech before setting the channel variable. If the timeout
and maximum digit options are not specified, the module with now ignore DTMF entirely (similar
to the AGI stream file command).

Requirements


The Swift module is released with a 1.2.x, 1.4.x, 1.6.x, and 1.8.x version scheme that corresponds with the
Asterisk code-base that version will work with. All of the versions require that the appropriate Asterisk
source code be installed along with a modern C compiler and the Cepstral engine before it will
compile. (i.e. app_swift v1.4.2 requires the Asterisk 1.4.x code-base)

You'll need to download and install one of the Cepstral Voices available on
their website (multiple languages and platforms and at a very reasonable price ~30US$).

Description

Swift([<Voice>^]the text to speak)
Swift([<Voice>^]the text to speak[|<timeout in ms>|<maximum digits to listen for>])


example:

[menu]
exten => s,1,Swift(This text is going to get spoken by the Swift engine to the caller|1000|1)
exten => s,2,Swift(You can press buttons on your keypad at any time|5000|1)

exten => 1,1,Swift(Diane^You've pressed 1) ; speak with us english female voice
exten => 5,1,Swift(Matthias^Sie haben die 5 gedrückt) ; speak with german male voice

exten => t,1,Swift(Anybody there? Doesn't matter, I'm going to ignore anything you dial now)

exten => i,1,Swift(goodbye)
exten => i,2,Hangup



Asterisk configuration file: swift.conf


[general]
voice=Allison ; Set english female voice as default, otherwise use system default
goto_exten=yes ; Set to yes to go to the extension when a key is pressed. Maximum digits option must be set to a value of 1.
buffer_size=65535 ; Size of audio buffer in bytes. 8192 is roughly one second's worth of audio




Return values

Always returns 0.

Download


app_swift for Asterisk 1.2.x, 1.4.x, 1.6.x, 1.8.x, 10 (Beta)

See also



Swift


Synopsis


Swift is an Asterisk application module that uses the Cepstral Swift engine library to provide native
text-to-speech (TTS) capabilities in Asterisk without the typical file input / output slow down and
delay associated with AGI or script based implementations (i.e. keeping the caller waiting in silence
while the secondary app generates the entire text-to-speech output to an audio file). The module
can listen for or ignore DTMF while streaming the audio from the Cepstral Swift Engine.

In addition, the Swift module now supports multi-digit DTMF detection along with timeout and
maximum digit options (similar to the AGI get data command). If these options are specified and
no DTMF is detected while the text-to-speech audio is being streamed, the module will use the
timeout value and pause after the text-to-speech before setting the channel variable. If the timeout
and maximum digit options are not specified, the module with now ignore DTMF entirely (similar
to the AGI stream file command).

Requirements


The Swift module is released with a 1.2.x, 1.4.x, 1.6.x, and 1.8.x version scheme that corresponds with the
Asterisk code-base that version will work with. All of the versions require that the appropriate Asterisk
source code be installed along with a modern C compiler and the Cepstral engine before it will
compile. (i.e. app_swift v1.4.2 requires the Asterisk 1.4.x code-base)

You'll need to download and install one of the Cepstral Voices available on
their website (multiple languages and platforms and at a very reasonable price ~30US$).

Description

Swift([<Voice>^]the text to speak)
Swift([<Voice>^]the text to speak[|<timeout in ms>|<maximum digits to listen for>])


example:

[menu]
exten => s,1,Swift(This text is going to get spoken by the Swift engine to the caller|1000|1)
exten => s,2,Swift(You can press buttons on your keypad at any time|5000|1)

exten => 1,1,Swift(Diane^You've pressed 1) ; speak with us english female voice
exten => 5,1,Swift(Matthias^Sie haben die 5 gedrückt) ; speak with german male voice

exten => t,1,Swift(Anybody there? Doesn't matter, I'm going to ignore anything you dial now)

exten => i,1,Swift(goodbye)
exten => i,2,Hangup



Asterisk configuration file: swift.conf


[general]
voice=Allison ; Set english female voice as default, otherwise use system default
goto_exten=yes ; Set to yes to go to the extension when a key is pressed. Maximum digits option must be set to a value of 1.
buffer_size=65535 ; Size of audio buffer in bytes. 8192 is roughly one second's worth of audio




Return values

Always returns 0.

Download


app_swift for Asterisk 1.2.x, 1.4.x, 1.6.x, 1.8.x, 10 (Beta)

See also



Created by: szunny, Last modification: Sat 11 of Feb, 2012 (01:51 UTC) by drclaw
Please update this page with new information, just login and click on the "Edit" or "Discussion" tab. Get a free login here: Register Thanks! - Find us on Google+