org.alchar.jdtk
Class Voice

java.lang.Object
  extended by javax.speech.synthesis.Voice
      extended by org.alchar.jdtk.Voice

public class Voice
extends Voice

This class encapsulates a DECtalk software speech synthesizer voice. It also provides constants for the system defined voices (by name).


Field Summary
static Voice BETTY
          The default female voice.
static Voice DENNIS
          A younger male voice.
static Voice FRANK
          An older male voice.
static Voice HARRY
          A deep male voice.
static Voice KIT
          A child voice.
static Voice PAUL
          The default male voice.
static Voice RITA
          A deep female voice.
static Voice URSULA
          An older female voice.
static Voice[] voices
          A static array holding the list of defined voices.
static Voice WENDY
          A whispery female voice.
 
Fields inherited from class javax.speech.synthesis.Voice
AGE_CHILD, AGE_DONT_CARE, AGE_MIDDLE_ADULT, AGE_NEUTRAL, AGE_OLDER_ADULT, AGE_TEENAGER, AGE_YOUNGER_ADULT, GENDER_DONT_CARE, GENDER_FEMALE, GENDER_MALE, GENDER_NEUTRAL
 
Constructor Summary
Voice(String name, int gender, int age, String style, int averagePitch, int pitchRange)
          Create a new DECtalk voice with the given parameters.
 
Method Summary
 int getAveragePitch()
          Return the average pitch.
 int getPitchRange()
          Return the pitch range percentage.
static Voice[] getVoices()
          Return a array of all available voices.
 String toString()
          Return a string representation of this object.
 
Methods inherited from class javax.speech.synthesis.Voice
clone, equals, getAge, getGender, getName, getStyle, match, setAge, setGender, setName, setStyle
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PAUL

public static final Voice PAUL
The default male voice.


BETTY

public static final Voice BETTY
The default female voice.


HARRY

public static final Voice HARRY
A deep male voice.


FRANK

public static final Voice FRANK
An older male voice.


DENNIS

public static final Voice DENNIS
A younger male voice.


KIT

public static final Voice KIT
A child voice.


URSULA

public static final Voice URSULA
An older female voice.


RITA

public static final Voice RITA
A deep female voice.


WENDY

public static final Voice WENDY
A whispery female voice.


voices

public static final Voice[] voices
A static array holding the list of defined voices.

Constructor Detail

Voice

public Voice(String name,
             int gender,
             int age,
             String style,
             int averagePitch,
             int pitchRange)
Create a new DECtalk voice with the given parameters.

Parameters:
name - Name
gender - Gender
age - Age
style - Style
averagePitch - Average pitch
pitchRange - Pitch range
Method Detail

getAveragePitch

public int getAveragePitch()
Return the average pitch.

Returns:
Average pitch

getPitchRange

public int getPitchRange()
Return the pitch range percentage.

Returns:
Pitch range percentage

toString

public String toString()
Return a string representation of this object.

Overrides:
toString in class Object
Returns:
String representation

getVoices

public static Voice[] getVoices()
Return a array of all available voices.

Returns:
Array of voices


Copyright © 2007-2009 Kris Van Hees. All Rights Reserved.