Package com.sun.speech.freetts.jsapi
Class FreeTTSVoice
- java.lang.Object
-
- Voice
-
- com.sun.speech.engine.synthesis.BaseVoice
-
- com.sun.speech.freetts.jsapi.FreeTTSVoice
-
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
-
-
Constructor Summary
Constructors Constructor Description FreeTTSVoice(Voice freettsVoice, java.lang.String validatorName)
Constructs a FreeTTSVoice
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
clone()
Creates a copy of thisBaseVoice
.java.lang.String
getId()
Gets the id for this voice.Voice
getVoice()
Gets a FreeTTS com.sun.speech.freetts.Voice from this JSAPI voicevoid
setId(java.lang.String id)
Sets the id for this voice.java.lang.String
toString()
Gets a string representation of the objectvoid
validate()
Validates this FreeTTSVoice.-
Methods inherited from class com.sun.speech.engine.synthesis.BaseVoice
getPitch, getPitchRange, getSpeakingRate, getVolume
-
-
-
-
Constructor Detail
-
FreeTTSVoice
public FreeTTSVoice(Voice freettsVoice, java.lang.String validatorName)
Constructs a FreeTTSVoice- Parameters:
freettsVoice
- the freetts voicevalidatorName
- 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 classBaseVoice
- Returns:
- the voice id
- See Also:
BaseVoice.setId(java.lang.String)
-
toString
public java.lang.String toString()
Gets a string representation of the object
-
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 classBaseVoice
- Parameters:
id
- the new id- See Also:
BaseVoice.getId()
-
clone
public java.lang.Object clone()
Creates a copy of thisBaseVoice
.
-
validate
public void validate() throws ValidationException
Validates this FreeTTSVoice.- Throws:
ValidationException
- if this FreeTTSVoice is invalid
-
-