def stSpectralRollOff(X, c, fs):
    'Computes spectral roll-off'
    totalEnergy = np.sum((X ** 2))
    fftLength = len(X)
    Thres = (c * totalEnergy)
    CumSum = (np.cumsum((X ** 2)) + eps)
    [a] = np.nonzero((CumSum > Thres))
    if (len(a) > 0):
        mC = (np.float64(a[0]) / float(fftLength))
    else:
        mC = 0.0
    return mC
Computes spectral roll-off
def stSpectralRollOff(X, c, fs):
    
    totalEnergy = np.sum((X ** 2))
    fftLength = len(X)
    Thres = (c * totalEnergy)
    CumSum = (np.cumsum((X ** 2)) + eps)
    [a] = np.nonzero((CumSum > Thres))
    if (len(a) > 0):
        mC = (np.float64(a[0]) / float(fftLength))
    else:
        mC = 0.0
    return mC