code: def split_file(filename, max_frames=600, fps=25.0):
      lines = open(filename).read().splitlines()
  
      flag = 0
      stack = []
      res = []
  
      tmp = 0
      start_timestamp = 0.0
  
      threshold = max_frames / fps
  
      for line in lines:
          if "WORD START END ASDSCORE" in line:
              flag = 1
              continue
          if flag:
              word, start, end, score = line.split(" ")
              start, end, score = float(start), float(end), float(score)
              if end < tmp + threshold:
                  stack.append(word)
                  last_timestamp = end
              else:
                  res.append(
                      [
                          " ".join(stack),
                          start_timestamp,
                          last_timestamp,
                          last_timestamp - start_timestamp,
                      ]
                  )
                  tmp = start
                  start_timestamp = start
                  stack = [word]
      if stack:
          res.append(
              [
                  " ".join(stack),
                  start_timestamp,
                  end,
                  end - start_timestamp,
              ]
          )
      return res
  
file_path: audio/examples/avsr/data_prep/utils.py
imports: import os
  import torchaudio
  import torchvision
label_desc: Use image node_id 1 for calling a global function with example usage: split_file(filename, max_frames, fps) and returns: res