What is an MRCP TTS server?
A Text-To-Speech (TTS) server accepts text and converts it into spoken audio.
The Media Resource Control Protocol (MRCP) is a standard which, besides many other things, describes how to communicate with a TTS server over the network.
Some Voxtron software (e.g. VoxIvrMrcp30 plugin, VXML module, …) connects to an MRCP TTS server. If you want to create and test a project that uses this software, you’ll need an MRCP TTS server.
What are UniMrcp and Festival?
Festival is an open-source TTS engine.
UniMrcp is an open-source MRCP framework, which can be used to communicate with Festival using MRCP.
When to use UniMrcp and Festival?
For production systems it is best to buy a license for a commercial MRCP TTS server, since those tend to support more languages and provide better audio quality.
For testing and experimenting, the combination of UniMrcp and Festival has the advantage that you don’t need to buy any licenses.
If you want to switch to a different TTS server, you only have to change the IP address in the VccWebCenter.
Both UniMrcp and Festival require Linux, which means that you need to install a Linux server first.
You can download a Debian Linux ISO here: http://cdimage.debian.org/debian-cd/7.4.0/i386/iso-cd/debian-7.4.0-i386-netinst.iso
If you want to install the Linux system on a virtual machine, you can use VirtualBox: https://www.virtualbox.org When creating a new Virtual Machine, providing 5Gb space for the hard disk and 512Mb RAM should be more than enough.
Most default installation settings are fine. When choosing which packages to install, you don’t need to select any server software or graphical interfaces, but you do need a build environment (i.e. gcc, g++ and make).
Downloading UniMrcp and Festival
Once you have installed your linux server, you can log in and download the source code for UniMrcp and Festival.
For this you need the wget tool, which can be installed using the command: apt-get install wget
Once wget is installed, you can download the source code for Flite (Festival Lite) and UniMrcp:
- wget http://www.festvox.org/flite/packed/flite-1.4/flite-1.4-release.tar.bz2
- wget http://unimrcp.googlecode.com/files/unimrcp-deps-1.2.0.tar.gz
- wget http://unimrcp.googlecode.com/files/unimrcp-1.1.0.tar.gz
Compiling flite (Festival Lite)
- bunzip2 flite-1.4-release.tar.bz2
- tar xvf flite-1.4-release.tar
- cd flite-1.4-release
- cd ..
Compiling the UniMrcp dependencies
- tar -xzvf unimrcp-deps-1.2.0.tar.gz
- cd unimrcp-deps-1.2.0
- Do you want to build APR libraries (y/n)? => y
- Do you want to build Sofia-SIP library (y/n)? => y
- cd ..
- tar -xzvf unimrcp-1.1.0.tar.gz
- cd unimrcp-1.1.0
- ./configure –enable-flite-plugin –with-flite=../flite-1.4-release
- Log in as root and cd to the unimrcp-1.1.0 directory
- make install
The location of the configuration file is /usr/local/unimrcp/conf/unimrcpserver.xml
You need to edit this file and change the following lines:
- <ip>10.0.65.80</ip> (change to the IP address of your linux server)
- <ext-ip>10.0.65.80</ext-ip> (change to the IP address of your linux server)
- <engine id=”Flite-1″ name=”mrcpflite” enable=”true”/> (set enable=”false” for all other engine lines)
Note: In this example we changed the SIP port from 5060 (default) to 8060, because Asterisk was already using port 5060. If no other programs need port 5060, you can keep the default port number.
Start the UniMrcp server
- cd /usr/local/unimrcp/bin
Make a test call
To test your new TTS server, you can install the VoxIvrMrcp30 plugin on the IVR and try the included test flows. Don’t forget to configure the IP addresses and port numbers in the VccWebCenter.
Start UniMRCP as daemon on startup
If you want to automatically start the UniMrcp TTS server when the system boots, you can add the following script to /etc/init.d:
Note: we specified the unimrcp directory using the -r argument, otherwise the unimrcp server won’t find its config files
In order to create the correct links to start and stop the service, you can run the following command (from the /etc/init.d directory):
update-rc.d unimrcp defaults
Now the unimrcp server will start automatically when the linux system boots.