code: def dataio_prepare(hparams):
      # Define audio pipeline:
      @sb.utils.data_pipeline.takes("wav")
      @sb.utils.data_pipeline.provides("sig")
      def audio_pipeline(wav):
          sig = sb.dataio.dataio.read_audio(wav)
          info = torchaudio.info(wav)
          resampled = torchaudio.transforms.Resample(
              info.sample_rate,
              hparams["sample_rate"],
          )(sig)
          return resampled
  
      datasets = {}
      data_info = {
          "train": hparams["train_json"],
      }
      for dataset in hparams["splits"]:
          datasets[
              dataset
          ] = sb.dataio.dataset.DynamicItemDataset.from_json(
              json_path=data_info[dataset],
              replacements={"data_root": hparams["data_folder"]},
              dynamic_items=[audio_pipeline],
              output_keys=["id", "sig"],
          )
  
      return datasets
  
      return datasets
  
file_path: speechbrain/recipes/LJSpeech/quantization/train.py
imports: import os
  import sys
  import logging
  import speechbrain
  from speechbrain.utils.distributed import run_on_main
  from hyperpyyaml import load_hyperpyyaml
  from torch.utils.data import DataLoader
  from speechbrain.dataio.dataloader import LoopedLoader
  from speechbrain.utils.kmeans import fetch_kmeans_model, train, save_model
  import torchaudio
label_desc: Use image node_id 1 for calling a global function with example usage: dataio_prepare(hparams) and returns: datasets, datasets, resampled