class_docstr: The base class for audio classifier models.
code: def _batchify(
      self,
      data: List[List[float]],
      sample_rate: int,
      feat_type: str,
      batch_size: int,
  ):
      examples = []
      for waveform in data:
          if feat_type == "mel":
              feat = extract_melspectrogram(
                  waveform, sample_rate=sample_rate
              )
              examples.append(feat)
          else:
              examples.append(waveform)
  
      # Seperates data into some batches.
      one_batch = []
      for example in examples:
          one_batch.append(example)
          if len(one_batch) == batch_size:
              yield one_batch
              one_batch = []
      if one_batch:
          # The last batch whose size is less than the config batch_size setting.
          yield one_batch
  
file_path: PaddleHub/paddlehub/module/audio_module.py
imports: from collections import OrderedDict
  from typing import List, Tuple
  import numpy
  import paddle
  from paddlehub.module.module import RunModule, runnable, serving
  from paddlehub.utils.utils import extract_melspectrogram
label_desc: Use image node_id 1 for calling the AudioClassifierModule obj's underlying member method code with example usage: obj._batchify(data, sample_rate, feat_type, batch_size) without return types