Share via


Note

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

Grammar Validator Command-Line Syntax

The command-line syntax for Grammar Validator has the following format.

GrammarValidator /In <name of the file to validate> /RecoConfig <configuration file name>

The following table describes the command-line option names and values for Grammar Validator.

Option name

Description

/In

Required. The name of the grammar file to be validated.

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

/?

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

Note

  • Command-line options 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.

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

Example

The following example shows a typical entry at the command prompt for GrammarValidator.exe, when there is a default configuration file named "RecoConfig.xml" in the current directory or in the directory that contains the executable for the tool.

GrammarValidator -In C:\Grammars\MyGrammar.grxml

The following is an example command-line entry that specifies a configuration file that is not the default file in the current directory or in the directory that contains GrammarValidator.exe:

GrammarValidator -In C:\Grammars\MyGrammar.grxml -RecoConfig C:\Grammars\SpecialRecoConfig.xml