-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathconfig.py
executable file
·153 lines (114 loc) · 5.04 KB
/
config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
import numpy as np
import tensorflow as tf
wav_dir = '../datasets/perc_synth_2/sounds-filtered-cut-normalized-downsampled/'
ana_dir = '../datasets/perc_synth_2/analysis/'
# wav_dir = '../datasets/perc_synth_2/processed_kicks/'
# ana_dir = '../datasets/perc_synth_2/kicks_analysis/'
mode = 'L1'
feats_dir = './feats/'
if mode =='GAN':
log_dir = './log_GAN/'
elif mode =='L1':
log_dir = './log_kicks_high/'
elif mode == 'Content':
log_dir = './log_content/'
elif mode == 'Encode':
log_dir = './log_encode/'
data_log = './log/data_log.log'
dir_npy = './data_npy/'
stat_dir = './stats/'
h5py_file_train = './data_h5py/train.hdf5'
h5py_file_val = './data_h5py/val.hdf5'
val_dir = './val_dir_synth/'
in_mode = 'mix'
norm_mode_out = "max_min"
norm_mode_in = "max_min"
voc_ext = '_voc_stft.npy'
feats_ext = '_synth_feats.npy'
f0_weight = 10
max_models_to_keep = 10
f0_threshold = 1
filter_len = 5
encoder_layers = 15
filters = 32
fs = 16000
num_f0 = 256
max_phr_len = 16000
input_features = 7
output_features = 1
kernel_size = 2
num_filters = 32
augment_filters_every = 3
wavenet_layers = 12
train_split = 0.9
feats_to_use = ['brightness', 'hardness', 'depth', 'roughness', 'boominess', 'warmth', 'sharpness']
do_not_use = ['319832.wav', '255918.wav']
# ssh -L 16006:127.0.0.1:6006 mirlab@mirlab-web1.s.upf.edu
augment = True
aug_prob = 0.5
noise_threshold = 0.4 #0.7 for the unnormalized features
pred_mode = 'all'
# Hyperparameters
num_epochs = 2500
batches_per_epoch_train = 284
batches_per_epoch_val = 31
# batches_per_epoch_train = 576
# batches_per_epoch_val = 64
batch_size = 16
samples_per_file = 4
init_lr = 0.0002
comp_mode = 'mfsc'
hoptime = 5.80498866
noise = 0.05
print_every = 1
save_every = 50
validate_every =1
dtype = tf.float32
remove_indecis = [697, 732, 6669, 7698, 9928, 10087]
# remove_indecis = [ 24, 25, 29, 33, 41, 69, 76, 89, 90, 101, 102,
# 103, 112, 113, 115, 148, 194, 198, 255, 256, 257, 258,
# 259, 260, 261, 353, 371, 389, 398, 860, 877, 878, 879,
# 885, 931, 934, 935, 936, 938, 958, 967, 991, 1001, 1008,
# 1009, 1010, 1012, 1026, 1140, 1141, 1407, 1408, 1409, 1410, 1412,
# 1415, 1418, 1421, 1423, 1424, 1425, 1426, 1427, 1429, 1430, 1434,
# 1435, 1437, 1438, 1439, 1440, 1441, 1442, 1443, 1448, 1452, 1454,
# 1473, 1487, 1573, 1613, 1614, 1616, 1637, 1640, 1714, 1715, 1716,
# 1754, 1755, 1778, 1828, 1829, 1830, 1831, 1833, 1846, 1847, 1848,
# 1849, 1850, 1851, 1852, 1854, 1855, 1856, 1857, 1859, 1860, 1861,
# 1862, 1863, 1864, 1865, 1867, 1868, 1920, 1922, 1923, 1927, 1928,
# 1929, 1960, 1991, 2065, 2070, 2073, 2075, 2076, 2086, 2107, 2170,
# 2179, 2191, 2220, 2233, 2239, 2240, 2248, 2308, 2310, 2329, 2330,
# 2337, 2338, 2339, 2374, 2376, 2377, 2378, 2394, 2395, 2398, 2414,
# 2415, 2429, 2448, 2449, 2450, 2451, 2452, 2473, 2488, 2498, 2519,
# 2524, 2550, 2551, 2605, 2607, 2619, 2635, 2636, 2639, 2640, 2646,
# 2647, 2649, 2658, 2664, 2695, 2752, 2753, 2754, 2755, 2756, 2757,
# 2758, 2766, 2768, 2769, 2770, 2771, 2775, 2778, 2779, 2780, 2781,
# 2782, 2783, 2784, 2785, 2786, 2788, 2789, 2790, 2793, 2794, 2795,
# 2796, 2797, 2798, 2799, 2800, 2801, 2818, 2847, 2848, 2850, 2851,
# 2864, 2865, 2866, 2909, 2952, 2960, 2973, 3003, 3005, 3006, 3009,
# 3010, 3011, 3013, 3024, 3092, 3093, 3095, 3097, 3100, 3101, 3161,
# 3168, 3221, 3272, 3324, 3340, 3341, 3362, 3368, 3397, 3400, 3401,
# 3407, 3410, 3411, 3412, 3413, 3427, 3429, 3443, 3444, 3450, 3451,
# 3464, 3465, 3468, 3479, 3480, 3481, 3482, 3487, 3518, 3520, 3529,
# 3548, 3553, 3576, 3580, 3613, 3640, 3646, 3647, 3649, 3684, 3685,
# 3687, 3705, 3706, 3713, 3714, 3715, 3737, 3744, 3774, 3791, 3792,
# 3795, 3796, 3797, 3799, 3800, 3802, 3804, 3805, 3806, 3807, 3809,
# 3810, 3811, 3829, 3853, 3865, 3886, 3893, 3894, 3895, 3896, 3911,
# 3912, 4005, 4012, 4043, 4044, 4184, 4217, 4221, 4235, 4238, 4241,
# 4249, 4251, 4273, 4278, 4301, 4303, 4306, 4308, 4310, 4311, 4312,
# 4315, 4316, 4317, 4326, 4327, 4328, 4330, 4333, 4334, 4336, 4342,
# 4364, 4377, 4398, 4400, 4411, 4413, 4421, 4433, 4434, 4436, 4452,
# 4465, 4516, 4517, 4523, 4524, 4526, 4539, 4540, 4541, 4542, 4543,
# 4544, 4549, 4574, 4614, 4617, 4632, 4665, 4675, 4686, 4691, 4695,
# 4713, 4714, 4733, 4736, 4738, 4752, 4760, 4761, 4767, 4816, 4827,
# 4832, 4835, 4838, 4848, 4866, 4897, 4899, 4900, 4959, 5004, 5033,
# 5034, 5036, 5065, 5071, 5074, 5075, 5112, 5133, 5151, 5161, 5171,
# 5172, 5176, 5179]
indecis_2000 = [ 24, 25, 101, 103, 115, 198, 877, 935, 938, 958, 1008,
1423, 1424, 1714, 1716, 1846, 1848, 1859, 1862, 1863, 1864, 1865,
1867, 1927, 2179, 2239, 2240, 2330, 2338, 2414, 2550, 2752, 2754,
2756, 2757, 2758, 2769, 2770, 2771, 2778, 2784, 2788, 2789, 2793,
2794, 2795, 2796, 2797, 2798, 2800, 2801, 2847, 3003, 3005, 3011,
3400, 3401, 3429, 3518, 3548, 3613, 3684, 3685, 3705, 3706, 3713,
3714, 3796, 3797, 3807, 3809, 4310, 4315, 4342, 4421, 4433, 4436,
4541, 4617, 4632, 4665, 4691, 4714, 4738, 4827, 4899, 5133, 5172]