mlsacheck#
- class diffsptk.MLSADigitalFilterStabilityCheck(cep_order, alpha=0, fft_length=256, pade_order=4, strict=True, fast=True, threshold=None, mod_type='scale', warn_type='warn')[source]#
See this page for details.
- Parameters:
- cep_orderint >= 0 [scalar]
Order of mel-cepstrum, \(M\).
- alphafloat [-1 < alpha < 1]
Frequency warping factor, \(\alpha\).
- fft_lengthint > M [scalar]
Number of FFT bins, \(L\).
- pade_order[4 <= int <= 7].
Order of Pade approximation.
- strictbool [scalar]
If True, keep maximum log approximation error rather than MLSA filter stability.
- fastbool [scalar]
Fast mode.
- thresholdfloat > 0 [scalar]
Threshold value. If not given, automatically computed.
- mod_type[‘clip’, ‘scale’]
Modification type.
- warn_type[‘ignore’, ‘warn’, ‘exit’]
Behavior for unstable MLSA.
- forward(c1)[source]#
Check stability of MLSA filter.
- Parameters:
- c1Tensor [shape=(…, M+1)]
Mel-cepstrum.
- Returns:
- c2Tensor [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])