Ejemplo n.º 1
0
def main():
    parser = argparse.ArgumentParser()
    # parser.add_argument('--base_dir', default=os.path.expanduser('/past_projects/DB'))
    # parser.add_argument('--output', default='sitec')
    parser.add_argument('--dataset',
                        required=True,
                        choices=[
                            'blizzard', 'ljspeech', 'sitec', 'sitec_short',
                            'selvas_multi', 'libri_tts',
                            'selvas_multispeaker_pron', 'integrate_dataset',
                            'public_korean_pron', 'check_file_integrity'
                        ])
    parser.add_argument(
        '--hparams',
        default='',
        help=
        'Hyperparameter overrides as a comma-separated list of name=value pairs'
    )
    parser.add_argument('--num_workers', type=int, default=12)
    args = parser.parse_args()
    hparams = create_hparams(args.hparams)

    if args.dataset == 'libri_tts':
        assert (True)
        print("Not implemented")
        # preprocess_libri_tts(args)
    elif args.dataset == 'selvas_multi':
        assert (True)
        print("Not implemented")
        # preprocess_selvas_multi(args)
    elif args.dataset == 'integrate_dataset':
        integrate_dataset(args)
    elif args.dataset == 'selvas_multispeaker_pron':
        preprocess_selvas_multispeaker_pron(args)
    elif args.dataset == 'public_korean_pron':
        preprocess_public_korean_pron(args)
    elif args.dataset == 'check_file_integrity':
        check_for_file_integrity(args)
Ejemplo n.º 2
0
'''
Defines the set of symbols used in text input to the model.

The default is a set of ASCII characters that works well for English or text that has been run
through Unidecode. For other data, you can modify _characters. See TRAINING_DATA.md for details.
'''
from configs.hparams import create_hparams  # hparams, hparams_debug_string

from .korean import ALL_SYMBOLS

hparams=create_hparams()
if hparams.text_cleaners != 'korean_cleaners':
  # symbols = '_~ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!\'(),-.:;? '
  print('english cleaner')
  symbols = '_~ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!\'(),-.:;?<>《》 '
else:
  print('korean cleaner')
  symbols = ALL_SYMBOLS
Ejemplo n.º 3
0
                        type=int,
                        default=0,
                        required=False,
                        help='rank of current gpu')
    parser.add_argument('--group_name',
                        type=str,
                        default='group_name',
                        required=False,
                        help='Distributed group name')
    parser.add_argument('--hparams',
                        type=str,
                        required=False,
                        help='comma separated name=value pairs')

    args = parser.parse_args()
    hparams = create_hparams(args.hparams)
    if hparams.text_cleaners != 'korean_cleaners':
        # symbols = '_~ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!\'(),-.:;? '
        symbols = '_~ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!\'(),-.:;?<>《》 '
    else:
        symbols = ALL_SYMBOLS
    torch.backends.cudnn.enabled = hparams.cudnn_enabled
    torch.backends.cudnn.benchmark = hparams.cudnn_benchmark

    print("FP16 Run:", hparams.fp16_run)
    print("Dynamic Loss Scaling:", hparams.dynamic_loss_scaling)
    print("Distributed Run:", hparams.distributed_run)
    print("cuDNN Enabled:", hparams.cudnn_enabled)
    print("cuDNN Benchmark:", hparams.cudnn_benchmark)

    train(args.output_directory, args.log_directory, args.checkpoint_path,