Modules | Files | Inheritance Tree | Inheritance Graph | Name Index
module GNOME::Speech::Recognition
interface DictationGrammar
Files: GNOME_Speech.idl
GNOME-Speech-Recognition-DictationGrammar-inheritance GNOME-Speech-Recognition-Grammar.html GNOME-Speech-SpeechObject.html Bonobo-Unknown.html
Operations Summary:
 voidaddWord(in string word)
 voidremoveWord(in string word)
StringArraylistAddedWords()
StringArraylistRemovedWords()
 voidsetContext(in string preceding, in string following)
 voidsetContextFromArray(in StringArray preceding, in StringArray following)

Operations Inherited from Grammar
addGrammarListener, removeGrammarListener, addResultListener, removeResultListener, getActivationMode, getName, getRecognizer, isActive, isEnabled, setActivationMode, setEnabled

Operations Inherited from Bonobo::Unknown
ref, unref, queryInterface

Operation Details:
 void addWord(in string word)

Add a word to the DictationGrammar. The addWord method can undo the effects of an removeWord call.

A change in a DictationGrammar is applied to the recognition process only after changes have been committed.

Parameters:
word - the word to be added.
See Also:
Recognizer#commitChanges


 void removeWord(in string word)

Remove a word from the DictationGrammar. The removeWord method can undo the effects of an addWord call.

A change in a DictationGrammar is applied to the recognition process only after changes have been committed.

Parameters:
word - the word to be removed.
See Also:
Recognizer#commitChanges


StringArray listAddedWords()

List the words that have been added to the DictationGrammar.

Return:
the list of words that have been added to the DictationGrammar.


StringArray listRemovedWords()

List the words that have been removed from the DictationGrammar.

Return:
the list of words that have been removed from the DictationGrammar.


 void setContext(in string preceding, in string following)

Provide the recognition engine with the current textual context. Dictation recognizers use the context information to improve recognition accuracy. (Context is discussed above.)

When dictating a sequence of words, the recognizer updates its context. The app does not need to inform the recognizer when results arrive. Instead it should call setContext for events such as cursor movement, cut, paste etc.

The preceding or following context may be null if there is no preceding or following context. This is appropriate for a new document or in situations where context is not clear.

The alternative setContext, that accepts arrays of tokens for context, should be used when the current context includes tokens from previous results.

Parameters:
preceding - the preceding context.
following - the following context.
See Also:
setContextFromArray


 void setContextFromArray(in StringArray preceding, in StringArray following)

Provide the recognition engine with the current textual context with arrays of the previous and following tokens. Dictation recognizers use the context information to improve recognition accuracy. (Context is Parameters:

preceding - the preceding context.
following - the following context.
See Also:
setContext