|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.cmu.sphinx.util.props.ConfigurableAdapter
edu.cmu.sphinx.frontend.BaseDataProcessor
edu.cmu.sphinx.frontend.endpoint.SpeechClassifier
public class SpeechClassifier
Implements a level tracking endpointer invented by Bent Schmidt Nielsen.
This endpointer is composed of three main steps.
The first step, classification of audio into speech and non-speech, uses Bent Schmidt Nielsen's algorithm. Each time audio comes in, the average signal level and the background noise level are updated, using the signal level of the current audio. If the average signal level is greater than the background noise level by a certain threshold value (configurable), then the current audio is marked as speech. Otherwise, it is marked as non-speech.
The second and third step of this endpointer are documented in the classes SpeechMarker and
NonSpeechDataFilter.
SpeechMarker| Field Summary | |
|---|---|
static java.lang.String |
PROP_ADJUSTMENT
A property specifying the adjustment. |
static java.lang.String |
PROP_FRAME_LENGTH_MS
A property specifying the endpointing frame length in milliseconds. |
static java.lang.String |
PROP_MIN_SIGNAL
A property specifying the minimum signal level used to update the background signal level. |
static java.lang.String |
PROP_THRESHOLD
A property specifying the threshold. |
| Constructor Summary | |
|---|---|
SpeechClassifier()
|
|
SpeechClassifier(int frameLengthMs,
double adjustment,
double threshold,
double minSignal)
|
|
| Method Summary | |
|---|---|
Data |
getData()
Returns the next Data object. |
void |
initialize()
Initializes this LevelTracker endpointer and DataProcessor predecessor. |
boolean |
isSpeech()
|
static double |
logRootMeanSquare(double[] samples)
Returns the logarithm base 10 of the root mean square of the given samples. |
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, setPredecessor |
| Methods inherited from class edu.cmu.sphinx.util.props.ConfigurableAdapter |
|---|
getName, toString |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
@S4Integer(defaultValue=10) public static final java.lang.String PROP_FRAME_LENGTH_MS
@S4Double(defaultValue=0.0) public static final java.lang.String PROP_MIN_SIGNAL
@S4Double(defaultValue=10.0) public static final java.lang.String PROP_THRESHOLD
@S4Double(defaultValue=0.0030) public static final java.lang.String PROP_ADJUSTMENT
| Constructor Detail |
|---|
public SpeechClassifier(int frameLengthMs,
double adjustment,
double threshold,
double minSignal)
public SpeechClassifier()
| Method Detail |
|---|
public void newProperties(PropertySheet ps)
throws PropertyException
Configurable
newProperties in interface ConfigurablenewProperties in class ConfigurableAdapterps - a property sheet holding the new data
PropertyException - if there is a problem with the properties.public void initialize()
initialize in interface DataProcessorinitialize in class BaseDataProcessorpublic static double logRootMeanSquare(double[] samples)
samples - the samples
public Data getData()
throws DataProcessingException
getData in interface DataProcessorgetData in class BaseDataProcessorDataProcessingException - if a data processing error occurspublic boolean isSpeech()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||