Overview | Package | Class | Tree | Index | Help | |||
PREV CLASS | NEXT CLASS | FRAMES | NO FRAMES | ||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.speech.synthesis.Voice
Voice
objects can be used in selection of
synthesis engines (through the SynthesizerModeDesc
).
The current speaking voice of a Synthesizer
can be changed during operation with the setVoice method
of the SynthesizerProperties
object.
Field Summary | |
static int | AGE_CHILD
Age roughly up to 12 years. |
static int | AGE_DONT_CARE
Ignore age when performing a match. |
static int | AGE_MIDDLE_ADULT
Age roughly 40 to 60 years. |
static int | AGE_NEUTRAL
Voice with age that is indeterminate. |
static int | AGE_OLDER_ADULT
Age roughly 60 years and up. |
static int | AGE_TEENAGER
Age roughly 13 to 19 years. |
static int | AGE_YOUNGER_ADULT
Age roughly 20 to 40 years. |
static int | GENDER_DONT_CARE
Ignore gender when performing a match of voices. |
static int | GENDER_FEMALE
Female voice. |
static int | GENDER_MALE
Male voice. |
static int | GENDER_NEUTRAL
Neutral voice that is neither male or female (for example, artificial voices, robotic voices). |
Constructor Summary | |
Voice()
Empty constructor sets voice name and style to null , and
age and gender to "don't care" values. |
|
Voice(String name,
int gender,
int age,
String style)
Constructor provided with voice name, gender, age and style. |
Method Summary | |
Object | clone()
Create a copy of this Voice . |
boolean | equals(Object anObject)
Returns true if and only if the parameter is not null
and is a Voice with equal values of name, age, gender,
and style. |
int | getAge()
Get the voice age. |
int | getGender()
Get the voice gender. |
String | getName()
Get the voice name. |
String | getStyle()
Set the voice style. |
boolean | match(Voice require)
Determine whether a Voice has all the features
defined in the require object. |
void | setAge(int age)
Set the voice age. |
void | setGender(int gender)
Set the voice gender. |
void | setName(String name)
Set the voice name. |
void | setStyle(String style)
Set the voice style. |
Methods inherited from class java.lang.Object | |
clone, equals, finalize, getClass, hashCode, notifyAll, notify, toString, wait, wait, wait |
Field Detail |
public static final int GENDER_DONT_CARE
GENDER_DONT_CARE
.
public static final int GENDER_FEMALE
public static final int GENDER_MALE
public static final int GENDER_NEUTRAL
public static final int AGE_DONT_CARE
AGE_DONT_CARE
.
public static final int AGE_CHILD
public static final int AGE_TEENAGER
public static final int AGE_YOUNGER_ADULT
public static final int AGE_MIDDLE_ADULT
public static final int AGE_OLDER_ADULT
public static final int AGE_NEUTRAL
Constructor Detail |
public Voice()
null
, and
age and gender to "don't care" values.public Voice(String name, int gender, int age, String style)
Method Detail |
public String getName()
null
.public void setName(String name)
public int getGender()
Voice voice = ...; Voice test = new Voice(); test.setGender(Voice.GENDER_MALE | Voice.GENDER_NEUTRAL); if (voice.match(test)) ...
public void setGender(int gender)
public int getAge()
Voice voice = ...; Voice test = new Voice(); test.setAge(Voice.AGE_CHILD | Voice.AGE_TEENAGER); if (voice.match(test)) ...
public void setAge(int age)
public String getStyle()
public void setStyle(String style)
public Object clone()
Voice
.public boolean match(Voice require)
Voice
has all the features
defined in the require
object. Strings in
require
which are either null
or
zero-length ("") are ignored.
All string comparisons are exact matches (case-sensitive).
GENDER_DONT_CARE
and AGE_DONT_CARE
values in the require
object are ignored.
The age and gender parameters are OR'ed: e.g. the required age
can be AGE_TEENAGER | AGE_CHILD
.
public boolean equals(Object anObject)
null
and is a Voice
with equal values of name, age, gender,
and style.Overview | Package | Class | Tree | Index | Help | |||
PREV CLASS | NEXT CLASS | FRAMES | NO FRAMES | ||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
JavaTM Speech API
Copyright 1997-1998 Sun Microsystems, Inc. All rights reserved
Send comments to javaspeech-comments@sun.com