Check Phrase Command-Line Syntax

Microsoft Speech Platform SDK 11

Collapse image Expand Image Copy image CopyHover image

The command-line syntax for CheckPhrase.exe has the following format.

CheckPhrase /In <input file name> /Phrase <input phrase> /RecoConfig <configuration file name> /Rule <rule ID> /Out <output file name>

The following table describes the command-line option names and values for Check Phrase.

Option Name

Description

/In

Required. The file name and extension of a grammar file. The tool accepts the following file formats: .grxml (grammar XML) and .cfg (compiled grammar). For example "MyGrammar.grxml", or "MyCompiledGrammar.cfg". Input files in other formats will generate an error.

/Phrase

Required. The phrase for which you want to determine whether it exists in the grammar and to receive emulated recognition results. Phrases containing multiple, space-delimited words must be enclosed in parentheses. For example: /Phrase "this phrase".

/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 CheckPhrase.exe. The tool will generate an error if you do not supply it with a configuration file.

/Rule

Optional. The ID of the rule from which analysis should begin. You can use this option for grammars that contain a set of unrelated rules, such as a grammar library. If no rule is specified, the root rule of the grammar is used.

/Out

Optional. The name of the file to which the results will be written. The output file provides more detailed results about grammar parsing than those that are written to the console, including pronunciation of the input phrase that is used in emulation. The output file is in XML format and uses elements optimized to describe utterances. If no file is specified, the tool writes an abbreviated version of the output to the console.

/?

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

NoteNote
  • 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.

Caution noteCaution

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.

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 CheckPhrase.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.