code: def main():
      args = parse_args()
  
      args.output_dir.mkdir(parents=True, exist_ok=True)
      talks = process_kaldi_directory(
          data_dir=args.data_dir,
          prefix=args.prefix,
          src=args.src,
          tgt=args.tgt,
          src_field=args.src_field,
          num_proc=args.num_proc,
          nlsyms=args.nlsyms,
          lower_case=args.lower_case,
      )
  
      write_dir = args.output_dir
      write_dir.mkdir(parents=True, exist_ok=True)
  
      wavscp_fp = open(write_dir / "wav.scp", "w")
      segments_fp = open(write_dir / "segments", "w")
      text_fp = open(write_dir / "text", "w")
      textprev_fp = open(write_dir / "text.prev", "w")
      textctc_fp = open(write_dir / "text.ctc", "w")
      utt2spk_fp = open(write_dir / "utt2spk", "w")
  
      for talk in talks:
          for u in generate_long_utterances(talk):
              wavscp_fp.write(f"{u.wav_id} {u.wav_path}\n")
              segments_fp.write(
                  f"{u.utt_id} {u.wav_id} {u.start_time:.2f} {u.end_time:.2f}\n"
              )
              text_fp.write(
                  f"{u.utt_id} {u.lang}{u.task}{u.text_with_time}\n"
              )
              textprev_fp.write(f"{u.utt_id} {u.prev_text}\n")
              textctc_fp.write(f"{u.utt_id} {u.asr_text}\n")
              utt2spk_fp.write(f"{u.utt_id} {u.utt_id}\n")
  
      wavscp_fp.close()
      segments_fp.close()
      text_fp.close()
      textprev_fp.close()
      textctc_fp.close()
      utt2spk_fp.close()
  
      special_tokens = [
          SYMBOL_NA,
          SYMBOL_NOSPEECH,
          f"<{args.src}>",
          *SYMBOLS_TIME,
      ]
      if args.tgt is not None:
          special_tokens.insert(3, f"<{args.tgt}>")
      with open(args.output_dir / "nlsyms.txt", "w") as fp:
          for tok in special_tokens:
              fp.write(f"{tok}\n")
  
file_path: espnet/egs2/owsm_v3/s2t1/local/kaldi_to_whisper.py
imports: import logging
  from argparse import ArgumentParser
  from io import BytesIO
  from multiprocessing import Pool
  from pathlib import Path
  import kaldiio
  import librosa
  import soundfile
  from utils import SYMBOL_NA, SYMBOL_NOSPEECH, SYMBOLS_TIME, LongUtterance, Utterance, generate_long_utterances
label_desc: Use image node_id 6 for calling a global function with example usage: main() without return types