inpro.features
Class EOTFeatureAggregator

java.lang.Object
  extended by inpro.features.EOTFeatureAggregator
All Implemented Interfaces:
edu.cmu.sphinx.instrumentation.Resetable, edu.cmu.sphinx.util.props.Configurable, SignalFeatureListener, java.util.EventListener
Direct Known Subclasses:
EOTPredictor, EOTTrainer

public class EOTFeatureAggregator
extends java.lang.Object
implements edu.cmu.sphinx.instrumentation.Resetable, edu.cmu.sphinx.util.props.Configurable, SignalFeatureListener

implements SignalFeatureListener and derives acoustic features (that may or may not be) useful for EOT detection

Author:
timo

Field Summary
protected  boolean CLUSTERED_TIME
           
protected  boolean CONTINUOUS_TIME
           
private  weka.core.Attribute currentFrameEnergyAttribute
           
(package private)  double currentFrameEnergyValue
           
private  weka.core.Attribute currentPitchAttribute
           
(package private)  double currentPitchValue
           
private  weka.core.Attribute currentVoicingAttribute
           
(package private)  boolean currentVoicingValue
           
private  weka.core.Attribute[] energyRegressionAttributes
           
(package private)  TimeShiftingAnalysis[] energyRegressions
           
private  int[] energyRegressionSteps
           
protected  weka.core.Attribute framesIntoAudioAttribute
           
(package private)  int framesIntoAudioValue
           
(package private)  boolean includeFrameCount
           
protected  weka.core.Instances instances
           
private static int[] noSteps
           
(package private)  int numAttributes
          total number of attributes in an instance
private  weka.core.Attribute[] pitchRegressionAttributes
           
(package private)  TimeShiftingAnalysis[] pitchRegressions
           
private  int[] pitchRegressionSteps
           
static java.lang.String PROP_CLUSTER_TIME
           
static java.lang.String PROP_CONTINUOUS_TIME
           
static java.lang.String PROP_ENERGY_WINDOWS_LIST
           
static java.lang.String PROP_FRAME_COUNT
           
static java.lang.String PROP_PITCH_WINDOWS_LIST
           
static java.lang.String PROP_VENERGY_WINDOWS_LIST
           
private static java.lang.String[] regressionParams
          names for the sub-parameters for energy, voice and pitch
protected  weka.core.Attribute timeToEOT
           
protected  weka.core.Attribute turnBin
           
private  weka.core.Attribute[] voicedEnergyRegressionAttributes
           
(package private)  TimeShiftingAnalysis[] voicedEnergyRegressions
           
private  int[] voicedEnergyRegressionSteps
           
 
Constructor Summary
EOTFeatureAggregator()
           
 
Method Summary
 void createFeatures()
           
private static weka.core.Attribute[] createRegressionAttributesFor(int[] steps, java.lang.String name, weka.core.FastVector attInfo)
           
private static TimeShiftingAnalysis[] createRegressions(int[] steps)
           
 double getCurrentEnergy()
           
 double getCurrentPitch()
           
 weka.core.Instance getNewestFeatures()
           
 double getTimeIntoAudio()
           
 void newProperties(edu.cmu.sphinx.util.props.PropertySheet ps)
           
 void newSignalFeatures(double logEnergy, boolean voicing, double pitch)
           
 void newSignalFeatures(int frame, double power, boolean voicing, double pitch)
          Method called when a new set of signal features is available
 void printArffHeader()
           
private  int[] regressionArrayForList(java.lang.String s)
           
 void reset()
           
private  void reset(TimeShiftingAnalysis[] tsas)
           
 void setCurrentFrameEnergy(double logEnergy)
           
 void setCurrentPitch(double pitch)
           
 void setCurrentVoicing(boolean voicing)
           
private  void setRegressionValues(weka.core.Attribute[] atts, TimeShiftingAnalysis[] tsas, weka.core.Instance instance)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROP_PITCH_WINDOWS_LIST

@S4String
public static final java.lang.String PROP_PITCH_WINDOWS_LIST
See Also:
Constant Field Values

PROP_ENERGY_WINDOWS_LIST

@S4String
public static final java.lang.String PROP_ENERGY_WINDOWS_LIST
See Also:
Constant Field Values

PROP_VENERGY_WINDOWS_LIST

@S4String
public static final java.lang.String PROP_VENERGY_WINDOWS_LIST
See Also:
Constant Field Values

PROP_CLUSTER_TIME

@S4Boolean(defaultValue=false)
public static final java.lang.String PROP_CLUSTER_TIME
See Also:
Constant Field Values

PROP_CONTINUOUS_TIME

@S4Boolean(defaultValue=false)
public static final java.lang.String PROP_CONTINUOUS_TIME
See Also:
Constant Field Values

PROP_FRAME_COUNT

@S4Boolean(defaultValue=false)
public static final java.lang.String PROP_FRAME_COUNT
See Also:
Constant Field Values

noSteps

private static final int[] noSteps

energyRegressionSteps

private int[] energyRegressionSteps

voicedEnergyRegressionSteps

private int[] voicedEnergyRegressionSteps

pitchRegressionSteps

private int[] pitchRegressionSteps

regressionParams

private static final java.lang.String[] regressionParams
names for the sub-parameters for energy, voice and pitch


framesIntoAudioAttribute

protected weka.core.Attribute framesIntoAudioAttribute

includeFrameCount

@S4Boolean(defaultValue=true)
boolean includeFrameCount

currentFrameEnergyAttribute

private weka.core.Attribute currentFrameEnergyAttribute

energyRegressionAttributes

private weka.core.Attribute[] energyRegressionAttributes

voicedEnergyRegressionAttributes

private weka.core.Attribute[] voicedEnergyRegressionAttributes

currentVoicingAttribute

private weka.core.Attribute currentVoicingAttribute

currentPitchAttribute

private weka.core.Attribute currentPitchAttribute

pitchRegressionAttributes

private weka.core.Attribute[] pitchRegressionAttributes

CLUSTERED_TIME

@S4Boolean(defaultValue=false)
protected boolean CLUSTERED_TIME

CONTINUOUS_TIME

@S4Boolean(defaultValue=false)
protected boolean CONTINUOUS_TIME

timeToEOT

protected weka.core.Attribute timeToEOT

turnBin

protected weka.core.Attribute turnBin

instances

protected weka.core.Instances instances

framesIntoAudioValue

int framesIntoAudioValue

currentFrameEnergyValue

double currentFrameEnergyValue

energyRegressions

TimeShiftingAnalysis[] energyRegressions

voicedEnergyRegressions

TimeShiftingAnalysis[] voicedEnergyRegressions

currentVoicingValue

boolean currentVoicingValue

currentPitchValue

double currentPitchValue

pitchRegressions

TimeShiftingAnalysis[] pitchRegressions

numAttributes

int numAttributes
total number of attributes in an instance

Constructor Detail

EOTFeatureAggregator

public EOTFeatureAggregator()
Method Detail

createRegressionAttributesFor

private static weka.core.Attribute[] createRegressionAttributesFor(int[] steps,
                                                                   java.lang.String name,
                                                                   weka.core.FastVector attInfo)

createRegressions

private static TimeShiftingAnalysis[] createRegressions(int[] steps)

setRegressionValues

private void setRegressionValues(weka.core.Attribute[] atts,
                                 TimeShiftingAnalysis[] tsas,
                                 weka.core.Instance instance)

createFeatures

public void createFeatures()

getNewestFeatures

public weka.core.Instance getNewestFeatures()

getTimeIntoAudio

public double getTimeIntoAudio()

setCurrentFrameEnergy

public void setCurrentFrameEnergy(double logEnergy)

setCurrentVoicing

public void setCurrentVoicing(boolean voicing)

setCurrentPitch

public void setCurrentPitch(double pitch)

reset

private void reset(TimeShiftingAnalysis[] tsas)

reset

public void reset()
Specified by:
reset in interface edu.cmu.sphinx.instrumentation.Resetable

regressionArrayForList

private int[] regressionArrayForList(java.lang.String s)

printArffHeader

public void printArffHeader()

newProperties

public void newProperties(edu.cmu.sphinx.util.props.PropertySheet ps)
                   throws edu.cmu.sphinx.util.props.PropertyException
Specified by:
newProperties in interface edu.cmu.sphinx.util.props.Configurable
Throws:
edu.cmu.sphinx.util.props.PropertyException

getCurrentEnergy

public double getCurrentEnergy()

getCurrentPitch

public double getCurrentPitch()

newSignalFeatures

public void newSignalFeatures(double logEnergy,
                              boolean voicing,
                              double pitch)

newSignalFeatures

public void newSignalFeatures(int frame,
                              double power,
                              boolean voicing,
                              double pitch)
Description copied from interface: SignalFeatureListener
Method called when a new set of signal features is available

Specified by:
newSignalFeatures in interface SignalFeatureListener
Parameters:
frame - the frame number for this result
power - average power per sample in the frame param rbcpower average power per sample after filtering the frame with a revised B-curve filter
voicing - whether this frame is voiced
pitch - pitch for this frame in cent relative to 100 Hz