Prophecy 9.0 Development Guide Home  |  Frameset Home

  Apple Mac OS  |  TOC  |  Communities  

How to configure Nuance ASR with Prophecy


Nuance 8.5

Prophecy has been tested with version 8.5 of the Nuance MRCP ASR engine as well as version 9.0.

Nuance Configuration

To integrate Nuance ASR with Prophecy, you will need to make the following modifications to the Nuance configuration files:

File mrcp-config:
Change:
mrcp.RtspPort 554
to
mrcp.RtspPort 5554

This will eliminate a port conflict between Prophecy's built-in ASR recognizer and the Nuance recognizer.

File watcher.startup:
Comment out (by prepending with a #) any lines starting with 'nlm'.  Then, add a line:
nlm ncr85-4-2061114001-a-zx16-363f822a1e93

This will change the license to the 4-port evaluation license.

Comment out this line:
vocalizer -text_type SSML -config %MRCP%/nuance-resources.txt lm.Addresses=localhost:8471

Then, restart the Nuance Watcher Daemon service. Once the service has started, you should check to make sure that each individual "virtual" process has started correctly. It may take several minutes for all of the virtual processes to start.

To check if all of the Nuance services have started correctly, open a command window and type the following: telnet localhost 7023

You will see the following:
SH 0 --
SC 0 -- Connected to TelnetWatcherModule as connection id:1.
SF 0 --


Type listvp to see the Nuance virtual processes.  You should see output similar to the following:
-- Virtual processes: (w = is watchable, r = will restart)
-- (state) (type) (vpid) (pvpid) (pid) (starts) (consecutive missed pings)
--    w  ( 5)READY          watcher-daemon              1    0  3540  1  0
--    wr ( 5)READY          nlm                      4601    1  796  1  0
--    wr ( 5)READY          resource-manager          4602    1  616  1  0
--    wr ( 5)READY          recserver                4603    1  3088  1  0
--    wr ( 5)READY          compilation-server        4604    1  3404  1  0
--    wr ( 5)READY          mrcp-server              4605    1  3528  1  0
-- Total: 6 virtual processes.


If a process is listed as INITIALIZING instead of READY, give it a few minutes.  If the state still has not changed, there may be an error.  Once you see all six processes as READY, the Nuance portion is ready.

Prophecy Configuration

If you haven't already, sign in to the Management Console.  Go to the 'Servers' section and select the correct Server. The configuration details show all the services configured for this server. Add the Nuance ASR service by clicking the Add (services) button. Make sure you add the correct service for every language that you want to make available. You can now use the service to create resources in your Virtual Platform. The resources can then be used in your applications, e.g. by referencing it in the xml:lang property of the <prompt> element in VoiceXML.

Installing Language Packs

Once the base installation of Nuance ASR is complete, you will have the US English recognition support. Now we will go through the basic installation of other Nuance language packs. For this example, we will use American Spanish.

To start, download the appropriate language pack - in this case, LanguageModule-SpanishAmerica-v8-0-r2.zip. Extract the data folder from the archive to the Nuance install folder - for Windows this is typically C:\Nuance\V8.5.0 - click Yes to All if it you receive a pop-up about overwriting existing files. We should now have the folder C:\Nuance\V8.5.0\data\lang\Spanish.America.

In order to use the language, we'll first need to compile it. Open the text editor of your choice and input:


SET LANGUAGE=Spanish.America
SET PACKAGE=mrcp-es-mx
%NUANCE%\bin\win32\nuance-compile %MRCP%\mrcp %LANGUAGE% -enable_jit -package_name %PACKAGE% -o %MRCP%\%PACKAGE%
pause


For other packages, simply change the SET LANGUAGE and SET PACKAGE options to those appropriate for that language. Save the file as Compile-Language-es-mx.bat to the Nuance install folder. The naming convention here is not important, however it is useful if you are installing multiple language packs or language packs on multiple servers, as we can simply edit and rename the file for different packs and reuse the batch file.

Run the batch file and the language pack should properly compile, after this we should have the directory C:\Nuance\V8.5.0\mrcp\mrcp-es-mx

Open C:\Nuance\V8.5.0\mrcp\watcher.startup and add the following two lines:

recserver -package %MRCP%/mrcp-es-mx -config %MRCP%/nuance-resources.txt config.ServerPort=0 config.LogFileNamePrefix=rs-es-mx
compilation-server -package %MRCP%/mrcp-es-mx -config_name es-mx -config %MRCP%/nuance-resources.txt -min_fresh_secs 0 -nthreads 24 comp.Port=0 config.LogFileNamePrefix=cs-es-mx


Edit the below line to add -package %MRCP%/mrcp-es-mx

mrcp-server -cfg %MRCP%/mrcp-config -package %MRCP%/mrcp-en-us -package %MRCP%/mrcp-es-mx -config %MRCP%/nuance-resources.txt config.ClapiConfigFile=%MRCP%/clapi_cfg.xml

Last, edit C:\Nuance\V8.5.0\mrcp\mrcp-lang-map and add the following line:

es-mx  mrcp-es-mx  es-mx UTF-8

Restart the Nuance Watcher Daemon service. Open a command prompt and type telnet localhost 7023 again. If Nuance has not started, you will see some information scrolling by. Once you see the line (Return Status: [0] NUANCE_OK), startup has completed successfully. Run listvp and you should now see two instances of compilation server and recserver. If not, the language pack failed to start. Check C:\Nuance\V8.5.0\mrcp\logs, sort by Date Modified, and check the most recent logs to determine why or contact Voxeo Support for assistance.

Now, we can add the newly installed languages a services to Prophecy. Go ahead and create a test grammar specifying the resource you just created, e.g. xml:lang="es-mx" in this case and place a test call. In the Log Viewer, you should see Prophecy connecting to the ASR server successfully. The first call after the Nuance Watcher Daemon service has been restarted may result in an error, so place a second call to verify. If you see a message in the Log Viewer similar to the one below, then Prophecy is successfully communicating with Nuance ASR:


2009.04.06.14.07.44.470  RTSP message(o):                                                                                                                                                                                                    4cbcf8d419a58b6695b1ca326b274f58-9125265-0ac5dcb8-000006b0-00000005  MRS  MRCPCLI  1  14  4x0e83bh  1  00000001
                          ANNOUNCE rtsp://10.10.10.1:5554/recognizer RTSP/1.0
                          CSeq: 3
                          Session: 80b9a8c0_00000ad4_49da44f0_0003_0000
                          Content-Type: application/mrcp
                          Content-Length: 391

                          DEFINE-GRAMMAR 2001 MRCP/1.0
                          content-base: http://127.0.0.1:9990/
                          content-id: 0@vxmlgrammar
                          content-length: 210
                          content-type: application/grammar+xml
                          speech-language: es-mx

                          <?xml version='1.0'?><grammar xmlns='http://www.w3.org/2001/06/grammar' version='1.0' xml:lang='es-mx' root='TOP'><rule id='TOP' scope='public'><one-of><item> si</item><item> no</item></one-of></rule></grammar>


Prophecy Configuration


Creating a new Server



First, we will need to create and configure Nuance 8.5 as a Server available to Prophecy - this applies to both on-box and off-box ASR. Open Prophecy Commander (http://127.0.0.1:9996) and click the Servers tab on the far left menu under Manage. At the top, to the right of Servers, click New, which should bring up the New Server dialog. The Identity tab should be selected first. Input the name of the server - example: Nuance 8.5 ASR - and the IP where the Nuance install is located. Note: Even if Nuance is installed on the same server as Prophecy, please input the IP of the server and not localhost or 127.0.0.1. Highlight Default under Not Selected Groups, click the right arrow to move it over to Selected Groups and click Save. You should a pop-up in the bottom right corner of the browser window to let you know if it saved successfully.


Next, click the Configuration tab and under Services, click Add. Expand ASR, expand Nuance ASR (v8.5), and click the check mark next to US English. Click Ok and then Save.


Prophecy is now configured with Nuance 8.5 as an available Server, which provides the Nuance ASR (v8.5) resource. Lastly, we'll just need to create a new Resource mapping that points to this service.


Mapping the new resource


Click Virtual Platforms under the Manage menu to the far left. If for any reason you get a pop-up that says you have unsaved changes, click Cancel and click the Save button again. At the top, we should see our Default platform. Select this and at the bottom we'll get the Edit Virtual Platform tab. Under this, select New. Under the New Resource dialog, we have two options: Role and Name. For Role, select ASR. Name will be how we reference the resource in our applications, so name it something simple, but descriptive. I went with en-us-n here for English, US, and Nuance. Note: Since this is DNS based, you cannot use special characters, underscores or periods.

Click New and under the New Group Service Priority dialog, set Group to Default, Service to Nuance ASR 8.5 - US English, and Priority to 1.


That's it. Nuance 8.5 is now configured to work with Prophecy 9.


Using the new resource with VoiceXML applications


To use the Nuance recognizer in your VoiceXML documents, set the xml:lang attribute to en-us-n in the <vxml> tag - for all grammars within the document - or the <grammar> tag - for only that specific grammar.

<vxml version="2.1" xml:lang="en-us-n">

<grammar xml:lang="en-us-n" src="myGrammar.grxml" mode="voice"/>


  ANNOTATIONS: EXISTING POSTS
0 posts - click the button below to add a note to this page

login
  Apple Mac OS  |  TOC  |  Communities  

© 2011 Voxeo Corporation  |  Voxeo IVR  |  VoiceXML & CCXML IVR Developer Site