|
|
|
|
|
|
|
|
|
|
|
|
|
HPARAMS_NEEDED: ["encoder_dim", "out_n_neurons", "accent_encoder", "softmax"] |
|
|
|
MODULES_NEEDED: ["wav2vec2", "avg_pool", "output_mlp"] |
|
|
|
|
|
|
|
wav2vec2_hub: "facebook/wav2vec2-large-xlsr-53" |
|
|
|
|
|
pretrained_path: Jzuluaga/accent-id-commonaccent_xlsr-spanish |
|
|
|
|
|
|
|
encoder_dim: 1024 |
|
out_n_neurons: 6 |
|
|
|
wav2vec2: !new:speechbrain.lobes.models.huggingface_wav2vec.HuggingFaceWav2Vec2 |
|
source: !ref <wav2vec2_hub> |
|
output_norm: True |
|
freeze: True |
|
save_path: wav2vec2_checkpoints |
|
|
|
|
|
mean_var_norm_input: !new:speechbrain.processing.features.InputNormalization |
|
norm_type: sentence |
|
std_norm: False |
|
|
|
avg_pool: !new:speechbrain.nnet.pooling.StatisticsPooling |
|
return_std: False |
|
|
|
output_mlp: !new:speechbrain.nnet.linear.Linear |
|
input_size: !ref <encoder_dim> |
|
n_neurons: !ref <out_n_neurons> |
|
bias: False |
|
|
|
model: !new:torch.nn.ModuleList |
|
- [!ref <output_mlp>] |
|
|
|
modules: |
|
mean_var_norm_input: !ref <mean_var_norm_input> |
|
wav2vec2: !ref <wav2vec2> |
|
output_mlp: !ref <output_mlp> |
|
avg_pool: !ref <avg_pool> |
|
|
|
softmax: !new:speechbrain.nnet.activations.Softmax |
|
|
|
accent_encoder: !new:speechbrain.dataio.encoder.CategoricalEncoder |
|
|
|
|
|
pretrainer: !new:speechbrain.utils.parameter_transfer.Pretrainer |
|
loadables: |
|
mean_var_norm_input: !ref <mean_var_norm_input> |
|
wav2vec2: !ref <wav2vec2> |
|
model: !ref <model> |
|
accent_encoder: !ref <accent_encoder> |
|
paths: |
|
mean_var_norm_input: !ref <pretrained_path>/normalizer_input.ckpt |
|
wav2vec2: !ref <pretrained_path>/wav2vec2.ckpt |
|
model: !ref <pretrained_path>/model.ckpt |
|
accent_encoder: !ref <pretrained_path>/accent_encoder.txt |
|
|
|
|