Example #1
0
def main(cmd=None):
    """TTS training

    Example:

        % python tts_train.py asr --print_config --optim adadelta
        % python tts_train.py --config conf/train_asr.yaml
    """
    TTSTask.main(cmd=cmd)
def config_file(tmp_path: Path, token_list):
    # Write default configuration file
    TTSTask.main(cmd=[
        "--dry_run",
        "true",
        "--output_dir",
        str(tmp_path),
        "--token_list",
        str(token_list),
        "--token_type",
        "char",
        "--cleaner",
        "none",
        "--g2p",
        "none",
        "--normalize",
        "none",
    ])
    return tmp_path / "config.yaml"
Example #3
0
def test_main_print_config():
    with pytest.raises(SystemExit):
        TTSTask.main(cmd=["--print_config"])
Example #4
0
def test_main_with_no_args():
    with pytest.raises(SystemExit):
        TTSTask.main(cmd=[])
Example #5
0
def test_main_help():
    with pytest.raises(SystemExit):
        TTSTask.main(cmd=["--help"])