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

Fields
Modifier and Type
Field
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 String`
`voiceId`
The id of the voice

## Constructor Summary

Constructors
Constructor
Description
`BaseVoice(String id, String name, int gender, int age, String style, float pitch, float pitchRange, float speakingRate, float volume)`
Class constructor.

## Method Summary

Modifier and Type
Method
Description
`Object`
`clone()`
Creates a copy of this voice.
`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(String id)`
Sets the id for this voice.
`String`
`toString()`
Converts a Voice to a printable string.

## Field Details

### voiceId

protected String voiceId
The id of the voice

### defaultPitch

protected float defaultPitch
The default pitch

### defaultPitchRange

protected float defaultPitchRange
The default pitch range

### defaultSpeakingRate

protected float defaultSpeakingRate
The default speaking rate

### defaultVolume

protected float defaultVolume
The 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 in `Voice`.

Parameters:
  `id` - the id
  `name` - the name
  `gender` - the gender
  `age` - the age
  `style` - the style
  `pitch` - the baseline pitch in Hertz
  `pitchRange` - the pitch range in Hertz
  `speakingRate` - the speaking rate in words per minute
  `volume` - the volume expressed between 0.0 and 1.0, inclusive

## Method Details

### getId

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

Returns:
  the id for this voice
See Also:
  - `setId(java.lang.String)`

### setId

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

Parameters:
  `id` - the new id
See Also:
  - `getId()`

### 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

public Object clone()
Creates a copy of this voice.

Returns:
  a clone of this voice

### toString

public String toString()
Converts a Voice to a printable string.