mlsacheck#
- class diffsptk.MLSADigitalFilterStabilityCheck(cep_order, *, alpha=0, pade_order=4, strict=True, threshold=None, fast=True, n_fft=256, warn_type='warn', mod_type='scale')[source]#
See this page for details.
- Parameters:
- cep_orderint >= 0
Order of mel-cepstrum, \(M\).
- alphafloat in (-1, 1)
Frequency warping factor, \(\alpha\).
- pade_orderint in [4, 7]
Order of Pade approximation.
- strictbool
If True, keep maximum log approximation error rather than MLSA filter stability.
- thresholdfloat > 0 or None
Threshold value. If not given, automatically computed.
- fastbool
Enable fast mode (do not use FFT).
- n_fftint > M
Number of FFT bins, \(L\). Used only in non-fast mode.
- warn_type[‘ignore’, ‘warn’, ‘exit’]
Warning type.
- mod_type[‘clip’, ‘scale’]
Modification type.
References
[1]S. Imai et al., “Mel log spectrum approximation (MLSA) filter for speech synthesis,” Electronics and Communications in Japan, vol. 66, no. 2, pp. 11-18, 1983.
- forward(c)[source]#
Check stability of MLSA filter.
- Parameters:
- cTensor [shape=(…, M+1)]
Mel-cepstrum.
- Returns:
- outTensor [shape=(…, M+1)]
Modified mel-cepstrum.
Examples
>>> c1 = diffsptk.nrand(4, stdv=10) >>> c1 tensor([ 1.8963, 7.6629, 4.4804, 8.0669, -1.2768]) >>> mlsacheck = diffsptk.MLSADigitalFilterStabilityCheck(4, warn_type="ignore") >>> c2 = mlsacheck(c1) >>> c2 tensor([ 1.3336, 1.7537, 1.0254, 1.8462, -0.2922])
- diffsptk.functional.mlsacheck(c, *, alpha=0, pade_order=4, strict=True, threshold=None, fast=True, n_fft=512, warn_type='warn', mod_type='scale')[source]#
Check stability of MLSA filter.
- Parameters:
- cTensor [shape=(…, M+1)]
Mel-cepstrum.
- alphafloat in (-1, 1)
Frequency warping factor, \(\alpha\).
- pade_orderint in [4, 7]
Order of Pade approximation.
- strictbool
If True, keep maximum log approximation error rather than MLSA filter stability.
- thresholdfloat > 0 or None
Threshold value. If not given, automatically computed.
- fastbool
Enable fast mode.
- n_fftint > M
Number of FFT bins, \(L\). Used only in non-fast mode.
- warn_type[‘ignore’, ‘warn’, ‘exit’]
Warning type.
- mod_type[‘clip’, ‘scale’]
Modification type.
- Returns:
- outTensor [shape=(…, M+1)]
Modified mel-cepstrum.