Asterisk + UniMRCP + Pocketsphinx (ASR) + Nuance (TTS)

1,119 views
Skip to first unread message

roko

unread,
Jan 20, 2011, 10:34:08 AM1/20/11
to uni...@googlegroups.com
Hi guys. I need a litlle help if any have some ideas to solve my issue. I'll explain:

I'm configuring Asterisk with pocketSphinx as ASR and Nuance as TTS.

I'm trying to bind all together using UniMRCP but I think I have something bad in the configurations file becasue ASR and TTS do not work.

My servers:
Server 1: Asterisk 1.6, uniMRCP (uni-ast-package-0.3.0) and PocketSphinx (pocketsphinx-0.6.1 & sphinxbase-0.6.1)
Server 2: Nuance  (Vocalizer 5)
O.S in both servers: (CentOS

I need to configure uniMRCP in order to bind it to the ASR that is installed in the same server as UniMRCP and also bind it to the TTS that is installed in another server in the same LAN.

I'm a little lost here. How is the architecture ?

Sip Phone calls the extension in Astrisk then Asterisk check execute the Dialplan.

When Asterisk calls MRCPSynth, UniMRCP client connects to Nuance right ?

So, in /usr/local/unimrcp/conf/unimrcpclient.xml I added:
<sip-uac id="SIP-Agent-2" type="SofiaSIP"> (ip-server pointing to Nuance IP)
<rtsp-uac id="RTSP-Agent-2" type="UniRTSP">
<mrcpv2-uac id="MRCPv2-Agent-2">


ASR and TTS share the same <media-engine id="Media-Engine-1">


In /usr/local/unimrcp/conf/client-profiles/nuance.xml I have:

    <!-- Nuance MRCPv2 profile -->
    <mrcpv2-profile id="nss2">
      <sip-uac>SIP-Agent-2</sip-uac>
      <mrcpv2-uac>MRCPv2-Agent-2</mrcpv2-uac>
      <media-engine>Media-Engine-1</media-engine>
      <rtp-factory>RTP-Factory-2</rtp-factory>
      <sip-settings>Nuance-SIP-Settings</sip-settings>
      <rtp-settings>Nuance-RTP-Settings</rtp-settings>
    </mrcpv2-profile>
   
    <!-- Nuance MRCPv1 profile -->
    <mrcpv1-profile id="nss1">
      <rtsp-uac>RTSP-Agent-2</rtsp-uac>
      <media-engine>Media-Engine-1</media-engine>
      <rtp-factory>RTP-Factory-2</rtp-factory>
      <rtsp-settings>Nuance-RTSP-Settings</rtsp-settings>
      <rtp-settings>Nuance-RTP-Settings</rtp-settings>
    </mrcpv1-profile>



In /etc/asterisk/mrcp.conf I have:
[general]
default-asr-profile = asr-pocketsphinx-mrcp2
default-tts-profile = speech-nuance5-mrcp2


[speech-nuance5-mrcp2]
; +++ MRCP settings +++
version = 2
;
; === SIP settings ===
server-ip = 10.202.163.112
server-port = 8060
force-destination = 1
; === SIP agent ===
client-ip = 10.202.163.112
client-port = 5093
sip-transport = udp
; === RTP factory ===
rtp-ip = 10.202.163.112
rtp-port-min = 4000
rtp-port-max = 5000
; === RTP settings ===
playout-delay = 50
max-playout-delay = 200
; --- RTP settings ---
ptime = 20
codecs = PCMU PCMA L16/96/8000
; --- RTCP settings ---
rtcp = 1
rtcp-bye = 2
rtcp-tx-interval = 5000
rtcp-rx-resolution = 1000




The extension I'm testing (/etc/asterisk/extensions.conf):
exten => 6600,1,Answer
exten => 6600,n,Wait(2)
exten => 6600,n,Set(TEXT="Hola mundo GEGO!")
exten => 6600,n,MRCPSynth(<?xml version=\"1.0\"?><speak version=\"1.0\" xml:lang=\"es-MX\" xmlns=\"http://www.w3.org/2001/10/synthesis\"><voice name='Paulina' gender='female'>${TEXT}</voice></speak>,p=default&i=any&f=/tmp/synth.raw)
exten => 6600,n,Hangup

Whe I call extension 6600 the call just gets like "waiting" and no voice is played :-(

These are the last lines in Asterisk CLI:

[Jan 20 10:32:01] NOTICE[26812]: app_unimrcp.c:4487 app_synth_exec: Text to synthesize is: <?xml version="1.0"?><speak version="1.0" xml:lang="es-MX" xmlns="http://www.w3.org/2001/10/synthesis"><voice name='Paulina' gender='female'>Hola mundo GEGO!</voice></speak>
[Jan 20 10:32:01] NOTICE[26812]: app_unimrcp.c:4490 app_synth_exec: Filename to save to: /tmp/synth.raw
[Jan 20 10:32:01] NOTICE[26812]: app_unimrcp.c:4526 app_synth_exec: DTMF enable: 1
[Jan 20 10:32:01] NOTICE[26812]: app_unimrcp.c:4169 unimrcp_log: Create MRCP Handle 0x9628f30 [asr-pocketsphinx-mrcp2]
[Jan 20 10:32:01] NOTICE[21941]: app_unimrcp.c:4169 unimrcp_log: Add Control Channel 0x9628f30 <new@speechsynth>
[Jan 20 10:32:01] NOTICE[21945]: app_unimrcp.c:4169 unimrcp_log: SIP Call State 0x9628f30 [calling]
[Jan 20 10:32:01] NOTICE[21968]: app_unimrcp.c:4169 unimrcp_log: SIP Call State  [received]

Any suggestion ?

Thanks !

roko

unread,
Jan 20, 2011, 10:36:51 AM1/20/11
to uni...@googlegroups.com
I forgot to tell that unimrcpclient and unimrcpserver are running and they have no messages after "[NOTICE] MRCP Client Started" and "[NOTICE] MRCP Server Started".

Nuance TTS works because I tested it using another Asterisk instance that is running in Nuance server.

There is something missing in the config files :-(

roko

unread,
Jan 21, 2011, 2:26:35 PM1/21/11
to uni...@googlegroups.com
Just to let you know thjat I solved this error. The RTP-Factory IP and ports in nuance profile (speech-nuance5-mrcp2) located in mrcp.conf file, must match with UniMRCP server's

Reply all
Reply to author
Forward
0 new messages