Modules | Files | Inheritance Tree | Inheritance Graph | Name Index
module GNOME::Speech
interface EngineModeDesc
Files: GNOME_Speech.idl
GNOME-Speech-EngineModeDesc-inheritance GNOME-Speech-Recognition-RecognizerModeDesc.html GNOME-Speech-Synthesis-SynthesizerModeDesc.html GNOME-Speech-SpeechObject.html Bonobo-Unknown.html

EngineModeDesc provides information about a specific operating mode of a speech engine. The availableRecognizers and availableSynthesizers methods of the Central class provide a list of mode descriptors for all operating modes of registered engines. Applications may also create EngineModeDescs for use in selecting and creating engines. Examples of uses mode descriptors are provided in the documentation for the Central class.

The properties defined in the EngineModeDesc class apply to all speech engines including speech recognizers and speech synthesizers. The RecognizerModeDesc and SynthesizerModeDesc classes extend the EngineModeDesc class to define specialized properties for recognizers and synthesizers.

The EngineModeDesc and its sub-classes use set/get property patterns. The list of properties is outlined below.

The properties of EngineModeDesc and its sub-classes are all object references. All properties are defined so that a null value means "don't care" when selecting an engine or matching EngineModeDesc and its sub-classes. For example, a Tristate value for a property means that its three values are true, false and don't care (null).

The basic properties of an engine defined by EngineModeDesc are:

engine name
A string that uniquely identifies a speech engine. e.g. "Acme Recognizer"

mode name
A string that uniquely identifies a mode of operation of the speech engine. e.g. "Spanish Dictator"

Locale
A string representing the language supported by the engine mode. The country code may be optionally defined for an engine. The Locale variant is typically ignored.

Running
A Tristate value indicating whether a speech engine is already running. This allows for the selection of engines that already running so that system resources are conserved.

Selection

There are two types of EngineModeDesc object (and its sub-classes): those created by a speech engine and those created by an application. Engine-created descriptors are obtained through the availableRecognizers and availableSynthesizers methods of the Central class and must have all features set to non-null values.

Applications can create descriptors using the constructors of the descriptor classes. Applications may leave any or all of the feature values null to indicate "don't care".

Typically, application-created descriptors are used to test the engine-created descriptors to select an appropriate engine for creation.

An application can create a descriptor and pass it to the createRecognizer or createSynthesizer methods of Central. In this common approach, the Central performs the engine selection.

Applications that need advanced selection criterion will

  1. Request a list of engine mode descriptors from availableRecognizers or availableSynthesizers,
  2. Select one of the descriptors using the methods of EngineList and EngineModeDesc and its sub-classes,
  3. Pass the selected descriptor to the createRecognizer or createSynthesizer method of Central.

    See Also:
    ::GNOME::Speech::Recognition::RecognizerModeDesc
    ::GNOME::Speech::Synthesis::SynthesizerModeDesc
    Central


Operations Summary:
 voidinitWithLocale(in string locale)
 voidinitWithNameAndState(in string engineName, in string modeName, in string locale, in Tristate running)
 booleanequals(in EngineModeDesc anObject)
 stringgetEngineName()
 stringgetLocale()
 stringgetModeName()
 TristategetRunning()
 booleanmatch(in EngineModeDesc require)
 voidsetEngineName(in string engineName)
 voidsetLocale(in string locale)
 voidsetModeName(in string modeName)
 voidsetRunning(in Tristate running)

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

Operation Details:
 void initWithLocale(in string locale)

Initialise an EngineModeDesc for a locale. The engine name, mode name and running are set to null.

Parameters:
locale - the locale. The locale for an engine mode must have the language defined but the country may be undefined.


 void initWithNameAndState(in string engineName, in string modeName, in string locale, in Tristate running)

Initialize with engine name, mode name, locale and running. Any parameter may be null.

Parameters:
engineName - the engine name. The engine name should be a unique string across the provider company and across companies.
modeName - the mode name that should uniquely identify a single mode of operation of a speech engine (per-engine unique).
locale - the locale. The locale for an engine mode must have the language defined but the country may be undefined. The locale variant is typically ignored.
running - the running feature. Values may be TRUE, FALSE or null (null means "don't care").


 boolean equals(in EngineModeDesc anObject)

True if and only if the parameter is not null and is a EngineModeDesc with equal values of Locale, engineName and modeName.

Parameters:
anObject - an EngineModeDesc to test for equality against.
Return:
a boolean indication of equality between this EngineModeDesc and anObject


 string getEngineName()

Get the engine name. The engine name should be a unique string across the provider company and across companies.

Return:
the engine name.


 string getLocale()

Get the locale. The locale for an engine mode must have the language defined but the country may be undefined. The locale variant is typically ignored.

Return:
the locale.


 string getModeName()

Get the mode name. The mode that should uniquely identify a single mode of operation of a speech engine (per-engine unique).

Return:
the mode name.


 Tristate getRunning()

Get the running feature. Values may be TRUE, FALSE or null (null means "don't care").

Return:
the running feature.


 boolean match(in EngineModeDesc require)

Determine whether an EngineModeDesc has all the features defined in the require object. Strings in require which are either null or zero-length ("") are not tested, including those in the locale. All string comparisons are exact (case-sensitive).

Parameters:
require - an EngineModeDesc containing the feature set required.
Return:
a boolean indication of whether this EngineModeDesc has the feature set given in require.


 void setEngineName(in string engineName)

Set the engine name. The engine name should be a unique string across the provider company and across companies. May be null.

Parameters:
engineName - the engine name.


 void setLocale(in string locale)

Set the locale. The locale for an engine mode must have the language defined but the country may be undefined. The locale variant is typically ignored. May be null.

Parameters:
locale - the locale.


 void setModeName(in string modeName)

Set the mode name. The mode name should uniquely identify a single mode of operation of a speech engine (per-engine unique). May be null.

Parameters:
modeName - the mode name.


 void setRunning(in Tristate running)

Set the running feature. Values may be TRUE, FALSE or null (null means "don't care").

Parameters:
running - the running feature.