CAIVIAR capiserver using realspeak
Finally....The caiviar server source 0.3.5 has some flaws when compiling/using it in relation to Scansoft RealSpeak TTS engine under Linux.
Currently, I can't make the thing connect to a Scansoft TTS-server, but I can use the engine statically linked in.
In what follows, I assumed (change for your needs):
- the installation of scansoft realspeak is in REALSPEAKDIR (mine: /opt/scansoft/tts)
REALSPEAKDIR=/opt/scansoft/tts/
- the caiviar source is in CAIVIARDIR (mine: /tmp/caiviar-0.3.5)
CAIVIARDIR=/tmp/caiviar-0.3.5/
this is what I did:
- fix
${CAIVIARDIR}server/RealSpeak.cpp
I *did* alter more than minimally needed. Most importantly:- change the
".\\Engine"
string you find into the directory needed for your system. (I changed it to"/opt/scansoft/tts/engine"
- replace
tts_language
bylanguage
- replace
stdup
bystrdup
- if needed, change or adjust the code around "
Setting language to
" to have YOUR constant(s) (for your specific language).
You should consult${REALSPEAKDIR}api/inc/lh_ttsso.h
(or your RealSpeak documentation) for correct values/constants.
Check after installation (see below) the configuration file (probably/etc/ivr.properties
the line statingrealspeak.language=
should have one of the strings caught by that functionality. (default is "german
").
- change the
- incorporate RealSpeak includes and objects (of your RealSpeak obtained installation)
cp ${REALSPEAKDIR}api/lib/* ${CAIVIARDIR}server/TTS
cp ${REALSPEAKDIR}api/inc/* ${CAIVIARDIR}server/TTS- configure and compile caiviar (capiserver)
cd ${CAIVIARDIR} && ./configure --enable_realspeak && make
- install caiviar (capiserver)
cd ${CAIVIARDIR} && sudo make install
- create sysv-init script:
create /etc/init.d/capiserver
#!/bin/bash
# Filename: capiserver
# Version: 1.0
# Author: Dieter Demerre
# Description
# SysV-init script to launch capiserver
#
# usually known as: /etc/init.d/capiserver
#
NAME="CAIVIAR CAPI Server"
CAIVIARCONFIG=/etc/ivr.properties
CAIVIAR_PIDFILE=/var/run/capiserver.init.pid
CAIVIAR=/usr/local/bin/capiserver
if [ ! -x ${CAIVIAR} ]; then
echo -n "\nError: Could not find ${CAIVIAR} executable.\n" >&2
exit 5
fi
test -f ${CAIVIARCONFIG} || echo "WARNING no ${CAIVIARCONFIG} config found\n" >&2
case "$1" in
start) startproc -f -p ${CAIVIAR_PIDFILE} ${CAIVIAR};;
stop) killproc -p $CAIVIAR_PIDFILE -TERM ${CAIVIAR};;
restart) $0 stop ; $0 start;;
*) echo -n "unknown action.\nknown actions are: (start|stop|restart)\n"; exit ;;
esac
link to/etc/init.d/capiserver
from the expected sysV runlevel directories (distribution specific, maybe use system-tools to set the links).
for level in 2 3 5;
do
sudo ln -sf ../init.d/capiserver /etc/init.d/rc${level}.d/S99capiserver;
done
Labels: bug, caiviar, compilation, linux, ScanSoft RealSpeak, telephony, TTS
0 Comments:
Post a Comment
<< Home