|
Sautrela | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.gtts.sautrela.engine.AbstractDataProcessor
edu.gtts.sautrela.sp.VoiceActivityDetector
public class VoiceActivityDetector
An energy based Voice Activity Detector. Adds a voiced/unvoiced
boolean mask to a DataStream. Frames with an energy level lower than
max(energy)-threshold (in dB), are considered
to be unvoiced. A boolean array representing the voice mask is
added to the DataBeginStream by means of a propperty
called VADFlag.
DataStreamBegin.getProperty(String),
Serialized Form| Field Summary | |
|---|---|
static double |
DEFAULT_THRESHOLD
default energy threshold = 30dB |
| Fields inherited from interface java.beans.BeanInfo |
|---|
ICON_COLOR_16x16, ICON_COLOR_32x32, ICON_MONO_16x16, ICON_MONO_32x32 |
| Constructor Summary | |
|---|---|
VoiceActivityDetector()
Creates a new instance of VoiceActivityDetector |
|
| Method Summary | |
|---|---|
void |
editBeanInfo(java.beans.BeanInfo info)
|
double |
getThreshold()
Getter for property threshold. |
static void |
main(java.lang.String[] args)
|
void |
process(Buffer in,
Buffer out)
Processes the input Data. |
void |
setThreshold(double threshold)
Setter for property threshold. |
static boolean[] |
transformVADFlag(boolean[] flag,
int windowSize,
int shift,
int leftSkip,
int rightSkip,
int minVoiceCount)
Utility method for converting VAD flags. |
| Methods inherited from class edu.gtts.sautrela.engine.AbstractDataProcessor |
|---|
getAdditionalBeanInfo, getBeanDescriptor, getDefaultEventIndex, getDefaultPropertyIndex, getEventSetDescriptors, getIcon, getMethodDescriptors, getName, getPropertyDescriptors, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final double DEFAULT_THRESHOLD
| Constructor Detail |
|---|
public VoiceActivityDetector()
| Method Detail |
|---|
public double getThreshold()
public void setThreshold(double threshold)
threshold - New value of property threshold.
public static boolean[] transformVADFlag(boolean[] flag,
int windowSize,
int shift,
int leftSkip,
int rightSkip,
int minVoiceCount)
outFlag(i) = numberOfTrue(window(i)) >= minVoiceCount ? true : falseoutFlag.length = (flag.length - leftSkip - rightSkip - windowSize + shift) / shift
flag - The source VADflag array.windowSize - The sliding window sizeshift - The sliding window shiftleftSkip - The number of values to skipt at the leftrightSkip - The number of values to skipt at the rigthminVoiceCount - Minimum number of voiced values in the window to generate
a voiced output
public void process(Buffer in,
Buffer out)
throws DataProcessorException
in - Input Bufferout - Output Buffer
DataProcessorExceptionpublic void editBeanInfo(java.beans.BeanInfo info)
editBeanInfo in class AbstractDataProcessor
public static void main(java.lang.String[] args)
throws java.lang.Exception
java.lang.Exception
|
Sautrela | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||