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

The Word class provides a standard representation of speakable words for speech engines. A Word object provides the following information:

The written form string is required. The other properties are optional. Typically, one or more of the optional properties are specified. The Word class allows the specification of multiple pronunciations and multiple grammatical categories. Each pronunciation must be appropriate to each category. If not, separate Word objects should be created.

All the optional properties of a word are hints to the speech engine. Speech engines will use the information as appropriate for their internal design.

See Also:
#VocabManager
Engine#getVocabManager


Consts Summary:
long longUNKNOWN = 0
long longDONT_CARE = 1
long longOTHER = 2
long longNOUN = 4
long longPROPER_NOUN = 8
long longPRONOUN = 16
long longVERB = 32
long longADVERB = 64
long longADJECTIVE = 128
long longPROPER_ADJECTIVE = 256
long longAUXILIARY = 512
long longDETERMINER = 1024
long longCARDINAL = 2048
long longCONJUNCTION = 4096
long longPREPOSITION = 8192
long longCONTRACTION = 16384
long longABBREVIATION = 32768

Operations Summary:
 voidinitWithDetails(in string writtenForm, in string spokenForm, in StringArray pron, in long long cat)
 long longgetCategories()
 StringArraygetPronunciations()
 stringgetSpokenForm()
 stringgetWrittenForm()
 voidsetCategories(in long long cat)
 voidsetPronunciations(in StringArray pron)
 voidsetSpokenForm(in string text)
 voidsetWrittenForm(in string text)

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

Const Details:
long long UNKNOWN = 0

Grammatical category of word is unknown. The value is zero - 0 - and implies that no other category flag is set.


long long DONT_CARE = 1

Grammatical category of word doesn't matter.


long long OTHER = 2

Other grammatical category of word not specified elsewhere in this class.


long long NOUN = 4

Grammatical category of word is noun. English examples: "car", "house", "elephant".


long long PROPER_NOUN = 8

Grammatical category of word is proper noun. English examples: "Yellowstone", "Singapore".


long long PRONOUN = 16

Grammatical category of word is pronoun. English examples: "me", "I", "they".


long long VERB = 32

Grammatical category of word is verb. English examples: "run", "debug", "integrate".


long long ADVERB = 64

Grammatical category of word is adverb. English examples: "slowly", "loudly", "barely", "very", "never".


long long ADJECTIVE = 128

Grammatical category of word is adjective. English examples: "red", "mighty", "very", "first", "eighteenth".


long long PROPER_ADJECTIVE = 256

Grammatical category of word is proper adjective. English examples: "British", "Brazilian".


long long AUXILIARY = 512

Grammatical category of word is auxiliary. English examples: "have", "do", "is", "shall", "must", "cannot".


long long DETERMINER = 1024

Grammatical category of word is determiner. English examples: "the", "a", "some", "many", "his", "her".


long long CARDINAL = 2048

Grammatical category of word is cardinal. English examples: "one", "two", "million".


long long CONJUNCTION = 4096

Grammatical category of word is conjunction. English examples: "and", "or", "since", "if".


long long PREPOSITION = 8192

Grammatical category of word is preposition. English examples: "of", "for".


long long CONTRACTION = 16384

Grammatical category is contraction. English examples: "don't", "can't".


long long ABBREVIATION = 32768

Word is an abbreviation or acronynm. English examples: "Mr.", "USA".


Operation Details:
 void initWithDetails(in string writtenForm, in string spokenForm, in StringArray pron, in long long cat)

Initialise, setting the pronunciations, spoken form, written form, and categories.

Parameters:
writtenForm - the "written form" of the Word.
spokenForm - the "spoken form" of the Word.
pron - the pronunciation of the Word.
cat - the categories of the Word.


 long long getCategories()

Get the categories of the Word. Value may be UNKNOWN or an OR'ed set of the categories defined by this class.

Return:
the categories of the #Word.


 StringArray getPronunciations()

Get the pronunciations of the Word. The pronunciation string uses the UTF8 IPA subset. Returns null if no pronunciations are specified.

Return:
the pronunciations of the Word.


 string getSpokenForm()

Get the "spoken form" of the Word. Returns null if the spoken form is not defined.

Return:
the "spoken form" of the Word.


 string getWrittenForm()

Get the written form of the Word.

Return:
the written form of the Word.


 void setCategories(in long long cat)

Set the categories of the Word. The categories may be UNKNOWN or may be an OR'ed set of the defined categories such as NOUN, VERB, PREPOSITION.

The category information is a guide to the word's grammatical role. Speech synthesizers can use this information to improve phrasing and accenting.

Parameters:
cat - the categories of the #Word.


 void setPronunciations(in StringArray pron)

Set the pronunciation of the Word as an array containing a phonetic character string for each pronunciation of the word.

The pronunciation string uses the IPA subset of UTF8.

The string should be null if no pronunciation is available. Speech engines should be expected to handle most words of the language they support.

Recognizers can use pronunciation information to improve recognition accuracy. Synthesizers use the information to accurately speak unusual words (e.g., foreign words).

Parameters:
pron - the pronunciation of the Word.


 void setSpokenForm(in string text)

Set the "spoken form" of the Word. May be null.

The spoken form of a word is useful for mapping the written form to words that are likely to be handled by a speech recognizer or synthesizer. For example, "JavaSoft" to "java soft", "toString" -> "to string", "IEEE" -> "I triple E".

Parameters:
text - the "spoken form" of the Word.


 void setWrittenForm(in string text)

Set the "written form" of the Word. The written form text should be a string that could be used to present the Word visually.

Parameters:
text - the "written form" of the Word.