parameters: (parser)
return_statement: return parser
docstring: Parse commandline arguments.
docstring_summary: Parse commandline arguments.
docstring_tokens: Parse commandline arguments .
function: def parse_args(parser):
      """
      Parse commandline arguments.
      """
      parser.add_argument('-i', '--input', type=str, required=True,
                          help='full path to the input text (phareses separated by new line)')
      parser.add_argument('-o', '--output', required=True,
                          help='output folder to save audio (file per phrase)')
      parser.add_argument('--encoder', type=str, required=True,
                          help='full path to the Encoder engine')
      parser.add_argument('--decoder', type=str, required=True,
                          help='full path to the DecoderIter engine')
      parser.add_argument('--postnet', type=str, required=True,
                          help='full path to the Postnet engine')
      parser.add_argument('--waveglow', type=str, required=True,
                          help='full path to the WaveGlow engine')
      parser.add_argument('--waveglow-ckpt', type=str, default="",
                          help='full path to the WaveGlow model checkpoint file')
      parser.add_argument('--log-file', type=str, default='nvlog.json',
                          help='Filename for logging')
      parser.add_argument('-d', '--denoising-strength', default=0.01, type=float)
      parser.add_argument('-sr', '--sampling-rate', default=22050, type=int,
                          help='Sampling rate')
      parser.add_argument('--stft-hop-length', type=int, default=256,
                          help='STFT hop length for estimating audio length from mel size')
      parser.add_argument('--fp16', action='store_true',
                          help='inference with FP16')
      parser.add_argument('--loop', dest='loop', action='store_true',
                          help='Includes the outer decoder loop in the ONNX model. Enabled by default and only supported on TensorRT 8.0 or later.')
      parser.add_argument('--no-loop', dest='loop', action='store_false',
                          help='Excludes outer decoder loop from decoder ONNX model. Default behavior and necessary for TensorRT 7.2 or earlier.')
      parser.set_defaults(loop=int(trt.__version__[0]) >= 8)
      parser.add_argument('--waveglow-onnxruntime', action='store_true',
                          help='Specify this option to use ONNX runtime instead of TRT for running Waveglow')
      parser.add_argument('--decoder-onnxruntime', action='store_true',
                          help='Specify this option to use ONNX runtime instead of TRT for running the TT2 Decoder with loop. When using this option, pass the decoder ONNX model to the --decoder argument')
      return parser
function_tokens: def parse_args ( parser ) : parser . add_argument ( '-i' , '--input' , type = str , required = True , help = 'full path to the input text (phareses separated by new line)' ) parser . add_argument ( '-o' , '--output' , required = True , help = 'output folder to save audio (file per phrase)' ) parser . add_argument ( '--encoder' , type = str , required = True , help = 'full path to the Encoder engine' ) parser . add_argument ( '--decoder' , type = str , required = True , help = 'full path to the DecoderIter engine' ) parser . add_argument ( '--postnet' , type = str , required = True , help = 'full path to the Postnet engine' ) parser . add_argument ( '--waveglow' , type = str , required = True , help = 'full path to the WaveGlow engine' ) parser . add_argument ( '--waveglow-ckpt' , type = str , default = "" , help = 'full path to the WaveGlow model checkpoint file' ) parser . add_argument ( '--log-file' , type = str , default = 'nvlog.json' , help = 'Filename for logging' ) parser . add_argument ( '-d' , '--denoising-strength' , default = 0.01 , type = float ) parser . add_argument ( '-sr' , '--sampling-rate' , default = 22050 , type = int , help = 'Sampling rate' ) parser . add_argument ( '--stft-hop-length' , type = int , default = 256 , help = 'STFT hop length for estimating audio length from mel size' ) parser . add_argument ( '--fp16' , action = 'store_true' , help = 'inference with FP16' ) parser . add_argument ( '--loop' , dest = 'loop' , action = 'store_true' , help = 'Includes the outer decoder loop in the ONNX model. Enabled by default and only supported on TensorRT 8.0 or later.' ) parser . add_argument ( '--no-loop' , dest = 'loop' , action = 'store_false' , help = 'Excludes outer decoder loop from decoder ONNX model. Default behavior and necessary for TensorRT 7.2 or earlier.' ) parser . set_defaults ( loop = int ( trt . __version__ [ 0 ] ) >= 8 ) parser . add_argument ( '--waveglow-onnxruntime' , action = 'store_true' , help = 'Specify this option to use ONNX runtime instead of TRT for running Waveglow' ) parser . add_argument ( '--decoder-onnxruntime' , action = 'store_true' , help = 'Specify this option to use ONNX runtime instead of TRT for running the TT2 Decoder with loop. When using this option, pass the decoder ONNX model to the --decoder argument' ) return parser