Dialog batch editor - cropping buffer~ using edge~

samplehold's icon

I'm trying to create an automated process for removing silence from the top and tail of basic dialog files. I'm finding the read out from edge~ unreliable to use to time stamp the files at zero transition points. Is there an easier way to approach this? I have simply made a list of transition points from 0 - 0.01 and 0.01 - 0 and extracted the fist and the last value from the list. I then crop the buffer~ with these new values. Thanks in advance for any help.

zerCrossing.maxpat
Max Patch