Installing Voiceglue: Two Ways

There are two ways to install Voiceglue. The easy way, and the hard way. The easy was has the advantage of being, well, easy, but has the disadvantage of supporting only a small number of configurations and a small number of platforms. The hard way is, well, harder, but has the advantage of potentially being able to support any unix-y system in arbitrary configurations.

If you're fine with running Voiceglue on the same box as Asterisk and are going to run it on Ubuntu 8.04 or 8.10 or Fedora 9 or 10, then by all means try the easy method.

The Easy Way

The easy way is mostly automatic. Voiceglue provides a script that should get everything installed and running in one shot. Before the script can run, however, you have to do some preparation work.

Prerequisites

The prerequisites must be satisfied before installing Voiceglue.

Supported Platform

You must be installing on one of the following platforms:

  • Ubuntu 8.04 (Hardy)
  • Ubuntu 8.10 (Intrepid)
  • Fedora 9
  • Fedora 10

Voiceglue has been tested and runs on both 32-bit and 64-bit versions of these OSes.

Asterisk Installed

You must have Asterisk installed somehow. The Voiceglue installer doesn't check for an asterisk package, so it's fine to install it from source if you want to.

Supported versions of Asterisk are:

  • Asterisk 1.2
  • Asterisk 1.4
  • Asterisk 1.6

The "asterisk" user

The “asterisk” user must be present. This user is what the voiceglue process runs as because it needs to share audio files with Asterisk. It is legal, even with the easy way, to have Asterisk installed on a separate machine from Voiceglue, but the “asterisk” user must be present on the voiceglue host, and should match the uid/gid of the “asterisk” user on the Asterisk host.

Required Packages

There are several software packages that Voiceglue requires. The installer looks for them as packages in the system (debs for Ubuntu, rpms for Fedora) so they must be installed that way. For Ubuntu you use apt/synaptic, for Fedora you use yum/yumex. Here's the list of what's required on each of the supported platforms:

Package Ubuntu 8.04 Ubuntu 8.10 Fedora 9 or 10
gcc/g++ gcc g++ gcc g++ gcc-c++
libc++ libstdc++-devel
xerces-c libxerces28-dev libxerces-c2-dev xerces-c-devel
SpiderMonkey libmozjs-dev libmozjs-dev xulrunner-devel
flite flite flite flite
sox sox sox sox
libsox-fmt-alllibsox-fmt-alllibsox-fmt-all*
wget wget wget wget
openssl libssl-dev libssl-dev openssl-devel
XML::LibXML libxml-libxml-perl libxml-libxml-perl perl-XML-LibXML
BSD::Resource libbsd-resource-perl libbsd-resource-perl perl-BSD-Resource
Module::Build libmodule-build-perl libmodule-build-perl perl-Module-Build
FFTW 3 libfftw3-dev libfftw3-dev fftw-devel
Test::More perl-Test-Base
pkg-config pkg-config pkg-config pkgconfig

If an entry is blank, it means I didn't have to install that package from a base system because it was already present, so you probably won't have to either.

* I don't have an 8.10 box to test, but since it's a recent change I'm assuming it was continued in newer versions.

Without libsox-fmt-all in ubuntu sox will not be able to determine the type of file you are trying to encode, and fail. If you get “cannot find file” errors, go to /var/lib/asterisk/voiceglue/tts and try to manually encode the file using sox:

sox <filename> -r 8000 <filename.out.wav>

if you get this error:

sox soxio: Failed reading `Hello_World_This_is_a_Voice_X_M_L_test-DCC6DCF954C093C9.wav.16khz.wav': unknown file type `auto' 

you don't have the right codecs installed Note that in voiceglue 0.9 the dependency checker does not check for pkg-config, so that one will not get caught for you if it's missing.

Download and Unpack Voiceglue

After prerequisites are installed, download and upack the voiceglue distribution. It can always be found at http://voiceglue.org by clicking on the “Download” tab at the top.

I'm assuming that downloading and unpacking a tar file is not hard for a voiceglue user. After all, you installed Asterisk, didn't you? :-)

Running the install script

From within the top-level voiceglue directory (the one containing doc), run the following command as root:

doc/install-voiceglue

It first checks the prerequisites listed above, then if those are satisfied, builds and installs all of the software required for Voiceglue. Check the output for errors.

After the script runs to completion,. you should have the following services ready to run:

  • dynlog
  • phoneglue
  • voiceglue

On Fedora systems, you need to run chkconfig to turn them on for automatic system startup.

These services must be brought up in the order shown above, and brought down in the reverse order. Their install scripts will do this automatically on system startup and shutdown.

The Hard Way

Prerequisites

The prerequisites are the same as for the easy way, except that you are not necessarily restricted to the platforms listed there, and the software packages don't necessarily need to be installed as the package format of choice for the distribution.

Voiceglue Contents

The Voiceglue distribution contains the following top-level directories:

Directory Contents
Cam-Scom perl library for IPC
doc documentation and install script
dynlog perl programs providing unified log collection
libvglue voiceglue C/C++ libraries
openvxi-3.4+vglue voiceglue-modified openvxi 3.4 C/C++ library
phoneglue perl program providing high-level Asterisk interface
Satc perl library for phoneglue communication
SRGSDTMF perl library for processing SRGS DTMF grammars
Vgluefftw perl library for FFTW access
voiceglue perl program providing voiceglue interface
Vxglue perl library for interfacing to openvxi

Each of these items (except doc) must be installed.

Installing Voiceglue

The order in which the software components must be installed is:

  1. Cam-Scom
  2. dynlog
  3. Vgluefftw
  4. Satc
  5. phoneglue
  6. SRGSDTMF
  7. libvglue-headers
  8. openvxi-3.4+vglue
  9. libvglue
  10. Vxglue
  11. voiceglue

Installing Perl Libraries

Each perl library can be installed with the following sequence of actions:

  1. Change to that directory
  2. Run: perl Build.PL
  3. Run: ./Build install

Installing Programs

Each program can be installed with the following sequence of actions:

  1. Change to that directory
  2. Determine which Makefile is appropriate for your situation
  3. Run: make -f Makefile install

Installing libvglue-headers

The libvglue software is installed in two steps. The first step installs just the headers:

  1. Change to that directory
  2. Run: make install-headers

Installing libvglue

When it's time to install libvglue binaries, do:

  1. Change to that directory
  2. Run: make install

Installing openvxi-3.4+vglue

This is the most challenging install step, as it consists of a large number of C/C++ modules that have dependencies on several system libraries.

First, look at the exports file at the top level. It contains the following definitions:

  • SWISBSDK - The top-level directory of OpenVXI
  • XERCESDIR - The directory containing the Xerces-C distribution
  • SPIDERMONKEYDIR - The directory containing the Mozilla SpiderMonkey distribution
  • JSCFLAGS - The CFLAGS used for compiling against SpiderMonkey
  • JSLIBFLAGS - The library flags for linking against SpiderMonkey

These definitions have to all be correct and loaded into environment variables for the following steps to work.

Next, look at the build-openvxi script in the same top-level directory. It encodes the steps to build OpenVXI. Hopefully, with proper settings in exports, it will run successfully.

Finally, the install-openvxi script in the same top-level directory installs the compiled OpenVXI library files and runtime support files to their system destinations.

 
voiceglue_0.9_installation_instructions.txt · Last modified: 2009/05/22 04:48 by soup
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Debian Driven by DokuWiki