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


Intelligent Interface Technologies Home Page Microsoft Speech SDK

Speech Automation 5.1

Interface: ISpeechRecoContext

State Property


The State property gets or sets the active state of the recognition context.

The entire grammar associated with the recognition context can be disabled or enabled. The individual rule states of the grammar are unaffected otherwise. These conditions allow the application to control the state of the grammars at a high level. For example, if the window loses the current focus, the recognition context (s) associated with that window may be disabled if recognitions are not needed. Likewise, when the window regains the focus, all the recognition contexts may be enabled.


Syntax

Set: SpeechRecoContext.State = SpeechRecoContextState
Get: SpeechRecoContextState = SpeechRecoContext.State

Parts

SpeechRecoContext
The owning object.
SpeechRecoContextState
Set: A SpeechRecoContextState variable that sets the property.
Get: A SpeechRecoContextState variable that gets the property.

Example

The following code snippet demonstrates disabling and enabling a command and control grammar. The sample opens a configuration file, sol.xml, and sets one rule, identified as 101, as active. The application could continue and disable the entire grammar so that no recognitions are possible based on that grammar. Later, when the application enables the grammar, the same single rule (101) would still be active.

Set RC = New SpSharedRecoContext
    
Set myGrammar = RC.CreateGrammar
myGrammar.CmdLoadFromFile "sol.xml", SLODynamic
myGrammar.CmdSetRuleIdState 101, SGDSActive

'Possible program execution could go here
RC.State = SRCS_Disabled

'Possible program execution could go here
RC.State = SRCS_Enabled


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