CHMlib Logo Leading Translation Management System for Translation Agencies, Top Translation Management Software for Freelance Translators, Time Tracking Software, Word Count, Character Count and Line Count Software, Computer Assisted Translation Tool for Easy Word Count, Clipboard Character Count Software, User-Friendly Translation Memory Software, Terminology Management Software, Terminology Management Server, Microsoft Glossary Software, Dictionary of Acronyms, Social Network for Translators and Translation Agencies, Acronyms and Abbreviations Search Engine, Russian Translation Lab, Ukrainian Translation Lab.
You are reading help file online using chmlib.com
CrisisHelper - First Aid in Tough Times of World Economic Crisis


The Microsoft.com Speech website Microsoft Speech SDK

SAPI 5.1

ISpRecoGrammar::LoadDictation

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
);

Parameters

pszTopicName
[in, optional, string] The null-terminated string containing the topic name. If NULL, the general dictation is loaded. See Remarks section.
Options
[in] Flag of type SPLOADOPTIONS indicating whether the file should be loaded statically or dynamically. This value must be SPLO_STATIC.

Return values

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.

Remarks

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.

Example

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

If you want your help file to be removed or added please send e-mail to chmlibcom@gmail.com
Partner sites: Logo Design, Simple Anti-Crisis Accounting Software, Voice Search for Web