code: def dataio_prep(hparams):
      "Creates the datasets and their data processing pipelines."
  
      # 1. Declarations:
      data_folder = hparams["data_folder"]
      train = sb.dataio.dataset.DynamicItemDataset.from_json(
          json_path=hparams["annotation_train"],
          replacements={"data_root": data_folder},
      )
      validation = sb.dataio.dataset.DynamicItemDataset.from_json(
          json_path=hparams["annotation_valid"],
          replacements={"data_root": data_folder},
      )
      test = sb.dataio.dataset.DynamicItemDataset.from_json(
          json_path=hparams["annotation_test"],
          replacements={"data_root": data_folder},
      )
  
      # 2. Define audio pipeline:
      @sb.utils.data_pipeline.takes("wav")
      @sb.utils.data_pipeline.provides("signal")
      def audio_pipeline(wav):
          sig = sb.dataio.dataio.read_audio(wav)
          return sig
  
      # 3. Define text pipeline:
      @sb.utils.data_pipeline.takes("speech")
      @sb.utils.data_pipeline.provides("target")
      def vad_targets(speech, hparams=hparams):
          boundaries = (
              [
                  (
                      int(interval[0] / hparams["time_resolution"]),
                      int(interval[1] / hparams["time_resolution"]),
                  )
                  for interval in speech
              ]
              if len(speech) > 0
              else []
          )
          gt = torch.zeros(
              int(
                  np.ceil(
                      hparams["example_length"]
                      * (1 / hparams["time_resolution"])
                  )
              )
          )
          for indxs in boundaries:
              start, stop = indxs
              gt[start:stop] = 1
          return gt
  
      # Create dataset
      datasets = [train, validation, test]
      sb.dataio.dataset.add_dynamic_item(datasets, audio_pipeline)
      sb.dataio.dataset.add_dynamic_item(datasets, vad_targets)
      sb.dataio.dataset.set_output_keys(
          datasets, ["id", "signal", "target", "speech"]
      )
  
      # Split dataset
      train_data, valid_data, test_data = datasets
      return train_data, valid_data, test_data
  
file_path: speechbrain/recipes/LibriParty/VAD/train.py
imports: import sys
  import torch
  import logging
  import numpy
  import speechbrain
  from hyperpyyaml import load_hyperpyyaml
  from speechbrain.utils.distributed import run_on_main
  from data_augment import augment_data
label_desc: Use image node_id 1 for calling a global function with example usage: dataio_prep(hparams) and returns: train_data,  valid_data,  test_data, sig, gt