code: def evaluateSilenceRate(self, input):
      thresh = [0, 0.15, 0.2, 0.3, 0.4, 0.5, 0.75, 0.8]
      nThresh = len(thresh)
      nFrames = len(input)
  
      # expected values:
      expected = zeros([nThresh, nFrames])
      for frame in range(nFrames):
          if len(input[frame]):
              power = instantPower(input[frame])
          for i in range(nThresh):
              if power < thresh[i]:
                  expected[i][frame] = 1
              else:
                  expected[i][frame] = 0
  
      gen = VectorInput(input)
      sRate = SilenceRate(thresholds=thresh)
      ports = []
      labels = []
      pool = Pool()
      gen.data >> sRate.frame
      for i in range(nThresh):
          labels.append("threshold_" + str(i))
          ports.append(getattr(sRate, labels[i]))
          ports[i] >> (pool, labels[i])
      run(gen)
  
      for i in range(nThresh):
          if len(expected[i]):
              self.assertEqualVector(pool[labels[i]], expected[i])
          else:
              self.assertRaises(KeyError, lambda: pool[labels[i]])
  
file_path: essentia/test/src/unittests/standard/test_silencerate_streaming.py
imports: from essentia_test import *
  from essentia.streaming import SilenceRate
  from numpy import random
label_desc: Use image node_id 1 for calling the TestSilenceRate_Streaming obj's underlying member method code with example usage: obj.evaluateSilenceRate(input) without return types