ISpRecognizer::GetRecoState (Windows Embedded CE 6.0)
1/6/2010
This method gets the current state of the SR engine.
This method shows whether audio is currently being read from the audio input stream and passed to the SR engine.
See also ISpRecognizer::SetRecoState.
Syntax
HRESULT GetRecoState(
SPRECOSTATE* pState
);
Parameters
- pState
[out] Pointer to the current state of the SR engine. Possible values are defined for the SPRECOSTATE enumeration.
Return Value
The following table shows the possible return values.
Value | Description |
---|---|
S_OK |
Function completed successfully. |
E_INVALIDARG |
Invalid pointer. |
FAILED(hr) |
Appropriate error message. |
Remarks
The default recognizer state is SPRST_ACTIVE, which means SAPI will start the audio input stream only when at least one top-level rule is active.
If you would like to be notified when the recognizer state changes (for example, another application changes the shared SR engine's recognizer state), rather than polling the state with GetRecoState, you can call ISpEventSource::SetInterest with SPEI_RECO_STATE.
Requirements
Header | sapi.h, sapi.idl |
Library | sapilib.lib |
Windows Embedded CE | Windows CE .NET 4.1 and later |