Share via


Note

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

Microsoft Speech Platform

ISpRecoGrammar2::SetGrammarLoader

ISpRecoGrammar2::SetGrammarLoader is used to pass a pointer to an ISpeechResourceLoader interface into the Speech Platform to override the Speech Platform's default grammar loading function. Applications that wish to perform grammar loading, rather than leave this to the Speech Platform, can do so by implementing ISpeechResourceLoader.

<pre IsFakePre="true" xmlns="http://www.w3.org/1999/xhtml"> <strong>HRESULT SetGrammarLoader(</strong> <strong> ISpeechResourceLoader</strong> *<em>pLoader</em> <strong>);</strong> </pre>

Parameters

  • pLoader
    The pointer to the ISpeechResourceLoader interface implemented by an application.

Return Values

Value Description
S_OK Function completed successfully.
E_POINTER pLoader is invalid.
E_NOTIMPL The interface is not implemented.