inpro.incremental.basedata
Class BaseData

java.lang.Object
  extended by inpro.incremental.basedata.BaseData
All Implemented Interfaces:
edu.cmu.sphinx.instrumentation.Resetable, edu.cmu.sphinx.util.props.Configurable, BaseDataKeeper, SignalFeatureListener, java.util.EventListener

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


Nested Class Summary
private  class BaseData.TimedData<T>
           
(package private)  class BaseData.TimedDataComparator
           
 
Field Summary
(package private)  EOTFeatureAggregator eotfa
           
(package private)  java.util.concurrent.ConcurrentSkipListSet<BaseData.TimedData<weka.core.Instance>> eotFeatures
          contains WEKA instances from EOTFeatureAggregator
(package private) static org.apache.log4j.Logger logger
           
private  java.util.concurrent.ConcurrentSkipListSet<BaseData.TimedData<java.lang.Double>> loudnessData
           
static java.lang.String MEL_DATA
           
(package private)  java.util.concurrent.ConcurrentSkipListSet<BaseData.TimedData<edu.cmu.sphinx.frontend.DoubleData>> melData
           
static java.lang.String PITCHED_DATA
           
(package private)  java.util.concurrent.ConcurrentSkipListSet<BaseData.TimedData<PitchedDoubleData>> pitchedData
           
static java.lang.String PROP_EOTFA
           
private  ddf.minim.effects.RevisedBCurveFilter rbcFilter
           
private  double specTiltRSquared
           
private  double specTiltSlope
           
private  double specTiltTime
           
 
Constructor Summary
BaseData()
           
 
Method Summary
 void addData(edu.cmu.sphinx.frontend.Data d, java.lang.String type)
           
private  void computeSpectralTilt(double time)
           
 weka.core.Instance getEOTFeatures(double time)
           
static BaseData getInstance()
           
 double getLoudness(double time)
           
 PitchedDoubleData getPitchedData(double time)
           
 double getPitchInCent(double time)
           
 double getSpectralTilt(double time)
           
 double getSpectralTiltQual(double time)
           
 double getVoicing(double time)
           
private  void makeLoudness(int smoothingWindow, int windowPosition)
           
 void newProperties(edu.cmu.sphinx.util.props.PropertySheet ps)
           
 void newSignalFeatures(int frame, double power, boolean voicing, double pitch)
          Method called when a new set of signal features is available
static double percentileFilter(java.util.Collection<java.lang.Double> list, int windowPosition)
           
 void reset()
           
private  double revisedBCurveCorrectedRMS(edu.cmu.sphinx.frontend.DoubleData d)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROP_EOTFA

@S4Component(type=EOTFeatureAggregator.class,
             defaultClass=EOTFeatureAggregator.class,
             mandatory=false)
public static final java.lang.String PROP_EOTFA
See Also:
Constant Field Values

logger

static final org.apache.log4j.Logger logger

PITCHED_DATA

public static final java.lang.String PITCHED_DATA
See Also:
Constant Field Values

MEL_DATA

public static final java.lang.String MEL_DATA
See Also:
Constant Field Values

pitchedData

java.util.concurrent.ConcurrentSkipListSet<BaseData.TimedData<PitchedDoubleData>> pitchedData

melData

java.util.concurrent.ConcurrentSkipListSet<BaseData.TimedData<edu.cmu.sphinx.frontend.DoubleData>> melData

loudnessData

private java.util.concurrent.ConcurrentSkipListSet<BaseData.TimedData<java.lang.Double>> loudnessData

eotFeatures

java.util.concurrent.ConcurrentSkipListSet<BaseData.TimedData<weka.core.Instance>> eotFeatures
contains WEKA instances from EOTFeatureAggregator


eotfa

EOTFeatureAggregator eotfa

rbcFilter

private ddf.minim.effects.RevisedBCurveFilter rbcFilter

specTiltTime

private double specTiltTime

specTiltSlope

private double specTiltSlope

specTiltRSquared

private double specTiltRSquared
Constructor Detail

BaseData

public BaseData()
Method Detail

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

addData

public void addData(edu.cmu.sphinx.frontend.Data d,
                    java.lang.String type)

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

getPitchInCent

public double getPitchInCent(double time)
Specified by:
getPitchInCent in interface BaseDataKeeper

getVoicing

public double getVoicing(double time)
Specified by:
getVoicing in interface BaseDataKeeper

getPitchedData

public PitchedDoubleData getPitchedData(double time)

getEOTFeatures

public weka.core.Instance getEOTFeatures(double time)
Specified by:
getEOTFeatures in interface BaseDataKeeper

revisedBCurveCorrectedRMS

private double revisedBCurveCorrectedRMS(edu.cmu.sphinx.frontend.DoubleData d)

percentileFilter

public static double percentileFilter(java.util.Collection<java.lang.Double> list,
                                      int windowPosition)

makeLoudness

private void makeLoudness(int smoothingWindow,
                          int windowPosition)

getLoudness

public double getLoudness(double time)
Specified by:
getLoudness in interface BaseDataKeeper

computeSpectralTilt

private void computeSpectralTilt(double time)

getSpectralTiltQual

public double getSpectralTiltQual(double time)
Specified by:
getSpectralTiltQual in interface BaseDataKeeper

getSpectralTilt

public double getSpectralTilt(double time)
Specified by:
getSpectralTilt in interface BaseDataKeeper

reset

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

getInstance

public static BaseData getInstance()