edu.cmu.sphinx.frontend.endpoint
Class ExcessiveNonSpeechPruner
java.lang.Object
edu.cmu.sphinx.util.props.ConfigurableAdapter
edu.cmu.sphinx.frontend.BaseDataProcessor
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 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. |
|
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 java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
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
ExcessiveNonSpeechPruner
public ExcessiveNonSpeechPruner(int maxNonSpeechTime)
ExcessiveNonSpeechPruner
public ExcessiveNonSpeechPruner()
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 ConfigurableAdapter
- Parameters:
ps - a property sheet holding the new data
- Throws:
PropertyException - if there is a problem with the properties.
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