Note

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

Microsoft Speech Platform

ISpRecognizer::CreateRecoContext

ISpRecognizer::CreateRecoContext creates a recognition context for this instance of a speech recognition engine. The recognition context is used to load recognition grammars, start and stop recognition, and receive events and recognition results. 

Each application can have one or more recognition contexts, although normally each application will have only one. 

<pre IsFakePre="true" xmlns="http://www.w3.org/1999/xhtml"> <strong>HRESULT CreateRecoContext(</strong><a runat="server" href="jj127719(v=msdn.10).md"><strong>ISpRecoContext</strong></a> **<em>ppNewContext</em> <strong>);</strong> </pre>

Parameters

  • ppNewContext
    [out] Address of a pointer to an ISpRecoContext interface receiving the recognition context.

Return Values

Value Description
S_OK Function completed successfully.
E_POINTER ppNewContext is invalid or bad.
FAILED(hr) Appropriate error message.