edu.cmu.sphinx.frontend.endpoint
Class ExcessiveNonSpeechPruner

java.lang.Object
  extended by edu.cmu.sphinx.frontend.BaseDataProcessor
      extended by edu.cmu.sphinx.frontend.endpoint.ExcessiveNonSpeechPruner
All Implemented Interfaces:
DataProcessor, Configurable

public class ExcessiveNonSpeechPruner
extends BaseDataProcessor

Removes excessive non-speech-segments from a speech stream. Compared with NonSpeechDatatFilter this component does not remove all non-speech frames. It just reduces the non-speech parts to a user defined length.

See Also:
SpeechMarker, NonSpeechDataFilter

Field Summary
static int PROP_MAX_NON_SPEECH_TIME_DEFAULT
          The default value of PROP_MAX_NON_SPEECH_TIME.
static java.lang.String PROP_MAX_NON_SPEECH_TIME_MS
          The Sphinx Property for the maximum amount of (subsequent) none-speech time (in ms) to be preserved in the speech stream.
 
Constructor Summary
ExcessiveNonSpeechPruner()
           
 
Method Summary
 int getAudioTime(Data data)
          Returns the amount of audio data in milliseconds in the given SpeechClassifiedData object.
 Data getData()
          Returns the processed Data output.
 void newProperties(PropertySheet ps)
          This method is called when this configurable component needs to be reconfigured.
 
Methods inherited from class edu.cmu.sphinx.frontend.BaseDataProcessor
getPredecessor, getTimer, initialize, setPredecessor, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PROP_MAX_NON_SPEECH_TIME_MS

@S4Integer(defaultValue=2147483647)
public static final java.lang.String PROP_MAX_NON_SPEECH_TIME_MS
The Sphinx Property for the maximum amount of (subsequent) none-speech time (in ms) to be preserved in the speech stream.

See Also:
Constant Field Values

PROP_MAX_NON_SPEECH_TIME_DEFAULT

public static final int PROP_MAX_NON_SPEECH_TIME_DEFAULT
The default value of PROP_MAX_NON_SPEECH_TIME. The default is chosen to prune nothing.

See Also:
Constant Field Values
Constructor Detail

ExcessiveNonSpeechPruner

public ExcessiveNonSpeechPruner()
Method Detail

getData

public Data getData()
             throws DataProcessingException
Returns the processed Data output.

Specified by:
getData in interface DataProcessor
Specified by:
getData in class BaseDataProcessor
Returns:
an Data object that has been processed by this DataProcessor
Throws:
DataProcessingException - if a data processor error occurs

getAudioTime

public int getAudioTime(Data data)
Returns the amount of audio data in milliseconds in the given SpeechClassifiedData object.

Parameters:
data - the SpeechClassifiedData object
Returns:
the amount of audio data in milliseconds

newProperties

public void newProperties(PropertySheet ps)
                   throws PropertyException
Description copied from interface: Configurable
This method is called when this configurable component needs to be reconfigured.

Specified by:
newProperties in interface Configurable
Overrides:
newProperties in class BaseDataProcessor
Parameters:
ps - a property sheet holding the new data
Throws:
PropertyException - if there is a problem with the properties.