ISpSREngineSite::IsAlternate

Microsoft Speech SDK

The Microsoft.com Speech website Microsoft Speech SDK SAPI 5.1

ISpSREngineSite::IsAlternate

ISpSREngineSite::IsAlternate determines whether one rule is an alternate of another.

HRESULT IsAlternate(
   SPRULEHANDLE   hPriRule,
   SPRULEHANDLE   hAltRule
);

Parameters

hPriRule
[in] The primary rule.
hAltRule
[in] The alternate rule to be checked.

Return values

Value Description
S_OK hAltRule is an alternate of hPriRule.
S_FALSE hAltRule is not an alternate of hPriRule.
FAILED (hr) Appropriate error message.

Remarks

This method is used because it is not possible to return alternates for CFG rules from different recognition contexts. This method provides an easy way for engines to determine whether two rules belong to the same context.