Advertisement
Guest User

config.json

a guest
May 14th, 2020
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 8.47 KB | None | 0 0
  1. {
  2.     "model": "Tacotron2",          // one of the model in models/  
  3.     "run_name": "fr-ezwa-basic-2",
  4.     "run_description": "tacotron2 cosntant stf parameters with one fr speaker (ezwa) from the M-AILABS dataset",
  5.  
  6.     // AUDIO PARAMETERS
  7.     "audio":{
  8.         // Audio processing parameters
  9.         "num_mels": 80,         // size of the mel spec frame.
  10.         "num_freq": 1025,       // number of stft frequency levels. Size of the linear spectogram frame.
  11.         "sample_rate": 16000,   // DATASET-RELATED: wav sample-rate. If different than the original data, it is resampled.
  12.         "win_length": 1024,     // stft window length in ms.
  13.         "hop_length": 256,      // stft window hop-lengh in ms.
  14.         "frame_length_ms": null,  // stft window length in ms.If null, 'win_length' is used.
  15.         "frame_shift_ms": null,   // stft window hop-lengh in ms. If null, 'hop_length' is used.
  16.         "preemphasis": 1.0,    // pre-emphasis to reduce spec noise and make it more structured. If 0.0, no -pre-emphasis.
  17.         "min_level_db": -85,   // normalization range
  18.         "ref_level_db": 30,     // reference level db, theoretically 20db is the sound of air.
  19.         "power": 1.4,           // value to sharpen wav signals after GL algorithm.
  20.         "griffin_lim_iters": 60,// #griffin-lim iterations. 30-60 is a good range. Larger the value, slower the generation.
  21.         // Normalization parameters
  22.         "signal_norm": true,    // normalize the spec values in range [0, 1]
  23.         "symmetric_norm": true, // move normalization to range [-1, 1]
  24.         "max_norm": 4.0,          // scale normalization to range [-max_norm, max_norm] or [0, max_norm]
  25.         "clip_norm": true,      // clip normalized values into the range.
  26.         "mel_fmin": 0.0,         // minimum freq level for mel-spec. ~50 for male and ~95 for female voices. Tune for dataset!!
  27.         "mel_fmax": 8000.0,        // maximum freq level for mel-spec. Tune for dataset!!
  28.         "do_trim_silence": true,  // enable trimming of slience of audio as you load it. LJspeech (false), TWEB (false), Nancy (true)
  29.         "trim_db": 60          // threshold for timming silence. Set this according to your dataset.
  30.     },
  31.  
  32.     // VOCABULARY PARAMETERS
  33.     // if custom character set is not defined,
  34.     // default set in symbols.py is used
  35.     "characters":{
  36.         "pad": "_",
  37.         "eos": "~",
  38.         "bos": "^",
  39.         "characters": "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!'(),-.:;? àâæçéèêëîïôœùûüÿŸÜÛÙŒÔÏÎËÊÈÉÇÆÂÀ",
  40.         "punctuations":"!'(),-.:;? ",
  41.         "phonemes":"iyɨʉɯuɪʏʊeøɘəɵɤoɛœɜɞʌɔæɐaɶɑɒᵻʘɓǀɗǃʄǂɠǁʛpbtdʈɖcɟkɡqɢʔɴŋɲɳnɱmʙrʀⱱɾɽɸβfvθðszʃʒʂʐçʝxɣχʁħʕhɦɬɮʋɹɻjɰlɭʎʟˈˌːˑʍwɥʜʢʡɕʑɺɧɚ˞ɫ"
  42.     },
  43.    
  44.     // DISTRIBUTED TRAINING
  45.     "distributed":{
  46.         "backend": "nccl",
  47.         "url": "tcp:\/\/localhost:54321"
  48.     },
  49.  
  50.     "reinit_layers": [],    // give a list of layer names to restore from the given checkpoint. If not defined, it reloads all heuristically matching layers.
  51.  
  52.     // TRAINING
  53.     "batch_size": 32,       // Batch size for training. Lower values than 32 might cause hard to learn attention. It is overwritten by 'gradual_training'.
  54.     "eval_batch_size":16,  
  55.     "r": 7,                 // Number of decoder frames to predict per iteration. Set the initial values if gradual training is enabled.  
  56.     "gradual_training": [[0, 7, 64], [1, 5, 64], [50000, 3, 32], [130000, 2, 32], [290000, 1, 32]], //set gradual training steps [first_step, r, batch_size]. If it is null, gradual training is disabled. For Tacotron, you might need to reduce the 'batch_size' as you proceeed.
  57.     "loss_masking": true,         // enable / disable loss masking against the sequence padding.
  58.  
  59.     // VALIDATION
  60.     "run_eval": true,
  61.     "test_delay_epochs": 10,  //Until attention is aligned, testing only wastes computation time.
  62.     "test_sentences_file": null,  // set a file to load sentences to be used for testing. If it is null then we use default english sentences.
  63.  
  64.     // OPTIMIZER
  65.     "noam_schedule": false,        // use noam warmup and lr schedule.
  66.     "grad_clip": 1.0,                // upper limit for gradients for clipping.
  67.     "epochs": 1000,                // total number of epochs to train.
  68.     "lr": 0.0001,                  // Initial learning rate. If Noam decay is active, maximum learning rate.
  69.     "wd": 0.000001,         // Weight decay weight.
  70.     "warmup_steps": 4000,          // Noam decay steps to increase the learning rate from 0 to "lr"
  71.     "seq_len_norm": false,     // Normalize eash sample loss with its length to alleviate imbalanced datasets. Use it if your dataset is small or has skewed distribution of sequence lengths.
  72.    
  73.     // TACOTRON PRENET
  74.     "memory_size": -1,              // ONLY TACOTRON - size of the memory queue used fro storing last decoder predictions for auto-regression. If < 0, memory queue is disabled and decoder only uses the last prediction frame.
  75.     "prenet_type": "original",     // "original" or "bn".
  76.     "prenet_dropout": true,        // enable/disable dropout at prenet.
  77.  
  78.     // ATTENTION
  79.     "attention_type": "original",  // 'original' or 'graves'
  80.     "attention_heads": 4,          // number of attention heads (only for 'graves')
  81.     "attention_norm": "sigmoid",   // softmax or sigmoid. Suggested to use softmax for Tacotron2 and sigmoid for Tacotron.
  82.     "windowing": false,            // Enables attention windowing. Used only in eval mode.
  83.     "use_forward_attn": false,      // if it uses forward attention. In general, it aligns faster.
  84.     "forward_attn_mask": false,    // Additional masking forcing monotonicity only in eval mode.
  85.     "transition_agent": false,     // enable/disable transition agent of forward attention.
  86.     "location_attn": false,        // enable_disable location sensitive attention. It is enabled for TACOTRON by default.
  87.     "bidirectional_decoder": false,  // use https://arxiv.org/abs/1907.09006. Use it, if attention does not work well with your dataset.
  88.  
  89.     // STOPNET
  90.     "stopnet": true,               // Train stopnet predicting the end of synthesis.
  91.     "separate_stopnet": true,     // Train stopnet seperately if 'stopnet==true'. It prevents stopnet loss to influence the rest of the model. It causes a better model, but it trains SLOWER.
  92.  
  93.     // TENSORBOARD and LOGGING
  94.     "print_step": 25,       // Number of steps to log traning on console.
  95.     "save_step": 10000,      // Number of training steps expected to save traninpg stats and checkpoints.
  96.     "checkpoint": true,     // If true, it saves checkpoints per "save_step"
  97.     "tb_model_param_stats": false,     // true, plots param stats per layer on tensorboard. Might be memory consuming, but good for debugging.
  98.    
  99.     // DATA LOADING
  100.     "text_cleaner": "phoneme_cleaners",
  101.     "enable_eos_bos_chars": false, // enable/disable beginning of sentence and end of sentence chars.
  102.     "num_loader_workers": 4,        // number of training data loader processes. Don't set it too big. 4-8 are good values.
  103.     "num_val_loader_workers": 4,    // number of evaluation data loader processes.
  104.     "batch_group_size": 0,  //Number of batches to shuffle after bucketing.
  105.     "min_seq_len": 6,       // DATASET-RELATED: minimum text length to use in training
  106.     "max_seq_len": 150,     // DATASET-RELATED: maximum text length
  107.  
  108.     // PATHS
  109.     "output_path": "/home/ubuntu/TTS/trainnings",
  110.  
  111.     // PHONEMES
  112.     "phoneme_cache_path": "mozilla_fr_phonemes",  // phoneme computation is slow, therefore, it caches results in the given folder.
  113.     "use_phonemes": true,           // use phonemes instead of raw characters. It is suggested for better pronounciation.
  114.     "phoneme_language": "fr-fr",     // depending on your target language, pick one from  https://github.com/bootphon/phonemizer#languages
  115.  
  116.     // MULTI-SPEAKER and GST
  117.     "use_speaker_embedding": false,     // use speaker embedding to enable multi-speaker learning.
  118.     "style_wav_for_test": null,          // path to style wav file to be used in TacotronGST inference.
  119.     "use_gst": false,       // TACOTRON ONLY: use global style tokens
  120.  
  121.     // DATASETS
  122.     "datasets":   // List of datasets. They all merged and they get different speaker_ids.
  123.         [
  124.             {
  125.                 "name": "mailabs",
  126.                 "path": "/home/ubuntu/mailabs",
  127.                 "meta_file_train": null,
  128.                 "meta_file_val": null
  129.             }
  130.         ]
  131.  
  132. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement