Rules of parameter precedence
Regardless of how a parameter is set, its value is resolved when recognition starts using the following order of precedence:
- Runtime parameters are set during an individual session. They have the highest precedence and cannot be overridden. These parameters can change from one recognition event to the next. Values are valid for a single recognition event, after which they revert to the value set via a lower-order mechanism in the precedence stack.
There are various ways to set a runtime parameter:
- Voice applications can set parameters on a per-recognition basis. The settings are passed through other layers until reaching the affected component. A VoiceXML application can set properties on VoiceXML pages. These are handled by a browser and passed to Nuance Speech Server and Nuance Recognizer. See Parameters set in VoiceXML applications. An MRCP client can send any runtime parameter to Speech Server and Recognizer.
When an application uses Nuance Dialog Modules, it configures the modules through runtime settings. Although Dialog Modules use properties files for configuration, the system passes the properties as runtime parameters.
- Similarly, any browser settings are essentially runtime parameters. In addition to setting parameters on behalf of voice applications, the voice browser can configure components for its own reasons.
- Voice applications can set parameters on a per-recognition basis. The settings are passed through other layers until reaching the affected component. A VoiceXML application can set properties on VoiceXML pages. These are handled by a browser and passed to Nuance Speech Server and Nuance Recognizer. See Parameters set in VoiceXML applications. An MRCP client can send any runtime parameter to Speech Server and Recognizer.
- A parameter grammar file can set parameters that affect the recognition context. The settings remain in effect as long as the parameter grammar is activated. The settings have high precedence and can only be overridden by a temporary runtime setting (see above) or by the activation of another parameter grammar with higher precedence. See Parameters set in parameter grammar files.
- A speech grammar file can contain the <meta> tag to define recognition parameters for itself and its children grammars. The system automatically passes settings to Recognizer when you activate grammars for recognition. The values override settings in any configuration files. See Parameters set in grammar files.
When grammars contain the <meta> tag, there are additional layers of precedence to consider: grammars can be imported into other grammars, and grammars can be activated in parallel. See Precedence of parameters set via <meta> tags for more discussion.
When more than one grammar is active at the same time, and the grammars set the same configuration parameter, there is a precedence relationship. See Parameter precedence in parallel grammars.
- The Nuance Management Station centralizes the administration of large systems. You can use it to set certain parameters on a Nuance recognition service instance, and the system uses those values as defaults for all recognitions performed by that instance. (Management Station deploys values via Recognizer configuration files (User-nrsxx.xml) that replace any other Recognizer configuration files on your systems. If you use the Management Station, you must not create independent User-nrsxx.xml files.)
- A session configuration file (session.xml) defines defaults for the entire session. See Parameters set in session.xml.
- The Nuance Speech Server sets parameters during initialization, or in the Management Station. Some of these parameters affect Recognizer.
- A Recognizer configuration file (typically named User-nrsxx.xml) sets defaults on a single recognition server. It overrides the Recognizer’s default configuration. You specify the filename when starting the service. Management Station users do not use these files .
- The baseline configuration is the default settings installed with Recognizer.
- Parameters set in SpeechWorks.cfg are static and are seldom changed after the initial installation. You can override any parameters in SpeechWorks.cfg by setting the parameter as an environment variable. See Parameters set as environment variables and in SpeechWorks.cfg. This configuration file contains the following types of parameters:
- Parameters requiring initialization before the baseline or Recognizer configuration files become available during application startup.
- TRC diagnostic log parameters for Recognizer.
- In the absence of a needed configuration parameter, Recognizer either provides a hard-coded value or generates an error.

When you set a parameter with the <meta> tag in a grammar, the value that Recognizer uses depends on the answers to these questions:
- Is the parameter being overridden by a parameter grammar or a runtime setting by Nuance Speech Server? Speech Server and parameter grammars take precedence over <meta> tags in a grammar.
- Is the grammar imported? A parent grammar never inherits parameter values from its imported sub-grammars.
- Is the parameter a compilation-time or recognition-time parameter?
For compilation-time parameters, the value applies locally to the grammar even if the grammar is imported elsewhere. The value is not inherited by any parent, child, or parallel grammar.
For recognition-time parameters, a parent grammar can use <meta> to set a value, but the tag is always ignored when set in imported grammars. (If the parent does not set a given recognition-time parameter, the Recognizer configuration file or the Recognizer default is used.)
- At recognition time, do parallel grammars set the same parameter to different values? When there is more than one active grammar, and recognition-time parameters are set differently, the Recognizer determines a global value (within the process) for each parameter. See Parameter precedence in parallel grammars for details on how the determination is made.

When more than one grammar is activated at the same time (i.e. in parallel), it is possible that the grammars set any given parameter to different values. When the given parameter is a recognition-time parameter, Recognizer determines the value on a parameter-by-parameter basis as shown in the table below. The table uses the following abbreviations:
- Allow differences: Recognizer applies the setting independently to each active grammar. The settings are allowed to be different.
- Minimum value: Recognizer uses the minimum setting among the defined values in the parallel grammars. For parameters that take Boolean values, a 0 is used.
- Maximum value: Recognizer uses the maximum setting among the defined values in the parallel grammars. For parameters that take Boolean values, a 1 is used.
- Maximum words: Recognizer applies one value for all the parallel grammars using the value defined in the grammar that contains the most number of words.
Parameter |
Parallel grammar behavior |
---|---|
Allow differences |
|
Maximum value |
|
Maximum value |
|
Maximum words |
|
Allow differences |
|
Maximum words |
|
Allow differences |
|
Maximum words |
|
Allow differences |
|
Allow differences |
|
Allow differences |
|
Allow differences |
|
Allow differences |
|
Maximum value |
|
Allow differences |
|
Maximum value |
|
Allow differences |
|
Maximum value |
|
Maximum value |
|
Allow differences |
|
Allow differences |
|
Maximum value |
|
Maximum value |
|
Allow differences |
|
Allow differences |
|
Allow differences |
|
Allow differences |