I’m maybe a bittle late on this one but if anyone stumbles across it (as me), you might want to pay attention to torchaudio (https://pytorch.org/audio/functional.html 226). You can use it to create an IIR filter or an FIR filter if your signal is deterministic and you are fine with loosing a few samples equal to the filter size (number of weights). For the latter case just set the denominator to 1. You can find the right weights with a little research on Google (note that those need to be selected according to your sampling rate) or by playing around a little with scipys filter functions.
Hope that helps.
Edit:
There is also a prepared biquad low pass filter in torchaudio if that’s feasible for your use case.