org.robokind.impl.speech
Class PortableSpeechEvent

java.lang.Object
  extended by org.robokind.impl.speech.PortableSpeechEvent
All Implemented Interfaces:
SpeechEvent

public class PortableSpeechEvent
extends Object
implements SpeechEvent

SpeechEvent implementation wrapping a SpeechEventRecord.

Author:
Matthew Stevenson

Nested Class Summary
static class PortableSpeechEvent.MessageRecordAdapter
           
static class PortableSpeechEvent.RecordMessageAdapter
          Converts a SpeechEventRecord to a PortableSpeechEvent.
 
Field Summary
 
Fields inherited from interface org.robokind.api.speech.SpeechEvent
SPEECH_END, SPEECH_START, VISEME
 
Constructor Summary
PortableSpeechEvent(SpeechEvent event)
           
PortableSpeechEvent(SpeechEventRecord record)
          Creates a new SpeechEvent from the given SpeechEventRecord.
PortableSpeechEvent(String speechEventType, long streamNumber, int textPosition, int textLength, int currentData, int nextData, String stringData, int duration)
           
 
Method Summary
 Integer getCurrentData()
           
 Integer getDuration()
           
 Integer getNextData()
           
 SpeechEventRecord getRecord()
           
 String getSpeechEventType()
           
 Long getStreamNumber()
           
 String getStringData()
           
 Integer getTextLength()
           
 Integer getTextPosition()
           
 long getTimestampMillisecUTC()
           
 void setTimestampMillisecUTC(long timestamp)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PortableSpeechEvent

public PortableSpeechEvent(SpeechEventRecord record)
Creates a new SpeechEvent from the given SpeechEventRecord.

Parameters:
record - SpeechEventRecord to wrap

PortableSpeechEvent

public PortableSpeechEvent(SpeechEvent event)

PortableSpeechEvent

public PortableSpeechEvent(String speechEventType,
                           long streamNumber,
                           int textPosition,
                           int textLength,
                           int currentData,
                           int nextData,
                           String stringData,
                           int duration)
Method Detail

getSpeechEventType

public String getSpeechEventType()
Specified by:
getSpeechEventType in interface SpeechEvent

getStreamNumber

public Long getStreamNumber()
Specified by:
getStreamNumber in interface SpeechEvent

getTextPosition

public Integer getTextPosition()
Specified by:
getTextPosition in interface SpeechEvent

getTextLength

public Integer getTextLength()
Specified by:
getTextLength in interface SpeechEvent

getCurrentData

public Integer getCurrentData()
Specified by:
getCurrentData in interface SpeechEvent

getNextData

public Integer getNextData()
Specified by:
getNextData in interface SpeechEvent

getStringData

public String getStringData()
Specified by:
getStringData in interface SpeechEvent

getDuration

public Integer getDuration()
Specified by:
getDuration in interface SpeechEvent

getTimestampMillisecUTC

public long getTimestampMillisecUTC()
Specified by:
getTimestampMillisecUTC in interface SpeechEvent

setTimestampMillisecUTC

public void setTimestampMillisecUTC(long timestamp)

getRecord

public SpeechEventRecord getRecord()


Copyright © 2011-2012. All Rights Reserved.