grpdelay#
- class diffsptk.GroupDelay(fft_length, alpha=1, gamma=1)[source]#
See this page for details.
- Parameters:
- fft_lengthint >= 2
Number of FFT bins,
.- alphafloat > 0
Tuning parameter,
.- gammafloat > 0
Tuning parameter,
.
- forward(b=None, a=None)[source]#
Compute group delay.
- Parameters:
- bTensor [shape=(…, M+1)] or None
Numerator coefficients.
- aTensor [shape=(…, N+1)] or None
Denominator coefficients.
- Returns:
- outTensor [shape=(…, L/2+1)]
Group delay or modified group delay function.
Examples
>>> x = diffsptk.ramp(3) >>> grpdelay = diffsptk.GroupDelay(8) >>> g = grpdelay(x) >>> g tensor([2.3333, 2.4278, 3.0000, 3.9252, 3.0000])
- diffsptk.functional.grpdelay(b=None, a=None, *, fft_length=512, alpha=1, gamma=1, **kwargs)[source]#
Compute group delay.
- Parameters:
- bTensor [shape=(…, M+1)] or None
Numerator coefficients.
- aTensor [shape=(…, N+1)] or None
Denominator coefficients.
- fft_lengthint >= 2
Number of FFT bins,
.- alphafloat > 0
Tuning parameter,
.- gammafloat > 0
Tuning parameter,
.
- Returns:
- outTensor [shape=(…, L/2+1)]
Group delay or modified group delay function.