Modules | Files | Inheritance Tree | Inheritance Graph | Name Index
module GNOME::Speech
interface VocabManager
Files: GNOME_Speech.idl
GNOME-Speech-VocabManager-inheritance GNOME-Speech-SpeechObject.html Bonobo-Unknown.html

Interface for management of words used by a speech Engine. The VocabManager for an Engine is returned by the getVocabManager method of the Engine interface. Engines are not required support the VocabManager - the getVocabManager manager may return null.

Words, technically known as tokens, are provided to the vocabulary manager with optional information about their pronunciation, grammatical role and spoken form.

The VocabManager is typically used to provide a speech engine with information on problematic words - usually words for which the engine is unable to guess a pronunciation. For debugging purposes, an Engine may provide a list of words it finds difficult through the listProblemWords method.

Words in the vocabulary manager can be used as tokens in rule grammars for recognizers.

See Also:
Engine#getVocabManager
Word


Operations Summary:
 voidaddWord(in Word w)
 voidaddWords(in WordArray w)
 WordArraygetWords(in string text)
 WordArraylistProblemWords()
 voidremoveWord(in Word w) raises
 voidremoveWords(in WordArray w) raises

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

Operation Details:
 void addWord(in Word w)

Add a word to the vocabulary.

Parameters:
w - the word to add.


 void addWords(in WordArray w)

Add an array of words to the vocabulary.

Parameters:
w - the array of words to add.


 WordArray getWords(in string text)

Get all words from the vocabulary manager matching text. Returns null if there are no matches. If text is null all words are returned. This method only returns words that have been added by the addWord methods - it does not provide access to the engine's internal word lists.

Parameters:
text - word requested from VocabManager
Return:
list of words matching text.


 WordArray listProblemWords()

Returns a list of problematic words encountered during a session of using a speech recognizer or synthesizer. This return information is intended for development use (so the application can be enhanced to provide vocabulary information). An engine may return null.

If a pronunciation for a problem word is provided through the addWord methods, the engine may remove the word from the problem list.

An engine may (optionally) include its best-guess pronunciations for problem words in the return array allowing the developer to fix (rather than create) the pronunciation.

Return:
a list of problematic words.


 void removeWord(in Word w) raises (IllegalArgumentException)

Remove a word from the vocabulary.

Parameters:
w - the word to remove.


 void removeWords(in WordArray w) raises (IllegalArgumentException)

Remove an array of words from the vocabulary. To remove a set of words it is often useful to

removeWords(getWords("matching"));

Parameters:
w - the array of words to remove.