classafFancomSapi::ISpeechRecoGrammar
sys::Obj afFancomSapi::ISpeechRecoGrammar
Enables applications to manage the words and phrases for the SR engine.
http://msdn.microsoft.com/en-us/library/ee125481%28v=vs.85%29.aspx
@clsid {B6D6F79F-2158-4E50-B5BC-9A9CCD852A09}
- cmdLoadFromFile
Void cmdLoadFromFile(Uri fileUri, SpeechLoadOption? loadOption := SpeechLoadOption.SLOStatic)
Loads a command and control grammar from the specified file.
Only seems to load a .srgs file and not a SAPI .cfg file.
@see http://stackoverflow.com/questions/546428/how-do-i-load-a-grammar-xml-file-that-uses-sapi-5-3-tags
- cmdLoadFromMemory
Void cmdLoadFromMemory(Variant? grammarData, SpeechLoadOption? loadOption := SpeechLoadOption.SLOStatic)
Loads a compiled speech grammar from memory.
- cmdLoadFromObject
Void cmdLoadFromObject(Str? classId, Str? grammarName, SpeechLoadOption? loadOption := SpeechLoadOption.SLOStatic)
Loads a speech grammar from a COM object.
- cmdLoadFromProprietaryGrammar
Void cmdLoadFromProprietaryGrammar(Str? proprietaryGuid, Str? proprietaryString, Variant? proprietaryData, SpeechLoadOption? loadOption := SpeechLoadOption.SLOStatic)
Loads a proprietary speech grammar.
- cmdLoadFromResource
Void cmdLoadFromResource(Int? hModule, Variant? resourceName, Variant? resourceType, Int? languageId, SpeechLoadOption? loadOption := SpeechLoadOption.SLOStatic)
Loads a command and control grammar from a Win32 resource.
- cmdSetRuleIdState
Void cmdSetRuleIdState(Int? ruleId, SpeechRuleState? state)
Activates or deactivates a rule by its rule ID.
- cmdSetRuleState
Void cmdSetRuleState(Str? name, SpeechRuleState? state)
Activates or deactivates a rule by its rule name.
- dictationLoad
Void dictationLoad(Str? topicName := "", SpeechLoadOption? loadOption := SpeechLoadOption.SLOStatic)
Sets the dictation topic state.
- dictationSetState
Void dictationSetState(SpeechRuleState? state)
Sets the dictation topic state.
- dictationUnload
Void dictationUnload()
Unloads the active dictation topic from the grammar.
- id
Variant id { private set }
Returns the Id assigned to the grammar when it was created.
- isPronounceable
SpeechWordPronounceable? isPronounceable(Str? word)
Determines if a word has a pronunciation.
- makeFromDispatch
new makeFromDispatch(Dispatch dispatch)
- recoContext
ISpeechRecoContext? recoContext { private set }
Returns the RecoContext object that created this grammar.
- reset
Void reset(Int? newLanguage := (Int?)0)
Clears all grammar rules and resets the grammar's language to NewLanguage.
- rules
ISpeechGrammarRules? rules { private set }
Returns the collection of grammar rules in the RecoGrammar.
- setTextSelection
Void setTextSelection(SpTextSelectionInformation? info)
Sets the range of text selection information in a word sequence data buffer.
- setWordSequenceData
Void setWordSequenceData(Str? text, Int? textLength, SpTextSelectionInformation? info)
Defines a word sequence data buffer for use by the SR engine.
- state
SpeechGrammarState? state
Gets and sets the operational status of the speech grammar.