mlsacheck
Functions
-
int main(int argc, char *argv[])
mlsacheck [ option ] [ infile ]
-m int
order of mel-cepstrum
-l int
FFT length
-a double
all-pass constant
-P int
order of Pade approximation
-e int
warning type
0
no warning1
output index2
output index and exit immediately
-R double
threshold value
-r int
stability condition
0
keep maximum log approximation error1
keep filter stability
-t int
modification type
0
clipping1
scaling
-f bool
fast mode
-x bool
perform modification
infile str
double-type mel-cepstrum
stdout
double-type modified mel-cepstrum
If
-R
option is not specified, the threshold value is automatically determined according to the below table.P
R (r=0)
R (r=1)
E_max [dB]
4
4.5
6.20
0.24
5
6.0
7.65
0.27
6
7.4
9.13
0.25
7
8.9
10.60
0.26
In the following example, the stability of MLSA filter of 49-th order mel-cepstral coefficients read from
data.mcep
are checked and modified:mlsacheck -m 49 -a 0.55 -P 5 -l 4096 -r 1 -x data.mcep > data2.mcep
- Parameters
argc – [in] Number of arguments.
argv – [in] Argument vector.
- Returns
0 on success, 1 on failure.
-
class sptk::MlsaDigitalFilterStabilityCheck
Check stability of mel-cepstral coefficients and modify them.
The input is the
-th order mel-cepstrum: -th order mel-cepstrum:In the mel-cepstral analysis, spectral envelope is modeled by
-th order mel-cepstral coefficients: can be decomposed as where is implemented by an -th order rational function using the modified Pade approximation: . It can be simply obtained by applying the fast Fourier transform to the gain normalized mel-cepstrum sequence. In addition, by assuming that the amplitude spectrum of human speech at zero frequency usually takes maximum value, we can check the stability without FFT.Public Types
Public Functions
-
MlsaDigitalFilterStabilityCheck(int num_order, double alpha, double threshold)
- Parameters
num_order – [in] Order of mel-cepstrum,
.alpha – [in] All-pass constant,
.threshold – [in] Threshold value.
-
MlsaDigitalFilterStabilityCheck(int num_order, double alpha, double threshold, int fft_length, ModificationType modification_type)
- Parameters
num_order – [in] Order of mel-cepstrum,
.alpha – [in] All-pass constant,
.threshold – [in] Threshold value.
fft_length – [in] FFT length (valid if fast_mode is true).
modification_type – [in] Type of modification.
-
inline int GetNumOrder() const
- Returns
Order of coefficients.
-
inline double GetAlpha() const
- Returns
All-pass constant.
-
inline double GetThreshold() const
- Returns
Threshold value.
-
inline bool GetFastModeFlag() const
- Returns
True if fast mode is on.
-
inline int GetFftLength() const
- Returns
FFT length.
-
inline ModificationType GetModificationType() const
- Returns
Type of modification.
-
inline bool IsValid() const
- Returns
True if this object is valid.
-
bool Run(const std::vector<double> &mel_cepstrum, std::vector<double> *modified_mel_cepstrum, bool *is_stable, double *maximum_amplitude_of_basic_filter, MlsaDigitalFilterStabilityCheck::Buffer *buffer) const
- Parameters
mel_cepstrum – [in]
-th order mel-cepstrum.modified_mel_cepstrum – [out] Modified
-th order mel-cepstrum (optional).is_stable – [out] True if the given coefficients are stable.
maximum_amplitude_of_basic_filter – [out] Maximum amplitude (optional).
buffer – [out] Buffer.
- Returns
True on success, false on failure.
-
bool Run(std::vector<double> *input_and_output, bool *is_stable, double *maximum_amplitude_of_basic_filter, MlsaDigitalFilterStabilityCheck::Buffer *buffer) const
- Parameters
input_and_output – [inout]
-th order coefficients.is_stable – [out] True if the given coefficients are stable.
maximum_amplitude_of_basic_filter – [out] Maximum amplitude (optional).
buffer – [out] Buffer.
- Returns
True on success, false on failure.
-
class Buffer
-
MlsaDigitalFilterStabilityCheck(int num_order, double alpha, double threshold)