Share via


Note

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

Check Phrase Error Messages and Format

Check Phrase displays messages for errors, warnings, and other information in the console, as well as execution summaries. The tool halts execution and displays an error message when it encounters an error that prevents successful completion of a command. The tool returns EXIT_FAILURE (1) when it encounters an error and returns EXIT_SUCCESS (0) when it completes a command successfully. Whether or not a command completes successfully, the tool displays an execution summary after attempting to process a command.

Messages will have the following format:

<Input file name>(Line number): <Message type> <Error code>: <Error description>

Check Phrase will throw an error if it encounters any of the following conditions:

  • The grammar file specified by the /In option cannot be found, or cannot be opened.

  • The grammar file specified by the /In option is not properly formed and cannot be compiled.

  • The grammar file specified by the /In option includes the name of a rule, for example: /In MyGrammar#MyRule.

  • The phrase specified in the /Phrase option contains a syntax error, for example multiple words that are not enclosed in parentheses.

  • The file specified by the /RecoConfig option cannot be found, or cannot be opened.

  • There is no file specified by the /RecoConfig option and there is no file named "RecoConfig.xml" in the current directory.

  • The rule specified by the /Rule option cannot be found, or cannot be loaded, or contains invalid logic.

  • The /Out option is not specified with a filename.

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" in the current directory (the directory for the command line), or in the directory that contains CheckPhrase.exe. The tool will generate an error if you do not supply it with a configuration file.

Check Phrase converts the input grammar file and any external grammar files it references to CFG format before performing analysis. Consequently, you may also see errors that are generated by this conversion. For a list of errors and warnings that may display as a result of converting grammar files to CFG format, see Grammar Validator Error Messages and Format.