JSAPI 2.0

javax.speech.synthesis
Class PhoneInfo

Object
  extended by PhoneInfo

public class PhoneInfo
extends Object

Provides dynamic information associated with a phoneme.

See Also:
SpeakableEvent, PHONEME_STARTED

Field Summary
static int UNKNOWN_DURATION
          A value signifying that the duration of a phone is not known.
 
Constructor Summary
PhoneInfo(String phoneme, int duration)
          Constructs a phone instance with associated information.
 
Method Summary
 int getDuration()
          Gets the anticipated duration of this phone realization.
 String getPhoneme()
          Gets the base phoneme name for this phone realization.
 String toString()
          Returns a printable String.
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

UNKNOWN_DURATION

public static final int UNKNOWN_DURATION
A value signifying that the duration of a phone is not known.

See Also:
getDuration(), Constant Field Values
Constructor Detail

PhoneInfo

public PhoneInfo(String phoneme,
                 int duration)
Constructs a phone instance with associated information.

The name of the base phoneme is specified using Unicode IPA. The duration of the phoneme is specified in milliseconds. The duration may be UNKNOWN_DURATION if it is unknown.

Parameters:
phoneme - the name of the phoneme
duration - the anticipated duration of this phoneme
See Also:
getPhoneme, getDuration(), UNKNOWN_DURATION
Method Detail

getPhoneme

public String getPhoneme()
Gets the base phoneme name for this phone realization.

This is the name of the phoneme using Unicode IPA.

Returns:
the phoneme name

getDuration

public int getDuration()
Gets the anticipated duration of this phone realization.

The duration is measured in milliseconds. The duration may be UNKNOWN_DURATION if it is unknown.

Returns:
the anticipated duration
See Also:
UNKNOWN_DURATION

toString

public String toString()
Returns a printable String. Useful for event-logging and debugging.

Overrides:
toString in class Object
Returns:
A printable String.

JSAPI 2.0

JavaTM Speech API 2.0, Final Release v2.0.6.
© 2008, Conversay and Sun Microsystems.

Free Web Hosting