keithhon commited on
Commit
5ed6c8f
·
1 Parent(s): 9e1fb59

Upload vocoder/hparams.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. vocoder/hparams.py +44 -0
vocoder/hparams.py ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from synthesizer.hparams import hparams as _syn_hp
2
+
3
+
4
+ # Audio settings------------------------------------------------------------------------
5
+ # Match the values of the synthesizer
6
+ sample_rate = _syn_hp.sample_rate
7
+ n_fft = _syn_hp.n_fft
8
+ num_mels = _syn_hp.num_mels
9
+ hop_length = _syn_hp.hop_size
10
+ win_length = _syn_hp.win_size
11
+ fmin = _syn_hp.fmin
12
+ min_level_db = _syn_hp.min_level_db
13
+ ref_level_db = _syn_hp.ref_level_db
14
+ mel_max_abs_value = _syn_hp.max_abs_value
15
+ preemphasis = _syn_hp.preemphasis
16
+ apply_preemphasis = _syn_hp.preemphasize
17
+
18
+ bits = 9 # bit depth of signal
19
+ mu_law = True # Recommended to suppress noise if using raw bits in hp.voc_mode
20
+ # below
21
+
22
+
23
+ # WAVERNN / VOCODER --------------------------------------------------------------------------------
24
+ voc_mode = 'RAW' # either 'RAW' (softmax on raw bits) or 'MOL' (sample from
25
+ # mixture of logistics)
26
+ voc_upsample_factors = (5, 5, 8) # NB - this needs to correctly factorise hop_length
27
+ voc_rnn_dims = 512
28
+ voc_fc_dims = 512
29
+ voc_compute_dims = 128
30
+ voc_res_out_dims = 128
31
+ voc_res_blocks = 10
32
+
33
+ # Training
34
+ voc_batch_size = 100
35
+ voc_lr = 1e-4
36
+ voc_gen_at_checkpoint = 5 # number of samples to generate at each checkpoint
37
+ voc_pad = 2 # this will pad the input so that the resnet can 'see' wider
38
+ # than input length
39
+ voc_seq_len = hop_length * 5 # must be a multiple of hop_length
40
+
41
+ # Generating / Synthesizing
42
+ voc_gen_batched = True # very fast (realtime+) single utterance batched generation
43
+ voc_target = 8000 # target number of samples to be generated in each batch entry
44
+ voc_overlap = 400 # number of samples for crossfading between batches