marytts.signalproc.analysis
Class LpcPitchSynchronousAnalyser

java.lang.Object
  extended by marytts.signalproc.process.FrameProvider
      extended by marytts.signalproc.process.PitchFrameProvider
          extended by marytts.signalproc.analysis.PitchFrameAnalyser
              extended by marytts.signalproc.analysis.LpcPitchSynchronousAnalyser

public class LpcPitchSynchronousAnalyser
extends PitchFrameAnalyser

A Pitch-synchronous LPC analyser.

Author:
Marc Schröder

Field Summary
static int lpOrder
           
 
Fields inherited from class marytts.signalproc.analysis.PitchFrameAnalyser
analysisResults, analysisWindow
 
Fields inherited from class marytts.signalproc.process.PitchFrameProvider
currPitchmark, cutFrame, periodLengths, periodsInMemory, pitchmarks, shiftPeriods, twoHalvesWindow
 
Fields inherited from class marytts.signalproc.process.FrameProvider
frame, frameLength, frameShift, frameStart, nextFrameStart, processor, samplingRate, signal, totalRead, validSamplesInFrame
 
Constructor Summary
LpcPitchSynchronousAnalyser(DoubleDataSource signal, DoubleDataSource pitchmarks, int windowType, int samplingRate)
          Initialise a PitchLPCAnalyser.
LpcPitchSynchronousAnalyser(DoubleDataSource signal, DoubleDataSource pitchmarks, int windowType, int samplingRate, int framePeriods, int shiftPeriods)
          Create a new PitchLPCAnalyser with a configurable number of pitch periods per frame and pitch periods to shift by.
 
Method Summary
 java.lang.Object analyse(double[] frame)
          Apply this PitchFrameAnalyser to the given data.
static void main(java.lang.String[] args)
           
 
Methods inherited from class marytts.signalproc.analysis.PitchFrameAnalyser
analyseAllFrames, analyseAvailableFrames, analyseNextFrame, constructAnalysisResult
 
Methods inherited from class marytts.signalproc.process.PitchFrameProvider
getCurrentFrame, getData, getFramePeriods, getNextFrame, getShiftPeriods, hasMoreData
 
Methods inherited from class marytts.signalproc.process.FrameProvider
getFrameLengthSamples, getFrameLengthTime, getFrameShiftSamples, getFrameShiftTime, getFrameStartSamples, getFrameStartTime, getSamplingRate, resetInternalTimer, stopWhenTouchingEnd, validSamplesInFrame
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

lpOrder

public static int lpOrder
Constructor Detail

LpcPitchSynchronousAnalyser

public LpcPitchSynchronousAnalyser(DoubleDataSource signal,
                                   DoubleDataSource pitchmarks,
                                   int windowType,
                                   int samplingRate)
Initialise a PitchLPCAnalyser.

Parameters:
signal - the signal source to read from
pitchmarks - the source of the pitchmarks, in seconds from the start of signal
windowType - type of analysis window to use, @see{de.dfki.signalproc.window.Window#getAvailableTypes()}
samplingRate - the number of samples in one second.

LpcPitchSynchronousAnalyser

public LpcPitchSynchronousAnalyser(DoubleDataSource signal,
                                   DoubleDataSource pitchmarks,
                                   int windowType,
                                   int samplingRate,
                                   int framePeriods,
                                   int shiftPeriods)
Create a new PitchLPCAnalyser with a configurable number of pitch periods per frame and pitch periods to shift by.

Parameters:
signal - audio signal
pitchmarks - an array of pitchmarks; each pitch mark is in seconds from signal start
windowType - type of analysis window to use, @see{de.dfki.signalproc.window.Window#getAvailableTypes()}
samplingRate - number of samples per second in signal
framePeriods - number of periods that each frame should contain
shiftPeriods - number of periods that frames should be shifted by
Method Detail

analyse

public java.lang.Object analyse(double[] frame)
Apply this PitchFrameAnalyser to the given data.

Specified by:
analyse in class PitchFrameAnalyser
Parameters:
frame - the data to analyse, which must be of the length prescribed by this FrameBasedAnalyser, i.e. by @see{#getFrameLengthSamples()}.
Returns:
an LPCoeffs object representing the lpc coefficients and gain factor of the frame.
Throws:
java.lang.IllegalArgumentException - if frame does not have the prescribed length

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Throws:
java.lang.Exception