Note

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

SemanticResultValue Constructor

Include Protected Members
Include Inherited Members

Initializes a new instance of the SemanticResultValue class.

Overload List

  Name Description
Public method SemanticResultValue(Object) Initializes a new instance of the SemanticResultValue class and specifies a semantic value.
Public method SemanticResultValue(String, Object) Initializes a new instance of the SemanticResultValue class and associates a semantic value with a String object.
Public method SemanticResultValue(GrammarBuilder, Object) Initializes a new instance of the SemanticResultValue class and associates a semantic value with a GrammarBuilder object.

Top

Remarks

Using these constructors you can build SemanticResultValue objects in any of three ways:

  • Specify only a semantic value. To associate the value with a grammar component, you must incorporate the SemanticResultValue in a GrammarBuilder object. The semantic value will be returned in the recognition result when the grammar component used to match speech input.

  • Specify a semantic value and associate it with a String object. The semantic value will be returned in the recognition result when the contents of the String object are used to match speech input.

  • Specify a semantic value and associate it with a GrammarBuilder object. The semantic value will be returned in the recognition result when the contents of the GrammarBuilder object are used to match speech input.

Note

Values managed by SemanticResultValue objects are defined by Object instances passed to their constructors. The underlying type of this Object must be bool, int, float, or string. Any other type will prevent construction of a Grammar instance with the SemanticResultValue.

See Also

Reference

SemanticResultValue Class

SemanticResultValue Members

Microsoft.Speech.Recognition Namespace