Package com.sun.speech.engine.synthesis
Class BaseVoice
Voice
com.sun.speech.engine.synthesis.BaseVoice
- Direct Known Subclasses:
FreeTTSVoice
public class BaseVoice
extends Voice
Extends the JSAPI 1.0
Voice
class to encapsulate
engine-specific data.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected float
The default pitchprotected float
The default pitch rangeprotected float
The default speaking rateprotected float
The default volumeprotected String
The id of the voice -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()
Creates a copy of this voice.getId()
Gets the id for this voice.float
getPitch()
Gets the pitch for this voicefloat
Gets the pitch range for this voicefloat
Gets the speaking rate for this voicefloat
Gets the volume for this voicevoid
Sets the id for this voice.toString()
Converts a Voice to a printable string.
-
Field Details
-
voiceId
The id of the voice -
defaultPitch
protected float defaultPitchThe default pitch -
defaultPitchRange
protected float defaultPitchRangeThe default pitch range -
defaultSpeakingRate
protected float defaultSpeakingRateThe default speaking rate -
defaultVolume
protected float defaultVolumeThe default volume
-
-
Constructor Details
-
BaseVoice
public BaseVoice(String id, String name, int gender, int age, String style, float pitch, float pitchRange, float speakingRate, float volume) Class constructor. The age and gender parameters are defined inVoice
.- Parameters:
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, inclusive
-
-
Method Details
-
getId
Gets the id for this voice. Should be unique for a synthesizer.- Returns:
- the id for this voice
- See Also:
-
setId
Sets the id for this voice.- Parameters:
id
- the new id- See Also:
-
getPitch
public float getPitch()Gets the pitch for this voice- Returns:
- the pitch
-
getPitchRange
public float getPitchRange()Gets the pitch range for this voice- Returns:
- the pitch range
-
getSpeakingRate
public float getSpeakingRate()Gets the speaking rate for this voice- Returns:
- the speaking rate
-
getVolume
public float getVolume()Gets the volume for this voice- Returns:
- the volume
-
clone
Creates a copy of this voice.- Returns:
- a clone of this voice
-
toString
Converts a Voice to a printable string.
-