Building app_swift under Mac OS X

app_swift is a module used for integrating Cepstral text-to-speech library with Asterisk. This is a particularly good fit for Asterisk since Cepstral's "Allison" voice was sampled from the same voice actress as Asterisk's pre-recorded sound files. The app_swift module can be build along with Asterisk 1.6 under Mac OS X with some slight modifications.

At least one Cepstral voice must be installed in order for the required framework to be available. A trial version of any voice can be downloaded for free from cepstral.com.

Also, download app_swift-2.0_ast-1.6.tar from asterisk.org.

After extracting the app_swift-2.0_ast-1.6.tar archive, edit the app_swift.c file.

Near the top of the file, change the line

#include <swift.h>

to:

#include "/Library/Frameworks/swift.framework/Headers/swift.h"


After extracting the Asterisk source archive, copy the app_swift.c file into the apps folder.
Edit the Asterisk Makefile. Find the line for SOLINK directives under the Darwin architecture section. Append the text "-framework swift" to the line to make it read something like:

SOLINK=-dynamic -bundle -Xlinker -macosx_version_min -Xlinker 10.4 -Xlinker -undefined -Xlinker dynamic_lookup -force_flat_namespace -framework swift


Configure and build Asterisk as usual. This example was tested by building for the x86_64 architecture.

If desired, copy the swift.conf.sample into the asterisk config directory. Don't forget to rename it to "swift.conf"

There is a bug in Asterisk 1.6.2 where ast_frfree incorrectly tries to free a null pointer, causing app_swift to crash the process if a hangup occurs during playback. If this is the case, change line 432 of app_swift.c from

ast_frfree(f);

to:

if( f ) ast_frfree(f);

app_swift is a module used for integrating Cepstral text-to-speech library with Asterisk. This is a particularly good fit for Asterisk since Cepstral's "Allison" voice was sampled from the same voice actress as Asterisk's pre-recorded sound files. The app_swift module can be build along with Asterisk 1.6 under Mac OS X with some slight modifications.

At least one Cepstral voice must be installed in order for the required framework to be available. A trial version of any voice can be downloaded for free from cepstral.com.

Also, download app_swift-2.0_ast-1.6.tar from asterisk.org.

After extracting the app_swift-2.0_ast-1.6.tar archive, edit the app_swift.c file.

Near the top of the file, change the line

#include <swift.h>

to:

#include "/Library/Frameworks/swift.framework/Headers/swift.h"


After extracting the Asterisk source archive, copy the app_swift.c file into the apps folder.
Edit the Asterisk Makefile. Find the line for SOLINK directives under the Darwin architecture section. Append the text "-framework swift" to the line to make it read something like:

SOLINK=-dynamic -bundle -Xlinker -macosx_version_min -Xlinker 10.4 -Xlinker -undefined -Xlinker dynamic_lookup -force_flat_namespace -framework swift


Configure and build Asterisk as usual. This example was tested by building for the x86_64 architecture.

If desired, copy the swift.conf.sample into the asterisk config directory. Don't forget to rename it to "swift.conf"

There is a bug in Asterisk 1.6.2 where ast_frfree incorrectly tries to free a null pointer, causing app_swift to crash the process if a hangup occurs during playback. If this is the case, change line 432 of app_swift.c from

ast_frfree(f);

to:

if( f ) ast_frfree(f);

Created by: dustinwenz, Last modification: Thu 12 of Aug, 2010 (20:34 UTC)
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+