Description
asterisk-flite is a Flite text-to-speech module for the Asterisk open-source PBX.
This provides the "Flite" dialplan application, which allows you to use the Flite TTS Engine with Asterisk. It invokes the Flite TTS engine locally via the Flite C API, and uses it to render text to speech.
Installation
Installation is a 3-part process:
- installation of Asterisk's development header files,
- installation of the Flite TTS engine, and
- installation of the asterisk-flite module.
Some of these packages may already be present on your system. Please also refer to the README file included in the source archive.
1. Install Asterisk development files
This module was developed for Asterisk 1.4 or earlier.
Installing Asterisk development files with yum (Fedora) | [â] |
- In a terminal, enter:
yum install asterisk-devel
This will install the development files needed to build asterisk-flite.
Installing Asterisk from source | [â] |
Please refer to the documentation that comes with Asterisk for this procedure. It is recommended, however, to use your distribution's version of Asterisk (if available).
2. Install Flite
This module was developed for Flite 1.3. However, the makefile included in this version of Flite does not properly support ALSA or build shared libraries, and needs to be patched. Before doing this, check if your OS distribution provides an already-patched version of Flite, and rather install that if it is the case. For instance, Fedora, ALTLinux and Mandriva all provide appropriate Flite packages; in these cases, simply install the development package of flite (usually called "flite-devel" or something similar).
Installing Flite development files with yum (Fedora) | [â] |
- In a terminal, enter:
yum install flite-devel
This will install the development files needed to build asterisk-flite.
Installing and patching Flite 1.3 from source | [â] |
- Download Flite 1.3
- Download patch to enable Flite 1.3 to build shared libraries and save it in the same directory as flite-1.3-release.tar.gz
- Download patch to enable ALSA support for Flite 1.3 and save it in the same directory as the previous patch file
- In a terminal, go to the directory where the files were saved
- Extract flite:
tar -xzvf flite-1.3-release.tar.gz
- Change to the extracted flite directory:
cd flite-1.3-release
- Apply the patches:
patch -p1 < ../flite-1.3-sharedlibs.patch
patch -p1 < ../flite-1.3-alsa_support.patch
- Apply the patches:
patch -p1 < ../flite-1.3-sharedlibs.patch
patch -p1 < ../flite-1.3-alsa_support.patch
- Configure & compile flite:
./configure --enable-shared --with-audio=alsa
make
- Install flite to the system:
su -c 'make install'
3. Install asterisk-flite
Installing asterisk-flite RPM (Fedora) | [â] |
- Download the latest asterisk-flite RPM
- In a terminal, go to the directory where the file was saved
- Install the asterisk-flite module (your filename may be slightly different):
rpm -Uhv asterisk-flite-0.5-1.rpm
Installing asterisk-flite from source | [â] |
- Download the latest version of asterisk-flite
- In a terminal, go to the directory where the file was saved
- Extract asterisk-flite (the filename may be different from the example below):
tar -xzvf asterisk-flite-0.5.tar.gz
- Install the asterisk-flite module:
su -c 'make install'
Build the asterisk-flite module for your version of Asterisk:
make
make ASTERISKVERSION=1.2or if using Asterisk 1.0:
make ASTERISKVERSION=1.0
Usage
Type "core show application flite" at the Asterisk CLI prompt (or "show application flite" if you are using Asterisk < 1.4).
asterisk-flite has been designed to use the same syntax as the standard "festival" application that ships with Asterisk.
Links
Other Asterisk applications/extension modules by the author of this module:
- asterisk-agi-audiotx - AGI extension module that adds commands to allow the transfer of audio files to and from Asterisk via an AGI session
- asterisk-espeak - dialplan application providing speech synthesis using the eSpeak text-to-speech engine