marytts.signalproc.process
Class LSFInterpolator
java.lang.Object
marytts.signalproc.process.LPCAnalysisResynthesis
marytts.signalproc.process.LSFInterpolator
- All Implemented Interfaces:
- InlineDataProcessor, InlineFrameMerger
public class LSFInterpolator
- extends LPCAnalysisResynthesis
- implements InlineFrameMerger
- Author:
- Marc Schröder
|
Constructor Summary |
LSFInterpolator(int p,
double r)
Create an LSF-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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
otherFrame1
protected double[] otherFrame1
otherFrame2
protected double[] otherFrame2
relativeWeightOther1
protected double relativeWeightOther1
r
protected double r
LSFInterpolator
public LSFInterpolator(int p,
double r)
- Create an LSF-based interpolator.
- Parameters:
p - the order of LPC analysisr - the interpolation ratio, between 0 and 1: new = r * this + (1-r) * other
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 LSF-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