def parse_args(parser):
    """
    Parse commandline arguments.
    """
    parser.add_argument('-i', '--input', type=str, default="",
                        help='full path to the input text (phareses separated by new line); \
                        if not provided then use default text')
    parser.add_argument('-o', '--output', required=True,
                        help='output folder to save audio (file per phrase)')
    parser.add_argument('--tacotron2', type=str, default="",
                        help='full path to the Tacotron2 model checkpoint file')
    parser.add_argument('--mel-file', type=str, default="",
                        help='set if using mel spectrograms instead of Tacotron2 model')
    parser.add_argument('--waveglow', required=True,
                        help='full path to the WaveGlow model checkpoint file')
    parser.add_argument('--old-waveglow', action='store_true',
                        help='set if WaveGlow checkpoint is from GitHub.com/NVIDIA/waveglow')
    parser.add_argument('-s', '--sigma-infer', default=0.6, type=float)
    parser.add_argument('-sr', '--sampling-rate', default=22050, type=int,
                        help='Sampling rate')
    parser.add_argument('--fp16-run', action='store_true',
                        help='inference in fp16')
    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')

    return parser