Swift Text-to-Speech module for the Asterisk PBX

©2005,2006,2007 Sven Slezak <sunny at mezzo.net>

Swift is an Asterisk application module for using the Cepstral Swift Text-To-Speech (TTS) Engine in Asterisk. You need to download and install one of the Cepstral Voices first. Voices are available for Mac OS-X, Linux, Windows and WindowsCE in several languages like English, Spanish, German, French, Italian in professional quality for a very reasonable price (~30US$). You can use all Voices in demo mode until you have a license.

The syntax for Swift in extensions.conf is as follows:

Swift([<Voice>^]text to speak);

Example:

exten => s,1,Wait(2)  ; give it 2 seconds to open the line
exten => s,2,Swift(This text is going to get spoken by the Swift engine to the caller)
exten => s,3,Swift(You can press buttons on your keypad at any time)
exten => 1,1,Swift(Diane^You've pressed 1)  ; set to english female voice
exten => 5,1,Swift(Matthias^Sie haben auf 5 gedrückt)  ; set to german male voice
exten => t,1,Swift(Anybody there?)
exten => i,1,Swift(goodbye)
exten => i,2,Hangup

Compile:

Download (see below) and unpack the package:

tar -xzf app_swift-release.tgz
in the app_swift directory run:
make install
Restart Asterisk or load the application module with:
load app_swift.so
done!
show application Swift
should print the description.

Config swift.conf:

[general]
  voice=Katrin      ; set german female voice as default, otherwise use system default
  goto_exten=yes    ; wether to jump to the extension when a key was pressed
  buffer_size=65535 ; Number of bytes of audio data to buffer from the Swift libraries.
                    ; 8192 (8kbytes ~1second) is a practical minumum 

Changes and Download:

Mac version included in Asterisk PBX for Mac OS X
2.0rc1 - complete rewrite by (will@loopfree.net). version for Asterisk 1.4
0.9.6 universal binary for OS-X- support for setting voice in front of text.
0.9.5 - support for setting voice in front of text.
0.9.4 - fixed bug when using DTMF (thanks to wolfgang.alper@altrust.de)
0.9.3 - loads and reloads swift.conf at module load and reload. config protected by mutex.
0.9.2 - reads default voice name from swift.conf
0.9.1 - added OS-X support
0.9 - initial release

See also

"loopfree" version of app_swift

	 \ | /
	- :-) -
	 / | \