For what it's worth, having the same issue, I ended up doing the same for the end of the file, which was also causing some crackle.
So it became ulaw_audio_data[800:-800]
ulaw_audio_data[800:-800]