Fork of https://github.com/alokprasad/fastspeech_squeezewave to also fix denoising in squeezewave
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

92 lines
2.9 KiB

  1. from text import symbols
  2. class Hparams:
  3. """ hyper parameters """
  4. def __init__(self):
  5. ################################
  6. # Experiment Parameters #
  7. ################################
  8. self.epochs = 500
  9. self.iters_per_checkpoint = 1000
  10. self.seed = 1234
  11. self.dynamic_loss_scaling = True
  12. self.fp16_run = False
  13. self.distributed_run = False
  14. self.dist_backend = "nccl"
  15. self.dist_url = "tcp://localhost:54321"
  16. self.cudnn_enabled = True
  17. self.cudnn_benchmark = False
  18. self.ignore_layers = ['embedding.weight']
  19. ################################
  20. # Data Parameters #
  21. ################################
  22. self.load_mel_from_disk = False
  23. self.training_files = 'filelists/ljs_audio_text_train_filelist.txt'
  24. self.validation_files = 'filelists/ljs_audio_text_val_filelist.txt'
  25. self.text_cleaners = ['english_cleaners']
  26. ################################
  27. # Audio Parameters #
  28. ################################
  29. self.max_wav_value = 32768.0
  30. self.sampling_rate = 22050
  31. self.filter_length = 1024
  32. self.hop_length = 256
  33. self.win_length = 1024
  34. self.n_mel_channels = 80
  35. self.mel_fmin = 0.0
  36. self.mel_fmax = 8000.0
  37. ################################
  38. # Model Parameters #
  39. ################################
  40. self.n_symbols = len(symbols)
  41. self.symbols_embedding_dim = 512
  42. # Encoder parameters
  43. self.encoder_kernel_size = 5
  44. self.encoder_n_convolutions = 3
  45. self.encoder_embedding_dim = 512
  46. # Decoder parameters
  47. self.n_frames_per_step = 1 # currently only 1 is supported
  48. self.decoder_rnn_dim = 1024
  49. self.prenet_dim = 256
  50. self.max_decoder_steps = 1000
  51. self.gate_threshold = 0.5
  52. self.p_attention_dropout = 0.1
  53. self.p_decoder_dropout = 0.1
  54. # Attention parameters
  55. self.attention_rnn_dim = 1024
  56. self.attention_dim = 128
  57. # Location Layer parameters
  58. self.attention_location_n_filters = 32
  59. self.attention_location_kernel_size = 31
  60. # Mel-post processing network parameters
  61. self.postnet_embedding_dim = 512
  62. self.postnet_kernel_size = 5
  63. self.postnet_n_convolutions = 5
  64. ################################
  65. # Optimization Hyperparameters #
  66. ################################
  67. self.use_saved_learning_rate = False
  68. self.learning_rate = 1e-3
  69. self.weight_decay = 1e-6
  70. self.grad_clip_thresh = 1.0
  71. self.batch_size = 64
  72. self.mask_padding = True # set model's padded outputs to padded values
  73. def return_self(self):
  74. return self
  75. def create_hparams():
  76. hparams = Hparams()
  77. return hparams.return_self()