Share via


Create Speech Server Grammars with Conversational Grammar Builder

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 Conversational Grammar Builder to develop speech recognition grammars in Speech Server. Conversational Grammar Builder is most appropriate for developing grammars where the user's answers are single keywords. Conversational Grammar Builder can also be used to develop grammars that use natural language understanding, or Conversational Grammar grammars.

The Conversational Grammar Builder interface is divided into four panes:

  • Use the Keywords pane in the upper left to enter semantic keywords.
  • Use the Keyword Phrase pane in the upper right to enter words to recognize for the semantic keywords.
  • Use the Answers pane in the lower left to enter conversational nodes.
  • Use the Answer Examples pane in the lower right to enter sentences that train the grammar to parse carrier phrases and semantic information.

Single-Keyword Grammars

Single-keyword grammars are used where an application asks for a single piece of information (for example, "what day do you want to depart?"). In this case, the grammar only recognizes a response that provides a departure date. Use Conversational Grammar Builder to develop single-keyword grammars.

More Complex Grammars

If the user response is actually more complex than a single phrase (for example, if it is better represented as a regular expression), use Conversational Grammar Builder and make a rule reference from this to the more complex rule authored with Speech Grammar Editor. An example of this is the postal code used in Great Britain, where the postal code itself is the keyword and is best represented as a regular expression.

If there are no keywords, but rather just concepts (as in a response with no keyword in a category such as Billing), then this is a Conversational Understanding scenario and Conversational Grammar Builder is the best tool.

Preamble and Postamble Grammars

Preamble and postamble phrases are linguistic padding that come before or after information that is semantically significant. For example, in the user response "I'd like voice mail please," the words "I'd like" are the preamble and "please" is the postamble. Use training sentences in Conversational Grammar Builder to author preambles and postambles.

Conversational Understanding Grammars

Use Conversational Grammar Builder to author grammars that use natural language understanding or Conversational Understanding grammars.

Training Data

The Conversational Understanding feature in Conversational Grammar Builder uses a statistical language model to recognize the caller's meaning and return it to the application as a semantic value. Sentences entered in the Answer Examples pane are used as training data to improve the statistical language model. The amount of training data needed depends on the complexity of the grammar. Authors should consider 50 sentences as a minimum goal.

DTMF Grammars

Use Conversational Grammar Builder to quickly author dual tone multi-frequency (DTMF) grammars that parallel the voice grammar. Select a keyword, click the DTMF tab, and then enter the desired key.

Returning Recognition Results

Recognition results from Conversational Grammar Builder are returned in the QuestionAnswerActivity.RecognitionResult property. A keyword grammar returns results in this form.

this.myQuestionAnswerActivity.RecognitionResult.Semantics["myKeywordContainer"].Value

On the other hand, a grammar using Conversational Understanding returns results in a slightly different form.

this.myQuestionAnswerActivity.RecognitionResult.Semantics["myResponseContainer"].Value

Lexicon Reference URI

Use the Custom Application Lexicon editor to create and edit a .cal file and to compile the .cal file into a .lex file. Use the Lexicon Reference URI property to enter a reference to a .lex file.

To display the Lexicon Reference URI property in the Properties window

  1. Open a grammar in Conversational Grammar Builder.

    For more information, see How to: Start Conversational Grammar Builder.

  2. Click a language tab.

  3. Press F4 to open the Properties window.

  4. In the Properties window, select Grammar Properties in the Object Name list.

See Also

Other Resources

Use Conversational Grammar Builder to Create Grammars
Develop Grammars with Speech Grammar Tools