Share via


How to: Validate a .grxml Grammar File

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

Use the Speech Grammar Editor validation tools to ensure that Speech Server .grxml grammar files are valid.

The Recognition string check feature of Speech Grammar Editor can fail with a cryptic error unless you either:

  • Remove the lexicon element from the .grxml file, which is added by default when a new .grxml file is created.
  • Open the project's .cal file and click Build to build the .lex file. The lexicon element in the .grxml file references a .lex file that does not exist until the .cal file is built.

The cryptic error message previously mentioned is as follows:

SML output failure: Speech Recognizer is having problems with this grammar. Make sure that all external Grammars exist and are valid, and any external Rules being referenced have their Scope property set to "Public".

Validating Grammar Files and Sentences

To validate a .grxml file

  1. In Speech Grammar Editor, open an existing grammar file or create a new one.

  2. On the Speech Grammar Editor toolbar, click Validate Grammar.

  3. In the Output pane, review validation results.

To validate a sentence in a .grxml grammar

  1. Open an existing grammar file or create a new one.

  2. In the design pane, open a rule.

  3. In the Recognition String box, type a word or phrase that should be recognized by the rule, and then click Check.

  4. In the Output pane, review validation results.

See Also

Other Resources

Use Speech Grammar Editor to Create Grammars
Develop Grammars with Speech Grammar Tools