-
Notifications
You must be signed in to change notification settings - Fork 3
/
configs.py
106 lines (100 loc) · 2.53 KB
/
configs.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
import numpy as np
from itertools import product
umap_configs = {
"local": {
"min_dist": 0.1,
"n_neighbors": 15,
"metric": "cosine",
},
"global": {
"min_dist": 0.5,
"n_neighbors": 100,
"metric": "cosine",
},
}
model_configs = {
"base": { # 95M
"name": "wav2vec 2.0 Base",
"code": "facebook/wav2vec2-base",
"shorthand": "Base",
},
"large": { # 317M
"name": "wav2vec 2.0 Large",
"code": "facebook/wav2vec2-large",
"shorthand": "Large",
},
"xls": {
"name": "wav2vec 2.0 XLS-R",
"code": "facebook/wav2vec2-xls-r-300m",
"shorthand": "XLS-R",
},
}
exp_configs = {}
exp_configs.update({
f"window{w:.2f}": {
"signal": "get_step_signal",
"base_freq": 200,
"sig_freq": 800,
"sig_dur_ratio": w,
}
for w in [0.32, 0.16, 0.08, 0.04, 0.02, 0.01]
})
exp_configs.update({
"f0_dist": {
"signal": "get_signal",
"freq": np.arange(100, 600, 100).tolist(),
},
"bias": {
"signal": "get_signal",
"freq": np.arange(100, 600, 100).tolist(),
"bias": np.linspace(-0.5, 0.5, 5).tolist(),
"mag": 0.5,
},
"f0": {
"signal": "get_signal",
"freq": np.linspace(10, 8000, 800).tolist(),
},
"f1f2": {
"signal": "get_signal",
"freq": list(product(
[120],
np.linspace(235, 850, 30),
np.linspace(595, 2400, 30),
)),
"mag": (0.5, 0.35, 0.15),
},
"f0f1f2": {
"signal": "get_signal",
"freq": list(product(
np.linspace(100, 225, 6),
np.linspace(235, 850, 30),
np.linspace(595, 2400, 30),
)),
"mag": (0.5, 0.35, 0.15),
},
# "f0f1f2_praat": {
# "signal": "get_signal_from_file",
# "freq": list(product(
# np.linspace(100, 225, 6),
# np.linspace(235, 850, 30),
# np.linspace(595, 2400, 30),
# )),
# },
# "f1f2_praat": {
# "signal": "get_signal_from_file",
# "freq": list(product(
# [125],
# np.linspace(235, 850, 30),
# np.linspace(595, 2400, 30),
# )),
# },
"w": {
"signal": "get_signal",
"freq": (100, 700),
"mag": list(product(
# Square root scaling
np.square(np.linspace(np.sqrt(0.1), np.sqrt(0.5), 20)),
np.square(np.linspace(np.sqrt(0.1), np.sqrt(0.5), 20)),
))
},
})