Overview | Package | Class | Tree | Index | Help
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD

Class javax.speech.recognition.SpeakerProfile

java.lang.Object
  |
  +--javax.speech.recognition.SpeakerProfile

public class SpeakerProfile
extends Object
A SpeakerProfile object is used to identify each enrollment by a user to a Recognizer. SpeakerProfile objects are used in management of speaker data through the SpeakerManager interface for a Recognizer and in selection of recognizers through the RecognizerModeDesc class.

A user may have a single or multiple profiles stored in recognizer. Examples of multiple profiles include a user who enrolls and trains the recognizer separately for different microphones or for different application domains (e.g. romance novels and business email).

Each SpeakerProfile object has a unique identifier (unique to the Recognizer), plus a user name and optionally a variant name that identifies each separate profile for a user (per-user unique). All three identifying properties should be human-readable strings. (The identifier is often the concatenation of the user name and variant.)

The user name may be the same as the "user.name" property stored in the java.lang.System properties. (Note: access to system properties is restricted by Java's SecurityManager.) Appropriate naming of profiles is the joint responsibility of users and recognizers.

Calls to the setXXX methods of a SpeakerProfile make persistent changes to the speaker data stored by the recognizer. These changes are persistent across sessions with the recognizer.

SpeakerProfiles are created and managed by the SpeakerManager for a Recognizer.

Speaker Data

A SpeakerProfile object identifies all the stored data the recognizer has about a speaker in a particular enrollment. The contents of the profile are controlled by the recognizer. Except for the properties of the SpeakerProfile, this data is not accessibile to an application. The profile may include:

The key role of stored profiles maintaining information that enables a recognition to adapt to characteristics of the speaker. The goal of this adaptation is to improve the performance and accuracy of speech recognition.

Speakers in Recognizer Selection

When selecting a Recognizer (through javax.speech.Central) a user will generally prefer to select an engine which they have already trained. The getSpeakerProfiles method of a RecognizerModeDesc should return the list of speaker profiles known to a recognizer (or null for speaker-independent recognizers and new recognizers). For that selection process to be effective, a recognizer is responsible for ensuring that the getSpeakerProfiles method of its RecognizerModeDesc includes its complete list of known speakers.

See Also:
SpeakerManager, newSpeakerProfile, getSpeakerManager, getSpeakerProfiles

Field Summary
String id
          Unique identifier for a SpeakerProfile.
String name
          Name of user identified by the profile.
String variant
          Name of variant enrollment of a user.
 
Constructor Summary
SpeakerProfile()
          Null constructor sets all properties too null.
SpeakerProfile(String id, String name, String variant)
          Constructor a profile object with all properties specified.
 
Method Summary
boolean equals(Object anObject)
          True if and only if the input parameter is not null and is a SpeakerProfile with equal values of all properties.
String getId()
          Return the SpeakerProfile identifier.
String getName()
          Return the speaker name.
String getVariant()
          Get the variant description.
boolean match(SpeakerProfile require)
          Returns true if this object matches the require object.
void setId(String identifier)
          Set the SpeakerProfile identifier.
void setName(String name)
          Set the speaker name.
void setVariant(String variant)
          Get the variant description.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notifyAll, notify, toString, wait, wait, wait
 

Field Detail

id

protected String id
Unique identifier for a SpeakerProfile. (Unique for a Recognizer.)
See Also:
getId

name

protected String name
Name of user identified by the profile.
See Also:
getName

variant

protected String variant
Name of variant enrollment of a user. Should be unique for a user.
See Also:
getName
Constructor Detail

SpeakerProfile

public SpeakerProfile()
Null constructor sets all properties too null.

Applications can create SpeakerProfile objects for use in selection of engines and when requesting an engine to build a new profile. A SpeakerProfile created by an application using a SpeakerProfile constructor does not reference a recognizer's profile.


SpeakerProfile

public SpeakerProfile(String id,
                      String name,
                      String variant)
Constructor a profile object with all properties specified.
Method Detail

getId

public String getId()
Return the SpeakerProfile identifier.

setId

public void setId(String identifier)
          throws IllegalArgumentException
Set the SpeakerProfile identifier. The identifier should be a human-readable string. The identifier string must be unique for a recognizer. The identifier is sometimes the concatenation of the user name and variants strings.

If the SpeakerProfile object is one returned from a recognizer's SpeakerManager, setting the identifier changes the persistent speaker data of the recognizer.

Throws:
IllegalArgumentException - if the speaker id is already being used by this recognizer

getName

public String getName()
Return the speaker name.

setName

public void setName(String name)
Set the speaker name. The speaker name should be a human-readable string. The speaker name does not need to be unique for a recognizer. (A speaker with more than one profile must have a separate variant for each).

If the SpeakerProfile object is one returned from a recognizer's SpeakerManager, setting the name changes the persistent speaker data of the recognizer.


getVariant

public String getVariant()
Get the variant description.

setVariant

public void setVariant(String variant)
Get the variant description. The variant should be a human-readable string. A speaker with more than one SpeakerProfile should have a different variant description for each profile. If a speaker has only one profile, the variant description may be null.

If the SpeakerProfile object is one returned from a recognizer's SpeakerManager, setting the variant changes the persistent speaker data of the recognizer.


match

public boolean match(SpeakerProfile require)
Returns true if this object matches the require 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.

equals

public boolean equals(Object anObject)
True if and only if the input parameter is not null and is a SpeakerProfile with equal values of all properties.
Overrides:
equals in class Object

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