code: def main():
      parser = ArgumentParser()
      parser.add_argument(
          "--asr_model",
          type=str,
          default="QuartzNet15x5Base-En",
          required=False,
          help="Pass: 'QuartzNet15x5Base-En'",
      )
      parser.add_argument(
          "--dataset",
          type=str,
          required=True,
          help="path to evaluation data",
      )
      parser.add_argument("--batch_size", type=int, default=4)
      parser.add_argument(
          "--out_dir",
          type=str,
          required=True,
          help="Destination dir for output files",
      )
      parser.add_argument(
          "--sctk_dir",
          type=str,
          required=False,
          default="",
          help="Path to sctk root dir",
      )
      parser.add_argument(
          "--glm",
          type=str,
          required=False,
          default="",
          help="Path to glm file",
      )
      args = parser.parse_args()
      torch.set_grad_enabled(False)
  
      if not os.path.exists(args.out_dir):
          os.makedirs(args.out_dir, exist_ok=True)
  
      use_sctk = os.path.exists(args.sctk_dir)
  
      if args.asr_model.endswith(".nemo"):
          logging.info(f"Using local ASR model from {args.asr_model}")
          asr_model = ASRModel.restore_from(
              restore_path=args.asr_model, map_location="cpu"
          )
      else:
          logging.info(f"Using NGC cloud ASR model {args.asr_model}")
          asr_model = ASRModel.from_pretrained(
              model_name=args.asr_model, map_location="cpu"
          )
  
      if can_gpu:
          asr_model = asr_model.cuda()
  
      asr_model.eval()
  
      manifest_data = read_manifest(args.dataset)
  
      references = [data["text"] for data in manifest_data]
      audio_filepaths = [
          data["audio_filepath"] for data in manifest_data
      ]
  
      with autocast():
          hypotheses = asr_model.transcribe(
              audio_filepaths, batch_size=args.batch_size
          )
  
          # if transcriptions form a tuple (from RNNT), extract just "best" hypothesis
          if type(hypotheses) == tuple and len(hypotheses) == 2:
              hypotheses = hypotheses[0]
  
      info_list = get_utt_info(args.dataset)
      hypfile = os.path.join(args.out_dir, "hyp.trn")
      reffile = os.path.join(args.out_dir, "ref.trn")
      with open(hypfile, "w") as hyp_f, open(reffile, "w") as ref_f:
          for i in range(len(hypotheses)):
              utt_id = os.path.splitext(
                  os.path.basename(info_list[i]["audio_filepath"])
              )[0]
              # rfilter in sctk likes each transcript to have a space at the beginning
              hyp_f.write(
                  " " + hypotheses[i] + " (" + utt_id + ")" + "\n"
              )
              ref_f.write(
                  " " + references[i] + " (" + utt_id + ")" + "\n"
              )
  
      if use_sctk:
          score_with_sctk(
              args.sctk_dir,
              reffile,
              hypfile,
              args.out_dir,
              glm=args.glm,
          )
  
file_path: NeMo/examples/asr/experimental/sclite/speech_to_text_sclite.py
imports: import errno
  import json
  import os
  import subprocess
  from argparse import ArgumentParser
  import torch
  from nemo.collections.asr.models import ASRModel
  from nemo.collections.asr.parts.utils.manifest_utils import read_manifest
  from nemo.utils import logging
label_desc: Use image node_id 3 for calling a global function with example usage: main() without return types