|
JSAPI 2.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectSpeakerProfile
public class SpeakerProfile
Identifies speaker data in a SpeakerManager
.
SpeakerProfile
objects are used in management of speaker data through
the SpeakerManager
interface for a Recognizer
.
A user may have one or more profiles associated
with a SpeakerManager
.
A user may want multiple profiles to enroll and train
separately for different microphones or for different
application domains (e.g., name dialing and command and control).
Each SpeakerProfile
object has
a user name, and a variant
name that identifies each separate profile for a user (per-user unique).
The properties should be human-readable String
s.
The user name may be the same as the "user.name"
property stored in
the java.lang.System
properties.
However, access to System
properties may be restricted
by security policies.
Appropriate application of SpeakerProfile
s is
the joint responsibility of applications and SpeakerManager
s.
Applications should ensure that the property values are meaningful
and SpeakerManager
s should ensure the integrity
of the associated speaker data.
Recognizer
,
RecognizerMode
,
SpeakerManager
,
System
Field Summary | |
---|---|
static SpeakerProfile |
DEFAULT
The default SpeakerProfile is used
if no other speaker has been set. |
Constructor Summary | |
---|---|
SpeakerProfile(String name,
String variant)
Constructs a SpeakerProfile with the specified properties. |
Method Summary | |
---|---|
boolean |
equals(Object obj)
Returns true if and only if the parameter is not null
and is a SpeakerProfile with equal values. |
String |
getName()
Returns the speaker name. |
String |
getVariant()
Gets the variant description. |
int |
hashCode()
Returns a hash code value for the object. |
boolean |
match(SpeakerProfile required)
Returns true if this object matches the required object. |
String |
toString()
Returns a String representation of this SpeakerProfile . |
Methods inherited from class Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final SpeakerProfile DEFAULT
SpeakerProfile
is used
if no other speaker has been set.
Note that this default value uses empty String
s
for the property values of this class.
Applications should present a properly localized representation
of "default" in user interfaces.
setCurrentSpeaker
Constructor Detail |
---|
public SpeakerProfile(String name, String variant)
SpeakerProfile
with the specified properties.
The SpeakerProfile
identifies speaker data
in the SpeakerManager
.
The name
and variant
should
be human-readable String
s.
The SpeakerManager expects non-null
,
distinct SpeakerProfile
s
(not equal) when managing speaker data.
null
parameter values may be used for "don't care" values
in association with RecognizerMode
and
Recognizer
selection.
See getSpeakerProfiles
for details.
name
- the speaker namevariant
- a String
distinguishing multiple
SpeakerProfile
s for the same speakergetName
,
getVariant
,
equals
,
RecognizerMode
,
RecognizerMode.getSpeakerProfiles()
,
Recognizer
,
SpeakerManager
Method Detail |
---|
public boolean equals(Object obj)
true
if and only if the parameter is not null
and is a SpeakerProfile
with equal values.
equals
in class Object
obj
- a SpeakerProfile
to compare
true
if the SpeakerProfile
objects comparepublic String getName()
getVariant
,
SpeakerProfile
public String getVariant()
SpeakerProfile
s
for a single speaker.
It should be unique for a given user and condition
when associated with speaker data.
getName
,
SpeakerProfile
public int hashCode()
hashCode
in class Object
public boolean match(SpeakerProfile required)
true
if this object matches the required
object.
A match requires that each non-null
or non-zero-length
String
property of the required
object
be an exact String
match to the properties of this object.
required
- a SpeakerProfile
with the required values
true
if the SpeakerProfile
s matchequals
public String toString()
String
representation of this SpeakerProfile
.
toString
in class Object
String
representation of this SpeakerProfile
|
JSAPI 2.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
JavaTM Speech API 2.0,
Final Release v2.0.6.
© 2008, Conversay and Sun Microsystems.