Requesting speech processing resources

Speech applications can request specific resource capabilities. For example, a request for a particular, large grammar that is already loaded. For information on how the VoiceXML application requests resources, see Speech processing with VoiceXML.

In response to application requests, the MRCP client requests specific resources using any of the following techniques:

Session configuration (session.xml)

Applications use a session.xml file to configure Nuance speech products at the start of each session. For an overview, see Nuance-specific capabilities. For a description of session.xml format and parameters, see Configuring application sessions.

By default, each Speech Server host has access to a single session.xml file shared by all applications using that Speech Server. This is satisfactory when the host runs instances of a single application, but less satisfactory when running multiple applications (because it prevents tuning or customization of individual sessions).

Alternatively, the MRCP client can provide a session.xml at the start of each session. This enables each application to have a different session.xml configuration, but requires implementation in the client. Nuance strongly recommends this implementation. The mechanism works as follows:

  • The voice platform defines how the application creates a session.xml. Normally, the application developer creates the file and stores it in a location defined by the voice platform. More sophisticated techniques are also possible. For example, the platform could generate a session.xml from configuration details stored in a database.
  • The voice platform passes the application’s session.xml at the start of each session when it sends the SIP INVITE message. The configuration settings override any default session.xml on the host, and become default values for the duration of the session.

Accept-Contact header

The SIP Accept-Contact header specifies capabilities that the application needs from a speech-processing resource. If those capabilities are not available, the system responds to the INVITE with an error.

In the following example, the client uses the Accept-Contact and Reject-Contact headers in an INVITE request to query the capabilities of the MRCPv2 server. The example is contrived, but illustrates the matching process. For detailed information on the Accept-Contact header, see Caller Preferences for the Session Initiation Protocol (SIP), RFC 3841.

OPTIONS request

Use an OPTIONS request to use SDP (Session Description Protocol) to describe the resources supported by the server. Such an SDP-encoded description, which uses the SDP resource attribute, would overlap with a similar statement encoded as feature parameters of the Contact header.

Resource support can be indicated by both SDP resource attributes and by the feature tags defined in the SDP specification. When a feature tag describes a capability that can also be represented with an SDP resource attribute, an MRCPv2 server must use the resource attribute to describe the capability. Resource capabilities that do not overlap with resource attributes are specified as parameters of the Contact header field of the OPTIONS response.