code: def testARealCaseVampComparison(self):
      # Compare with the results obtained with the vamp pYIN
      # implementation of the YIN algorithm
      # https://code.soundsoftware.ac.uk/projects/pyin
  
      frameSize = 2048
      sr = 44100
      hopSize = 256
      filename = join(testdata.audio_dir, "recorded", "vignesh.wav")
      audio = MonoLoader(filename=filename, sampleRate=44100)()
      frames = FrameGenerator(
          audio, frameSize=frameSize, hopSize=hopSize
      )
      pitchDetect = PitchYin(
          frameSize=frameSize,
          sampleRate=sr,
          minFrequency=40,
          maxFrequency=1600,
      )
  
      pitch = array([pitchDetect(frame)[0] for frame in frames])
  
      expected_pitch = numpy.load(
          join(filedir(), "pitchyin/vignesh_pitch_vamp.npy")
      )
  
      # The VAMP implementation provides voiced/unvoiced information
      # while our system does not. Thus set to 0 unvoiced frames in
      # both cases to exclude them from the comparison.
      unvoiced_idx = numpy.where(expected_pitch <= 0)[0]
      expected_pitch[unvoiced_idx] = 0
      pitch[unvoiced_idx] = 0
  
      # Trim the first and last frames as the
      # system behavior is unstable.
      pitch = pitch[8:-5]
      expected_pitch = expected_pitch[8:-5]
  
      self.assertAlmostEqualVector(pitch, expected_pitch, 5e-2)
  
file_path: essentia/test/src/unittests/tonal/test_pitchyin.py
imports: from essentia_test import *
  from numpy import sin, pi, mean, random
label_desc: Use image node_id 10 for calling the TestPitchYin obj's underlying member method code with example usage: obj.testARealCaseVampComparison() without return types