Third Party ASR/TTS Integration
XCALLY Motion can potentially be integrated with any ASR/TTS system based on MRCP.
In the following section you find an example of this kind of integration (Lumenvox).
This configuration activity is recommended for advanced users only (system engineers)
LumenVox Integration
Configuring UniMRCP to work with LumenVox
You need to configure:
- The mrcp.conf file in /etc/asterisk/
- The res-speech-unimrcp.conf file in /etc/asterisk/
- The unimrcpclient.xml in /usr/local/unimrcp/conf/
- The lumenvox.xml in /usr/local/unimrcp/conf/client-profiles/
Step 1: Configure res_unimrcp.so module by editing the mrcp.conf file
Here you can find a working mrcp.conf example (to be modified accordingly with your environment):
[general]
default-asr-profile = speech-lumenvox-mrcp1
default-tts-profile = speech-lumenvox-mrcp1
; UniMRCP logging level to appear in Asterisk logs. Options are:
; EMERGENCY|ALERT|CRITICAL|ERROR|WARNING|NOTICE|INFO|DEBUG -->
log-level = DEBUG
max-connection-count = 100
offer-new-connection = 1
; rx-buffer-size = 1024
; tx-buffer-size = 1024
; request-timeout = 60
[speech-lumenvox-mrcp1]
; +++ MRCP settings +++
version = 1
;
; +++ RTSP +++
; === RSTP settings ===
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Set this to the LumenVox Media Server's IP:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
server-ip = X.X.X.X
server-port = 554
; force-destination = 1
resource-location = media
speechsynth = speechsynthesizer
speechrecog = speechrecognizer
;
; +++ RTP +++
; === RTP factory ===
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Set this to the XCALLY Motion machine's IP:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
rtp-ip = X.X.X.X
; rtp-ext-ip = auto
rtp-port-min = 4000
rtp-port-max = 5000
; === RTP settings ===
; --- Jitter buffer settings ---res-speech-unimrcp.conf
playout-delay = 50
; min-playout-delay = 20
max-playout-delay = 200
; --- RTP settings ---
ptime = 20
codecs = PCMU PCMA L16/96/8000 telephone-event/101/8000
; --- RTCP settings ---
rtcp = 1
rtcp-bye = 2
rtcp-tx-interval = 5000
rtcp-rx-resolution = 1000
1) Set the server-ip directive pointing to the Lumenvox Media Server IP.
2) Set the server-port directive to the Lumenvox Media Server port.
3) Set the rtp-ip directive pointing to the XCALLY Motion IP.
A copy of this file is available here:
https://provisioning.xcally.com/files/packages/motion2/MRCP/mrcp.conf.lumenvox.example
Step2: Configure res_speech_unimrcp.so modules by editing the res-speech-unimrcp.conf file
Here you can find a working res-speech-unimrcp.conf example:
[general]
; UniMRCP named profile. Options are:
;unimrcp-profile = uni2 ; UniMRCP MRCPv2 Server
;unimrcp-profile = uni1 ; UniMRCP MRCPv1 Server
;unimrcp-profile = lv2 ; LumenVox MRCPv2 Server
unimrcp-profile = lv1 ; LumenVox MRCPv1 Server
;unimrcp-profile = nss2 ; Nuance MRCPv2 Server
;unimrcp-profile = nss1 ; Nuance MRCPv1 Server
; UniMRCP logging level. Options are:
; EMERGENCY|ALERT|CRITICAL|ERROR|WARNING|NOTICE|INFO|DEBUG -->
log-level = DEBUG
; Preloaded grammars
[grammars]
;grammar-name = path-to-grammar-file
; MRCPv2 properties (recognizer and generic header fields)
; http://tools.ietf.org/html/draft-ietf-speechsc-mrcpv2-20#section-9.4
[mrcpv2-properties]
Recognition-Timeout = 20000
No-Input-Timeout = 15000
; MRCPv1 properties (recognizer and generic header fields)
; http://tools.ietf.org/html/rfc4463#section-8.4
[mrcpv1-properties]
Recognition-Timeout = 20000
No-Input-Timeout = 15000
1)Set the unimrcp-profile directive to lv1 (LumenVox MRCPv1 Server).
A copy of this file is available here:
https://provisioning.xcally.com/files/packages/motion2/MRCP/res-speech-unimrcp.conf.lumenvox.example
Step 3: Configure the MRCP client profile by editing the lumenvox.xml file
Here you can find a working lumenvox.xml example (to be modified accordingly with your environment):
<?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="LumenVox-SIP-Settings">
<!--
Server IP address can explicitly be specified per "sip-settings". Otherwise, the server IP
address defaults to "server-ip" set in the properties, which in turn defaults to "ip".
-->
<!-- <server-ip>10.10.0.1</server-ip> -->
<server-port>5060</server-port>
<!-- <force-destination>true</force-destination> -->
</sip-settings>
<!-- RTSP MRCPv1 settings -->
<rtsp-settings id="LumenVox-RTSP-Settings">
<!--
Server IP address can explicitly be specified per "rtsp-settings". Otherwise, the server IP
address defaults to "server-ip" set in the properties, which in turn defaults to "ip".
-->
<!-- <server-ip>10.10.0.1</server-ip> -->
<server-ip>X.X.X.X</server-ip>
<server-port>554</server-port>
<!-- <force-destination>true</force-destination> -->
<resource-location></resource-location>
<resource-map>
<param name="speechrecog" value="recognizer"/>
</resource-map>
</rtsp-settings>
</settings>
<profiles>
<!-- LumenVox MRCPv2 profile -->
<mrcpv2-profile id="lv2">
<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>LumenVox-SIP-Settings</sip-settings>
<rtp-settings>RTP-Settings-1</rtp-settings>
</mrcpv2-profile>
<!-- LumenVox MRCPv1 profile -->
<mrcpv1-profile id="lv1">
<rtsp-uac>RTSP-Agent-1</rtsp-uac>
<media-engine>Media-Engine-1</media-engine>
<rtp-factory>RTP-Factory-1</rtp-factory>
<rtsp-settings>LumenVox-RTSP-Settings</rtsp-settings>
<rtp-settings>RTP-Settings-1</rtp-settings>
</mrcpv1-profile>
<!-- More profiles may follow. -->
</profiles>
</unimrcpclient>
1) Set the <server-ip>X.X.X.X</server-ip> sections pointing to the Lumenvox Media Server IP.
2) Set the <server-port>554</server-port> to the Lumenvox Media Server port.
A copy of this file is available here:
https://provisioning.xcally.com/files/packages/motion2/MRCP/lumenvox.xml.example
Step 4: Configure unimrcpclient by editing the unimrcpclient.xml file
Here you can find a working unimrcpclient.xml example (to be modified accordingly with your environment):
<?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"
subfolder="client-profiles">
<properties>
<!--
If the attribute "type" is set to "auto", IP address is determined implicitly by the hostname.
This is the default setting.
-->
<!-- <ip type="auto"/> -->
<!--
If the attribute "type" is set to "iface", IP address is determined by the specified name of
network interface/adapter.
-->
<!-- <ip type="iface">eth0</ip>-->
<!--
IP address can also be specified explicitly.
-->
<ip>127.0.0.1</ip>
<!-- <ext-ip>a.b.c.d</ext-ip> -->
<!--
Server IP address should be specified explicitly, unless the client and the server are located on
the same host. The server IP address can also be specified per <sip-settings> and <rtsp-settings>.
-->
<!-- <server-ip>a.b.c.d</server-ip> -->
</properties>
<components>
<!-- Factory of MRCP resources -->
<resource-factory>
<resource id="speechsynth" enable="true"/>
<resource id="speechrecog" enable="true"/>
<resource id="recorder" enable="true"/>
<resource id="speakverify" enable="true"/>
</resource-factory>
<!-- SofiaSIP MRCPv2 signaling agent -->
<sip-uac id="SIP-Agent-1" type="SofiaSIP">
<!--
By default, "ip" and "ext-ip" addresses, set in the properties, are used. These parameters can
explicitly be specified per "sip-uas" by means of "sip-ip" and "sip-ext-ip" correspondingly.
-->
<!-- <sip-ip>10.10.0.1</sip-ip> -->
<!-- <sip-ext-ip>a.b.c.d</sip-ext-ip> -->
<sip-port>8062</sip-port>
<sip-transport>udp</sip-transport>
<ua-name>UniMRCP SofiaSIP</ua-name>
<sdp-origin>UniMRCPClient</sdp-origin>
<!-- <sip-t1>500</sip-t1> -->
<!-- <sip-t2>4000</sip-t2> -->
<!-- <sip-t4>4000</sip-t4> -->
<!-- <sip-t1x64>32000</sip-t1x64> -->
<!-- <sip-timer-c>185000</sip-timer-c> -->
<!-- <sip-message-output>true</sip-message-output> -->
<!-- <sip-message-dump>sofia-sip-uac.log</sip-message-dump> -->
</sip-uac>
<!-- UniRTSP MRCPv1 signaling agent -->
<rtsp-uac id="RTSP-Agent-1" type="UniRTSP">
<max-connection-count>100</max-connection-count>
<!-- <request-timeout>5000</request-timeout> -->
<sdp-origin>UniMRCPClient</sdp-origin>
</rtsp-uac>
<!-- MRCPv2 connection agent -->
<mrcpv2-uac id="MRCPv2-Agent-1">
<max-connection-count>100</max-connection-count>
<offer-new-connection>false</offer-new-connection>
<rx-buffer-size>1024</rx-buffer-size>
<tx-buffer-size>1024</tx-buffer-size>
<!-- <request-timeout>5000</request-timeout> -->
</mrcpv2-uac>
<!-- Media processing engine -->
<media-engine id="Media-Engine-1">
<realtime-rate>1</realtime-rate>
</media-engine>
<!-- Factory of RTP terminations -->
<rtp-factory id="RTP-Factory-1">
<!--
By default, "ip" and "ext-ip" addresses, set in the properties, are used. These parameters can
explicitly be specified per "rtp-factory" by means of "rtp-ip" and "rtp-ext-ip" correspondingly.
-->
<!-- <rtp-ip>10.10.0.1</rtp-ip> -->
<!-- <rtp-ext-ip>a.b.c.d</rtp-ext-ip> -->
<rtp-port-min>4000</rtp-port-min>
<rtp-port-max>5000</rtp-port-max>
</rtp-factory>
</components>
<settings>
<!-- Common (default) RTP/RTCP settings -->
<rtp-settings id="RTP-Settings-1">
<jitter-buffer>
<adaptive>1</adaptive>
<playout-delay>50</playout-delay>
<max-playout-delay>600</max-playout-delay>
<time-skew-detection>1</time-skew-detection>
</jitter-buffer>
<ptime>20</ptime>
<codecs>PCMU PCMA L16/96/8000 telephone-event/101/8000</codecs>
<!-- <codecs>PCMU PCMA L16/96/8000 PCMU/97/16000 PCMA/98/16000 L16/99/16000</codecs> -->
<!-- Enable/disable RTCP support -->
<rtcp enable="false">
<!--
RTCP BYE policies (RTCP must be enabled first)
0 - disable RTCP BYE
1 - send RTCP BYE at the end of session
2 - send RTCP BYE also at the end of each talkspurt (input)
-->
<rtcp-bye>1</rtcp-bye>
<!-- RTCP transmission interval in msec (set 0 to disable) -->
<tx-interval>5000</tx-interval>
<!-- Period (timeout) to check for new RTCP messages in msec (set 0 to disable) -->
<rx-resolution>1000</rx-resolution>
</rtcp>
</rtp-settings>
</settings>
</unimrcpclient>
1) Set the <ip>127.0.0.1</ip> pointing to localhost (Assuming XCALLY Motion and MRCP are on the same host).
2) Also verify the <codecs>PCMU PCMA L16/96/8000 telephone-event/101/8000</codecs> section.
A copy of this file is available here:
https://provisioning.xcally.com/files/packages/motion2/MRCP/unimrcpclient.xml.example