ISpSREngineSite::Recognition (Windows CE 5.0)

Send Feedback

This method gets a recognition result for SAPI. The phrase can be either a hypothesis or a final result. If it is a hypothesis, a hypothesis event is issued to all interested recognition contexts. If the phrase is a final result, a final result event is issued to the target grammar to which the result refers. An SR engine can also send a false recognition using this method, indicating it has low confidence in the result.

If this method returns S_FALSE, there are no more active rules and the engine is free to exit the ISpSREngine::RecognizeStream method without reading or processing any more data. Otherwise, the engine should continue reading data and continue recognition.

An call to ISpSREngineSite::AddEvent must precede a call to ISpSREngineSite::Recognition. The provided event type must be SPEI_PHRASE_START.

HRESULT Recognition(  SPRECORESULTINFO* pResultInfo);

Parameters

  • pResultInfo
    [in] Pointer to an SPRECORESULTINFO structure containing the recognition result.

Return Values

The following table shows the possible return values.

Value Description
S_OK Function completed successfully, and the engine can continue recognition.
S_FALSE Function completed successfully, and the engine can terminate recognition without reading the rest of the stream.
FAILED(hr) Appropriate error message.

Requirements

OS Versions: Windows CE .NET 4.1 and later.
Header: Sapiddk.h, Sapiddk.idl.
Link Library: Sapilib.lib.

See Also

ISpSREngineSite | SAPI Interfaces

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.