code: def collect_data(
      data_dir: Union[Path, str],
      split: str,
      prefix: str,
  ) -> List[List[Utterance]]:
      """Collect utterances in each long talk."""
      data_dir = Path(data_dir)
      lines = open(data_dir / f"{split}.tsv", "r").readlines()
      uttids = [line.strip().split()[0] for line in lines]
      trans = [" ".join(line.strip().split()[1:]) for line in lines]
  
      ans = []
      for idx, (uttid, tran) in enumerate(zip(uttids, trans)):
          path = data_dir / uttid
  
          uttid = uttid.replace(".flac", "").split("/")[1]
  
          text = preprocess_text(tran)
          if len(tran) == 0:
              logging.warning("empty string for {uttid}. Skip")
              continue
  
          ans.append(
              [
                  Utterance(
                      utt_id=f"{prefix}_{uttid}",
                      wav_id=f"{prefix}_{uttid}",
                      wav_path=f"flac -c -d -s {str(path)} |",
                      start_time=0.0,
                      end_time=0.0,
                      lang="<jpn>",
                      task="<asr>",
                      text=text,
                      asr_text=text,
                  )
              ]
          )
  
          if idx > 0 and idx % 100 == 0:
              logging.info(f"Done {idx} samples")
      return ans
  
file_path: espnet/egs2/owsm_v3/s2t1/local/prepare_reazonspeech.py
imports: import json
  import logging
  from argparse import ArgumentParser
  from collections import defaultdict
  from multiprocessing import Pool
  from pathlib import Path
  from typing import Dict, List, Optional, Tuple, Union
  import librosa
  from utils import SYMBOL_NA, SYMBOL_NOSPEECH, SYMBOLS_TIME, LongUtterance, Utterance, generate_long_utterances
label_desc: Use image node_id 4 for calling a global function with example usage: collect_data(data_dir, split, prefix) and returns: ans