def get_zcr(x):
    """
    Compute zero-crossing rate of the input signal.
    
    Args:
        x (numpy array): input signal.
        
    Returns:
        zcr (float): zero-crossing rate of the signal.
    """
    zcr = (((x[:-1] * x[1:]) < 0).sum())/(len(x)-1)
    return zcr