|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.cmu.sphinx.frontend.BaseDataProcessor
edu.cmu.sphinx.frontend.endpoint.NonSpeechDataFilter
Given a sequence of Data, filters out the non-speech regions.
The sequence of Data should have the speech and non-speech regions
marked out by the SpeechStartSignal and SpeechEndSignal, using
the SpeechMarker
. Such a sequence of Data
for an utterance should look like one of the following two:
Case 1: Only one speech region
In the first case, the data stream has only one speech region:
Figure 1: A data stream with only one speech region.
After filtering, the non-speech regions are removed, and becomes:
Figure 2: A data stream with only on speech region
after filtering.
Case 2: Multiple speech regions
We will use the example of a data stream with two speech regions to illustrate the case of a data stream with multiple speech regions:
Figure 3: A data stream with two speech regions.
This case is more complicated than one speech region. The property mergeSpeechSegments is very important in controlling the behavior of this filter. This property determines whether individual speech regions (and the non-speech regions between them) in an utterance should be merged into one big region, or whether the individual speech regions should be converted into individual utterances. If mergeSpeechSegments is set to true, all the Data from the first SpeechStartSignal to the last SpeechEndSignal will be considered as one Utterance, and enclosed by a pair of DataStartSignal and DataEndSignal. All non-speech regions, as well as all SpeechStartSignals and SpeechEndSignals, are removed from the stream. This gives:
Figure 4: A data stream with two speech regions after filtering,
when mergeSpeechSegments is set to true. Note that all
SpeechStartSignals and SpeechEndSignals are removed.
On the other hand, if mergeSpeechSegments is set to false (the default), then each speech region will become its own data stream. Pictorially, our data stream with two speech regions becomes:
Figure 5: A data stream with two speech regions after filtering,
when mergeSpeechSegments is set to false.
That is, the SpeechStartSignal replaced by DataStartSignal, the SpeechEndSignal replaced by DataEndSignal, and the non-speech regions are removed.
Field Summary | |
static java.lang.String |
PROP_MERGE_SPEECH_SEGMENTS
The Sphinx Property that controls whether to merge discontiguous speech segments (and the non-speech segments between them) in an utterance into one big segment (true), or to treat the individual speech segments as individual utterances (false). |
static boolean |
PROP_MERGE_SPEECH_SEGMENTS_DEFAULT
The default value for PROP_MERGE_SPEECH_SEGMENTS. |
Constructor Summary | |
NonSpeechDataFilter()
|
Method Summary | |
Data |
getData()
Returns the next Data or Signal. |
void |
initialize()
Initializes this data processor |
void |
newProperties(PropertySheet ps)
This method is called when this configurable component has new data. |
void |
register(java.lang.String name,
Registry registry)
Register my properties. |
Methods inherited from class edu.cmu.sphinx.frontend.BaseDataProcessor |
getName, getPredecessor, getTimer, setPredecessor, toString |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.String PROP_MERGE_SPEECH_SEGMENTS
public static final boolean PROP_MERGE_SPEECH_SEGMENTS_DEFAULT
Constructor Detail |
public NonSpeechDataFilter()
Method Detail |
public void register(java.lang.String name, Registry registry) throws PropertyException
Configurable
register
in interface Configurable
register
in class BaseDataProcessor
PropertyException
public void newProperties(PropertySheet ps) throws PropertyException
Configurable
newProperties
in interface Configurable
newProperties
in class BaseDataProcessor
PropertyException
public void initialize()
initialize
in interface DataProcessor
initialize
in class BaseDataProcessor
public Data getData() throws DataProcessingException
getData
in interface DataProcessor
getData
in class BaseDataProcessor
DataProcessingException
- if a data processing error occurs
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |