Signal filtering using Python
Hey I've been meaning to write this program, too.  :D

The way you use the initial conditions is to just pass them from one stage to the next.  

Also lfilter returns (y, zf), not (zf, y).

So it should look more like:

zi = signal.lfilter_zi(b, a) * xn[0]
z, zi2 = signal.lfilter(b, a, xn, zi=zi)
z2, zi3 = signal.lfilter(b, a, z, zi=zi2)
z3, zi4 = signal.lfilter(b, a, z2, zi=zi3)


Though you don't need to rename each one, of course.  Initialize it with

zi = signal.lfilter_zi(b, a) * xn[0]


and then in each loop do something like

for x in chunks(signal):
    y, zi = signal.lfilter(b, a, x, zi=zi)
    look_for_glitches_in(y)