grpdelay#
- class diffsptk.GroupDelay(fft_length, alpha=1, gamma=1, device=None, dtype=None)[source]#
See this page for details.
- Parameters:
- fft_lengthint >= 2
The number of FFT bins, \(L\).
- alphafloat > 0
The tuning parameter, \(\alpha\).
- gammafloat > 0
The tuning parameter, \(\gamma\).
- forward(b=None, a=None)[source]#
Compute group delay.
- Parameters:
- bTensor [shape=(…, M+1)] or None
The numerator coefficients.
- aTensor [shape=(…, N+1)] or None
The denominator coefficients.
- Returns:
- outTensor [shape=(…, L/2+1)]
The 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
The numerator coefficients.
- aTensor [shape=(…, N+1)] or None
The denominator coefficients.
- fft_lengthint >= 2
The number of FFT bins, \(L\).
- alphafloat > 0
The tuning parameter, \(\alpha\).
- gammafloat > 0
The tuning parameter, \(\gamma\).
- Returns:
- outTensor [shape=(…, L/2+1)]
The group delay or modified group delay function.