zerodf#
- class diffsptk.AllZeroDigitalFilter(filter_order, frame_period, ignore_gain=False)[source]#
 See this page for details.
- Parameters:
 - filter_orderint >= 0
 Order of filter coefficients, \(M\).
- frame_periodint >= 1
 Frame period, \(P\).
- ignore_gainbool
 If True, perform filtering without gain.
- forward(x, b)[source]#
 Apply an all-zero digital filter.
- Parameters:
 - xTensor [shape=(…, T)]
 Excitation signal.
- bTensor [shape=(…, T/P, M+1)]
 Filter coefficients.
- Returns:
 - outTensor [shape=(…, T)]
 Output signal.
Examples
>>> x = diffsptk.step(4) >>> b = diffsptk.ramp(4) >>> zerodf = diffsptk.AllZeroDigitalFilter(0, 1) >>> y = zerodf(x, b.view(-1, 1)) >>> y tensor([[0., 1., 2., 3., 4.]])
- diffsptk.functional.zerodf(x, b, frame_period=80, ignore_gain=False)[source]#
 Apply an all-zero digital filter.
- Parameters:
 - xTensor [shape=(…, T)]
 Excitation signal.
- bTensor [shape=(…, T/P, M+1)]
 Filter coefficients.
- frame_periodint >= 1
 Frame period, \(P\).
- ignore_gainbool
 If True, perform filtering without gain.
- Returns:
 - outTensor [shape=(…, T)]
 Output signal.
See also