docstr: Generates the utt2spk, text and wav data required by ESPNET
  
  Args:
  speaker_folders (list): The folders from where to extract data
  dataset (str): The dataset we are working with (train, test, dev)
  
  Returns:
  utt2spk (list) : Utterence to Speaker data
  text (list) : Utterence to Transcript data
  wav (list) : Utterence to Wav-Path data
docstr_tok: ["Generates","the","utt2spk",",","text","and","wav","data","required","by","ESPNET","Args",":","speaker_folders","(","list",")",":","The","folders","from","where","to","extract","data","dataset","(","str",")",":","The","dataset","we","are","working","with","(","train",",","test",",","dev",")","Returns",":","utt2spk","(","list",")",":","Utterence","to","Speaker","data","text","(","list",")",":","Utterence","to","Transcript","data","wav","(","list",")",":","Utterence","to","Wav-Path","data"]
code: def generate_espnet_data(
      speaker_folders: list, dataset: str
  ) -> Union[List[str], List[str], List[str]]:
      """Generates the utt2spk, text and wav data required by ESPNET
  
      Args:
      speaker_folders (list): The folders from where to extract data
      dataset (str): The dataset we are working with (train, test, dev)
  
      Returns:
      utt2spk (list) : Utterence to Speaker data
      text (list) : Utterence to Transcript data
      wav (list) : Utterence to Wav-Path data
      """
      utt2spk = []
      text = []
      wav = []
  
      for speaker_folder in speaker_folders:
          spk_id = os.path.basename(speaker_folder)
  
          for wav_file in os.listdir(speaker_folder):
              if not wav_file.endswith(".wav"):
                  continue
              text_file = wav_file.replace("wav", "txt")
  
              wav_full_path = os.path.join(speaker_folder, wav_file)
              text_full_path = os.path.join(speaker_folder, text_file)
  
              assert os.path.exists(wav_full_path)
              assert os.path.exists(text_full_path)
  
              utt_id = spk_id + "_" + Path(wav_full_path).stem
  
              utt2spk.append(utt_id + " " + spk_id)
              wav.append(utt_id + " " + wav_full_path)
              text.append(
                  utt_id + " " + Utils.read_text(text_full_path)
              )
      return utt2spk, text, wav
  
file_path: espnet/egs2/lrs3/asr1/local/data_prep.py
imports: import argparse
  import logging
  import os
  from pathlib import Path
  from typing import List, Union
  import numpy
label_desc: Use image node_id 3 for calling the DatasetUtils obj's underlying member method code with example usage: obj.generate_espnet_data(speaker_folders, dataset) and returns: utt2spk,  text,  wav