code: def main():
      parser = ArgumentParser(
          description="This script computes the ASR-BLEU metric between model's generated audio and the text reference sequences."
      )
  
      parser.add_argument(
          "--lang",
          help="The target language used to initialize ASR model, see asr_model_cfgs.json for available languages",
          type=str,
      )
      parser.add_argument(
          "--asr_version",
          type=str,
          default="oct22",
          help="For future support we add and extra layer of asr versions. The current most recent version is oct22 meaning October 2022",
      )
      parser.add_argument(
          "--audio_dirpath",
          type=str,
          help="Path to the directory containing the audio predictions from the translation model",
      )
      parser.add_argument(
          "--reference_path",
          type=str,
          help="Path to the file containing reference translations in the form of normalized text (to be compared to ASR predictions",
      )
      parser.add_argument(
          "--reference_format",
          choices=["txt", "tsv"],
          help="Format of reference file. Txt means plain text format where each line represents single reference sequence",
      )
      parser.add_argument(
          "--reference_tsv_column",
          default=None,
          type=str,
          help="If format is tsv, then specify the column name which contains reference sequence",
      )
      parser.add_argument(
          "--audio_format",
          default="n_pred.wav",
          choices=["n_pred.wav"],
          help="Audio format n_pred.wav corresponds to names like 94_pred.wav or 94_spk7_pred.wav where spk7 is the speaker id",
      )
      parser.add_argument(
          "--results_dirpath",
          default=None,
          type=str,
          help="If specified, the resulting BLEU score will be written to this file path as txt file",
      )
      parser.add_argument(
          "--transcripts_path",
          default=None,
          type=str,
          help="If specified, the predicted transcripts will be written to this path as a txt file.",
      )
  
      args = parser.parse_args()
  
      prediction_transcripts, bleu_score = run_asr_bleu(args)
      result_filename = f"{args.reference_format}_{args.lang}_bleu.txt"
      if args.results_dirpath is not None:
          if not Path(args.results_dirpath).exists():
              Path(args.results_dirpath).mkdir(parents=True)
          with open(
              Path(args.results_dirpath) / result_filename, "w"
          ) as f:
              f.write(bleu_score.format(width=2))
  
      if args.transcripts_path is not None:
          with open(args.transcripts_path, "w") as f:
              for transcript in prediction_transcripts:
                  f.write(transcript + "\n")
  
file_path: fairseq/examples/speech_to_speech/asr_bleu/compute_asr_bleu.py
imports: import os
  from typing import Dict, List
  import sacrebleu
  import pandas
  from glob import glob
  from pathlib import Path
  from utils import retrieve_asr_config, ASRGenerator
  from tqdm import tqdm
  from argparse import ArgumentParser
label_desc: Use image node_id 8 for calling a global function with example usage: main() without return types