public class FDPSOLAProcessor extends VocalTractModifier
Modifier and Type | Field and Description |
---|---|
protected boolean |
bBroke |
protected boolean |
bLastFrame |
boolean |
bSilent |
protected boolean |
bWarp |
protected LEDataInputStream |
din |
protected LEDataOutputStream |
dout |
protected double[] |
f0s |
protected double[] |
frm |
protected double |
frmEn |
protected int |
frmSize |
protected double[] |
frmy |
protected double |
frmyEn |
protected static int |
FROM_CODE |
protected static int |
FROM_FILE |
protected static int |
FROM_TARGET |
protected double |
gain |
protected int |
halfWin |
protected ComplexArray |
hy |
protected DoubleDataSource |
input |
protected AudioInputStream |
inputAudio |
protected int |
inputFrameIndex |
protected double[] |
inputVT |
protected boolean |
isWavFileOutput |
protected double |
localDurDiff |
protected double |
localDurDiffSaved |
protected int |
lpOrder |
protected static double |
MAX_PSCALE |
protected static double |
MAX_TSCALE |
protected int |
maxFrmSize |
protected int |
maxNewFrmSize |
protected static double |
MIN_PSCALE |
protected static double |
MIN_TSCALE |
protected VoiceModificationParametersPreprocessor |
modParams |
protected int |
newFftSize |
protected int |
newFrmSize |
protected int |
newMaxFreq |
protected int |
newPeriod |
protected int |
newSkipSize |
protected double[] |
newVScales |
protected double |
nextAdd |
protected static int |
NUM_PITCH_SYNC_PERIODS |
protected int |
numfrm |
protected int |
numfrmFixed |
protected int |
numPeriods |
protected int |
origLen |
protected double[] |
outBuff |
protected int |
outBuffLen |
protected int |
outBuffStart |
protected DDSAudioInputStream |
outputAudio |
protected String |
outputFile |
protected PitchMarks |
pm |
protected PsolaFrameProvider |
psFrm |
protected double[] |
py2 |
protected int |
repeatSkipCount |
protected double |
ssFixedInSeconds |
protected double |
sumLocalDurDiffs |
protected int |
synthFrameInd |
protected int |
synthFrmInd |
protected int |
synthSt |
protected int |
synthTotal |
protected String |
tempOutBinaryFile |
protected double[] |
tmpvsc |
protected int |
totalWrittenToFile |
protected double |
tscaleSingle |
static int |
TTS_MODIFICATION |
static int |
WAVEFORM_MODIFICATION |
protected double[] |
wgt |
protected double[] |
wgty |
protected DynamicWindow |
windowIn |
protected DynamicWindow |
windowOut |
protected double |
wsFixedInSeconds |
protected double[] |
wSynthBuff |
protected double[] |
ySynthBuff |
protected int |
ySynthInd |
fftSize, fs, h, maxFreq, p, tmpCount, vtSpectrum
Constructor and Description |
---|
FDPSOLAProcessor() |
FDPSOLAProcessor(String strInputFile,
String strPitchFile,
String strOutputFile,
double[] pscales,
double[] tscales,
double[] escales,
double[] vscales) |
FDPSOLAProcessor(String strInputFile,
String strPitchFile,
String strOutputFile,
double[] pscales,
double[] tscales,
double[] escales,
double[] vscales,
boolean isFixedRate) |
Modifier and Type | Method and Description |
---|---|
void |
convertToWav(AudioFormat audioformat) |
void |
fdpsolaOnline() |
double[] |
getScalesFromTextFile(String strScaleFile) |
protected void |
init(int initialisationType) |
protected void |
init(int initialisationType,
String strInputFile,
String strPitchFile,
String strOutputFile,
double[] pscales,
double[] tscales,
double[] escales,
double[] vscales,
boolean isFixedRate) |
static void |
main(String[] args) |
static void |
mainParametric(String inputWavFile,
double[] pscales,
double[] tscales,
double[] escales,
double[] vscales) |
DDSAudioInputStream |
process(Datagram[][] datagrams,
Datagram[] rightContexts,
AudioFormat audioformat,
boolean[][] voicings,
double[][] pitchScales,
double[][] timeScales) |
DDSAudioInputStream |
process(double[] x,
int[] pitchMarks,
AudioFormat audioformat,
boolean[] voicings,
double[] pitchScales,
double[] timeScales) |
double[] |
processDatagram(Datagram[] datagrams,
Datagram rightContext,
AudioFormat audioformat,
boolean[] voicings,
double[] pitchScales,
double[] timeScales,
boolean bLastDatagram) |
DDSAudioInputStream |
processDecrufted(Datagram[][] datagrams,
Datagram[] rightContexts,
AudioFormat audioformat,
boolean[][] voicings,
double[][] pitchScales,
double[][] timeScales)
Functionally equivalent to
process(marytts.util.data.Datagram[][], marytts.util.data.Datagram[], javax.sound.sampled.AudioFormat, boolean[][], double[][], double[][]) (but with most of the cruft removed, which should make this easier to modify) |
double[] |
processFrame(double[] frmIn,
boolean isVoiced,
double pscale,
double tscale,
double escale,
double vscale,
boolean isLastInputFrame,
int currentPeriod,
int inputFrameSize) |
double[] |
writeFinal() |
applyInline, initialise, initialise, processSpectrum
public static int WAVEFORM_MODIFICATION
public static int TTS_MODIFICATION
protected DoubleDataSource input
protected AudioInputStream inputAudio
protected DDSAudioInputStream outputAudio
protected VoiceModificationParametersPreprocessor modParams
protected int numfrm
protected int numfrmFixed
protected int lpOrder
protected String outputFile
protected String tempOutBinaryFile
protected int origLen
protected PitchMarks pm
protected double[] f0s
protected PsolaFrameProvider psFrm
protected double wsFixedInSeconds
protected double ssFixedInSeconds
protected int numPeriods
protected static int NUM_PITCH_SYNC_PERIODS
protected static int FROM_CODE
protected static int FROM_FILE
protected static int FROM_TARGET
public boolean bSilent
protected LEDataOutputStream dout
protected LEDataInputStream din
protected DynamicWindow windowIn
protected DynamicWindow windowOut
protected double[] wgt
protected double[] wgty
protected int frmSize
protected int newFrmSize
protected int newPeriod
protected int synthFrmInd
protected double localDurDiff
protected int repeatSkipCount
protected double localDurDiffSaved
protected double sumLocalDurDiffs
protected double nextAdd
protected int synthSt
protected int synthTotal
protected int maxFrmSize
protected int maxNewFrmSize
protected int synthFrameInd
protected boolean bLastFrame
protected boolean bBroke
protected int newFftSize
protected int newMaxFreq
protected int outBuffLen
protected double[] outBuff
protected int outBuffStart
protected int totalWrittenToFile
protected double[] ySynthBuff
protected double[] wSynthBuff
protected int ySynthInd
protected double[] frm
protected boolean bWarp
protected double[] inputVT
protected double[] py2
protected ComplexArray hy
protected double[] frmy
protected double frmEn
protected double frmyEn
protected double gain
protected int newSkipSize
protected int halfWin
protected double[] newVScales
protected double[] tmpvsc
protected boolean isWavFileOutput
protected int inputFrameIndex
protected static double MIN_PSCALE
protected static double MAX_PSCALE
protected static double MIN_TSCALE
protected static double MAX_TSCALE
protected double tscaleSingle
public FDPSOLAProcessor(String strInputFile, String strPitchFile, String strOutputFile, double[] pscales, double[] tscales, double[] escales, double[] vscales) throws UnsupportedAudioFileException, IOException
public FDPSOLAProcessor(String strInputFile, String strPitchFile, String strOutputFile, double[] pscales, double[] tscales, double[] escales, double[] vscales, boolean isFixedRate) throws UnsupportedAudioFileException, IOException
public FDPSOLAProcessor()
protected void init(int initialisationType)
protected void init(int initialisationType, String strInputFile, String strPitchFile, String strOutputFile, double[] pscales, double[] tscales, double[] escales, double[] vscales, boolean isFixedRate)
public DDSAudioInputStream processDecrufted(Datagram[][] datagrams, Datagram[] rightContexts, AudioFormat audioformat, boolean[][] voicings, double[][] pitchScales, double[][] timeScales) throws IOException
process(marytts.util.data.Datagram[][], marytts.util.data.Datagram[], javax.sound.sampled.AudioFormat, boolean[][], double[][], double[][])
(but with most of the cruft removed, which should make this easier to modify)datagrams
- array of Datagram arrays, one element per SelectedUnitrightContexts
- array of Datagrams, one element per SelectedUnitaudioformat
- audioformatvoicings
- array of boolean arrays, matching datagramspitchScales
- array of double arrays, matching datagrams, pitch modification factorstimeScales
- array of double arrays, matching datagrams, duration modification factorsIOException
- if frames cannot be processedpublic DDSAudioInputStream process(Datagram[][] datagrams, Datagram[] rightContexts, AudioFormat audioformat, boolean[][] voicings, double[][] pitchScales, double[][] timeScales)
public DDSAudioInputStream process(double[] x, int[] pitchMarks, AudioFormat audioformat, boolean[] voicings, double[] pitchScales, double[] timeScales)
public double[] processDatagram(Datagram[] datagrams, Datagram rightContext, AudioFormat audioformat, boolean[] voicings, double[] pitchScales, double[] timeScales, boolean bLastDatagram)
public double[] getScalesFromTextFile(String strScaleFile)
public void fdpsolaOnline() throws IOException
IOException
public double[] processFrame(double[] frmIn, boolean isVoiced, double pscale, double tscale, double escale, double vscale, boolean isLastInputFrame, int currentPeriod, int inputFrameSize) throws IOException
IOException
public double[] writeFinal() throws IOException
IOException
public void convertToWav(AudioFormat audioformat) throws IOException
IOException
public static void mainParametric(String inputWavFile, double[] pscales, double[] tscales, double[] escales, double[] vscales) throws UnsupportedAudioFileException, IOException
Copyright © 2000–2016 DFKI GmbH. All rights reserved.