acorr#
- class diffsptk.Autocorrelation(frame_length, acr_order, norm=False, estimator='none')[source]#
See this page for details.
- Parameters:
- frame_lengthint > M
Frame length, \(L\).
- acr_orderint >= 0
Order of autocorrelation, \(M\).
- normbool
If True, normalize the autocorrelation.
- estimator[‘none’, ‘biased’, ‘unbiased’]
Estimator of autocorrelation.
- forward(x)[source]#
Estimate autocorrelation of input.
- Parameters:
- xTensor [shape=(…, L)]
Framed waveform.
- Returns:
- outTensor [shape=(…, M+1)]
Autocorrelation.
Examples
>>> x = diffsptk.ramp(4) >>> acorr = diffsptk.Autocorrelation(5, 3) >>> r = acorr(x) >>> r tensor([30.0000, 20.0000, 11.0000, 4.0000])
- diffsptk.functional.acorr(x, acr_order, norm=False, estimator='none')[source]#
Compute autocorrelation.
- Parameters:
- xTensor [shape=(…, L)]
Framed waveform.
- acr_orderint >= 0
Order of autocorrelation, \(M\).
- normbool
If True, normalize the autocorrelation.
- estimator[‘none’, ‘biased’, ‘unbiased’]
Estimator of autocorrelation.
- Returns:
- outTensor [shape=(…, M+1)]
Autocorrelation.