Partager via


Note

Please see Azure Cognitive Services for Speech documentation for the latest supported speech solutions.

Simulator Command-Line Syntax

The command-line syntax for Simulator has the following format.

Simulator.exe /In <input file name> /Out <output file name> /MaxActiveRecognitions <integer value> /RecoConfig <config file name> /Filter <filter file name> /IncludeInitialEngineState <boolean>

The following table describes the option names and values for Simulator.

Option Name

Description

/In

Required. A string that contains the name of the input EMMA document. See Simulator Input and Output File Contents.

/Out

Optional. A string that contains the name (and path, as required) of the output EMMA document. Simulator logs a critical error and exits if the output file name and input file name refer to the same file.

If no output file is specified, a file with the name <inputfilename>.out.xml is created, and output is sent to it.

/MaxActiveRecognitions

Optional. An integer that specifies the maximum number of connections that the recognition engine should make at any given time. If not specified, the default value is 10. The value must be greater than zero and not larger than 2147483647.

/RecoConfig

Optional. The name of the configuration file to use for the speech recognition engine. If not specified, the tool will look for a default configuration file named “RecoConfig.xml” in the current working directory and in the directory that contains Simulator.exe. The tool will generate an error if you do not supply it with a configuration file.

/Filter

Optional. A string that contains the name of the configuration file to use for filtering. If no file is specified, all recognitions are run and all transcripts are processed for semantics.

The file contains a Filter element, which contains an IsTranscript element whose value can be either true or false. A value of true indicates that only transcripts are to be processed. A value of false indicates that only speech recognitions are to be performed. See an example of a filter configuration file after this table.

/IncludeInitialEngineState

Optional. Removes the serialized state information from the output file that Simulator generates, significantly reducing the size of the output file. Accepted values are true and false. The default value is true.

/?

Optional. Displays a list of acceptable option/value pairs.

The following XML code is an example of a filter configuration file.

<?xml version="1.0" encoding="utf-8"?>
<Filter>
  <IsTranscript>true</IsTranscript>
</Filter> 

Note

  • Command-line options and values are not case-sensitive.

  • Command-line options can be preceded by a forward slash (0x002F), a dash (0x002d), an en dash (0x2013), an em dash (0x2014), or a horizontal bar (0x2015).

  • You can enter option/value pairs in any sequence.

Warning

If an existing file has the same name as the file name specified by the /Out option, it will be overwritten. The tool does not warn that a file will be overwritten.

Remarks

You must either specify a recognition engine configuration file using the /RecoConfig option, or create a default configuration file named "RecoConfig.xml" either in the current directory (the directory for the command line) or in the directory that contains Simulator.exe. Use the configuration file to specify a speech recognition engine to use, to configure the parameters for connecting to it, and to configure its behavior. For more information, see Setting Up the Grammar Development Tools.

To properly assess the confidence threshold setting for your application via the output of Simulator Results Analyzer, set confidencelevel="0" in your RecoConfig file. This will ensure that all recognitions are returned, regardless of confidence score.

Note

Simulator may generate the following error if it cannot locate one or more of the grammars listed in the EMMA input document specified by the /In option:

Error Name

Hexadecimal

Decimal

Description

SPERR_NOT_FOUND

0x8004503a

-2147200966

The requested data item (data key, value, etc.) was not found.

Example Usage

The following demonstrates the syntax for using Simulator.

Simulator.exe -In InputFile.xml -Out OutputFile.xml -MaxActiveRecognitions 15 -RecoConfig MyRecoConfigFile.xml –IncludeInitialEngineState false