code: def testWhiteness(self):
      inputSize = 512
      sampleRate = 44100
      nPeaks = 3
  
      audio = MonoLoader(
          filename=join(
              testdata.audio_dir, "generated/synthesised/sin5000.wav"
          ),
          sampleRate=sampleRate,
      )()
  
      fc = FrameCutter(frameSize=inputSize, hopSize=inputSize)
  
      windowing = Windowing(type="blackmanharris62")
      spec = Spectrum(size=inputSize)
  
      speaks = SpectralPeaks(
          sampleRate=44100,
          maxPeaks=nPeaks,
          maxFrequency=sampleRate / 2,
          minFrequency=0,
          magnitudeThreshold=0,
          orderBy="magnitude",
      )
      specWhitener = SpectralWhitening(
          maxFrequency=sampleRate / 2, sampleRate=sampleRate
      )
  
      frame = fc(audio)
      whitenedMagSums = [0] * nPeaks
      counter = 0
      while len(frame) != 0:
          spectrum = spec(windowing(frame))
          (freqs, mags) = speaks(spectrum)
          whitenedMags = specWhitener(spectrum, freqs, mags)
  
          for i in range(0, len(whitenedMags)):
              whitenedMagSums[i] += whitenedMags[i]
          counter += 1
  
          frame = fc(audio)
  
      whitenedMagAvgs = [x / counter for x in whitenedMagSums]
  
      expected = [
          0.05626755335908027,
          0.0030654285443056555,
          0.0041451468459836284,
      ]
      self.assertAlmostEqualVector(whitenedMagAvgs, expected, 1e-5)
  
file_path: essentia/test/src/unittests/spectral/test_spectralwhitening.py
imports: from essentia_test import *
label_desc: Use image node_id 1 for calling the TestSpectralWhitening obj's underlying member method code with example usage: obj.testWhiteness() without return types