marytts.signalproc.process
Class LPCCInterpolator

java.lang.Object
  extended by marytts.signalproc.process.LPCAnalysisResynthesis
      extended by marytts.signalproc.process.LPCCInterpolator
All Implemented Interfaces:
InlineDataProcessor, InlineFrameMerger

public class LPCCInterpolator
extends LPCAnalysisResynthesis
implements InlineFrameMerger

Author:
Marc Schröder

Field Summary
protected  double[] otherFrame1
           
protected  double[] otherFrame2
           
protected  double r
           
protected  double relativeWeightOther1
           
 
Fields inherited from class marytts.signalproc.process.LPCAnalysisResynthesis
p
 
Constructor Summary
LPCCInterpolator(int p, double r)
          Create an lpcc-based interpolator.
 
Method Summary
static void main(java.lang.String[] args)
           
protected  void processLPC(LpcAnalyser.LpCoeffs coeffs, double[] residual)
          Process the LPC coefficients in place.
 void setFrameToMerge(double[] frameToMerge)
          Set the frame of data to merge into the next call of applyInline().
 void setFrameToMerge(double[] frame1, double[] frame2, double relativeWeightFrame1)
          Set the frame of data to merge into the next call of applyInline().
 
Methods inherited from class marytts.signalproc.process.LPCAnalysisResynthesis
applyInline
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface marytts.signalproc.process.InlineDataProcessor
applyInline
 

Field Detail

otherFrame1

protected double[] otherFrame1

otherFrame2

protected double[] otherFrame2

relativeWeightOther1

protected double relativeWeightOther1

r

protected double r
Constructor Detail

LPCCInterpolator

public LPCCInterpolator(int p,
                        double r)
Create an lpcc-based interpolator.

Parameters:
p - the order of LPC analysis
r - the interpolation ratio, between 0 and 1: new = r * this + (1-r) * other
Method Detail

setFrameToMerge

public void setFrameToMerge(double[] frameToMerge)
Set the frame of data to merge into the next call of applyInline(). This is the data towards which lpcc-based interpolation will be done.

Specified by:
setFrameToMerge in interface InlineFrameMerger
Parameters:
frameToMerge -

setFrameToMerge

public void setFrameToMerge(double[] frame1,
                            double[] frame2,
                            double relativeWeightFrame1)
Set the frame of data to merge into the next call of applyInline(). This method allows for an interpolation of two frames to be merged into the data set; for example, in order to correct for time misalignment between signal and other frames.

Specified by:
setFrameToMerge in interface InlineFrameMerger
Parameters:
frame1 -
frame2 -
relativeWeightFrame1, - a number between 0 and 1 indicating the relative weight of frame1^ with respect to frame2. Consequently, the relative weight of frame 2 will be (1 - relativeWeightFrame1).

processLPC

protected void processLPC(LpcAnalyser.LpCoeffs coeffs,
                          double[] residual)
Process the LPC coefficients in place. This implementation converts the LPC coefficients into line spectral frequencies, and interpolates between these and the corresponding frame in the "other" signal.

Overrides:
processLPC in class LPCAnalysisResynthesis
Parameters:
a - the LPC coefficients

main

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