Note
Please see Azure Cognitive Services for Speech documentation for the latest supported speech solutions.
Microsoft Speech Platform
ISpRecognizer::GetRecoState
ISpRecognizer::GetRecoState retrieves the current state of the recognition engine.
<pre IsFakePre="true" xmlns="http://www.w3.org/1999/xhtml"> <strong>HRESULT GetRecoState(</strong><a runat="server" href="jj127476(v=msdn.10).md"><strong>SPRECOSTATE</strong></a> *<em>pState</em> <strong>);</strong> </pre>
Parameters
- pState
[out] One of the input state flags contained in the SPRECOSTATE enumeration.
Return Values
Value | Description |
---|---|
S_OK | Function completed successfully. |
E_INVALIDARG | Invalid pointer. |
FAILED(hr) | Appropriate error message. |
Remarks
This method determines whether audio is currently being read from the audio input stream and passed to the speech recognition engine.
See also ISpRecognizer::SetRecoState
The default recognizer state is SPRST_ACTIVE, which means the Speech Platform will activate the audio input stream only when at least one top-level rule is active.
To be notified when the recognizer state changes, rather than polling the state with ::GetRecoState, call ISpEventSource::SetInterest with SPEI_RECO_STATE