Overview | Package | Class | Tree | Index | Help
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD

Class javax.speech.synthesis.SynthesizerModeDesc

java.lang.Object
  |
  +--javax.speech.EngineModeDesc
        |
        +--javax.speech.synthesis.SynthesizerModeDesc

public class SynthesizerModeDesc
extends EngineModeDesc
SynthesizerModeDesc extends the EngineModeDesc with properties that are specific to speech synthesizers. A SynthesizerModeDesc inherits engine name, mode name, locale and running properties from EngineModeDesc. SynthesizerModeDesc adds two properties:

Like EngineModeDesc, there are two types of SynthesizerModeDesc: those created by an application which are used in engine selection, and those created by an engine which descibe a particular mode of operation of the engine. Descriptor provided engines are obtained through the availableSynthesizers method of the Central class and must have all their features defined. A descriptor created by an application may make any or all of the features null which means "don't care" (null features are ignored in engine selection).

Applications can modify application-created descriptors in any way. Applications should never modify a SynthesizerModeDesc provided by an engine (i.e. returned by the availableSynthesizers method.

Engine creation is described in the documentation for the Central class.

See Also:
Central, createSynthesizer, Voice

Constructor Summary
SynthesizerModeDesc()
          Construct a descriptor with all features set to null.
SynthesizerModeDesc(Locale locale)
          Create a SynthesizerModeDesc with a given Locale and other features set to null.
SynthesizerModeDesc(String engineName, String modeName, Locale locale, Boolean running, Voice[] voices)
          Create a fully-specified descriptor.
 
Method Summary
void addVoice(Voice v)
          Append a voice to the list of voices.
boolean equals(Object anObject)
          Returns true if and only if the parameter is not null and is a SynthesizerModeDesc with equal values of engine name, mode name, locale, running, and all voices.
Voice[] getVoices()
          Returns the list of voices available in this synthesizer mode.
boolean match(EngineModeDesc require)
          Determine whether a SynthesizerModeDesc has all the features specified by the require object.
void setVoices(Voice[] v)
          Set the list of synthesizer voices.
 
Methods inherited from class javax.speech.EngineModeDesc
equals, getEngineName, getLocale, getModeName, getRunning, match, setEngineName, setLocale, setModeName, setRunning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notifyAll, notify, toString, wait, wait, wait
 

Constructor Detail

SynthesizerModeDesc

public SynthesizerModeDesc()
Construct a descriptor with all features set to null.

SynthesizerModeDesc

public SynthesizerModeDesc(Locale locale)
Create a SynthesizerModeDesc with a given Locale and other features set to null.

SynthesizerModeDesc

public SynthesizerModeDesc(String engineName,
                           String modeName,
                           Locale locale,
                           Boolean running,
                           Voice[] voices)
Create a fully-specified descriptor. Any of the features may be null.
Method Detail

getVoices

public Voice[] getVoices()
Returns the list of voices available in this synthesizer mode.

setVoices

public void setVoices(Voice[] v)
Set the list of synthesizer voices.

addVoice

public void addVoice(Voice v)
Append a voice to the list of voices.

match

public boolean match(EngineModeDesc require)
Determine whether a SynthesizerModeDesc has all the features specified by the require object. Features in require which are either null or zero-length strings ("") are not tested (including those contained by Locale). All string comparisons are exact (case-sensitive).

The parameters are used as follows:

Note: if is possible to compare an EngineModeDesc against a SynthesizerModeDesc and vice versa.

Overrides:
match in class EngineModeDesc
See Also:
match, match

equals

public boolean equals(Object anObject)
Returns true if and only if the parameter is not null and is a SynthesizerModeDesc with equal values of engine name, mode name, locale, running, and all voices.
Overrides:
equals in class EngineModeDesc

Overview | Package | Class | Tree | Index | Help
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD

JavaTM Speech API
Copyright 1997-1998 Sun Microsystems, Inc. All rights reserved
Send comments to javaspeech-comments@sun.com