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

ISpSREngine::SetTextSelection

ISpSREngine::SetTextSelection informs the engine of the displayed and selected areas of the text buffer.(See ISpSREngine::SetWordSequenceData). Once a text buffer has been supplied to the engine, this method can be used to control which parts of the buffer are active for recognition using a text-buffer transition in a CFG. This method can communicate to the engine the location of the current text insertion point for dictation.


HRESULT SetTextSelection(
   void                         *pvEngineGrammar,
   const  SPTEXTSELECTIONINFO   *pInfo
);

Parameters

pvEngineGrammar
[in] The engine's grammar pointer for this grammar, as returned from a previous call to the OnCreateGrammar method.
pInfo
[in] Pointer to the text selection information structure.

Return values

Value Description
S_OK Function completed successfully.
E_NOTIMPL Engine does not support text-buffer functionality
FAILED(hr) Other appropriate error message.

Remarks

The first two fields of the SPTEXTSELECTIONINFO structure, ulStartActiveOffset and cchActiveChars indicate the area of the buffer that should be active for recognition when using a text-buffer transition in a CFG.

The other two fields of the SPTEXTSELECTIONINFO, ulStartSelection and cchSelection can be used with dictation. These could indicate, for example, which area of the buffer is currently selected on the screen. If cchSelection is zero, this could display the current location of the insertion point. This can be used by the engine to get extra language model context from preceding words in the dictated text.

This text buffer feature is optional for engines, and support for it is indicated using the TextBuffer attribute. If this method is called on an engine that does not support this feature, the engine should return E_NOTIMPL.



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