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:
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
availableRecognizers or
availableSynthesizers,
EngineList and EngineModeDesc and its
sub-classes,
createRecognizer or
createSynthesizer method of Central.
::GNOME::Speech::Recognition::RecognizerModeDesc
::GNOME::Speech::Synthesis::SynthesizerModeDesc
Central | Operations Summary: | |
| void | initWithLocale(in string locale) |
| void | initWithNameAndState(in string engineName, in string modeName, in string locale, in Tristate running) |
| boolean | equals(in EngineModeDesc anObject) |
| string | getEngineName() |
| string | getLocale() |
| string | getModeName() |
| Tristate | getRunning() |
| boolean | match(in EngineModeDesc require) |
| void | setEngineName(in string engineName) |
| void | setLocale(in string locale) |
| void | setModeName(in string modeName) |
| void | setRunning(in Tristate running) |
| Operations Inherited from Bonobo::Unknown | |
| ref, unref, queryInterface | |
| Operation Details: |
Initialise an EngineModeDesc for a locale.
The engine name, mode name and running are set to null.
Initialize with engine name, mode name, locale and running. Any parameter may be null.
null (null means "don't care").
True if and only if the parameter is not null and is a
EngineModeDesc with equal values of Locale, engineName
and modeName.
EngineModeDesc to test for equality against. EngineModeDesc and anObjectGet the engine name. The engine name should be a unique string across the provider company and across companies.
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.
Get the mode name. The mode that should uniquely identify a single mode of operation of a speech engine (per-engine unique).
Get the running feature. Values may be TRUE, FALSE or
null (null means "don't care").
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).
EngineModeDesc containing the feature set required. EngineModeDesc has the feature set given in require.
Set the engine name. The engine name should be a unique string
across the provider company and across companies.
May be null.
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.
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.
Set the running feature. Values may be TRUE, FALSE or
null (null means "don't care").