hyperparams.yaml
1.8 KB · 56 lines · yaml Raw
1 # ############################################################################
2 # Model: ECAPA-TDNN for Accent Identification
3 # ############################################################################
4
5 # Pretrain folder (HuggingFace)
6 pretrained_path: Jzuluaga/accent-id-commonaccent_ecapa
7
8 # Feature parameters
9 n_mels: 80
10
11 # Output parameters
12 n_languages: 16 # Possible languages in the dataset
13 emb_dim: 192 # dimensionality of the embeddings
14
15 # Model params
16 compute_features: !new:speechbrain.lobes.features.Fbank
17 n_mels: !ref <n_mels>
18
19 mean_var_norm: !new:speechbrain.processing.features.InputNormalization
20 norm_type: sentence
21 std_norm: False
22
23 # Embedding Model
24 embedding_model: !new:speechbrain.lobes.models.ECAPA_TDNN.ECAPA_TDNN
25 input_size: !ref <n_mels>
26 activation: !name:torch.nn.LeakyReLU
27 channels: [1024, 1024, 1024, 1024, 3072]
28 kernel_sizes: [5, 3, 3, 3, 1]
29 dilations: [1, 2, 3, 4, 1]
30 attention_channels: 128
31 lin_neurons: !ref <emb_dim>
32
33 # Classifier based on cosine distance
34 classifier: !new:speechbrain.lobes.models.ECAPA_TDNN.Classifier
35 input_size: !ref <emb_dim>
36 out_neurons: !ref <n_languages>
37
38 modules:
39 compute_features: !ref <compute_features>
40 mean_var_norm: !ref <mean_var_norm>
41 embedding_model: !ref <embedding_model>
42 classifier: !ref <classifier>
43
44 label_encoder: !new:speechbrain.dataio.encoder.CategoricalEncoder
45
46 pretrainer: !new:speechbrain.utils.parameter_transfer.Pretrainer
47 loadables:
48 embedding_model: !ref <embedding_model>
49 classifier: !ref <classifier>
50 label_encoder: !ref <label_encoder>
51 paths:
52 embedding_model: !ref <pretrained_path>/embedding_model.ckpt
53 classifier: !ref <pretrained_path>/classifier.ckpt
54 label_encoder: !ref <pretrained_path>/accent_encoder.txt
55
56