edu.cmu.sphinx.frontend.endpoint
Class SpeechClassifiedData

java.lang.Object
  extended by edu.cmu.sphinx.frontend.endpoint.SpeechClassifiedData
All Implemented Interfaces:
Data, java.io.Serializable

public class SpeechClassifiedData
extends java.lang.Object
implements Data

A container for DoubleData class that indicates whether the contained DoubleData is speech or not.

See Also:
Serialized Form

Constructor Summary
SpeechClassifiedData(DoubleData doubleData, boolean isSpeech)
          Constructs a SpeechClassifiedData object.
 
Method Summary
 long getCollectTime()
          Returns the time in milliseconds at which the audio data is collected.
 DoubleData getDoubleData()
          Returns the DoubleData contained by this SpeechClassifiedData.
 long getFirstSampleNumber()
          Returns the position of the first sample in the original data.
 int getSampleRate()
          Returns the sample rate of the data.
 double[] getValues()
          Returns the data values.
 boolean isSpeech()
          Returns whether this is classified as speech.
 void setSpeech(boolean isSpeech)
          Sets whether this SpeechClassifiedData is speech or not.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpeechClassifiedData

public SpeechClassifiedData(DoubleData doubleData,
                            boolean isSpeech)
Constructs a SpeechClassifiedData object.

Parameters:
doubleData - the DoubleData
isSpeech - indicates whether the DoubleData is speech
Method Detail

setSpeech

public void setSpeech(boolean isSpeech)
Sets whether this SpeechClassifiedData is speech or not.

Parameters:
isSpeech - true if this is speech, false otherwise

isSpeech

public boolean isSpeech()
Returns whether this is classified as speech.

Returns:
true if this is classified as speech, false otherwise

getValues

public double[] getValues()
Returns the data values.

Returns:
the data values

getSampleRate

public int getSampleRate()
Returns the sample rate of the data.

Returns:
the sample rate of the data

getCollectTime

public long getCollectTime()
Returns the time in milliseconds at which the audio data is collected.

Returns:
the difference, in milliseconds, between the time the audio data is collected and midnight, January 1, 1970

getFirstSampleNumber

public long getFirstSampleNumber()
Returns the position of the first sample in the original data. The very first sample number is zero.

Returns:
the position of the first sample in the original data

getDoubleData

public DoubleData getDoubleData()
Returns the DoubleData contained by this SpeechClassifiedData.

Returns:
the DoubleData contained by this SpeechClassifiedData