code: def spectral_rolloff(data, coeff):
      
      data = np.mean(data, axis=1)
      nFFT = len(data) // 2
      X = FFT(data, nFFT)
  
      totalEnergy = np.sum(X ** 2)
      fftLength = len(X)
      Thres = coeff * totalEnergy
  
      # Find the spectral rolloff as the frequency position where the
      # respective spectral energy is equal to c*totalEnergy
      CumSum = np.cumsum(X ** 2) + EPSILON
      [a, ] = np.nonzero(CumSum > Thres)
      if len(a) > 0:
          mC = np.float64(a[0]) / (float(fftLength))
      else:
          mC = 0.0
  
      return mC
docs: Computes spectral roll-off