com.sun.speech.freetts.jsapi
Class FreeTTSVoice

java.lang.Object
  extended byjavax.speech.synthesis.Voice
      extended bycom.sun.speech.engine.synthesis.BaseVoice
          extended bycom.sun.speech.freetts.jsapi.FreeTTSVoice
All Implemented Interfaces:
java.lang.Cloneable

public class FreeTTSVoice
extends BaseVoice

Extends the BaseVoice class to encapsulate FreeTTSSynthesizer specific data.


Field Summary
 
Fields inherited from class com.sun.speech.engine.synthesis.BaseVoice
defaultPitch, defaultPitchRange, defaultSpeakingRate, defaultVolume, voiceId
 
Fields inherited from class javax.speech.synthesis.Voice
AGE_CHILD, AGE_DONT_CARE, AGE_MIDDLE_ADULT, AGE_NEUTRAL, AGE_OLDER_ADULT, AGE_TEENAGER, AGE_YOUNGER_ADULT, GENDER_DONT_CARE, GENDER_FEMALE, GENDER_MALE, GENDER_NEUTRAL
 
Constructor Summary
FreeTTSVoice(Voice freettsVoice, java.lang.String validatorName)
          Constructs a FreeTTSVoice
 
Method Summary
 java.lang.Object clone()
          Creates a copy of this BaseVoice.
 java.lang.String getId()
          Gets the id for this voice.
 Voice getVoice()
          Gets a FreeTTS com.sun.speech.freetts.Voice from this JSAPI voice
 void setId(java.lang.String id)
          Sets the id for this voice.
 java.lang.String toString()
          Gets a string representation of the object
 void validate()
          Validates this FreeTTSVoice.
 
Methods inherited from class com.sun.speech.engine.synthesis.BaseVoice
getPitch, getPitchRange, getSpeakingRate, getVolume
 
Methods inherited from class javax.speech.synthesis.Voice
equals, getAge, getGender, getName, getStyle, match, setAge, setGender, setName, setStyle
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FreeTTSVoice

public FreeTTSVoice(Voice freettsVoice,
                    java.lang.String validatorName)
Constructs a FreeTTSVoice

Parameters:
freettsVoice - the freetts voice
validatorName - the classname of the validator to use
Method Detail

getId

public java.lang.String getId()
Gets the id for this voice. Should be unique for a synthesizer.

Overrides:
getId in class BaseVoice
Returns:
the voice id
See Also:
BaseVoice.setId(java.lang.String)

toString

public java.lang.String toString()
Gets a string representation of the object

Overrides:
toString in class BaseVoice
Returns:
the name of this voice

getVoice

public Voice getVoice()
Gets a FreeTTS com.sun.speech.freetts.Voice from this JSAPI voice

Returns:
a FreeTTS Voice or null, if the voice cannot be found

setId

public void setId(java.lang.String id)
Sets the id for this voice.

Overrides:
setId in class BaseVoice
Parameters:
id - the new id
See Also:
BaseVoice.getId()

clone

public java.lang.Object clone()
Creates a copy of this BaseVoice.

Overrides:
clone in class BaseVoice
Returns:
the cloned object

validate

public void validate()
              throws ValidationException
Validates this FreeTTSVoice.

Throws:
ValidationException - if this FreeTTSVoice is invalid