code: def parse_args():
      r"""
      Parse commandline arguments.
      """
      from torchaudio.models.tacotron2 import (
          _MODEL_CONFIG_AND_URLS as tacotron2_config_and_urls,
      )
      from torchaudio.models.wavernn import (
          _MODEL_CONFIG_AND_URLS as wavernn_config_and_urls,
      )
  
      parser = argparse.ArgumentParser(description=__doc__)
      parser.add_argument(
          "--checkpoint-name",
          type=str,
          default=None,
          choices=list(tacotron2_config_and_urls.keys()),
          help="[string] The name of the checkpoint to load.",
      )
      parser.add_argument(
          "--checkpoint-path",
          type=str,
          default=None,
          help="[string] Path to the checkpoint file.",
      )
      parser.add_argument(
          "--output-path",
          type=str,
          default="./audio.wav",
          help="[string] Path to the output .wav file.",
      )
      parser.add_argument(
          "--input-text",
          "-i",
          type=str,
          default="Hello world",
          help="[string] Type in something here and TTS will generate it!",
      )
      parser.add_argument(
          "--vocoder",
          default="nvidia_waveglow",
          choices=["griffin_lim", "wavernn", "nvidia_waveglow"],
          type=str,
          help="Select the vocoder to use.",
      )
      parser.add_argument(
          "--jit",
          default=False,
          action="store_true",
          help="If used, the model and inference function is jitted.",
      )
  
      preprocessor = parser.add_argument_group(
          "text preprocessor setup"
      )
      preprocessor.add_argument(
          "--text-preprocessor",
          default="english_characters",
          type=str,
          choices=available_symbol_set,
          help="select text preprocessor to use.",
      )
      preprocessor.add_argument(
          "--phonemizer",
          default="DeepPhonemizer",
          type=str,
          choices=available_phonemizers,
          help='select phonemizer to use, only used when text-preprocessor is "english_phonemes"',
      )
      preprocessor.add_argument(
          "--phonemizer-checkpoint",
          default="./en_us_cmudict_forward.pt",
          type=str,
          help="the path or name of the checkpoint for the phonemizer, "
          'only used when text-preprocessor is "english_phonemes"',
      )
      preprocessor.add_argument(
          "--cmudict-root",
          default="./",
          type=str,
          help="the root directory for storing CMU dictionary files",
      )
  
      audio = parser.add_argument_group("audio parameters")
      audio.add_argument(
          "--sample-rate", default=22050, type=int, help="Sampling rate"
      )
      audio.add_argument(
          "--n-fft",
          default=1024,
          type=int,
          help="Filter length for STFT",
      )
      audio.add_argument("--n-mels", default=80, type=int, help="")
      audio.add_argument(
          "--mel-fmin",
          default=0.0,
          type=float,
          help="Minimum mel frequency",
      )
      audio.add_argument(
          "--mel-fmax",
          default=8000.0,
          type=float,
          help="Maximum mel frequency",
      )
  
      # parameters for WaveRNN
      wavernn = parser.add_argument_group("WaveRNN parameters")
      wavernn.add_argument(
          "--wavernn-checkpoint-name",
          default="wavernn_10k_epochs_8bits_ljspeech",
          choices=list(wavernn_config_and_urls.keys()),
          help="Select the WaveRNN checkpoint.",
      )
      wavernn.add_argument(
          "--wavernn-loss",
          default="crossentropy",
          choices=["crossentropy"],
          type=str,
          help="The type of loss the WaveRNN pretrained model is trained on.",
      )
      wavernn.add_argument(
          "--wavernn-no-batch-inference",
          default=False,
          action="store_true",
          help="Don't use batch inference for WaveRNN inference.",
      )
      wavernn.add_argument(
          "--wavernn-no-mulaw",
          default=False,
          action="store_true",
          help="Don't use mulaw decoder to decode the signal.",
      )
      wavernn.add_argument(
          "--wavernn-batch-timesteps",
          default=11000,
          type=int,
          help="The time steps for each batch. Only used when batch inference is used",
      )
      wavernn.add_argument(
          "--wavernn-batch-overlap",
          default=550,
          type=int,
          help="The overlapping time steps between batches. Only used when batch inference is used",
      )
  
      return parser
  
file_path: audio/examples/pipeline_tacotron2/inference.py
imports: import argparse
  import os
  import random
  import sys
  from functools import partial
  import numpy
  import torch
  import torchaudio
  from datasets import InverseSpectralNormalization
  from text.text_preprocessing import available_phonemizers, available_symbol_set, get_symbol_list, text_to_sequence
  from torchaudio.models import Tacotron2, tacotron2
  from utils import prepare_input_sequence
label_desc: Use image node_id 1 for calling a global function with example usage: parse_args() and returns: parser