code: def process_transcripts(dataset_root):
      """
      Reads in transcripts for each audio segment and processes them.
      """
      stm_path = os.path.join(
          dataset_root,
          "2000_hub5_eng_eval_tr",
          "reference",
          "hub5e00.english.000405.stm",
      )
      results = []
      chars = set()
  
      with open(stm_path, "r") as fh:
          for line in fh:
              # lines with ';;' are comments
              if line.startswith(";;"):
                  continue
  
              if "IGNORE_TIME_SEGMENT_" in line:
                  continue
              line = line.replace("<B_ASIDE>", "").replace(
                  "<E_ASIDE>", ""
              )
              line = line.replace("(%HESITATION)", "UH")
              line = line.replace("-", "")
              line = line.replace("(%UH)", "UH")
              line = line.replace("(%AH)", "UH")
              line = line.replace("(", "").replace(")", "")
  
              line = line.lower()
  
              m = STM_LINE_FMT.search(line.strip())
              utt = StmUtterance(*m.groups())
  
              # Convert begin/end times to float
              utt = utt._replace(begin=float(utt.begin))
              utt = utt._replace(end=float(utt.end))
  
              # Check for utterance in dict of transcript mistakes
              transcript_update = TRANSCRIPT_BUGS.get(get_utt_id(utt))
              if transcript_update is not None:
                  utt = utt._replace(transcript=transcript_update)
  
              results.append(utt)
              chars.update(list(utt.transcript))
      return results, chars
  
imports: import argparse
  import glob
  import json
  import os
  import re
  import subprocess
  import sys
  from collections import namedtuple
  from math import ceil, floor
  from operator import attrgetter
  import numpy
  import scipy.io.wavfile
  from tqdm import tqdm
label_desc: Use image node_id 4 for calling a global function with example usage: process_transcripts(dataset_root) and returns: results,  chars