grpdelay#
- class diffsptk.GroupDelay(fft_length, alpha=1, gamma=1)[source]#
See this page for details.
- Parameters:
- fft_lengthint >= 2 [scalar]
Number of FFT bins, \(L\).
- alphafloat > 0 [scalar]
Tuning parameter, \(\alpha\).
- gammafloat > 0 [scalar]
Tuning parameter, \(\gamma\).
- forward(b, a=None)[source]#
Compute group delay.
- Parameters:
- bTensor [shape=(…, M+1)]
Numerator coefficients.
- aTensor [shape=(…, N+1)]
Denominator coefficients.
- Returns:
- gTensor [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])