You are reading help file online using chmlib.com
|
ISpRecoGrammar::LoadDictation loads a dictation topic into the SpRecoGrammar object and the SR engine.
See also ISpSREngine::OnCreateGrammar.
HRESULT LoadDictation(
const WCHAR *pszTopicName,
SPLOADOPTIONS Options
);
Value | Description |
---|---|
S_OK | Function completed successfully. |
E_INVALIDARG | pszTopicName is invalid or bad. Alternatively, Options is not SPLO_STATIC. |
FAILED(hr) | Appropriate error message. |
SAPI currently defines one specialized dictation topic: SPTOPIC_SPELLING. SR engines are not required to support specialized dictation topic (including spelling).
See the SR engine vendor for information on what specialized dictation topics if any are supported.
The following code snippet illustrates the use of ISpRecoGrammar::LoadDictation to load a spelling topic and activate it.
HRESULT hr = S_OK; // create a grammar object hr = cpRecoContext->CreateGrammar(GRAM_ID, &cpRecoGrammar); // Check hr // load the general dictation topic hr = cpRecoGrammar->LoadDictation(NULL, SPLO_STATIC); // Check hr // activate the dictation topic to receive recognitions hr = cpRecoGrammar->SetDictationState(SPRS_ACTIVE); // check hr
You are reading help file online using chmlib.com
|