code: def stSpectralRollOff(X, c, fs):
      
      totalEnergy = numpy.sum(X ** 2)
      fftLength = len(X)
      Thres = c*totalEnergy
      # Ffind the spectral rolloff as the frequency position 
      # where the respective spectral energy is equal to c*totalEnergy
      CumSum = numpy.cumsum(X ** 2) + eps
      [a, ] = numpy.nonzero(CumSum > Thres)
      if len(a) > 0:
          mC = numpy.float64(a[0]) / (float(fftLength))
      else:
          mC = 0.0
      return (mC)
docs: Computes spectral roll-off