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

Field Detail

SPEECH_START

static final java.lang.String SPEECH_START
See Also:
Constant Field Values

SPEECH_END

static final java.lang.String SPEECH_END
See Also:
Constant Field Values

VISEME

static final java.lang.String VISEME
See Also:
Constant Field Values

WORD_BOUNDARY

static final java.lang.String WORD_BOUNDARY
See Also:
Constant Field Values

BOOKMARK

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

getEventType

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

Returns:
name of the event of this event

getStreamNumber

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

Returns:
stream number for tts output the event originates from

getTextPosition

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

Returns:
position of the speech request the event begins at

getTextLength

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

Returns:
number of characters the event covers

getCurrentData

java.lang.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

java.lang.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

java.lang.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

java.lang.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-2014. All Rights Reserved.