code: def testPatchSize(self):
      model = join(
          testdata.models_dir, "vggish", "small_vggish_init.pb"
      )
      # One second of audio.
      data = numpy.ones((16000)).astype("float32")
  
      # VGGish expects a fixed batch size of 96 frames.
      patch_size = 96
      TensorflowPredictVGGish(
          graphFilename=model,
          patchHopSize=0,
          patchSize=patch_size,
      )(data)
  
      # An exception should be risen otherwise.
      patch_size = 65
      self.assertComputeFails(
          TensorflowPredictVGGish(
              graphFilename=model,
              patchHopSize=0,
              patchSize=patch_size,
          ),
          data,
      )
  
file_path: essentia/test/src/unittests/machinelearning/test_tensorflowpredictvggish.py
imports: from essentia_test import *
  import sys
  import os
label_desc: Use image node_id 2 for calling the TestTensorFlowPredictVGGish obj's underlying member method code with example usage: obj.testPatchSize() without return types