c2acr#
- class diffsptk.CepstrumToAutocorrelation(cep_order: int, acr_order: int, n_fft: int = 512)[source]#
See this page for details.
- Parameters:
- cep_orderint >= 0
The order of the cepstrum, \(M\).
- acr_orderint >= 0
The order of the autocorrelation, \(N\).
- n_fftint >> N
The number of FFT bins used for conversion. The accurate conversion requires the large value.
- forward(c: Tensor) Tensor [source]#
Convert cepstrum to autocorrelation.
- Parameters:
- cTensor [shape=(…, M+1)]
The cepstral coefficients.
- Returns:
- outTensor [shape=(…, N+1)]
The autocorrelation.
Examples
>>> import diffsptk >>> import torch >>> c2acr = diffsptk.CepstrumToAutocorrelation(4, 3) >>> c = torch.tensor([0.5, -0.3, 0.2, -0.1, 0.05]) >>> r = c2acr(c) >>> r tensor([ 3.2404, -1.1920, 0.9037, -0.5838])
- diffsptk.functional.c2acr(c: Tensor, acr_order: int, n_fft: int = 512) Tensor [source]#
Convert cepstrum to autocorrelation.
- Parameters:
- cTensor [shape=(…, M+1)]
The cepstral coefficients.
- acr_orderint >= 0
The order of the autocorrelation, \(N\).
- n_fftint >> N
The number of FFT bins used for conversion.
- Returns:
- outTensor [shape=(…, N+1)]
The autocorrelation.
See also