smcep#
- class diffsptk.SecondOrderAllPassMelCepstralAnalysis(cep_order, fft_length, alpha=0, theta=0, n_iter=0, accuracy_factor=4)[source]#
 See this page for details. Note that the current implementation does not use the efficient Toeplitz-plus-Hankel system solver.
- Parameters:
 - cep_orderint >= 0
 Order of mel-cepstrum, \(M\).
- fft_lengthint >= 2M
 Number of FFT bins, \(L\).
- alphafloat in (-1, 1)
 Frequency warping factor, \(\alpha\).
- thetafloat in [0, 1]
 Emphasis frequency, \(\theta\).
- n_iterint >= 0
 Number of iterations.
- accuracy_factorint >= 1
 Accuracy factor multiplied by FFT length.
- forward(x)[source]#
 Estimate mel-cepstrum from spectrum.
- Parameters:
 - xTensor [shape=(…, L/2+1)]
 Power spectrum.
- Returns:
 - outTensor [shape=(…, M+1)]
 Mel-cepstrum.
Examples
>>> x = diffsptk.ramp(19) >>> stft = diffsptk.STFT(frame_length=10, frame_period=10, fft_length=16) >>> smcep = diffsptk.SecondOrderAllPassMelCepstralAnalysis(3, 16, 0.1, n_iter=1) >>> mc = smcep(stft(x)) >>> mc tensor([[-0.8851, 0.7917, -0.1737, 0.0175], [-0.3523, 4.4223, -1.0883, -0.0510]])