SemanticResultValue Constructor

Microsoft Speech Platform SDK 11

Collapse imageExpand ImageCopy imageCopyHover image

Initializes a new instance of the SemanticResultValue class.

Overload List

  NameDescription
Public methodSemanticResultValue(Object)Initializes a new instance of the SemanticResultValue class and specifies a semantic value.
Public methodSemanticResultValue(String, Object)Initializes a new instance of the SemanticResultValue class and associates a semantic value with a String object.
Public methodSemanticResultValue(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.

NoteNote

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