mglsp2sp
Functions
-
int main(int argc, char *argv[])
mglsp2sp [ option ] [ infile ]
-m int
order of line spectral pairs
-a double
all-pass constant
-g double
gamma
-c int
gamma
-l int
FFT length
-s double
sampling rate
-k int
input gain type
0
linear gain1
log gain2
without gain
-q int
input format
0
frequency in rad1
frequency in rad2
frequency in kHz3
frequency in Hz
-o int
output format
0
1
2
3
infile str
double-type mel-LSP
stdout
double-type spectrum
- Parameters:
argc – [in] Number of arguments.
argv – [in] Argument vector.
- Returns:
0 on success, 1 on failure.
See also
-
class MelGeneralizedLineSpectralPairsToSpectrum
Convert mel-LSP to spectrum.
The input is the
-th order line spectral paris: is the gain. The output is the -length log amplitude spectrum: is the FFT length.The transfer function of the all-pole filter is given by
is even, is the angular frequency warped by the first-order all pass filter:[1] A. V. Oppenheim and D. H. Johnson, “Discrete representation of signals,” Proc. of the IEEE, vol. 60, no. 6, pp. 681-691, 1972.
[2] N. Sugamura and F. Itakura, “Speech data compression by LSP speech analysis-synthesis technique,” Journal of IEICE, vol. J64-A, no. 8, pp. 599-606, 1981.
Public Functions
-
MelGeneralizedLineSpectralPairsToSpectrum(int num_order, double alpha, double gamma, int fft_length)
- Parameters:
num_order – [in] Order of line spectral pairs,
.alpha – [in] Alpha,
.gamma – [in] Gamma,
.fft_length – [in] FFT length,
.
-
inline int GetNumOrder() const
- Returns:
Order of coefficients.
-
inline double GetAlpha() const
- Returns:
Alpha.
-
inline double GetGamma() const
- Returns:
Gamma.
-
inline int GetFftLength() const
- Returns:
FFT length.
-
inline bool IsValid() const
- Returns:
True if this object is valid.
-
bool Run(const std::vector<double> &line_spectral_pairs, std::vector<double> *spectrum) const
- Parameters:
line_spectral_pairs – [in]
-th order line spectral pairs. The first element is linear gain and the other elements are in normalized frequency .spectrum – [out]
-length log amplitude spectrum.
- Returns:
True on success, false on failure.
-
MelGeneralizedLineSpectralPairsToSpectrum(int num_order, double alpha, double gamma, int fft_length)