Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
SemanticResultKey Constructor

SemanticResultKey Constructor

Constructs an instance of SemanticResultKey and associates the key with grammar components.

This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.

  Name Description
Public method SemanticResultKey(String, GrammarBuilder[]) Assigns a semantic key to one or more GrammarBuilder objects used to create a speech recognition grammar.
Public method SemanticResultKey(String, String[]) Assigns a semantic key to one or more String instances used to create a speech recognition grammar.

The constructors for SemanticResultKey specify a text tag (the semantic key) and a set of grammar components to add to a speech recognition grammar.

The grammar components can be specified either as an array of GrammarBuilder objects, or as an array of String instances.

If the grammar components are used in recognition, you can access the returned SemanticValue using the text tag provided to the constructor of SemanticResultKey as a semantic key. The Value property of the SemanticValue instance will be determined by the grammar components used in the definition of SemanticResultKey.

© 2015 Microsoft