def zcr(data):
    """Computes zero crossing rate of segment"""
    data = np.mean(data, axis=1)

    count = len(data)
    countZ = np.sum(np.abs(np.diff(np.sign(data)))) / 2
    return (np.float64(countZ) / np.float64(count - 1.0))
Computes zero crossing rate of segment