split input signal into non-overlapping chunks of size N (e.g 512)
for each chunk:
run dct
zero DCT coefficients which are lower than threshold (e.g. 0.2)
run idct
place the resulting filtered chunk into the resulting signal
See figure below