def stSpectralFlux(X, Xprev):
 sumX = numpy.sum((X + eps))
 sumPrevX = numpy.sum((Xprev + eps))
 F = numpy.sum((((X / sumX) - (Xprev / sumPrevX)) ** 2))
 return F

def stSpectralFlux ( X , Xprev ) : sumX = numpy . sum ( ( X + eps ) ) sumPrevX = numpy . sum ( ( Xprev + eps ) ) F = numpy . sum ( ( ( ( X / sumX ) - ( Xprev / sumPrevX ) ) ** 2 ) ) return F
computes the spectral flux feature of the current frame arguments: x: the abs of the current frame xpre: the abs of the previous frame .