code: def get_parser():
      """Get default arguments."""
      parser = configargparse.ArgumentParser(
          description="Transcribe text from speech using "
          "a speech recognition model on one CPU or GPU",
          config_file_parser_class=configargparse.YAMLConfigFileParser,
          formatter_class=configargparse.ArgumentDefaultsHelpFormatter,
      )
      # general configuration
      parser.add(
          "--config", is_config_file=True, help="Config file path"
      )
      parser.add(
          "--config2",
          is_config_file=True,
          help="Second config file path that overwrites the settings in `--config`",
      )
      parser.add(
          "--config3",
          is_config_file=True,
          help="Third config file path that overwrites the settings "
          "in `--config` and `--config2`",
      )
  
      parser.add_argument(
          "--ngpu", type=int, default=0, help="Number of GPUs"
      )
      parser.add_argument(
          "--dtype",
          choices=("float16", "float32", "float64"),
          default="float32",
          help="Float precision (only available in --api v2)",
      )
      parser.add_argument(
          "--backend",
          type=str,
          default="chainer",
          choices=["chainer", "pytorch"],
          help="Backend library",
      )
      parser.add_argument(
          "--debugmode", type=int, default=1, help="Debugmode"
      )
      parser.add_argument(
          "--seed", type=int, default=1, help="Random seed"
      )
      parser.add_argument(
          "--verbose", "-V", type=int, default=1, help="Verbose option"
      )
      parser.add_argument(
          "--batchsize",
          type=int,
          default=1,
          help="Batch size for beam search (0: means no batch processing)",
      )
      parser.add_argument(
          "--preprocess-conf",
          type=str,
          default=None,
          help="The configuration file for the pre-processing",
      )
      parser.add_argument(
          "--api",
          default="v1",
          choices=["v1", "v2"],
          help="Beam search APIs "
          "v1: Default API. It only supports the ASRInterface.recognize method "
          "and DefaultRNNLM. "
          "v2: Experimental API. It supports any models that implements ScorerInterface.",
      )
      # task related
      parser.add_argument(
          "--recog-json",
          type=str,
          help="Filename of recognition data (json)",
      )
      parser.add_argument(
          "--result-label",
          type=str,
          required=True,
          help="Filename of result label data (json)",
      )
      # model (parameter) related
      parser.add_argument(
          "--model",
          type=str,
          required=True,
          help="Model file parameters to read",
      )
      parser.add_argument(
          "--model-conf",
          type=str,
          default=None,
          help="Model config file",
      )
      parser.add_argument(
          "--num-spkrs",
          type=int,
          default=1,
          choices=[1, 2],
          help="Number of speakers in the speech",
      )
      parser.add_argument(
          "--num-encs",
          default=1,
          type=int,
          help="Number of encoders in the model.",
      )
      # search related
      parser.add_argument(
          "--nbest",
          type=int,
          default=1,
          help="Output N-best hypotheses",
      )
      parser.add_argument(
          "--beam-size", type=int, default=1, help="Beam size"
      )
      parser.add_argument(
          "--penalty", type=float, default=0.0, help="Incertion penalty"
      )
      parser.add_argument(
          "--maxlenratio",
          type=float,
          default=0.0,
          help="""Input length ratio to obtain max output length.
                          If maxlenratio=0.0 (default), it uses a end-detect function
                          to automatically find maximum hypothesis lengths.
                          If maxlenratio<0.0, its absolute value is interpreted
                          as a constant max output length""",
      )
      parser.add_argument(
          "--minlenratio",
          type=float,
          default=0.0,
          help="Input length ratio to obtain min output length",
      )
      parser.add_argument(
          "--ctc-weight",
          type=float,
          default=0.0,
          help="CTC weight in joint decoding",
      )
      parser.add_argument(
          "--weights-ctc-dec",
          type=float,
          action="append",
          help="ctc weight assigned to each encoder during decoding."
          "[in multi-encoder mode only]",
      )
      parser.add_argument(
          "--ctc-window-margin",
          type=int,
          default=0,
          help="""Use CTC window with margin parameter to accelerate
                          CTC/attention decoding especially on GPU. Smaller magin
                          makes decoding faster, but may increase search errors.
                          If margin=0 (default), this function is disabled""",
      )
      # transducer related
      parser.add_argument(
          "--search-type",
          type=str,
          default="default",
          choices=["default", "nsc", "tsd", "alsd", "maes"],
          help="""Type of beam search implementation to use during inference.
          Can be either: default beam search ("default"),
          N-Step Constrained beam search ("nsc"), Time-Synchronous Decoding ("tsd"),
          Alignment-Length Synchronous Decoding ("alsd") or
          modified Adaptive Expansion Search ("maes").""",
      )
      parser.add_argument(
          "--nstep",
          type=int,
          default=1,
          help="""Number of expansion steps allowed in NSC beam search or mAES
          (nstep > 0 for NSC and nstep > 1 for mAES).""",
      )
      parser.add_argument(
          "--prefix-alpha",
          type=int,
          default=2,
          help="Length prefix difference allowed in NSC beam search or mAES.",
      )
      parser.add_argument(
          "--max-sym-exp",
          type=int,
          default=2,
          help="Number of symbol expansions allowed in TSD.",
      )
      parser.add_argument(
          "--u-max",
          type=int,
          default=400,
          help="Length prefix difference allowed in ALSD.",
      )
      parser.add_argument(
          "--expansion-gamma",
          type=float,
          default=2.3,
          help="Allowed logp difference for prune-by-value method in mAES.",
      )
      parser.add_argument(
          "--expansion-beta",
          type=int,
          default=2,
          help="""Number of additional candidates for expanded hypotheses
                  selection in mAES.""",
      )
      parser.add_argument(
          "--score-norm",
          type=strtobool,
          nargs="?",
          default=True,
          help="Normalize final hypotheses' score by length",
      )
      parser.add_argument(
          "--softmax-temperature",
          type=float,
          default=1.0,
          help="Penalization term for softmax function.",
      )
      # rnnlm related
      parser.add_argument(
          "--rnnlm",
          type=str,
          default=None,
          help="RNNLM model file to read",
      )
      parser.add_argument(
          "--rnnlm-conf",
          type=str,
          default=None,
          help="RNNLM model config file to read",
      )
      parser.add_argument(
          "--word-rnnlm",
          type=str,
          default=None,
          help="Word RNNLM model file to read",
      )
      parser.add_argument(
          "--word-rnnlm-conf",
          type=str,
          default=None,
          help="Word RNNLM model config file to read",
      )
      parser.add_argument(
          "--word-dict",
          type=str,
          default=None,
          help="Word list to read",
      )
      parser.add_argument(
          "--lm-weight", type=float, default=0.1, help="RNNLM weight"
      )
      # ngram related
      parser.add_argument(
          "--ngram-model",
          type=str,
          default=None,
          help="ngram model file to read",
      )
      parser.add_argument(
          "--ngram-weight", type=float, default=0.1, help="ngram weight"
      )
      parser.add_argument(
          "--ngram-scorer",
          type=str,
          default="part",
          choices=("full", "part"),
          help="""if the ngram is set as a part scorer, similar with CTC scorer,
                  ngram scorer only scores topK hypethesis.
                  if the ngram is set as full scorer, ngram scorer scores all hypthesis
                  the decoding speed of part scorer is musch faster than full one""",
      )
      # streaming related
      parser.add_argument(
          "--streaming-mode",
          type=str,
          default=None,
          choices=["window", "segment"],
          help="""Use streaming recognizer for inference.
                          `--batchsize` must be set to 0 to enable this mode""",
      )
      parser.add_argument(
          "--streaming-window", type=int, default=10, help="Window size"
      )
      parser.add_argument(
          "--streaming-min-blank-dur",
          type=int,
          default=10,
          help="Minimum blank duration threshold",
      )
      parser.add_argument(
          "--streaming-onset-margin",
          type=int,
          default=1,
          help="Onset margin",
      )
      parser.add_argument(
          "--streaming-offset-margin",
          type=int,
          default=1,
          help="Offset margin",
      )
      # non-autoregressive related
      # Mask CTC related. See https://arxiv.org/abs/2005.08700 for the detail.
      parser.add_argument(
          "--maskctc-n-iterations",
          type=int,
          default=10,
          help="Number of decoding iterations."
          "For Mask CTC, set 0 to predict 1 mask/iter.",
      )
      parser.add_argument(
          "--maskctc-probability-threshold",
          type=float,
          default=0.999,
          help="Threshold probability for CTC output",
      )
      # quantize model related
      parser.add_argument(
          "--quantize-config",
          nargs="*",
          help="""Config for dynamic quantization provided as a list of modules,
          separated by a comma. E.g.: --quantize-config=[Linear,LSTM,GRU].
          Each specified module should be an attribute of 'torch.nn', e.g.:
          torch.nn.Linear, torch.nn.LSTM, torch.nn.GRU, ...""",
      )
      parser.add_argument(
          "--quantize-dtype",
          type=str,
          default="qint8",
          choices=["float16", "qint8"],
          help="Dtype for dynamic quantization.",
      )
      parser.add_argument(
          "--quantize-asr-model",
          type=bool,
          default=False,
          help="Apply dynamic quantization to ASR model.",
      )
      parser.add_argument(
          "--quantize-lm-model",
          type=bool,
          default=False,
          help="Apply dynamic quantization to LM.",
      )
      return parser
  
file_path: espnet/espnet/bin/asr_recog.py
imports: import logging
  import os
  import random
  import sys
  import configargparse
  import numpy
  from espnet.utils.cli_utils import strtobool
label_desc: Use image node_id 1 for calling a global function with example usage: get_parser() and returns: parser