ISRResBasic::FlagsGet

HRESULT FlagsGet(DWORD dwRank, DWORD *pdwFlags);

Retrieves the recognition flags for the specified phrase.

· Returns NOERROR if successful, or one of these error values:

E_INVALIDARG
E_OUTOFMEMORY
SRERR_NOTENOUGHDATA
SRERR_VALUEOUTOFRANGE

dwRank

[in] Value that specifies the alternative phrase to get from the alternatives provided by the engine, starting with dwRank = 0 for the strongest alternative. If dwRank is greater than the number of alternatives, FlagsGet returns an error.

pdwFlags

[out] Address of a variable that receives one or more of these values:

Value

Meaning

ISRNOTEFIN_RECOGNIZED

The recognition was above the threshold set with the ISRAttributes::ThresholdSet member function. If this flag is not set, the engine did not have enough confidence in the recognition, and it should be declared as an "unknown utterance."

ISRNOTEFIN_THISGRAMMAR

This grammar had the highest score of all active grammars and claimed the recognition. If this flag is not set, another grammar had a higher score and claimed the recognition.

ISRNOTEFIN_FROMTHISGRAMMAR

The phrase was generated from this grammar (as opposed to another grammar).
(New for 3.0)


For an application to accept a recognition as valid, both ISRNOTEFIN_RECOGNIZED and ISRNOTEFIN_THISGRAMMAR should be set.