Upload hyperparams.yaml
Browse files- hyperparams.yaml +66 -0
hyperparams.yaml
ADDED
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
# #################################
|
3 |
+
# Basic inference parameters for speaker-id. We have first a network that
|
4 |
+
# computes some embeddings. On the top of that, we employ a classifier.
|
5 |
+
#
|
6 |
+
# Author:
|
7 |
+
# * Mirco Ravanelli 2021
|
8 |
+
# #################################
|
9 |
+
|
10 |
+
# pretrain folders:
|
11 |
+
pretrained_path: jefson08/spkrec-ecapa-voxceleb-kha
|
12 |
+
|
13 |
+
|
14 |
+
# Model parameters
|
15 |
+
n_mels: 23
|
16 |
+
sample_rate: 16000
|
17 |
+
n_classes: 28 # In this case, we have 28 speakers
|
18 |
+
emb_dim: 512 # dimensionality of the embeddings
|
19 |
+
|
20 |
+
# Feature extraction
|
21 |
+
compute_features: !new:speechbrain.lobes.features.Fbank
|
22 |
+
n_mels: !ref <n_mels>
|
23 |
+
|
24 |
+
# Mean and std normalization of the input features
|
25 |
+
mean_var_norm: !new:speechbrain.processing.features.InputNormalization
|
26 |
+
norm_type: sentence
|
27 |
+
std_norm: False
|
28 |
+
|
29 |
+
# To design a custom model, either just edit the simple CustomModel
|
30 |
+
# class that's listed here, or replace this `!new` call with a line
|
31 |
+
# pointing to a different file you've defined.
|
32 |
+
embedding_model: !new:custom_model.Xvector
|
33 |
+
in_channels: !ref <n_mels>
|
34 |
+
activation: !name:torch.nn.LeakyReLU
|
35 |
+
tdnn_blocks: 5
|
36 |
+
tdnn_channels: [512, 512, 512, 512, 1500]
|
37 |
+
tdnn_kernel_sizes: [5, 3, 3, 1, 1]
|
38 |
+
tdnn_dilations: [1, 2, 3, 1, 1]
|
39 |
+
lin_neurons: !ref <emb_dim>
|
40 |
+
|
41 |
+
classifier: !new:custom_model.Classifier
|
42 |
+
input_shape: [null, null, !ref <emb_dim>]
|
43 |
+
activation: !name:torch.nn.LeakyReLU
|
44 |
+
lin_blocks: 1
|
45 |
+
lin_neurons: !ref <emb_dim>
|
46 |
+
out_neurons: !ref <n_classes>
|
47 |
+
|
48 |
+
label_encoder: !new:speechbrain.dataio.encoder.CategoricalEncoder
|
49 |
+
|
50 |
+
# Objects in "modules" dict will have their parameters moved to the correct
|
51 |
+
# device, as well as having train()/eval() called on them by the Brain class.
|
52 |
+
modules:
|
53 |
+
compute_features: !ref <compute_features>
|
54 |
+
embedding_model: !ref <embedding_model>
|
55 |
+
classifier: !ref <classifier>
|
56 |
+
mean_var_norm: !ref <mean_var_norm>
|
57 |
+
|
58 |
+
pretrainer: !new:speechbrain.utils.parameter_transfer.Pretrainer
|
59 |
+
loadables:
|
60 |
+
embedding_model: !ref <embedding_model>
|
61 |
+
classifier: !ref <classifier>
|
62 |
+
label_encoder: !ref <label_encoder>
|
63 |
+
paths:
|
64 |
+
embedding_model: !ref <pretrained_path>/embedding_model.ckpt
|
65 |
+
classifier: !ref <pretrained_path>/classifier.ckpt
|
66 |
+
label_encoder: !ref <pretrained_path>/label_encoder.txt
|