DTSwift Cepstral AGI Wrapper

Play Cepstral (http://www.cepstral.com) voices through AGI commands using dtswift application. The dtswift application is a freeware AGI application written in freepascal using the Lazarus IDE. Sources are included with the package as well as a binary compiled on CentOS 4.3 i686. Links for downloading the freepascal compiler and lazarus IDE (both open source) are in included in the readme.txt file.

The first argument of the AGI can be either the actual text to output or it can be an absolute path to a text file to read for output. Cepstral allows you to apply markup to the data you feed it, thus enabling us to effect pronunciations, etc. Having this in a text file is much more covenient and modular than unwieldy paragraphs of text in the dialplan. dtswift allow both ways.

Freepascal Source is available here:
http://leebo.dreamhosters.com/dtswift/

Installation

datatrak.conf File.

In your /etc/asterisk directory, you must create a text file called
datatrak.conf with the following values defined:


[cepstralagi]

; params can be used to effect speech. See cepstral's website for more info.
params=speech/pitch/shift=1,speech/rate=170,audio/sampling-rate=8000,audio/deadair=0

; voice = default voice to use
voice=William-8kHz

; execpath = the directory where the cepstral swift application resides.
execpath=/opt/swift/bin


Use from Asterisk Dialplan

Syntax:

exten=>s,1,AGI(dtswift,"TextToSayOrPathToFile"[,VoiceToUse])

[my-chatty-context]

; play a string of chars using a specific voice

exten=>s,1,AGI(dtswift,"FreePascal and Lazarus Rock"|William-8kHz)

; play a text file using default voice

exten=>s,2,AGI(dtswift,"/tmp/they_sure_do.txt")


Notes

  • To determine which type of data is being fed to the AGI, it checks to see if there are any forward slashes ("/") in the parameter. Be sure to use paths that include at least one slash.
Created by: lee_is_me, Last modification: Fri 05 of Nov, 2010 (22:46 UTC) by admin
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+