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

Source

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

Source

Void cmdLoadFromMemory(Variant? grammarData, SpeechLoadOption? loadOption := SpeechLoadOption.SLOStatic)

Loads a compiled speech grammar from memory.

cmdLoadFromObject

Source

Void cmdLoadFromObject(Str? classId, Str? grammarName, SpeechLoadOption? loadOption := SpeechLoadOption.SLOStatic)

Loads a speech grammar from a COM object.

cmdLoadFromProprietaryGrammar

Source

Void cmdLoadFromProprietaryGrammar(Str? proprietaryGuid, Str? proprietaryString, Variant? proprietaryData, SpeechLoadOption? loadOption := SpeechLoadOption.SLOStatic)

Loads a proprietary speech grammar.

cmdLoadFromResource

Source

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

Source

Void cmdSetRuleIdState(Int? ruleId, SpeechRuleState? state)

Activates or deactivates a rule by its rule ID.

cmdSetRuleState

Source

Void cmdSetRuleState(Str? name, SpeechRuleState? state)

Activates or deactivates a rule by its rule name.

dictationLoad

Source

Void dictationLoad(Str? topicName := "", SpeechLoadOption? loadOption := SpeechLoadOption.SLOStatic)

Sets the dictation topic state.

dictationSetState

Source

Void dictationSetState(SpeechRuleState? state)

Sets the dictation topic state.

dictationUnload

Source

Void dictationUnload()

Unloads the active dictation topic from the grammar.

id

Source

Variant id { private set }

Returns the Id assigned to the grammar when it was created.

isPronounceable

Source

SpeechWordPronounceable? isPronounceable(Str? word)

Determines if a word has a pronunciation.

makeFromDispatch

Source

new makeFromDispatch(Dispatch dispatch)

recoContext

Source

ISpeechRecoContext? recoContext { private set }

Returns the RecoContext object that created this grammar.

reset

Source

Void reset(Int? newLanguage := (Int?)0)

Clears all grammar rules and resets the grammar's language to NewLanguage.

rules

Source

ISpeechGrammarRules? rules { private set }

Returns the collection of grammar rules in the RecoGrammar.

setTextSelection

Source

Void setTextSelection(SpTextSelectionInformation? info)

Sets the range of text selection information in a word sequence data buffer.

setWordSequenceData

Source

Void setWordSequenceData(Str? text, Int? textLength, SpTextSelectionInformation? info)

Defines a word sequence data buffer for use by the SR engine.

state

Source

SpeechGrammarState? state

Gets and sets the operational status of the speech grammar.