com.sun.speech.engine.synthesis
public class BaseVoice extends Voice
Voice
class to encapsulate
engine-specific data.Modifier and Type | Field and Description |
---|---|
protected float |
defaultPitch
The default pitch
|
protected float |
defaultPitchRange
The default pitch range
|
protected float |
defaultSpeakingRate
The default speaking rate
|
protected float |
defaultVolume
The default volume
|
protected java.lang.String |
voiceId
The id of the voice
|
Constructor and Description |
---|
BaseVoice(java.lang.String id,
java.lang.String name,
int gender,
int age,
java.lang.String style,
float pitch,
float pitchRange,
float speakingRate,
float volume)
Class constructor.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
Creates a copy of this voice.
|
java.lang.String |
getId()
Gets the id for this voice.
|
float |
getPitch()
Gets the pitch for this voice
|
float |
getPitchRange()
Gets the pitch range for this voice
|
float |
getSpeakingRate()
Gets the speaking rate for this voice
|
float |
getVolume()
Gets the volume for this voice
|
void |
setId(java.lang.String id)
Sets the id for this voice.
|
java.lang.String |
toString()
Converts a Voice to a printable string.
|
protected java.lang.String voiceId
protected float defaultPitch
protected float defaultPitchRange
protected float defaultSpeakingRate
protected float defaultVolume
public BaseVoice(java.lang.String id, java.lang.String name, int gender, int age, java.lang.String style, float pitch, float pitchRange, float speakingRate, float volume)
Voice
.id
- the idname
- the namegender
- the genderage
- the agestyle
- the stylepitch
- the baseline pitch in HertzpitchRange
- the pitch range in HertzspeakingRate
- the speaking rate in words per minutevolume
- the volume expressed between 0.0 and 1.0,
inclusivepublic java.lang.String getId()
setId(java.lang.String)
public void setId(java.lang.String id)
id
- the new idgetId()
public float getPitch()
public float getPitchRange()
public float getSpeakingRate()
public float getVolume()
public java.lang.Object clone()
public java.lang.String toString()