class FreeTTSSynthesizer.FreeTTSSynthesizerProperties extends BaseSynthesizerProperties
Constructor and Description |
---|
FreeTTSSynthesizerProperties(BaseVoice defaultVoice,
float defaultPitch,
float defaultPitchRange,
float defaultSpeakingRate,
float defaultVolume)
Constructor
|
Modifier and Type | Method and Description |
---|---|
(package private) void |
checkForPropertyChanges()
Checks to see if any properties have changed and if so
fires the proper events
|
float |
getPitch()
Get the baseline pitch for synthesis
|
float |
getPitchRange()
Get the pitch range for synthesis.
|
float |
getSpeakingRate()
Gets the current target speaking rate.
|
float |
getVolume()
Gets the current volume.
|
void |
reset()
Resets the properties to their default values
|
void |
setPitch(float hertz)
Set the baseline pitch for the current synthesis voice.
|
void |
setPitchRange(float hertz)
Set the pitch range for the current synthesis voice.
|
void |
setSpeakingRate(float wpm)
Set the target speaking rate.
|
void |
setVoice(javax.speech.synthesis.Voice voice)
Sets the voice to a voice that matches the given voice
|
void |
setVolume(float volume)
Sets the volume
|
FreeTTSSynthesizerProperties(BaseVoice defaultVoice, float defaultPitch, float defaultPitchRange, float defaultSpeakingRate, float defaultVolume)
defaultVoice
- the voice to use as the default for
this synthesizerdefaultPitch
- the default pitch in hertzdefaultPitchRange
- the default range of pitch in
hertzdefaultSpeakingRate
- the default speaking rate in
words per minutedefaultVolume
- the default speaking volume
(0.0 to 1.0)public void reset()
void checkForPropertyChanges()
public float getPitch()
public void setVoice(javax.speech.synthesis.Voice voice)
voice
- the voice that matches itpublic void setPitch(float hertz) throws PropertyVetoException
hertz
- sets the current pitchPropertyVetoException
- if the synthesizer rejects or
limits the new valuepublic float getPitchRange()
public void setPitchRange(float hertz) throws PropertyVetoException
PropertyVetoException
- if the synthesizer rejects or
limits the new valuepublic float getSpeakingRate()
public void setSpeakingRate(float wpm) throws PropertyVetoException
wpm
- sets the target speaking rate in
words per minutePropertyVetoException
- if the synthesizer rejects or
limits the new valuepublic float getVolume()
public void setVolume(float volume) throws PropertyVetoException
volume
- the new volume setting (between 0 and 1)PropertyVetoException
- if the synthesizer rejects or
limits the new valueWebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses