Table Of Contents
Configuring ASR and TTS Properties
Contents
Prerequisites for Using ASR and TTS
Restrictions for External ASR and TTS Servers
Information About Speech Recognition and Synthesis
How to Configure External Server Properties
Specifying ASR and TTS Media Server Locations
Troubleshooting Tips
Verifying the Media Server Locations
Troubleshooting ASR and TTS Server Functionality
Specifying MRCP v2 ASR and TTS Media Server Locations
Verifying the MRCP v2 Media Server Locations
Troubleshooting MRCP v2 ASR and TTS Server Functionality
Setting MRCP Client History Limits
Configuration Examples for ASR and TTS
ASR and TTS: Example
MRCP v2 ASR and TTS: Example
Where to Go Next
Additional References
Configuring ASR and TTS Properties
This chapter describes how to configure automatic speech recognition (ASR) and test-to-speech (TTS) attributes in Cisco IOS software for use by Tcl and VoiceXML applications. These attributes are part of the Speech Recognition and Synthesis for Voice Applications feature.
For more information about this and related Cisco IOS voice features, see the following:
•
""
•
Entire Cisco IOS Voice Configuration Library—including library preface and glossary, other feature documents, and troubleshooting documentation—at http://www.cisco.com/en/US/docs/ios/12_3/vvf_c/cisco_ios_voice_configuration_library_glossary/vcl.htm.
Note
For releases prior to Cisco IOS Release 12.3(14)T, see the previous version of the Cisco Tcl IVR and VoiceXML Application Guide at: http://www.cisco.com/univercd/cc/td/doc/product/software/ios123/123cgcr/vvfax_c/tcl_leg/index.htm
Release
|
Modification
|
12.2(11)T
|
This feature was introduced.
|
12.3(14)T
|
A new command-line interface structure for configuring Tcl and IVR applications was introduced and affected the commands for configuring this feature.
|
12.4(15)T
|
Support was added for Media Resource Control Protocol version 2 (MRCP v2).
|
Feature History for Speech Recognition and Synthesis for Voice Applications
Contents
•
Prerequisites for Using ASR and TTS
•
Restrictions for External ASR and TTS Servers
•
Information About Speech Recognition and Synthesis
•
How to Configure External Server Properties
•
Configuration Examples for ASR and TTS
•
Where to Go Next
•
Additional References
When developing and configuring a voice application, use this chapter and see the Cisco VoiceXML Programmer's Guide or the Tcl IVR API Version 2.0 Programmer's Guide.
Prerequisites for Using ASR and TTS
Using speech recognition or synthesis with a voice application requires:
•
Cisco IOS Release 12.2(11)T or a later release
•
Basic Cisco IOS functionality as described in "Configuring Basic Functionality for Tcl IVR and VoiceXML Applications" on page 1.
•
Tcl IVR 2.0 script or VoiceXML 2.0 document that implements ASR or TTS. To write your own script, see the Tcl IVR API Version 2.0 Programmer's Guide or Cisco VoiceXML Programmer's Guide, respectively.
•
Compatible version of external media server software, and VCWare (Cisco AS5300), as listed in Table 6-1.
For Cisco IOS Release 12.4(15)T and later releases, you also need:
•
Loquendo ASR and TTS MRCP v2 servers
•
Loquendo Speech Suite version 7.0.6 or later
or
•
Nuance Recognizer 9.0.0
•
RealSpeak 4.5.0
•
Nuance Speech Server 5.0.1
Table 6-1 Cisco IOS Compatibility Matrix
Software
|
Supported Version
|
Cisco IOS Release
|
Cisco VCWare
|
10.26a with Cisco DSPWare 4.0.26
|
12.2(11)T
12.2(11)T1
|
Nuance ASR/TTS Minimum Recommended Software
|
• Nuance Recognizer 9.0.0
– At least one Nuance Recognizer 9.0 language
• RealSpeak 4.5.0
– At least one RealSpeak 4.5 voice
• Nuance Speech Server 5.0.1
|
12.4(15)T
|
|
• OpenSpeech Recognizer 3.0.12
– At least one OSR 3.0 language
• RealSpeak 4.0.12
– At least one RealSpeak 4.0 voice
• SpeechWorks MediaServer 3.1.13
|
12.4(15)T
|
|
• OpenSpeech Recognizer 3.0.9
– At least one OSR 3.0 language
• RealSpeak 4.0.10
– At least one RealSpeak 4.0 voice
• SpeechWorks MediaServer 3.1.13
|
12.4(6)XT
|
|
• Nuance MRCP 1.0.0 SP10 (includes Nuance 8.5 SP050930)
• Vocalizer 4.0.6
– At least one Vocalizer 4.0 voice
|
12.4(6)XT
|
Loquendo ASR and TTS MRCP v2 servers
|
• Speech Suite version 7.0.6 or later
|
12.4(15)T
|
Nuance Communications Resources
For general information, visit the Nuance Communications, Inc. website:
http://www.nuance.com/
For Nuance software downloads and documentation, visit the Nuance Network Customer Service Portal:
http://network.nuance.com
Loquendo Resources
For specific information on installing and configuring the external media server, see the documentation resources on the Loquendo website.
Restrictions for External ASR and TTS Servers
•
For speech recognition and external DTMF recognition, the actual grammar formats that are supported are dependent on the media server being used.
•
External ASR and TTS media servers must support:
–
Server side of MRCP
–
HTTP clients
–
W3C XML grammar format as a minimum for ASR
–
W3C speech synthesis markup language specification for TTS
•
To use speech recognition on an IP call leg:
–
The codec command must be set to G.711 u-law in the VoIP dial peer.
–
The dtmf-relay command must be set to rtp-nte if DTMF input is required.
–
The no vad command must be configured in the VoIP dial peer. The ASR server performs voice activity detection (VAD) so for accurate results, VAD should not be configured on the gateway.
•
A separate G.711 u-law RTP stream (media forking) for speech recognition has the following platform restrictions:
–
It is supported on the Cisco 3660 only when the codec complexity is set to high on the voice card. It is not supported for medium complexity codecs.
–
It is not supported on the Cisco 1700 series.
Information About Speech Recognition and Synthesis
Cisco IOS Release 12.2(11)T and later releases supports automatic speech recognition (ASR) and text-to-speech (TTS) capabilities for VoiceXML and Tcl applications on Cisco voice gateways.
Cisco IOS Release 12.4(15)T adds support for Media Resource Control Protocol version 2 (MRCP v2) which depends on Session Initiation Protocol (SIP) to establish the control and media sessions between the Cisco gateway as a client and the MRCP v2 server.
The Speech Recognition and Synthesis feature provides interfaces to ASR and TTS media servers by using Media Resource Control Protocol (MRCP), an application-level protocol developed by Cisco and Nuance Communications. Client devices that are processing audio or video streams use MRCP to control media resources on external media servers, such as speech synthesizers for TTS and speech recognizers for ASR. The Cisco gateway, running a voice application, and the media servers providing speech recognition and speech synthesis, maintain a client/server relationship through an RTSP connection; the gateway is the RTSP client and the RTSP server is the streaming media server providing speech recognition and speech synthesis.
While doing speech recognition, the gateway creates a separate G.711 u-law RTP stream to the media server, enabling the gateway to simultaneously perform speech synthesis or play audio files using a different codec.
Figure 6-1 shows an example of a media server providing speech recognition and synthesis to a Cisco VoiceXML gateway.
Figure 6-1 Cisco IOS VoiceXML Network with ASR and TTS
Tcl IVR 2.0 and VoiceXML Integration
Tcl IVR 2.0 extensions in Cisco IOS Release 12.2(11)T allow Tcl applications to leverage support for ASR and TTS by invoking and managing VoiceXML-based dialogs within Tcl IVR scripts. This enables the implementation of hybrid applications using Tcl IVR for call control and VoiceXML for dialog management. For more information, see the Cisco VoiceXML Programmer's Guide.
How to Configure External Server Properties
•
Specifying ASR and TTS Media Server Locations (optional)
•
Verifying the Media Server Locations (optional)
•
Troubleshooting ASR and TTS Server Functionality (optional)
•
Specifying MRCP v2 ASR and TTS Media Server Locations (optional)
•
Verifying the MRCP v2 Media Server Locations (optional)
•
Troubleshooting MRCP v2 ASR and TTS Server Functionality (optional)
•
Setting MRCP Client History Limits (optional)
•
ASR and TTS: Example (optional)
Specifying ASR and TTS Media Server Locations
The location of media servers that are used for speech recognition and synthesis can be specified globally on the gateway, or these attributes can be specified in the individual VoiceXML document by using Cisco properties. These two methods have different results:
•
ivr tts-server and ivr asr-server commands on the gateway—Media server sessions are created for each call to IVR applications, regardless of whether an application needs to talk to the media server.
•
com.cisco.tt-server and com.cisco.asr-server <property> extensions—Media server sessions are created for each call to that application. If only a small number of applications require TTS/ASR media sessions, you should use the <property> extensions within those applications to define the external media server URL in the VXML script.
For information on identifying ASR or TTS servers through VoiceXML properties, see the Cisco VoiceXML Programmer's Guide.
Note
Specifying the URL of media servers in a VoiceXML document takes precedence over the gateway configuration. Any value that is configured on the gateway is ignored if the same attribute is configured with a VoiceXML property.
Note
If the asr and tts servers are in the same server, you have to differentiate them using the ip host command.
ip host asr-server <ip-address>
ip host tts-server <ip-address>
SUMMARY STEPS
1.
enable
2.
configure terminal
3.
ivr asr-server url
4.
ivr tts-server url
DETAILED STEPS
Step 1
Enable privileged EXEC mode:
Enter your password if prompted.
Step 2
Enter global configuration mode:
Example: Router# configure terminal
Step 3
Specify the ASR server location for VoiceXML documents:
•
url—Location of ASR resource on the media server in URL format.
Example: Router(config)# ivr asr-server rtsp://demo/recognizer
Note
Nuance media servers using the default installation require the following syntax for the URL:
rtsp://host:port/recognizer
(host is the host name of the media server; port is optional)
For media servers using MRCP v2, specify the URL as follows:
sip:server-name@host-name | ip-address
Step 4
Specify the TTS server location for VoiceXML documents:
•
url—Location of TTS resource on the media server in URL format.
Example: Router(config)# ivr tts-server rtsp://demo/synthesizer
Note
Nuance media servers using the default installation require the following syntax for the URL:
rtsp://host:port/synthesizer
(host is the host name of the media server; port is optional)
For media servers using MRCP v2, specify the URL as follows:
sip:server-name@host-name | ip-address
Troubleshooting Tips
If speech recognition or synthesis is not working, Table 6-2 lists some possible causes and the actions that you can take.
For additional debugging information on media servers, see the "Troubleshooting ASR and TTS Server Functionality" section.
Table 6-2 Speech Recognition or Synthesis Fails
Possible Causes
|
Suggested Actions
|
Server is not configured either on the Cisco gateway or in the VoiceXML document.
|
Verify that the server location is configured by using at least one of these methods:
• Globally on the gateway by using the ivr asr-server or ivr tts-server command. See the "Verifying the Media Server Locations" section.
• With the com.cisco.asr-server or com.cisco.tts-server property in the VoiceXML document. See the Cisco VoiceXML Programmer's Guide.
|
Gateway cannot access external ASR or TTS server or server is not running.
|
Ping the external server to make sure that the gateway has connectivity.
|
RTSP or MRCP errors are occurring between the gateway and the media server.
|
See the "Troubleshooting ASR and TTS Server Functionality" section.
|
MRCP v1 ports and URL defaults do not match.
|
Make the following changes to the Nuance configuration file. If you are using Nuance SpeechWorks MediaServer (SWMS), the configuration file is osserver.cfg. If you are using Nuance Speech Server (NSS), the configuration file is NSSserver.cfg.
TCP port:
Default:
server.mrcp1.transport.port VXIInteger 4900
New value:
server.mrcp1.transport.port VXIInteger 554
TTS URL:
Default:
server.mrcp1.resource.2.url VXIString media/speechsynthesizer
New value:
server.mrcp1.resource.2.url VXIString /synthesizer
ASR URL:
Default:
server.mrcp1.resource.3.url VXIString media/speechrecognizer
New value:
server.mrcp1.resource.3.url VXIString /recognizer
|
Verifying the Media Server Locations
SUMMARY STEPS
1.
show running-config
2.
show mrcp client session active
DETAILED STEPS
Step 1
Use the show running-config command to display the media server configuration on your gateway, for example:
ivr asr-server rtsp://asr-server/recognizer
ivr tts-server rtsp://tts-server/synthesizer
Note
The location of the external speech recognition or speech synthesis server can instead be configured in the VoiceXML document. The configuration in the VoiceXML document takes precedence over the gateway configuration.
Step 2
Make a call to an application using ASR or TTS and use the show mrcp client session active command to verify connectivity between the gateway and the media server, for example:
Router> show mrcp client session active
No Of Active MRCP Sessions:1
Resource Type:Synthesizer URL:rtsp://tts-server/synthesizer
Method In Progress:SPEAK State:SPEAKING
Resource Type:Recognizer URL:rtsp://asr-server/recognizer
Method In Progress:RECOGNIZE State:RECOGNIZING
Note
The external media server has vendor-specific default and configurable parameters that control its functionality. These parameters are server-dependent and could affect the media server's ability to interoperate with the Cisco gateway. See your server manufacturer's documentation for details.
Troubleshooting ASR and TTS Server Functionality
SUMMARY STEPS
1.
debug vxml
2.
debug mrcp error
3.
debug rtsp
DETAILED STEPS
Step 1
Use the debug vxml error and debug vxml event commands to verify that the external media server is reachable and its location is configured on the gateway or in the VoiceXML document. In the following example, the application failed because the media server is not configured on the gateway or in the VoiceXML document.:
*Jan 5 18:24:19.507: //62/36CA25A68036/VXML:/vxml_vapp_tts:
tftp://demo/sample/banking.vxml at line 17: vapp_tts() fail with vapp error 1
**Jan 5 18:24:19.507: //62/36CA25A68036/VXML:/vxml_event_proc:
*Jan 5 18:24:19.507: <event>: event=error.badfetch status=0
*Jan 5 18:24:19.507: //62/36CA25A68036/VXML:/vxml_default_event_handler: use default
event handler
*Jan 5 18:24:19.507: //62/36CA25A68036/VAPP:/vapp_session_exit_event_name: Exit Event
error.badfetch
*Jan 5 18:24:19.507: //62/36CA25A68036/VAPP:/vapp_session_exit_event_name: Exit Event
error.badfetch
*Jan 5 18:24:19.507: //62/36CA25A68036/VAPP:/vapp_session_exit_event_name: Exit Event
Name already set to error.badfetch
*Jan 5 18:24:19.507: //62/36CA25A68036/VXML:/vxml_vapp_terminate: vapp_status=0 ref_count
0
*Jan 5 18:24:19.507: //62/36CA25A68036/VXML:/vxml_vapp_terminate: vxml session
terminating with code=ERROR
vapp status=VAPP_SUCCESS vxml async status=VXML_ERROR_BAD_FETCH
In the following example, the application failed because the media server is either unreachable or is not running.
*Jan 5 18:36:44.451: //83/ECD9B163804B/VXML:/vxml_media_done: : media play failed to
setup with VAPP error=31,
**Jan 5 18:36:44.451: <event>: event=error.com.cisco.media.resource.unavailable
status=0
*Jan 5 18:36:44.451: //83/ECD9B163804B/VXML:/vxml_default_event_handler: use default
event handler
*Jan 5 18:36:44.451: //83/ECD9B163804B/VAPP:/vapp_session_exit_event_name: Exit Event
error.com.cisco.media.resource.unavailable
*Jan 5 18:36:44.451: //83/ECD9B163804B/VAPP:/vapp_session_exit_event_name: Exit Event
error.com.cisco.media.resource.unavailable
*Jan 5 18:36:44.451: //83/ECD9B163804B/VAPP:/vapp_session_exit_event_name: Exit Event
Name already set to error.com.cisco.media.resource.unavailable
*Jan 5 18:36:44.451: //83/ECD9B163804B/VXML:/vxml_vapp_terminate: vapp_status=0 ref_count
0
Step 2
Use the debug mrcp error command to verify the connection between the gateway and the server. The following example shows the error if the RTSP connection to the server fails:
*May 9 20:29:09.936:Connecting to 10.1.2.58:554 failed
The following error occurs if the response from the server is incorrect:
*May 9 20:29:09.936:Response from 10.1.2.58:554 failed
*May 9 20:29:09.936:MRCP/1.0 71 422 COMPLETE
The following error occurs if the recognize request comes out of sequence:
*May 9 20:29:09.936:act_idle_recognize:ignoring old recognize request
Step 3
Use the debug rtsp error, debug rtsp session, and debug rtsp socket commands to verify the RTSP connection with the media server, for example:
The following message displays if the RTSP connection fails:
*Sep 25 15:02:32.052: //-1//RTSP:/rtsplib_connect_to_svr: Socket Connect failed:
172.19.140.31:554
The following message displays if the RTSP client receives an incorrect response from the server:
*Sep 25 15:03:35.062: //-1//RTSP:/rtsp_process_single_svr_resp: Parse Server Response
failed, 172.19.140.31:554
The following message displays if the codec configured on the IP side is not G.711:
*Sep 25 15:05:15.765: //-1//RTSP:/rtsplib_rtp_associate_done: Association mismatch
Specifying MRCP v2 ASR and TTS Media Server Locations
The location of MRCP v2 media servers that are used for speech recognition and synthesis can be specified globally on the gateway, or these attributes can be specified in the individual VoiceXML document by using Cisco properties. These two methods have different results:
•
ivr tts-server and ivr asr-server commands on the gateway—Media server sessions are created for each call to IVR applications, regardless of whether an application needs to talk to the media server.
•
com.cisco.tt-server and com.cisco.asr-server <property> extensions—Media server sessions are created for each call to that application. If only a small number of applications require TTS/ASR media sessions, you should use the <property> extensions within those applications to define the external media server URL in the VoiceXML script.
For information on identifying MRCP v2 ASR or TTS servers through VoiceXML properties, see the Cisco VoiceXML Programmer's Guide.
Note
Specifying the URL of media servers in a VoiceXML document takes precedence over the gateway configuration. Any value that is configured on the gateway is ignored if the same attribute is configured with a VoiceXML property.
SUMMARY STEPS
1.
enable
2.
configure terminal
3.
voice class uri tag sip
4.
pattern uri-pattern
5.
exit
6.
voice class uri tag sip
7.
pattern uri-pattern
8.
exit
9.
dial-peer voice tag voip
10.
description description
11.
session protocol sipv2
12.
destination uri tag
13.
dtmf-relay rtp-nte
14.
codec {codec [bytes payload_size] | transparent}
15.
exit
16.
Repeat steps 9 to 15 for the TTS server
17.
ivr asr-server url
18.
ivr tts-server url
DETAILED STEPS
Step 1
Enable privileged EXEC mode:
Enter your password if prompted.
Step 2
Enter global configuration mode:
Example: Router# configure terminal
Step 3
Create a voice class for matching dial peers to a SIP or telephone (TEL) uniform resource identifier (URI) for the ASR server:
Example: Router(config)# voice class uri ASRserver sip
Step 4
Match a call based on the entire SIP or TEL URI:
Example: Router(config-voice-uri-class)# pattern mrcpv2ASRServer@10.5.18.22
Step 5
Exit voice URI class configuration mode.
Example: Router(config-voice-uri-class)# exit
Step 6
Create a voice class for matching dial peers to a SIP or telephone (TEL) URI for the TTS server:
Example: Router(config)# voice class uri TTSserver sip
Step 7
Match a call based on the entire SIP or TEL URI:
Example: Router(config-voice-uri-class)# pattern mrcpv2TTSServer@10.5.18.22
Step 8
Exit voice URI class configuration mode.
Example: Router(config-voice-uri-class)# exit
Step 9
Define a particular dial peer for the MRCP v2 ASR server termination, specify the method of voice encapsulation, and enter dial-peer configuration mode:
Example: Router(config)# dial-peer voice 2234 voip
Step 10
Add a description to a dial peer:
•
description—Text string up to 64 alphanumeric characters.
Example: Router(config-dial-peer)#
description SIP ASR Media Call
Step 11
Specify a session protocol for calls between local and remote routers using the packet network:
Example: Router(config-dial-peer)#
session protocol sipv2
Step 12
Specify the voice class used to match a dial peer to the destination URI of an outgoing call:
Example: Router(config-dial-peer)#
destination uri myASR
Step 13
Specify how an H.323 or SIP gateway relays dual-tone multifrequency (DTMF) tones between telephony interfaces and an IP network:
•
rtp-nte—Forwards DTMF tones by using Real-Time Transport Protocol (RTP) with the Named Telephone Event (NTE) payload type.
Example: Router(config-dial-peer)#
dtmf-relay rtp-nte
Step 14
Specify the voice codec rate of speech for a dial peer:
codec {codec [bytes payload_size] | transparent}
•
codec—g711ulaw or g711alaw. Only the g711ulaw and g711alaw codecs are supported for ASR and TTS media service.
Example: Router(config-dial-peer)#
codec g711ulaw
Step 15
Exit dial-peer configuration mode.
Example: Router(config-dial-peer)# exit
Step 16
Repeat steps 9 to 15 for the TTS server.
Step 17
Specify the MRCP v2 ASR server location for VoiceXML documents:
•
url—Location of ASR resource on the media server in URL format. For media servers using MRCP v2, specify the URL as follows:
sip:server-name@host-name | ip-address
Example: Router(config)# ivr asr-server sip:mrcpv2ASRServer@10.5.18.22
Step 18
Specify the MRCP v2 TTS server location for VoiceXML documents:
•
url—Location of TTS resource on the media server in URL format. For media servers using MRCP v2, specify the URL as follows:
sip:server-name@host-name | ip-address
Example: Router(config)# ivr tts-server sip:mrcpv2TTSServer@1.5.18.22
Verifying the MRCP v2 Media Server Locations
SUMMARY STEPS
1.
show running-config
2.
show mrcp client session active detailed
3.
show call active media compact
DETAILED STEPS
Step 1
Use the show running-config command to display the media server configuration on your gateway, for example:
voice class uri testASR sip
pattern mrcpv2ASRServer@10.5.18.22
voice class uri testTTS sip
pattern mrcpv2TTSServer@10.5.18.22
ivr asr-server sip:mrcpv2ASRServer@10.5.18.224
ivr tts-server sip:mrcpv2TTSServer@10.5.18.224
dial-peer voice 2234 voip
description SIP ASR Media Call
dial-peer voice 2235 voip
description SIP TTS Media Call
Note
The location of the external speech recognition or speech synthesis server can instead be configured in the VoiceXML document. The configuration in the VoiceXML document takes precedence over the gateway configuration.
Step 2
Make a call to an application using ASR or TTS and use the show mrcp client session active detailed command to verify connectivity between the gateway and the media server, for example:
Router# show mrcp client session active detailed
No Of Active MRCP Sessions: 1
Call-ID: 0x14 same: 0
--------------------------------------------
Resource Type: Synthesizer URL: sip:mrcpv2TTSServer@10.5.18.224
Method In Progress: SPEAK State: S_SYNTH_IDLE
Associated CallID: 0x17
MRCP version: 2.0
Control Protocol: TCP Server IP Address: 10.5.18.224 Port: 51000
Data Protocol: RTP Server IP Address: 10.5.18.224 Port: 10000
Signalling URL: sip:mrcpv2TTSServer@10.5.18.224:5060
Packets Transmitted: 0 (0 bytes)
Packets Received: 177 (28320 bytes)
ReceiveDelay: 100 LostPackets: 0
--------------------------------------------
--------------------------------------------
Resource Type: Recognizer URL: sip:mrcpv2ASRServer@10.5.18.224
Method In Progress: RECOGNITION-START-TIMERS State: S_RECOG_RECOGNIZING
Associated CallID: 0x18
MRCP version: 2.0
Control Protocol: TCP Server IP Address: 10.5.18.224 Port: 51001
Data Protocol: RTP Server IP Address: 10.5.18.224 Port: 10002
Packets Transmitted: 191 (30560 bytes)
Packets Received: 0 (0 bytes)
ReceiveDelay: 100 LostPackets: 0
Note
The external media server has vendor-specific default and configurable parameters that control its functionality. These parameters are server-dependent and could affect the media server's ability to interoperate with the Cisco gateway. See your server manufacturer's documentation for details.
Step 3
Use the show call active media compact command to display call information for media calls in progress.
Router# show call active media comp
<callID> A/O FAX T<sec> Codec type Peer Address IP R<ip>:<udp>
4 ORG T3 g711ulaw VOIP-MEDIA Psip:MRCPv2Server@1.5.18.224:5060 1.5.18.224:10000
5 ORG T3 g711ulaw VOIP-MEDIA Psip:MRCPv2Server@1.5.18.224:5060 1.5.18.224:10002
Troubleshooting MRCP v2 ASR and TTS Server Functionality
SUMMARY STEPS
1.
debug voip application vxml
2.
debug mrcp error
3.
debug voip application callsetup
4.
show call active media
5.
show call history media
DETAILED STEPS
Step 1
Use the debug voip application vxml error, debug voip application vxml event and debug voip application vxml application commands to verify that the external MRCP v2 media server is reachable and its location is configured on the gateway or in the VoiceXML document. In the following example, the application failed because the media server is not configured on the gateway or in the VoiceXML document.:
Router# debug voip application vxml error
Router# debug voip application vxml event
Router# debug voip application vxml application
Jul 12 12:37:42.067: //-1//AFW_:/AFW_VxmlModule_New:
Jul 12 12:37:42.091: //9//AFW_:/vapp_get_type_detail:
Jul 12 12:37:42.091: //9//AFW_:/vapp_get_incoming_gtd_list:
Jul 12 12:37:42.095: //9//AFW_:/vapp_tts:
Jul 12 12:37:42.095: //9//AFW_:/vapp_tts: bargein=1
Jul 12 12:37:42.095: //9//AFW_:/vapp_tts: timeout=0
Jul 12 12:37:42.095: //9/0B92138D8004/VXML:/vxml_vapp_tts:
CALL_ERROR; tftp://dirt/dileung/jeff-grammar.vxml
at line 20: fail with vapp error 2
Jul 12 12:37:42.099: //9//AFW_:/vapp_terminate:
Jul 12 12:37:42.099: //9//AFW_:/vapp_session_exit_event_name: Exit Event
Jul 12 12:37:42.099: //9//AFW_:/AFW_M_VxmlModule_Terminate:
Jul 12 12:37:42.099: //9//AFW_:/vapp_checksessionstate:
Jul 12 12:37:42.099: //9//AFW_:/vapp_checkifdone: Object: 1, Leg: 1
Jul 12 12:37:42.099: //9//AFW_:/vapp_checksessionstate:
Jul 12 12:37:42.099: //9//AFW_:/vapp_checkifdone: Object: 0, Leg: 0
Jul 12 12:37:42.227: //-1//AFW_:HN000F5B84:/AFW_M_VxmlModule_Free:
Jul 12 12:37:42.227: MOD[VxmlModule_63CD2B68_0_1006468] ( )
Step 2
Use the debug mrcp error command to display debugging messages for MRCP v1 and v2 operations. In the following example, the server message request timer expired:
*May 26 06:00:13.066: //31//MRCP:/mrcpv2_process_timers:
ERROR: MRCPv2 Timer Expired; TimerType:[MRCPV2_SVR_MSG_MGD_TIMER(21)]
FSM: Type=[RECOGNIZER(2),FSM_TYPE_REMOTE_SERVER(3)]
(debug mrcp error : Fail to establish TCP connection with server)
Jul 6 14:53:38.199: //30//MRCP:/mrcpv2_handle_socket_read:
Socket Connection Error; Socket=0,errno=-1
(debug mrcp error : Fail to send control message to server)
Jul 6 14:53:38.223: //30//MRCP:/mrcpv2_partial_socket_send:
Socket Send Failed; fd=1:1.5.18.224:51001, errno=-1
Step 3
Use the debug voip application callsetup command to display all application debug messages. In the following example, there is no match on the VoIP SIP dial peer for the MRCP v2 server:
Router# debug voip application callsetup
Jul 12 14:47:38.019: //48//Call:/AFW_CallSetup_AddDest: sip:mrcpv2TTSServer@1.5.18.224
Jul 12 14:47:38.019: //48//Call:/AFW_M_CallSetup_Initiate:
Jul 12 14:47:38.019: //48//Call:/CallSetupInitiate:
Jul 12 14:47:38.019: //48//Call:/CS_Placecall:
Jul 12 14:47:38.019: //-1//Dest:/AFW_Destination_New:
Jul 12 14:47:38.019: //48//Dest:/AFW_Destination_AddDest:
Jul 12 14:47:38.019: //-1//Dest:/AFW_Destination_AddDest: adding destination
"sip:mrcpv2TTSServer@1.5.18.224"
Jul 12 14:47:38.019: //48//Dest:/AFW_M_Destination_Initiate:
Jul 12 14:47:38.019: //48//Dest:/AFW_M_Destination_Initiate: Outgoing guid :
324C5D9B.10EC11DB.8011000B.5FDA0EF4
Jul 12 14:47:38.019: Incoming_guid : 00000000.00000000.00000000.00000000
Jul 12 14:47:38.019: //48//Dest:/DestSetupInitiate:
Jul 12 14:47:38.019: //48//Dest:/DestMatchDialPeer:
Jul 12 14:47:38.019: //48//Dest:/DestMatchDialPeer: src carrier id:test5, tgt carrier id:
Jul 12 14:47:38.019: //48//Dest:/DestSetupInitiate: Did not match any peers
Jul 12 14:47:38.019: //48//Dest:/DestResetCallInfo:
Jul 12 14:47:38.019: //48//Dest:/DestComplete: peer #:0 IW State IW_STATE_INIT, OB State
OB_STATE_INIT
Jul 12 14:47:38.019: //-1//Dest:/DestStatusFromDiscCause: mapped "unassigned number
(1)"(1) to DEST_INVALID_NUMBER(4)
Jul 12 14:47:38.019: //48//Dest:/DestReturn: Destination Returning(ds_004 Status
DEST_INVALID_NUMBER)
Jul 12 14:47:38.019: //48//Call:/CS_Placecall: Call placed to
sip:mrcpv2TTSServer@1.5.18.224
Jul 12 14:47:38.023: //48//Dest:/AFW_M_Destination_EventPreProcess:
Jul 12 14:47:38.023: //48//Call:/AFW_M_CallSetup_Action:
Jul 12 14:47:38.023: //48//Call:/CS_Placecall_DestDone:
Jul 12 14:47:38.023: //48//Call:/CS_Complete: CallSetup Returning(ls_004 Status
CS_INVALID_NUMBER)
Step 4
Use the show call active media command to display call information for media calls in progress. The following example displays the SIP media call leg that is used to establish the SIP session between the Cisco gateway, which is the client, and the MRCP v2 server:
Router# show call active media brief
<ID>: <CallID> <start>hs.<index> +<connect> pid:<peer_id> <dir> <addr> <state>
dur hh:mm:ss tx:<packets>/<bytes> rx:<packets>/<bytes>
IP <ip>:<udp> rtt:<time>ms pl:<play>/<gap>ms lost:<lost>/<early>/<late>
delay:<last>/<min>/<max>ms <codec>
media inactive detected:<y/n> media cntrl rcvd:<y/n> timestamp:<time>
long duration call detected:<y/n> long duration call duration :<sec> timestamp:<time>
MODEMPASS <method> buf:<fills>/<drains> loss <overall%> <multipkt>/<corrected>
last <buf event time>s dur:<Min>/<Max>s
FR <protocol> [int dlci cid] vad:<y/n> dtmf:<y/n> seq:<y/n>
ATM <protocol> [int vpi/vci cid] vad:<y/n> dtmf:<y/n> seq:<y/n>
Tele <int> (callID) [channel_id] tx:<tot>/<v>/<fax>ms <codec> noise:<l> acom:<l>
i/o:<l>/<l> dBm
MODEMRELAY info:<rcvd>/<sent>/<resent> xid:<rcvd>/<sent> total:<rcvd>/<sent>/<drops>
speeds(bps): local <rx>/<tx> remote <rx>/<tx>
Proxy <ip>:<audio udp>,<video udp>,<tcp0>,<tcp1>,<tcp2>,<tcp3> endpt: <type>/<manf>
bw: <req>/<act> codec: <audio>/<video>
tx: <audio pkts>/<audio bytes>,<video pkts>/<video bytes>,<t120 pkts>/<t120 bytes>
rx: <audio pkts>/<audio bytes>,<video pkts>/<video bytes>,<t120 pkts>/<t120 bytes>
Call agent controlled call-legs: 0
11EE : 57 10092920ms.1 +140 pid:2235 Originate sip:mrcpv2TTSServer@1.5.18.224:5060 active
dur 00:00:06 tx:0/0 rx:316/50560
IP 1.5.18.224:10000 SRTP: off rtt:0ms pl:2000/3520ms lost:0/0/0 delay:100/95/100ms
g711ulaw TextRelay: off
media inactive detected:n media contrl rcvd:n/a timestamp:n/a
long duration call detected:n long duration call duration:n/a timestamp:n/a
11EE : 58 10092940ms.1 +160 pid:2234 Originate sip:mrcpv2ASRServer@1.5.18.224:5060 active
dur 00:00:06 tx:328/52480 rx:0/0
IP 1.5.18.224:10002 SRTP: off rtt:0ms pl:2000/3380ms lost:0/0/0 delay:100/95/100ms
g711ulaw TextRelay: off
media inactive detected:n media contrl rcvd:n/a timestamp:n/a
long duration call detected:n long duration call duration:n/a timestamp:n/a
Call agent controlled call-legs: 0
Step 5
Use the show call history media command to display the call history table for media calls. The following example displays the SIP media call leg that is used to establish the SIP session between the Cisco gateway, which is the client, and the MRCP v2 server:
Router# show call history media brief
<ID>: <CallID> <start>hs.<index> +<connect> +<disc> pid:<peer_id> <direction> <addr>
dur hh:mm:ss tx:<packets>/<bytes> rx:<packets>/<bytes> <disc-cause>(<text>)
IP <ip>:<udp> rtt:<time>ms pl:<play>/<gap>ms lost:<lost>/<early>/<late>
delay:<last>/<min>/<max>ms <codec>
media inactive detected:<y/n> media cntrl rcvd:<y/n> timestamp:<time>
long duration call detected:<y/n> long duration call duration :<sec> timestamp:<time>
MODEMPASS <method> buf:<fills>/<drains> loss <overall%> <multipkt>/<corrected>
last <buf event time>s dur:<Min>/<Max>s
FR <protocol> [int dlci cid] vad:<y/n> dtmf:<y/n> seq:<y/n>
ATM <protocol> [int vpi/vci cid] vad:<y/n> dtmf:<y/n> seq:<y/n>
Telephony <int> (callID) [channel_id] tx:<tot>/<voice>/<fax>ms <codec> noise:<lvl>dBm
acom:<lvl>dBm
MODEMRELAY info:<rcvd>/<sent>/<resent> xid:<rcvd>/<sent> total:<rcvd>/<sent>/<drops>
disc:<cause code>
speeds(bps): local <rx>/<tx> remote <rx>/<tx>
Proxy <ip>:<audio udp>,<video udp>,<tcp0>,<tcp1>,<tcp2>,<tcp3> endpt: <type>/<manf>
bw: <req>/<act> codec: <audio>/<video>
tx: <audio pkts>/<audio bytes>,<video pkts>/<video bytes>,<t120 pkts>/<t120 bytes>
rx: <audio pkts>/<audio bytes>,<video pkts>/<video bytes>,<t120 pkts>/<t120 bytes>
Call agent controlled call-legs: 0
11EE : 57 10092920ms.21 +140 +58380 pid:2235 Originate sip:mrcpv2TTSServer@1.5.18.224:5060
dur 00:00:58 tx:0/0 rx:2918/466880 10 (normal call clearing (16))
IP 1.5.18.224:10000 SRTP: off rtt:0ms pl:19000/50540ms lost:0/0/0 delay:100/35/100ms
g711ulaw TextRelay: off
media inactive detected:n media contrl rcvd:n/a timestamp:n/a
long duration call detected:n long dur callduration :n/a timestamp:n/a
11EE : 58 10092940ms.22 +160 +58360 pid:2234 Originate sip:mrcpv2ASRServer@1.5.18.224:5060
dur 00:00:58 tx:2862/457920 rx:0/0 10 (normal call clearing (16))
IP 1.5.18.224:10002 SRTP: off rtt:0ms pl:19000/49720ms lost:0/0/0 delay:100/35/100ms
g711ulaw TextRelay: off
media inactive detected:n media contrl rcvd:n/a timestamp:n/a
long duration call detected:n long dur callduration :n/a timestamp:n/a
Setting MRCP Client History Limits
Media Resource Control Protocol (MRCP) is used for controlling media resources such as speech synthesizers for TTS and speech recognizers for ASR. The Cisco voice gateway can store records of previous MRCP sessions that are no longer active. The maximum number of history records and the length of time that the records are stored can also be configured on the gateway.
SUMMARY STEPS
1.
enable
2.
configure terminal
3.
mrcp client history records number
4.
mrcp client history duration seconds
DETAILED STEPS
Step 1
Enable privileged EXEC mode:
Enter your password if prompted.
Step 2
Enter global configuration mode:
Example: Router# configure terminal
Step 3
Set the maximum number of records for inactive MRCP sessions that the gateway can store:
mrcp client history records number
•
number—Maximum number of MRCP history records to save. If 0 is configured, no MRCP records are stored on the gateway. The maximum value is platform-specific. The default value is 50.
Example: Router(config)# mrcp client history records 100
Step 4
Set the maximum number of seconds that the history records of MRCP sessions are stored on the gateway:
mrcp client history duration seconds
•
seconds—Maximum number of seconds that MRCP history records are stored. If 0 is configured, no MRCP records are stored on the gateway. Range is from 0 to 99,999,999. The default value is 3600.
Example: Router(config)# mrcp client history duration 7200
Note
The default values for the mrcp client history records and mrcp client history duration commands are not platform-specific.
Configuration Examples for ASR and TTS
This section provides gateway configuration examples of VoiceXML applications using ASR and TTS.
•
ASR and TTS: Example
•
MRCP v2 ASR and TTS: Example
ASR and TTS: Example
The following is an example configuration for MRCP v1 ASR and TTS.
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
enable secret 5 $1$aBC123
ip host tftp-server1 10.1.2.2
isdn switch-type primary-ni
no voice hpi capture buffer
no voice hpi capture destination
ivr asr-server rtsp://10.1.2.52/recognizer
ivr tts-server rtsp://10.1.2.52/synthesizer
fax interface-type fax-mail
mta receive maximum-recipients 0
interface FastEthernet0/0
ip address 10.1.2.228 255.255.0.0
interface FastEthernet0/1
no logging event link-status
isdn switch-type primary-ni
isdn incoming-voice voice
dialer-list 1 protocol ip permit
dialer-list 1 protocol ipx permit
service rdnis tftp://10.1.2.2/demo/sample/test27535.vxml
service event tftp://10.1.2.2/demo/sample/test51565-2-1.0.vxml
service myapp tftp://10.1.2.2/demo/scr/func/A_1.vxml
incoming called-number 50202
MRCP v2 ASR and TTS: Example
The following is an example configuration for MRCP v2 ASR and TTS.
! Last configuration change at 16:24:12 UTC Sat Jun 28 2006
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
logging buffered 10000000 debugging
no network-clock-participate wic 0
network-clock-participate wic 2
network-clock-participate wic 3
ip host dirt 223.255.254.253
voice class uri testasr sip
pattern MRCPv2ASRServer@10.5.24.1
voice class uri testtts sip
pattern MRCPv2TTSServer@10.5.24.1
ivr asr-server sip:MRCPv2ASRServer@10.5.24.100
ivr tts-server sip:MRCPv2TTSServer@10.5.24.100
service myservice tftp://dir1/dir2/myservice.vxml
isdn switch-type primary-5ess
isdn incoming-voice voice
interface GigabitEthernet0/0
ip address 10.5.14.6 255.255.0.0
interface GigabitEthernet0/1
ip address 172.16.156.23 255.255.0.0
no logging event link-status
isdn switch-type primary-net5
isdn protocol-emulate network
isdn integrate calltype all
dial-peer voice 2323 voip
dial-peer voice 2324 voip
dial-peer voice 3838 pots
incoming called-number 3838
dial-peer voice 38381 voip
session target ipv4:10.5.14.13
Where to Go Next
•
To configure properties for audio files, see "Configuring Audio File Properties for Tcl IVR and VoiceXML Applications".
•
To record voice messages using a VoiceXML application, see "Configuring VoiceXML Voice Store and Forward".
•
To configure a VoiceXML fax detection application, see "Configuring Fax Detection for VoiceXML".
•
To configure telephony call-redirect features for voice applications, see "Configuring Telephony Call-Redirect Features".
•
To configure session interaction for a Tcl IVR 2.0 application, see "Configuring Tcl IVR 2.0 Session Interaction".
•
To configure support for SIP and TEL URLs, see "Configuring SIP and TEL URL Support" on page 245.
•
To monitor and troubleshoot voice applications, see "Monitoring and Troubleshooting Voice Applications".
Additional References
•
""—Describes how to access Cisco Feature Navigator; also lists and describes, by Cisco IOS release, Tcl IVR and VoiceXML features for that release.
•
"Overview of Cisco IOS Tcl IVR and VoiceXML Applications"—Describes underlying Cisco IOS Tcl IVR and VoiceXML technology; also lists related documents, standards, MIBs, RFCs, and how to obtain technical assistance.