You are reading help file online using chmlib.com
|
ISpSREngineSite::GetTransitionProperty retrieves semantic property information for a transition in a grammar.
HRESULT GetTransitionProperty(
SPTRANSITIONID ID,
SPTRANSITIONPROPERTY **ppCoMemProperty
);
Value | Description |
---|---|
S_OK | Function completed successfully and transition has a property. |
S_FALSE | Function completed successfully but transition does not have a property. |
E_INVALIDARG | One or more parameters are invalid. |
E_OUTOFMEMORY | Exceeded available memory. |
FAILED(hr) | Appropriate error message. |
CFG grammars can contain properties (also known as ‘semantic tags’) within a grammar. This provides a means for semantic information to be embedded inside a grammar.
By default, the engine does not recognize these properties. Typically, an engine will recognize only the speech from the words in the grammar, and SAPI will parse and add the property information in the ISpSREngineSite::ParseFromTransitions call. However, it is possible for an engine to recognize this information by calling this method on any transition. If there is a property on this transition, the property name or ID and value is returned in the SPTRANSITIONPROPERTY structure, which must be freed after each use using CoTaskMemFree.
An engine can find out if a transition has a semantic property attached before calling this method by looking at the fHasProperty flag in the SPTRANSITIONENTRY structure associated with this transition.
You are reading help file online using chmlib.com
|