Voice Recognition unimrcp, asterisk & nuance on Centos 5.4 64bit – Part 2

Next is nuance. We negotiated an evaluation of the software from Nuance of Recognizer, NSS & the License Manager, all of which are downloaded from the network area in the Nuance login – which they send you.

At the time of writing I grabbed:

  • NRec-9.0.12-i386-rhel3.tar.gz (Recognizer)
  • NSS-5.1.1-i386-linux.tar.gz (Nuance Speech Server)
  • NSS-Client-5.1.1-i386-linux.tar.gz (Nuance Speech Server Client)
  • NLICMGR-11.4.0c-i386-linux.tar.gz (License Manager)
  • NRec-9.0.0-en-AU.i386-rhel3.tar.gz (Australian Language Pack)
  • NRec-9.0.0-en-US.i386-rhel3.tar.gz (US Language Pack)
  • eval-rec-9.lic (The evaluation license)

There is documentation from Nuance which is pretty accurate in describing the installation process for all of the above. You basically, unpack and run the ./install.sh

I didn’t need to do anything special so I just left everything default for the install paths etc.

I would suggest you install the components in this order:

License Manager

setup your new license like this (as per the doco):

cp eval-rec-9.lic /usr/local/Nuance/licensemanager/license/ cd /usr/local/Nuance/licensemanager/components/ ./set-new-lic-file.sh /usr/local/Nuance/license_manager/license/eval-rec-9.lic


Install using ./install.sh – I used the default options.

Recognizer – Languange Pack

tar zxf NRec-9.0.0-en-AU.i386-rhel3.tar.gz rpm -Uhv NRec-en-AU-9.0-0.i386-rhel3.rpm

now for some configuration to get it all working so far.

Setup your evaluation license


Setup the Recognizer path data in your user startup directory (or the user you plan to run Nuance as)

nano ~/.bash_profile

Add to the bottom of the file:

export SWISRSDK=/usr/local/Nuance/Recognizer export LDLIBRARYPATH=$SWISRSDK/lib:$LDLIBRARYPATH export PATH="$SWISRSDK/bin:$PATH"

For now, execute the above in your shell as well.

Recognizer Tests

At this point you should run the tests supplied with Recognizer. To get the tests to run you actually need to install the en-US language. So before doing this, follow the instructions above for install the Language pack:

cd /usr/local/Nuance/Recognizer/samples/swirec_sample/ ./SWIrecsample

Make sure you can run the sample test before you move on. Alot of the above instructions were extracted from the nuance support file: nuanrecinstallation.pdf

Nuance Speech Server

Just extract it and do:

./install.sh chkconfig NSSservice on

Setup the correct IP for the Nuance Speech Server

nano /usr/local/Nuance/Speech_Server/server/config/NSSserver.cfg

Find and adjust the following line to your local IP:

server.mrcp2.sip.transport.interface.0 VXIString

Nuance Speech Server Client

tar zxf NSS-Client-5.1.1-i386-linux.tar.gz cd NuanceSpeechServer_Client ./install.sh

Then try the sample.

cd /usr/local/Nuance/Speech_Server/client cp scripts/demo.mrcp . cp scripts/one.ulaw . ./client.sh -s -p 5060 demo.mrcp

Now I get the error:

3@speechrecog@#Completion-Cause: 002 no-input-timeout@#@#

I never actually got this thing to work properlly, but its worth confirming all the networking stuff is working and talking to Recognizer etc.

Next we move onto the uni-ast-package-0.2.0

There is some info here which helped me get going, however I cover all the points from this below.

As I had so many problems with this, I decided to revert back to the asterisk version which is included here. This is optional.

cd asterisk ./configure make make install

Then we install unimrcp and its dependencies. You can do this yourself, or use the included which does it all for you:


Now you need to bring your local library resources upto date

nano /etc/ld.so.conf

Add the following to the bottom:

/usr/lib/asterisk/modules /usr/local/unimrcp/lib /usr/local/unimrcp/include /usr/src/uni-ast-package/unimrcp/build

Save and exit, then run:


Now we build the unimrcp connector for asterisk

cd asterisk-unimrcp/ ./bootstrap ./configure make make install

Now some configuration of the above newly installed stuff.

nano /etc/asterisk/mrcp.conf

Replace everywhere you see an IP with your local ip. For me this was: There should be 5 places.

Change the profile type to the Nuance Speech Server

nano /etc/asterisk/res-speech-unimrcp.conf

Make the following changes:

[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

(leave the rest of the file unchanged.)

Create a grammar File:

nano /etc/asterisk/grammar.xml

Inside the file put:


Open /usr/local/unimrcp/conf/unimrcpclient.xml file, go to the properties and specify IP address Asterisk is running on and the IP address of an MRCP server.

Now, we are getting close. Last thing we need to do is setup a better dialplan to test our new voice rec features.

nano /etc/asterisk/extenstions.conf

[general] static=yes writeprotect=no clearglobalvars=no [default] exten => s,1,Ringing exten => s,n,Wait(2) exten => s,n,Answer() exten => s,n,Wait(1) exten => s,n,SpeechCreate() exten => s,n,SpeechLoadGrammar(digit,/etc/asterisk/grammar.xml) exten => s,n,SpeechActivateGrammar(digit) exten => s,n,SpeechBackground(demo-enterkeywords,20) exten => s,n,Verbose(1,The recognized input is ${SPEECHTEXT(0)}) exten => s,n,Verbose(1,The score is ${SPEECHSCORE(0)}) exten => s,n,Verbose(1,The matched grammar is ${SPEECH_GRAMMAR(0)}) exten => s,n,SpeechDeactivateGrammar(digit) exten => s,n,SpeechUnloadGrammar(digit) exten => s,n,SpeechDestroy() exten => s,n,Hangup()

Now place a test call and see how you go. If you have any problems try the guys at unimrcp, they are most helpful.

[p2p type="id" value="73"]