code: def parse_libri_folder(libri_folders):
      # parsing librispeech
      # step 1:  we construct a dictionary with speakers ids
      utterances = []
      txt_files = []
      for libri_dir in libri_folders:
          utterances.extend(
              get_all_files(libri_dir, match_and=[".flac"])
          )
          txt_files.extend(
              get_all_files(libri_dir, match_and=["trans.txt"])
          )
      # step 2: we then build an hashtable for words for each utterance
      words_dict = {}
      for trans in txt_files:
          with open(trans, "r") as f:
              for line in f:
                  splitted = line.split(" ")
                  utt_id = splitted[0]
                  words = " ".join(splitted[1:])
                  words_dict[utt_id] = words.strip("\n")
  
      # step 3: we build an hashtable for also speakers
      speakers = {}
      for u in utterances:
          spk_id = Path(u).parent.parent.stem
          if spk_id not in speakers:
              speakers[spk_id] = [u]
          else:
              speakers[spk_id].append(u)
  
      return speakers, words_dict
  
file_path: speechbrain/recipes/LibriParty/generate_dataset/create_custom_dataset.py
imports: import os
  import sys
  import json
  import random
  import numpy
  import speechbrain
  from hyperpyyaml import load_hyperpyyaml
  from speechbrain.utils.data_utils import get_all_files
  from local.create_mixtures_metadata import create_metadata
  from local.create_mixtures_from_metadata import create_mixture
  from pathlib import Path
  from tqdm import tqdm
label_desc: Use image node_id 2 for calling a global function with example usage: parse_libri_folder(libri_folders) and returns: speakers,  words_dict