ISpSREngineSite::Recognition (Windows Embedded CE 6.0)
1/6/2010
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.
Syntax
HRESULT Recognition(
SPRECORESULTINFO* pResultInfo
);
Parameters
- pResultInfo
[in] Pointer to an SPRECORESULTINFO structure containing the recognition result.
Return Value
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
Header | sapiddk.h, sapiddk.idl |
Library | sapilib.lib |
Windows Embedded CE | Windows CE .NET 4.1 and later |