code: def prepare_split(data_folder, split_list):
      """
      Processes the provided list of LibriTTS subsets and creates a list of all the .wav files present in the subsets.
      Downloads the LibriTTS subsets as required.
  
      Arguments
      ---------
      data_folder : str
          Path to the folder where the LibriTTS dataset is stored
      split_list : list
          List of librispeech subsets to process (e.g., dev-clean, train-clean-100, ...)
  
      Returns
      -------
      wav_list : list
          List of all .wav files to be processed
      """
      extension = [".wav"]  # The expected extension for audio files
      wav_list = list()  # Stores all audio file paths for the dataset
  
      # For every subset of the dataset, if it doesn't exist, downloads it
      for subset_name in split_list:
          subset_folder = os.path.join(data_folder, subset_name)
          subset_archive = os.path.join(
              subset_folder, subset_name + ".tar.gz"
          )
  
          subset_data = os.path.join(subset_folder, "LibriTTS")
          if not check_folders(subset_data):
              logger.info(
                  f"No data found for {subset_name}. Checking for an archive file."
              )
              if not os.path.isfile(subset_archive):
                  logger.info(
                      f"No archive file found for {subset_name}. Downloading and unpacking."
                  )
                  subset_url = (
                      LIBRITTS_URL_PREFIX + subset_name + ".tar.gz"
                  )
                  download_file(subset_url, subset_archive)
                  logger.info(
                      f"Downloaded data for subset {subset_name}."
                  )
              else:
                  logger.info(
                      f"Found an archive file for {subset_name}. Unpacking."
                  )
  
              shutil.unpack_archive(subset_archive, subset_folder)
  
          # Collects all files matching the provided extension
          wav_list.extend(
              get_all_files(subset_folder, match_and=extension)
          )
  
      return wav_list
  
file_path: speechbrain/recipes/LibriTTS/vocoder/hifigan/libritts_prepare.py
imports: from speechbrain.utils.data_utils import get_all_files, download_file
  import json
  import os
  import shutil
  import random
  import logging
  import torchaudio
  import torch
  from tqdm import tqdm
  from speechbrain.inference.txt import GraphemeToPhoneme
  from speechbrain.utils.text_to_sequence import _g2p_keep_punctuations
label_desc: Use image node_id 2 for calling a global function with example usage: prepare_split(data_folder, split_list) and returns: wav_list