org.robokind.api.speech
Interface SpeechEvent


public interface SpeechEvent

Defines a common interface for several types of Speech events. Some examples of events are word start and end events, or phoneme events.

Author:
Matthew Stevenson

Field Summary
static String BOOKMARK
           
static String SPEECH_END
           
static String SPEECH_START
           
static String VISEME
           
static String WORD_BOUNDARY
           
 
Method Summary
 Integer getCurrentData()
          Returns event data (usually phone or viseme id) associated with the start of the event.
 Integer getDuration()
          Returns the duration of the event in milliseconds.
 String getEventType()
          Returns the name of the event of this event.
 Integer getNextData()
          Returns event data (usually phone or viseme id) associated with the end of the event.
 Long getStreamNumber()
          Returns the stream number for tts output the event originates from.
 String getStringData()
          Returns any String data associated with the event (used for SAPI bookmark events).
 Integer getTextLength()
          Returns the number of characters the event covers.
 Integer getTextPosition()
          Returns the position of the speech request the event begins at.
 

Field Detail

SPEECH_START

static final String SPEECH_START
See Also:
Constant Field Values

SPEECH_END

static final String SPEECH_END
See Also:
Constant Field Values

VISEME

static final String VISEME
See Also:
Constant Field Values

WORD_BOUNDARY

static final String WORD_BOUNDARY
See Also:
Constant Field Values

BOOKMARK

static final String BOOKMARK
See Also:
Constant Field Values
Method Detail

getEventType

String getEventType()
Returns the name of the event of this event.

Returns:
name of the event of this event

getStreamNumber

Long getStreamNumber()
Returns the stream number for tts output the event originates from.

Returns:
stream number for tts output the event originates from

getTextPosition

Integer getTextPosition()
Returns the position of the speech request the event begins at.

Returns:
position of the speech request the event begins at

getTextLength

Integer getTextLength()
Returns the number of characters the event covers.

Returns:
number of characters the event covers

getCurrentData

Integer getCurrentData()
Returns event data (usually phone or viseme id) associated with the start of the event.

Returns:
event data (usually phone or viseme id) associated with the start of the event

getNextData

Integer getNextData()
Returns event data (usually phone or viseme id) associated with the end of the event.

Returns:
event data (usually phone or viseme id) associated with the end of the event

getStringData

String getStringData()
Returns any String data associated with the event (used for SAPI bookmark events).

Returns:
String data associated with the event (used for SAPI bookmark events)

getDuration

Integer getDuration()
Returns the duration of the event in milliseconds. For word boundaries, this duration for speaking the word in milliseconds. For phonemes and visemes, this is the duration of event in milliseconds.

Returns:
duration of the event in milliseconds


Copyright © 2011-2013. All Rights Reserved.