public class HTSVocoder extends Object
Modifier and Type | Class and Description |
---|---|
protected class |
HTSVocoder.HTSVocoderDataProducer |
Modifier and Type | Field and Description |
---|---|
static int |
IPERIOD |
static int |
IRLENG |
static double |
LZERO |
static int |
PADEORDER |
static int |
SEED |
static double |
ZERO |
Constructor and Description |
---|
HTSVocoder() |
Modifier and Type | Method and Description |
---|---|
static double |
b2en(double[] b,
int m,
double a)
b2en: functions for postfiltering
|
static void |
b2mc(double[] b,
double[] mc,
int m,
double a)
b2mc: transform MLSA digital filter coefficients to mel-cepstrum
|
static void |
c2ir(double[] c,
int nc,
double[] hh,
int leng)
c2ir: The minimum phase impulse response is evaluated from the minimum phase cepstrum
|
static void |
freqt(double[] c1,
int m1,
double[] c2,
int m2,
double a)
freqt: frequency transformation
|
static void |
gc2gc(double[] c1,
int m1,
double g1,
double[] c2,
int m2,
double g2)
gc2gc: generalized cepstral transformation
|
static double[] |
genPulseFromFourierMag(double[] mag,
double f0)
Generate one pitch period from Fourier magnitudes
|
static double[] |
genPulseFromFourierMag(HTSPStream mag,
int n,
double f0) |
static AudioFormat |
getHTSAudioFormat(HMMData htsData)
get the audio format produced by the hts vocoder
|
static void |
gnorm(double[] c1,
double[] c2,
int m,
double g)
ignorm: gain normalization
|
AudioInputStream |
htsMLSAVocoder(HTSParameterGeneration pdf2par,
HMMData htsData)
HTS_MLSA_Vocoder: Synthesis of speech out of mel-cepstral coefficients.
|
double[] |
htsMLSAVocoder(HTSPStream lf0Pst,
HTSPStream mcepPst,
HTSPStream strPst,
HTSPStream magPst,
boolean[] voiced,
HMMData htsData,
HTSVocoder.HTSVocoderDataProducer audioProducer) |
static void |
htsMLSAVocoderCommand(String[] args)
Stand alone vocoder reading parameters from files in SPTK format, parameters in args[] array in the following order:
|
static void |
ignorm(double[] c1,
double[] c2,
int m,
double ng)
ignorm: inverse gain normalization
|
static void |
lsp2lpc(double[] lsp,
double[] a,
int m)
lsp2lpc: transform LSP to LPC.
|
void |
lsp2mgc(double[] lsp,
double[] mgc,
int m,
double alpha)
lsp2mgc: transform LSP to MGC.
|
static void |
main(String[] args) |
static void |
main1(String[] args)
Stand alone testing reading parameters from files in SPTK format
|
static void |
mc2b(double[] mc,
double[] b,
int m,
double a)
mc2b: transform mel-cepstrum to MLSA digital filter coefficients
|
static void |
mgc2mgc(double[] c1,
int m1,
double a1,
double g1,
double[] c2,
int m2,
double a2,
double g2)
mgc2mgc: frequency and generalized cepstral transformation
|
static double |
mglsadf(double x,
double[] b,
int m,
double a,
int n,
double[] d)
mglsadff: sub functions for MGLSA filter
|
static double |
mlsadf(double x,
double[] b,
int m,
double a,
double[] d,
int pt2,
int[] pt3)
mlsadf: HTS Mel Log Spectrum Approximation filter
|
static void |
postfilter_mgc(double[] mgc,
int m,
double alpha,
double beta)
posfilter: postfilter for mel-cepstrum.
|
double |
uniformRand()
uniform_rand: generate uniformly distributed random numbers 1 or -1
|
static void |
vocoderList(String[] args) |
public static final int IPERIOD
public static final int SEED
public static final int PADEORDER
public static final int IRLENG
public static final double ZERO
public static final double LZERO
public AudioInputStream htsMLSAVocoder(HTSParameterGeneration pdf2par, HMMData htsData) throws Exception
pdf2par
- pdf2parhtsData
- htsDataException
- Exceptionpublic static AudioFormat getHTSAudioFormat(HMMData htsData)
htsData
- htsDatapublic double[] htsMLSAVocoder(HTSPStream lf0Pst, HTSPStream mcepPst, HTSPStream strPst, HTSPStream magPst, boolean[] voiced, HMMData htsData, HTSVocoder.HTSVocoderDataProducer audioProducer) throws Exception
Exception
public static double mlsadf(double x, double[] b, int m, double a, double[] d, int pt2, int[] pt3)
x
- xb
- bm
- ma
- ad
- dpt2
- pt2pt3
- pt3public double uniformRand()
public static void mc2b(double[] mc, double[] b, int m, double a)
mc
- mcb
- bm
- ma
- apublic static void b2mc(double[] b, double[] mc, int m, double a)
b
- bmc
- mcm
- ma
- apublic static void freqt(double[] c1, int m1, double[] c2, int m2, double a)
c1
- c1m1
- m1c2
- c2m2
- m2a
- apublic static void c2ir(double[] c, int nc, double[] hh, int leng)
c
- cnc
- nchh
- hhleng
- lengpublic static double b2en(double[] b, int m, double a)
b
- bm
- ma
- apublic static void ignorm(double[] c1, double[] c2, int m, double ng)
c1
- c1c2
- c2m
- mng
- ngpublic static void gnorm(double[] c1, double[] c2, int m, double g)
c1
- c1c2
- c2m
- mg
- gpublic static void lsp2lpc(double[] lsp, double[] a, int m)
lsp
- lspa
- am
- mpublic static void gc2gc(double[] c1, int m1, double g1, double[] c2, int m2, double g2)
c1
- c1m1
- m1g1
- g1c2
- c2m2
- m2g2
- g2public static void mgc2mgc(double[] c1, int m1, double a1, double g1, double[] c2, int m2, double a2, double g2)
c1
- c1m1
- m1a1
- a1g1
- g1c2
- c2m2
- m2a2
- a2g2
- g2public void lsp2mgc(double[] lsp, double[] mgc, int m, double alpha)
lsp
- lspmgc
- mgcm
- malpha
- alphapublic static double mglsadf(double x, double[] b, int m, double a, int n, double[] d)
x
- xb
- bm
- ma
- an
- nd
- dpublic static void postfilter_mgc(double[] mgc, int m, double alpha, double beta)
mgc
- mgcm
- malpha
- alphabeta
- betapublic static double[] genPulseFromFourierMag(HTSPStream mag, int n, double f0)
public static double[] genPulseFromFourierMag(double[] mag, double f0)
mag
- magf0
- f0public static void main1(String[] args) throws IOException, InterruptedException, Exception
args
- argsIOException
- IOExceptionInterruptedException
- InterruptedExceptionException
- Exceptionpublic static void htsMLSAVocoderCommand(String[] args) throws IOException, InterruptedException, Exception
The type of spectrum parameters is set through the parameters gamma and alpha
args
- example iput parameters:
0 0.45 0 0.0 16000 80 cmu_us_arctic_slt_a0001.mgc 75 cmu_us_arctic_slt_a0001.lf0 3 vocoder_out.wav cmu_us_arctic_slt_a0001.str 15 mix_excitation_filters.txt 5 48 cmu_us_arctic_slt_a0001.mag 30
example input parameters without mixed excitation:
0 0.45 0 0.0 16000 80 cmu_us_arctic_slt_a0001.mgc 75 cmu_us_arctic_slt_a0001.lf0 3 vocoder_out.wav
IOException
- IOExceptionInterruptedException
- InterruptedExceptionException
- Exceptionpublic static void main(String[] args) throws IOException, InterruptedException, Exception
IOException
InterruptedException
Exception
public static void vocoderList(String[] args) throws IOException, InterruptedException, Exception
IOException
InterruptedException
Exception
Copyright © 2000–2016 DFKI GmbH. All rights reserved.