ISpRecognizer::GetRecoState

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.

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 Values

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

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

See Also

ISpRecognizer | SAPI Interfaces

 Last updated on Saturday, April 10, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.