File: howto-make-gnome-speech-ibmtts-rpm.html
Author:
Ali Sobhi
Date:
This document describes the complete procedure for creating a binary RPM package to enable Gnome 2.10.x desktop text-to-speech to work with IBM ViaVoice Text-to-Speech (TTS).
Introduction
This procedure was performed and tested on an Intel PC with Fedora Core 4. The goal of this exercise is to be able to generate the binary RPM as a non-root user. The prerequisite RPMs should be installed as root.
Prerequisites
Login as root or “su -” and check / update the required RPMs.
# This is needed by ibmtts_rte.
rpm -q compat-libstdc++-296 || yum install compat-libstdc++-296
# This is needed for building gnome-speech.
rpm -q gnome-common || yum install gnome-common
# An updated ALSA 1.0.9a is needed to fix a speech clipping problem
yum update alsa-lib
# rpm-4.4.1-22, if older version, then upgrade
rpm -q rpm
yum update rpm
You also need to have ibmtts_rte or ibmtts-devel packages installed in order to compile the gnome-speech to use ibmtts. This can be accomplished in two ways. First, install the complete IBM ViaVoice TTS package (ibmtts_rte-6.7-4.2.i386.rpm and ibmtts_rte_En_US-6.7-4.0.i386.rpm). Second, you can install the interface definition for ibmtts provided by ibmtts-devel-6.7-4.i386.rpm .
Setting up the RPM directory structure
Login as non-root user. Copy the following shell script in to a file “setrpm” and make the shell script executable. This script duplicates the system RPM directory (under /usr/src/redhat) under the user's directory of “~/ibmtts/rpmwork”.
#!/bin/bash
mkdir -p ~/ibmtts/rpmwork
cd ~/ibmtts/rpmwork
SysRPM=/usr/src/redhat
find $SysRPM -type d | sed "\?^$SysRPM\$?d" |
while read
do
d=${REPLY#$SysRPM/}
mkdir -p $d
done
Execute the script by typing “./setrpm”.
Making gnome-speech
Execute the following steps. Remember that we just created ~/lap/rpmwork/SOURCES in previous step.
cd ~/ibmtts/rpmwork/SOURCES
export CVS_RSH=ssh
export CVSROOT=:pserver:anonymous@anoncvs.gnome.org:/cvs/gnome
cvs -z3 -q checkout -P -A gnome-speech
cd gnome-speech
./autogen.sh
./configure --prefix=/usr --with-viavoice-dir=/opt/IBM/ibmtts-devel #if using ibmtts-devel
./configure --prefix=/usr #if using ibmtts_rte
make
DESTDIR=~/ibmtts/rpmwork/BUILD make install
At this point you will notice that the directory “~/ibmtts/rpmwork/BUILD/usr” is populated. There are only two files that we are interested in which will be packaged together as a binary RPM
usr/bin/viavoice-synthesis-driver
usr/lib/bonobo/servers/GNOME_Speech_SynthesisDriver_Viavoice.server
Packaging into a binary RPM
Put the following two lines in the ~/.rpmmacros
%_topdir /home/build/lap/rpmwork
%_unpackaged_files_terminate_build 0
Copy gnome-speech-ibmtts.spec into “~/ibmtts/rpmwork/SPECS/gnome-speech-ibmtts.spec”. Now type the following commands:
cd ~/ibmtts/rpmwork/SPECS
rpmbuild -bb gnome-speech-ibmtts.spec
...
ls ~/ibmtts/rpmwork/RPMS/i386
rpm -qpilR ~/ibmtts/rpmwork/RPMS/i386/gnome-speech-ibmtts-0.3.8-6.i386.rpm
If everything is OK and you have no errors, the last command lists the RPM information for “gnome-speech-ibmtts-0.3.8-6.i386.rpm”.
You have successfully created a binary RPM to enable gnome-speech to use IBM TTS.
Installing gnome-speech-ibmtts-*.rpm
Copy the newly created gnome-speech-ibmtts-*.rpm to a FC4 machine which has the IBM TTS (not ibmtts-devel) installed. Note that initially “test-speech” does not show that ibmtts-viavoice is available as a TTS. As user root install the newly created rpm.
rpm -iv gnome-speech-ibmtts-0.3.8-6.i386.rpm
Now try “test-speech” and you should see the ibmtts-viavoice as one of two choices (in addition to Festival) for your TTS selection.
Final note
Of course you have already realized that all of the above steps can be nicely written in to a shell script and save you some typing and avoiding the mistyping the commands and other errors, right? Well, that's left as an exercise to the reader :-)