Share via


Note

Please see Azure Cognitive Services for Speech documentation for the latest supported speech solutions.

Microsoft Speech Platform

ISpRecognizer::SetRecoState

ISpRecognizer::SetRecoState sets the state of the speech recognition engine.

<pre IsFakePre="true" xmlns="http://www.w3.org/1999/xhtml"> <strong>HRESULT SetRecoState(</strong><a runat="server" href="jj127476(v=msdn.10).md"><strong>SPRECOSTATE</strong></a> <em>NewState</em> <strong>);</strong> </pre>

Parameters

  • NewState
    [in] One of the flags contained in the SPRECOSTATE enumeration.

Return Values

Value Description
S_OK Function completed successfully.
FAILED(hr) Appropriate error message.
E_INVALIDARG One or more parameters are invalid.

Remarks

Changing the recognition state leads to a SPEI_RECO_STATE_CHANGE event for all interested recognition contexts.