|
||||||||||
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
inpro.pitch.PitchTracker
public class PitchTracker
Data Processor for voicing-decision and pitch tracking. pitch tracking usually consists of several steps: - preprocessing (e. g. low pass filtering) - period candidate generation (score, auto-correlation, cross-correlation, normalized cross-correlation) - candidate refinement (e. g. thresholding of candidates) - voicing decision and final path determination (dynamic programming, ...)
Field Summary | |
---|---|
private double |
candidateScoreThreshold
TODO: IS THIS CORRECT? |
protected static boolean |
debug
|
private double |
energyThreshold
the silence threshold below which we don't do any pitch extraction (this avoids division by zero, and especially reduces processing overhead) |
private double |
lastBestPitch
for tracking, we have to keep track of the previously selected lag |
private java.util.List<SignalFeatureListener> |
listeners
|
private int |
maxLag
|
private int |
minLag
|
private static double |
NO_LAST_BEST_PITCH
|
private java.util.concurrent.ArrayBlockingQueue<PitchedDoubleData> |
pitchAssignmentQueue
pitch can only be assigned to a PitchedDoubleData object a little later, when this data is in the center of the signalBuffer (not the newest data on the right of the buffer) but we don't want to buffer the objects before we output them; we therefore output the PDD objects immediately, keep reference to them in this queue and fill in the pitch values once they have been calculated. |
static java.lang.String |
PROP_CAND_SCORE_THRESHOLD
|
static java.lang.String |
PROP_LISTENERS
|
static java.lang.String |
PROP_MAX_PITCH_HZ
|
static java.lang.String |
PROP_MIN_PITCH_HZ
|
private static float |
SAMPLING_FREQUENCY
|
private double[] |
signalBuffer
|
Fields inherited from class edu.cmu.sphinx.util.props.ConfigurableAdapter |
---|
logger |
Constructor Summary | |
---|---|
PitchTracker()
|
Method Summary | |
---|---|
double[] |
amdf(double[] signal)
calculate score of a given signalBuffer and downsample the signalBuffer on the way. |
(package private) static PitchCandidate |
bestCandidateSelection(java.util.List<PitchCandidate> candidates)
select the candidate with the highest quality (deepest minimum in the lagScoreTrajectory |
double[] |
cmn(double[] smdsf)
cumulative mean normalization |
static void |
functionalTest(java.lang.String[] args,
edu.cmu.sphinx.util.props.ConfigurationManager cm)
|
edu.cmu.sphinx.frontend.Data |
getData()
|
private static java.util.Queue<java.lang.Double> |
getReferencePitch(java.lang.String filename)
|
static void |
main(java.lang.String[] args)
|
void |
newProperties(edu.cmu.sphinx.util.props.PropertySheet ps)
|
(package private) double |
parabolicInterpolation(double alpha,
double beta,
double gamma)
|
private java.util.List<PitchCandidate> |
qualityThresheldCandidates(double[] lagScoreTrajectory)
pick global minima in the lagScoreFunction that are smaller than candidateScoreThreshold as candidates and return the least lag. |
private void |
signalListeners(PitchCandidate selectedCandidate,
java.util.List<PitchCandidate> candidates)
signal listeners, and apply values to first element of queue |
private static PitchCandidate |
simplisticCandidateSelection(java.util.List<PitchCandidate> candidates)
select the first candidate (with the highest f0) |
double[] |
smdsf(double[] signal)
calculate the sum magnitude difference square function of a signal. |
static void |
speedTest(edu.cmu.sphinx.frontend.BaseDataProcessor fe)
|
(package private) PitchCandidate |
trackingCandidateSelection(java.util.List<PitchCandidate> candidates)
select lag of the candidate that is closest to the most recently selected lag (which is recorded in lastBestPitch) |
Methods inherited from class edu.cmu.sphinx.frontend.BaseDataProcessor |
---|
getPredecessor, getTimer, initialize, setPredecessor |
Methods inherited from class edu.cmu.sphinx.util.props.ConfigurableAdapter |
---|
getName, initLogger, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private static final float SAMPLING_FREQUENCY
@S4Double(defaultValue=0.15) public static final java.lang.String PROP_CAND_SCORE_THRESHOLD
private double candidateScoreThreshold
@S4Double(defaultValue=66.66666666) public static final java.lang.String PROP_MIN_PITCH_HZ
private int maxLag
@S4Double(defaultValue=500.0) public static final java.lang.String PROP_MAX_PITCH_HZ
private int minLag
private double energyThreshold
private double[] signalBuffer
private java.util.concurrent.ArrayBlockingQueue<PitchedDoubleData> pitchAssignmentQueue
@S4ComponentList(type=SignalFeatureListener.class) public static final java.lang.String PROP_LISTENERS
private java.util.List<SignalFeatureListener> listeners
protected static final boolean debug
private static final double NO_LAST_BEST_PITCH
private double lastBestPitch
Constructor Detail |
---|
public PitchTracker()
Method Detail |
---|
public double[] amdf(double[] signal)
public double[] smdsf(double[] signal)
public double[] cmn(double[] smdsf)
private java.util.List<PitchCandidate> qualityThresheldCandidates(double[] lagScoreTrajectory)
PitchCandidate trackingCandidateSelection(java.util.List<PitchCandidate> candidates)
candidates
-
private static PitchCandidate simplisticCandidateSelection(java.util.List<PitchCandidate> candidates)
static PitchCandidate bestCandidateSelection(java.util.List<PitchCandidate> candidates)
double parabolicInterpolation(double alpha, double beta, double gamma)
public edu.cmu.sphinx.frontend.Data getData() throws edu.cmu.sphinx.frontend.DataProcessingException
getData
in interface edu.cmu.sphinx.frontend.DataProcessor
getData
in class edu.cmu.sphinx.frontend.BaseDataProcessor
edu.cmu.sphinx.frontend.DataProcessingException
private void signalListeners(PitchCandidate selectedCandidate, java.util.List<PitchCandidate> candidates)
selectedCandidate
- or null if no candidate/voicelesspublic void newProperties(edu.cmu.sphinx.util.props.PropertySheet ps) throws edu.cmu.sphinx.util.props.PropertyException
newProperties
in interface edu.cmu.sphinx.util.props.Configurable
newProperties
in class edu.cmu.sphinx.util.props.ConfigurableAdapter
edu.cmu.sphinx.util.props.PropertyException
private static java.util.Queue<java.lang.Double> getReferencePitch(java.lang.String filename)
public static void functionalTest(java.lang.String[] args, edu.cmu.sphinx.util.props.ConfigurationManager cm) throws edu.cmu.sphinx.util.props.PropertyException, edu.cmu.sphinx.frontend.DataProcessingException
edu.cmu.sphinx.util.props.PropertyException
edu.cmu.sphinx.frontend.DataProcessingException
public static void speedTest(edu.cmu.sphinx.frontend.BaseDataProcessor fe) throws edu.cmu.sphinx.frontend.DataProcessingException
edu.cmu.sphinx.frontend.DataProcessingException
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |