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('--suffix', type=str, default="",
                        help="Output filename suffix")
    parser.add_argument('--tacotron2', type=str,
                        help='Full path to the Tacotron2 model checkpoint file')
    parser.add_argument('--waveglow', type=str,
                        help='Full path to the WaveGlow model checkpoint file')
    parser.add_argument('-s', '--sigma-infer', default=0.9, type=float,
                        help='Standard deviation of the Gaussian distribution')
    parser.add_argument('-d', '--denoising-strength', default=0.01, type=float,
                        help='Denoising strength for removing model bias')
    parser.add_argument('-sr', '--sampling-rate', default=22050, type=int,
                        help='Sampling rate')

    run_mode = parser.add_mutually_exclusive_group()
    run_mode.add_argument('--fp16', action='store_true',
                        help='Run inference with mixed precision')
    run_mode.add_argument('--cpu', action='store_true',
                        help='Run inference on CPU')

    parser.add_argument('--log-file', type=str, default='nvlog.json',
                        help='Filename for logging')
    parser.add_argument('--include-warmup', action='store_true',
                        help='Include warmup')
    parser.add_argument('--stft-hop-length', type=int, default=256,
                        help='STFT hop length for estimating audio length from mel size')

    return parser