Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Acapelas UNIMRCP
Integration Documentation
TTS for Asterisk
Julien Boy
18/02/2014
Documentation to install an Acapela-Groups TTS Server dealing with Asterisk and with any other
UNIMRCP client.
I.
Contents
I.
Contents ................................................................................................................................................ 1
II.
III.
Server................................................................................................................................................. 3
2.
Client .................................................................................................................................................. 3
IV.
2.
3.
Acapela-Group
II.
Document revisions
Date
18/02/14
21/02/14
Author
Julien Boy
Julien Boy
Description
First version
Acapelas configuration
files added.
Version
1.0
1.1
Acapela-Group
III.
The following documentation is provided for an Unix environment and was tested on a CentOS 6.5 64bits
edition. Except for some specific points such as dependencies resolution, the manual still provides useful
informations for any environment.
1. Server
The Acapela Telecom application must be installed on the server as well as the Acapela MRCP V2 Server
application. These steps will not be explained in this documentation. Please refer to the official Acapelas
documentation of these products for more information.
To have a straightforward installation, its recommended to install the en-US Ryan and the fr-FR
Bruno voices.
2. Client
Asterisk will be used as the uniMRCP client. To do so, the Unix environment should be ready for the
compilation of Asterisk and its dependencies:
yum install gcc-c++.x86_64 glibc-devel.x86_64 ncurses-devel.x86_64 libxml2-devel.x86_64 sqlitedevel.x86_64;
Once the generic dependencies are installed, simply download and install the specific ones as follow:
cd /usr/local/src/;
wget https://unimrcp.googlecode.com/files/unimrcp-deps-1.2.0.tar.gz;
tar -xf unimrcp-deps-1.2.0.tar.gz;
cd unimrcp-deps-1.2.0;
./build-dep-libs.sh;
Acapela-Group
Follow the instructions and answer yes to all questions. Please make sure that you do NOT have other
versions of APR, APR-util or Sofia-SIP libraries already installed. As mentioned, those dependencies are
specifically patched for the compilation of Asterisk. Otherwise, make sure that during the configuration
steps of Asterisk, the correct path is used to compile with the patched libraries.
The next step is about downloading, compiling and installing Asterisk:
cd /usr/local/src/;
wget https://unimrcp.googlecode.com/files/uni-ast-package-1.1.0.tar.gz;
tar -xf uni-ast-package-1.1.0.tar.gz;
cd uni-ast-package-1.1.0;
There are 3 shell scripts to help you with the installation of Asterisk. However, the manual compilation
will be preferred as it may be useful to see debug informations in case of problem (such as missing
dependencies). During the writing of this documentation, the shell scripts were not displaying errors
while the installation was incomplete.
cd asterisk;
./configure;
make;
make install;
cd /usr/local/src/unimrcp;
./configure;
make;
make install;
cd /usr/local/src/modules;
./configure;
make;
make install;
Acapela-Group
IV.
Before configuring the client and the server to deal with MRCP, some preliminary tests should be
performed.
<trace>
<properties>
<!-- <ip type="auto"/> -->
<!-- Enter your Acapela MRCP V2 server IP here. Do NOT put localhost or 127.0.0.1. Be aware, here the
ip is the same than the Acapela TTS server as this tutorial was performed on a unique VM. -->
<ip>192.168.40.135</ip>
<!-- <ext-ip>a.b.c.d</ext-ip> -->
</properties>
To finish, make sure that the sip-port is set to 8060.
The uniMRCP server may be launched (make sure that the TTS server is also running):
cd /opt/Acapela/MRCP-2/bin/;
./unimrcpserver;
You should see a message like:
3. UniMRCP client
Open /usr/local/unimrcp/conf/unimrcpclient.xml
<properties>
<!-- <ip type="auto"/> -->
<!-- Enter your uniMRCP client IP here. Do NOT put localhost or 127.0.0.1. Be aware, here the ip is the
same than the Acapela TTS server and uniMRCP server. -->
<ip>192.168.40.135</ip>
<!-- <ext-ip>a.b.c.d</ext-ip> -->
</properties>
Acapela-Group
Open /usr/local/unimrcp/conf/client-profiles/ and create a file named acapela.xml where you will insert
this content:
<?xml version="1.0" encoding="UTF-8"?>
<!-- UniMRCP client document -->
<unimrcpclient xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../unimrcpclient.xsd"
version="1.0">
<settings>
<!-- SIP MRCPv2 settings -->
<sip-settings id="UniMRCP-SIP-Settings">
<!-- Server address should be explicitly specified, it defaults to "ip" address set in the
properties. Enter the Acapela MRCP V2 server ip and its port -->
<server-ip>192.168.40.135</server-ip>
<server-port>8060</server-port>
<!-- <force-destination>true</force-destination> -->
</sip-settings>
</settings>
<profiles>
<!-- Acapela MRCPv2 profile -->
<mrcpv2-profile id="aca2">
<sip-uac>SIP-Agent-1</sip-uac>
<mrcpv2-uac>MRCPv2-Agent-1</mrcpv2-uac>
<media-engine>Media-Engine-1</media-engine>
<rtp-factory>RTP-Factory-1</rtp-factory>
<sip-settings>UniMRCP-SIP-Settings</sip-settings>
<rtp-settings>RTP-Settings-1</rtp-settings>
</mrcpv2-profile>
</profiles>
</unimrcpclient>
-> Dont forget to replace with your server ip.
While both of these configuration files are used by the uniMRCP client, Asterisk uses
/etc/asterisk/mrcp.conf for its dialplan applications such as MRCPSynth() and MRCPRelog() while
/etc/asterisk/res-speech-unimrcp.conf is used by the implementation of the Asterisk Speech API via
MRCP.
Open /etc/asterisk/mrcp.conf, replace the value of the field default-tts-profile by speech-acapela-mrcp2.
Then append at the end of the file:
[speech-acapela-mrcp2]
Acapela-Group
Acapela-Group
Open /etc/asterisk/res-speech-unimrcp.conf and comment the line unimrcp-profile = uni2 and add
unimrcp-profile = aca2;
You should have something like:
[general]
; UniMRCP named profile. Options are:
unimrcp-profile = aca2 ; Acapela MRCPv2 Server
;unimrcp-profile = uni2 ; UniMRCP MRCPv2 Server
;unimrcp-profile = uni1 ; UniMRCP MRCPv1 Server
Now launch the unimrcp client to perform a quick test:
cd /usr/local/unimrcp/bin;
./unimrcpclient;
Do NOT launch the client from another location e.g. with a command like
/usr/local/unimrcp/bin/unimrcpclient. The configurations files are defined with relative paths from the
current directory
Many lines will appear on the terminal, look for eventual warnings or errors. Notice the lines:
2014-02-19 06:23:29:999748 [NOTICE] Open Config File [../conf/client-profiles/unimrcp.xml]
2014-02-19 06:23:30:000575 [INFO] Create SIP Settings 192.168.40.135:8060
2014-02-19 06:23:30:000581 [INFO] Register Signaling Settings [UniMRCP-SIP-Settings]
2014-02-19 06:23:30:000585 [INFO] Create RTSP Settings 192.168.40.135:1554
2014-02-19 06:23:30:000587 [INFO] Register Signaling Settings [UniMRCP-RTSP-Settings]
2014-02-19 06:23:30:000590 [NOTICE] Create MRCPv2 Profile [uni2]
2014-02-19 06:23:30:000592 [INFO] Register Profile [uni2]
The ip address should match what was defined previously.
From the unimrcpclient command line, type:
run synth uni2
Exit the unimrcpclient command line and open /usr/local/unimrcp/data. A file named like synth-8kHzxxxx.pcm should be present. Play the sound and you should be able to listen Welcome to MRCP.
You should now have a complete client server MRCP installation ready to be used with Asterisk.
Acapela-Group