Help With Cepstral 6 And Asterisk 11

Home » Asterisk Users » Help With Cepstral 6 And Asterisk 11
Asterisk Users 7 Comments

Hello,

I recently purchased the Cepstral 6 text-to-speech engine (swift), and am now wondering if I should have bought something else. I would like to use Cepstral text to speech like some people use the Festival() or Flite() applications. For example, when I do a “core show application flite” at the CLI, flite is available to me:

localhost*CLI> core show application flite
-= Info about application ‘Flite’ =-
[Synopsis]
Say text to the user, using Flite TTS engine
[Description]
Flite(text[,intkeys]): This will invoke the Flite TTS engine, send a text string, get back the resulting waveform and play it to the user, allowing any given interrupt keys to immediately terminate and return the value, or ‘any’ to allow any number back.

I would like to do the same thing with Cepstral, and am trying to use app_swift available from:

https://github.com/darrensessions/app_swift

However, I am not able to get app_swift to compile. I am running Asterisk 11.6.0 and CentOS 6.4 64-bit.

I am wondering if anyone else out there has been able to get app_swift working with Asterisk 11 and could share any tricks they used to get it installed?

Brandon

7 thoughts on - Help With Cepstral 6 And Asterisk 11

  • can you pastie your configure and make ?

    I don’t have Cepstral6 but did submit tweaks to the code that should have made it Cepstral6 compatible.

    Also since you recently spent money with Cepstral, they’ll help you. They’ve got at least one guy who understands the app_swift code and was working on forking it as an official version.

  • Jeremy,

    I heard back from Cepstral support, and sadly I was told “Unfortunately, we do not provide support for app_swift. app_swift is an open source program that was not written by Cepstral.”

    I am new to installing software on Linux from source code. I am wondering if you would mind giving me some details on where I can find my configure and make?

    My /opt/swift directory looks like this:
    [root@dialer swift]# ls -l total 28
    drwxr-xr-x 2 root root 4096 Dec 30 19:47 bin drwxr-xr-x 2 root root 4096 Dec 30 19:47 doc drwxr-xr-x 2 root root 4096 Dec 30 20:19 etc drwxr-xr-x 2 root root 4096 Dec 30 19:47 include drwxr-xr-x 2 root root 4096 Dec 30 19:47 lib drwxr-xr-x 2 root root 4096 Dec 30 19:47 sfx drwxr-xr-x 3 root root 4096 Dec 30 19:47 voices

    I downloaded app_swift to /root/app_swift and the directory looks like this:
    [root@dialer app_swift]# ls -l total 48
    -rw-r–r– 1 root root 20073 Dec 31 10:23 app_swift.c
    -rw-r–r– 1 root root 15123 Dec 31 10:23 LICENSE
    -rw-r–r– 1 root root 3210 Jan 8 14:07 Makefile
    -rw-r–r– 1 root root 1701 Dec 31 10:23 README
    -rw-r–r– 1 root root 1072 Dec 31 10:23 swift.conf.sample

    When I run the make command, it spews a whole bunch of errors and warnings. The first few lines are:

    gcc -I/opt/swift/include -I/usr/src/asterisk-11.6.0/include -g -Wall
    -fPIC -D_SWIFT_VER_6 -D_AST_VER_11 -c -o app_swift.o app_swift.c In file included from app_swift.c:33:
    /usr/src/asterisk-11.6.0/include/asterisk.h:21:33: error:
    asterisk/autoconfig.h: No such file or directory In file included from /usr/src/asterisk-11.6.0/include/asterisk.h:27,
    from app_swift.c:33:
    /usr/src/asterisk-11.6.0/include/asterisk/compat.h:97: error: expected

    Please let me know what information I can provide, thanks for your patience with a newbie.

    Brandon

  • Wouldn’t it be easier in your case to pay somebody to do the job? I doubt that it would take more than a couple of minutes to compile, install, and configure the package. Maybe some things need to get adjusted as the author has abandoned the project (at least there is no longer a project web page) and the latest sources are about 2 years old.

    Building from sources is not that difficult, but if you don’t have a proper configure script you are responsible that all prerequisites are met, which can be time consuming if you don’t know your distro well enough. Here, there is no configure script and some things, which might be invalid for your machine, are hand coded inside the Makefile. Nothing spectacular, but you could end up asking a lot more questions that have nothing to do with asterisk.

    jg

  • Another option is to use an MRCP server like UniMRCP along with the Cepstral plugin. One very nice thing about this approach is that there is less ‘cepstral version’ < -> ‘asterisk version’ dependency, which is a problem with the current app_swift module (each app_swift version is designed to work on specifically one version of asterisk and one version of cepstral).

    Cepstral provides details here: http://www.cepstral.com/en/telephony/mrcp Information on the open-source uniMRCP can be found here: http://www.unimrcp.org/
    Information for connecting asterisk to uniMRCP can be found here (although it seems to be having issues ATM): http://code.google.com/p/unimrcp/wiki/asteriskUniMRCP

    -Justin

    —–Original Message—

  • Thanks to Jeremy Kister’s advice, I was able to get this compiled. He suggested these two commands:
    yum update -y yum install asterisk-devel

    These commands upgraded my Asterisk to 11.7.0 and installed the Asterisk development files that I was missing. After I did that, the make worked beautifully:

    [root@dialer app_swift]# make

    _ ___
    (_) / __) _
    _____ ____ ____ ___ _ _ _ _ _| |__ _| |_
    (____ | _ \| _ \ /___) | | | (_ __|_ _)
    / ___ | |_| | |_| | ____ |___ | | | | | | | | |_
    \_____| __/| __/ (____) |___/ \___/|_| |_| \__)
    |_| |_|

    gcc -I/opt/swift/include -I/usr/include -g -Wall -fPIC -D_SWIFT_VER_6
    -D_AST_VER_11 -c -o app_swift.o app_swift.c gcc -shared -Xlinker -x -o app_swift.so -L/opt/swift/lib -L/usr/lib
    -lswift -lceplang_en -lceplex_us app_swift.o

    ********************************************************
    * Run ‘make install’ to install the app_swift module. *
    ********************************************************

    When I ran the make install, I did get “install: cannot create regular file `/usr/lib/asterisk/modules’: No such file or directory”, but I just changed the line SYS_LIB_DIR=/usr/lib in the Makefile to SYS_LIB_DIR=/usr/lib64 and it worked fine.

    Just wanted to post this resolution in case it helps someone else out there.

    Brandon

  • Justin,

    Thank you very much for the information, that is great to learn that I
    have that option as well.

    Brandon