Upload 4 files
Browse files- asr.ckpt +3 -0
- hyperparams.yaml +97 -0
- tokenizer.ckpt +3 -0
- wav2vec2.ckpt +3 -0
asr.ckpt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7fa0ce6f3ddeeb6ba04154ba46c63ff0401cb4c94b76d8376e393f1d631feeb7
|
| 3 |
+
size 12807072
|
hyperparams.yaml
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# ################################
|
| 2 |
+
# Model: wav2vec2 + DNN + CTC
|
| 3 |
+
# Augmentation: SpecAugment
|
| 4 |
+
# Authors: W. Fernando López Gavilánez 2022
|
| 5 |
+
# ################################
|
| 6 |
+
|
| 7 |
+
sample_rate: 16000
|
| 8 |
+
wav2vec2_hub: facebook/wav2vec2-large-xlsr-53-spanish
|
| 9 |
+
|
| 10 |
+
# BPE parameters
|
| 11 |
+
token_type: char # ["unigram", "bpe", "char"]
|
| 12 |
+
character_coverage: 1.0
|
| 13 |
+
|
| 14 |
+
# Model parameters
|
| 15 |
+
activation: !name:torch.nn.LeakyReLU
|
| 16 |
+
dnn_layers: 3
|
| 17 |
+
dnn_neurons: 1024
|
| 18 |
+
emb_size: 128
|
| 19 |
+
dec_neurons: 1024
|
| 20 |
+
|
| 21 |
+
# Outputs
|
| 22 |
+
output_neurons: 38 # BPE size, index(blank/eos/bos) = 0
|
| 23 |
+
|
| 24 |
+
# Decoding parameters
|
| 25 |
+
# Be sure that the bos and eos index match with the BPEs ones
|
| 26 |
+
blank_index: 0
|
| 27 |
+
bos_index: 1
|
| 28 |
+
eos_index: 2
|
| 29 |
+
min_decode_ratio: 0.0
|
| 30 |
+
max_decode_ratio: 1.0
|
| 31 |
+
beam_size: 80
|
| 32 |
+
eos_threshold: 1.5
|
| 33 |
+
using_max_attn_shift: True
|
| 34 |
+
max_attn_shift: 140
|
| 35 |
+
ctc_weight_decode: 0.0
|
| 36 |
+
temperature: 1.50
|
| 37 |
+
|
| 38 |
+
enc: !new:speechbrain.nnet.containers.Sequential
|
| 39 |
+
input_shape: [null, null, 1024]
|
| 40 |
+
linear1: !name:speechbrain.nnet.linear.Linear
|
| 41 |
+
n_neurons: 1024
|
| 42 |
+
bias: True
|
| 43 |
+
bn1: !name:speechbrain.nnet.normalization.BatchNorm1d
|
| 44 |
+
activation: !new:torch.nn.LeakyReLU
|
| 45 |
+
drop: !new:torch.nn.Dropout
|
| 46 |
+
p: 0.15
|
| 47 |
+
linear2: !name:speechbrain.nnet.linear.Linear
|
| 48 |
+
n_neurons: 1024
|
| 49 |
+
bias: True
|
| 50 |
+
bn2: !name:speechbrain.nnet.normalization.BatchNorm1d
|
| 51 |
+
activation2: !new:torch.nn.LeakyReLU
|
| 52 |
+
drop2: !new:torch.nn.Dropout
|
| 53 |
+
p: 0.15
|
| 54 |
+
linear3: !name:speechbrain.nnet.linear.Linear
|
| 55 |
+
n_neurons: 1024
|
| 56 |
+
bias: True
|
| 57 |
+
bn3: !name:speechbrain.nnet.normalization.BatchNorm1d
|
| 58 |
+
activation3: !new:torch.nn.LeakyReLU
|
| 59 |
+
|
| 60 |
+
wav2vec2: !new:speechbrain.lobes.models.huggingface_wav2vec.HuggingFaceWav2Vec2
|
| 61 |
+
source: !ref <wav2vec2_hub>
|
| 62 |
+
output_norm: True
|
| 63 |
+
freeze: True
|
| 64 |
+
save_path: !ref <model_checkpoints>
|
| 65 |
+
|
| 66 |
+
ctc_lin: !new:speechbrain.nnet.linear.Linear
|
| 67 |
+
input_size: !ref <dnn_neurons>
|
| 68 |
+
n_neurons: !ref <output_neurons>
|
| 69 |
+
|
| 70 |
+
log_softmax: !new:speechbrain.nnet.activations.Softmax
|
| 71 |
+
apply_log: True
|
| 72 |
+
|
| 73 |
+
ctc_cost: !name:speechbrain.nnet.losses.ctc_loss
|
| 74 |
+
blank_index: !ref <blank_index>
|
| 75 |
+
|
| 76 |
+
asr_model: !new:torch.nn.ModuleList
|
| 77 |
+
- [!ref <enc>, !ref <ctc_lin>]
|
| 78 |
+
|
| 79 |
+
tokenizer: !new:sentencepiece.SentencePieceProcessor
|
| 80 |
+
|
| 81 |
+
encoder: !new:speechbrain.nnet.containers.LengthsCapableSequential
|
| 82 |
+
wav2vec2: !ref <wav2vec2>
|
| 83 |
+
enc: !ref <enc>
|
| 84 |
+
ctc_lin: !ref <ctc_lin>
|
| 85 |
+
|
| 86 |
+
decoding_function: !name:speechbrain.decoders.ctc_greedy_decode
|
| 87 |
+
blank_id: !ref <blank_index>
|
| 88 |
+
|
| 89 |
+
modules:
|
| 90 |
+
encoder: !ref <encoder>
|
| 91 |
+
|
| 92 |
+
pretrainer: !new:speechbrain.utils.parameter_transfer.Pretrainer
|
| 93 |
+
loadables:
|
| 94 |
+
wav2vec2: !ref <wav2vec2>
|
| 95 |
+
asr: !ref <asr_model>
|
| 96 |
+
tokenizer: !ref <tokenizer>
|
| 97 |
+
|
tokenizer.ckpt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7c9cf17c8e478e777e88c1f4c68c90206c2c8169be8008381da8727cae5161a9
|
| 3 |
+
size 238088
|
wav2vec2.ckpt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9a69918182429eac712700456a5aa0b634f5ce769fc0491ec86abd741a48d2f0
|
| 3 |
+
size 1261923125
|