def get_parser():
    parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter)
    parser.add_argument('--epoch', type=int, default=34, help='It specifies the checkpoint to use for decoding.Note: Epoch counts from 0.')
    parser.add_argument('--avg', type=int, default=20, help="Number of checkpoints to average. Automatically select consecutive checkpoints before the checkpoint specified by '--epoch'. ")
    parser.add_argument('--method', type=str, default='attention-decoder', help='Decoding method.\n        Supported values are:\n            - (0) ctc-decoding. Use CTC decoding. It uses a sentence piece\n              model, i.e., lang_dir/bpe.model, to convert word pieces to words.\n              It needs neither a lexicon nor an n-gram LM.\n            - (1) 1best. Extract the best path from the decoding lattice as the\n              decoding result.\n            - (2) nbest. Extract n paths from the decoding lattice; the path\n              with the highest score is the decoding result.\n            - (3) nbest-rescoring. Extract n paths from the decoding lattice,\n              rescore them with an n-gram LM (e.g., a 4-gram LM), the path with\n              the highest score is the decoding result.\n            - (4) whole-lattice-rescoring. Rescore the decoding lattice with an\n              n-gram LM (e.g., a 4-gram LM), the best path of rescored lattice\n              is the decoding result.\n            - (5) attention-decoder. Extract n paths from the LM rescored\n              lattice, the path with the highest score is the decoding result.\n            - (6) nbest-oracle. Its WER is the lower bound of any n-best\n              rescoring method can achieve. Useful for debugging n-best\n              rescoring method.\n        ')
    parser.add_argument('--num-paths', type=int, default=100, help='Number of paths for n-best based decoding method.\n        Used only when "method" is one of the following values:\n        nbest, nbest-rescoring, attention-decoder, and nbest-oracle\n        ')
    parser.add_argument('--nbest-scale', type=float, default=0.5, help='The scale to be applied to `lattice.scores`.\n        It\'s needed if you use any kinds of n-best based rescoring.\n        Used only when "method" is one of the following values:\n        nbest, nbest-rescoring, attention-decoder, and nbest-oracle\n        A smaller value results in more unique paths.\n        ')
    parser.add_argument('--export', type=str2bool, default=False, help='When enabled, the averaged model is saved to\n        conformer_ctc/exp/pretrained.pt. Note: only model.state_dict() is saved.\n        pretrained.pt contains a dict {"model": model.state_dict()},\n        which can be loaded by `icefall.checkpoint.load_checkpoint()`.\n        ')
    parser.add_argument('--exp-dir', type=str, default='conformer_mmi/exp_500', help='The experiment dir')
    parser.add_argument('--lang-dir', type=str, default='data/lang_bpe_500', help='The lang dir')
    parser.add_argument('--num-decoder-layers', type=int, default=6, help='Number of attention decoder layers')
    return parser
def get_parser():
    parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter)
    parser.add_argument('--epoch', type=int, default=34, help='It specifies the checkpoint to use for decoding.Note: Epoch counts from 0.')
    parser.add_argument('--avg', type=int, default=20, help="Number of checkpoints to average. Automatically select consecutive checkpoints before the checkpoint specified by '--epoch'. ")
    parser.add_argument('--method', type=str, default='attention-decoder', help='Decoding method.\n        Supported values are:\n            - (0) ctc-decoding. Use CTC decoding. It uses a sentence piece\n              model, i.e., lang_dir/bpe.model, to convert word pieces to words.\n              It needs neither a lexicon nor an n-gram LM.\n            - (1) 1best. Extract the best path from the decoding lattice as the\n              decoding result.\n            - (2) nbest. Extract n paths from the decoding lattice; the path\n              with the highest score is the decoding result.\n            - (3) nbest-rescoring. Extract n paths from the decoding lattice,\n              rescore them with an n-gram LM (e.g., a 4-gram LM), the path with\n              the highest score is the decoding result.\n            - (4) whole-lattice-rescoring. Rescore the decoding lattice with an\n              n-gram LM (e.g., a 4-gram LM), the best path of rescored lattice\n              is the decoding result.\n            - (5) attention-decoder. Extract n paths from the LM rescored\n              lattice, the path with the highest score is the decoding result.\n            - (6) nbest-oracle. Its WER is the lower bound of any n-best\n              rescoring method can achieve. Useful for debugging n-best\n              rescoring method.\n        ')
    parser.add_argument('--num-paths', type=int, default=100, help='Number of paths for n-best based decoding method.\n        Used only when "method" is one of the following values:\n        nbest, nbest-rescoring, attention-decoder, and nbest-oracle\n        ')
    parser.add_argument('--nbest-scale', type=float, default=0.5, help='The scale to be applied to `lattice.scores`.\n        It\'s needed if you use any kinds of n-best based rescoring.\n        Used only when "method" is one of the following values:\n        nbest, nbest-rescoring, attention-decoder, and nbest-oracle\n        A smaller value results in more unique paths.\n        ')
    parser.add_argument('--export', type=str2bool, default=False, help='When enabled, the averaged model is saved to\n        conformer_ctc/exp/pretrained.pt. Note: only model.state_dict() is saved.\n        pretrained.pt contains a dict {"model": model.state_dict()},\n        which can be loaded by `icefall.checkpoint.load_checkpoint()`.\n        ')
    parser.add_argument('--exp-dir', type=str, default='conformer_mmi/exp_500', help='The experiment dir')
    parser.add_argument('--lang-dir', type=str, default='data/lang_bpe_500', help='The lang dir')
    parser.add_argument('--num-decoder-layers', type=int, default=6, help='Number of attention decoder layers')
    return parser