swirec_secondpass_model_name

Specifies the acoustic models for secondpass processing in Recognizer.

Value

URI. One or more paths to acoustic model files.

DEFAULT: (default models used)

How to set

Shown in precedence order (see Rules of parameter precedence):

In a grammar using a <meta> tag (see the text on recognition-time parameters in Parameters set in grammar files).

In the application's session xml in the <speechrecog> section of <resourcehints>.

In Management Station set on the Nuance recognition service. If not using Management Station, set in a Recognizer configuration file (User-nrsxx.xml).

Usage

Useful when Nuance Professional Services provides custom models.

When you have models for specific grammar contexts, set this parameter via a <meta> inside those grammars.

Performance

Loading models across the network is likely to cause delays. To avoid delays, preload the files (when set on the Nuance recognition service via the Management Station), or load the files at session start (using a session.xml), but do not load during a session (using a <meta>).

Once loaded, the models remain in memory. Adding too many models will degrade performance.

Always use these parameters together, and provide the same number of files for each:

The order of the files in the parameter values is important: the first model file corresponds to the first allophone file and the first fsm. For example, here is secondpass configuration for US English in a session.xml file:

<sessionparameters>
  …
  <speechrecog name="NR10">
    …
    <param name="swirec_secondpass_model_name" xml:lang="en-US">
        <value>acousticmodels/enus/myappsecondpass1.hmm</value>
        <value>acousticmodels/enus/myappsecondpass2.hmm</value>
    </param>
    <param name="swirec_secondpass_allophone_mapfile_name" 
               xml:lang="en-US">
        <value>acousticmodels/enus/myappsecondpass1.a2l</value>
        <value>acousticmodels/enus/myappsecondpass2.a2l</value>
    </param>
    <param name="swirec_secondpass_global_fsm_name" xml:lang="en-US">
        <value>acousticmodels/enus/myappsecondpass1.fsm</value>
        <value>acousticmodels/enus/myappsecondpass2.fsm</value>
    </param>
  </speechrecog>
  …
</sessionparameters>

A model is related to a specific language and set of audio media types. Recognizer uses the current language and audio environment to select the correct model.

The order of the filenames is important: the first file acoustic model hmm file corresponds to the first allophone file and the first fsm.

Relative paths in a Recognizer configuration file are relative to the location of the User-nrsxx.xml file itself. To change the relative location, set xml:base in the root token (SWIrecConfig) of the configuration file. For example:

<SWIrecConfig lang="en-us" xml:base="${SWISRSDK}/config">

This example sets the parameters in a grammar:

<meta name="swirec_secondpass_model_name" content="
         http://myserver/mydir/mymodels1.hmm
         http://myserver/mydir/mymodels2.hmm"/>
<meta name="swirec_secondpass_fsm_name" content="
         http://myserver/mydir/mymodels1.fsm
         http://myserver/mydir/mymodels2.fsm"/>
 <meta name="swirec_secondpass_allophone_mapfile_name" content="
         http://myserver/mydir/mymodels1.a2l
         http://myserver/mydir/mymodels2.a2l"/>

For multiple-language grammars, add the lang attribute to specify the models’ language. For example:

<meta name="swirec_secondpass_model_name" content="
         http://myserver/mydir/mymodels1.hmm
         http://myserver/mydir/mymodels2.hmm" 
         nuan:lang="fr-ca" />
...

Each language in a multiple-language grammar must have the same number of secondpass models (except when turning off secondpass processing, which requires only a single declaration with no lang attribute).

Nuance Professional Services might request that secondpass processing be disabled. For example, if custom models require too much CPU or memory. To turn off secondpass processing, specify empty values:

<meta name="swirec_secondpass_model_name" content=""/>
<meta name="swirec_secondpass_global_fsm_name" content="" />
<meta name="swirec_secondpass_allophone_mapfile_name" content=""/>

Related parameter