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"
def test_main_print_config(): with pytest.raises(SystemExit): TTSTask.main(cmd=["--print_config"])
def test_main_with_no_args(): with pytest.raises(SystemExit): TTSTask.main(cmd=[])
def test_main_help(): with pytest.raises(SystemExit): TTSTask.main(cmd=["--help"])