# ################################ # Model: wav2vec2 + CTC # Augmentation: SpecAugment # Authors: Le Do Thanh Binh 2021 # ################################ sample_rate: 16000 wav2vec2_hub: dragonSwing/wav2vec2-base-vn-270h # Model parameters activation: !name:torch.nn.LeakyReLU dnn_layers: 2 dnn_neurons: 768 dropout_prob: 0.1 # Outputs output_neurons: 696 # BPE size, index(blank/eos/bos) = 0 output_tones: 12 # Decoding parameters # Be sure that the bos and eos index match with the BPEs ones blank_index: 0 bos_index: 1 eos_index: 2 unk_index: 3 tokenizer: !apply:custom.Wav2Vec2WordpieceTokenizer.from_pretrained pretrained_model_name_or_path: !ref dropout: !new:torch.nn.Dropout p: !ref wav2vec2: !new:speechbrain.lobes.models.huggingface_wav2vec.HuggingFaceWav2Vec2 source: !ref output_norm: True freeze: True save_path: model_checkpoints lm_head: !new:torch.nn.Linear in_features: !ref out_features: !ref tone_head: !new:torch.nn.Linear in_features: !ref out_features: !ref log_softmax: !new:speechbrain.nnet.activations.Softmax apply_log: True ctc_cost: !name:speechbrain.nnet.losses.ctc_loss blank_index: !ref model: !new:torch.nn.ModuleList - [!ref , !ref , !ref , !ref ] encoder: !new:speechbrain.nnet.containers.LengthsCapableSequential wav2vec2: !ref dropout: !ref lm_head: !ref decoding_function: !name:speechbrain.decoders.ctc_greedy_decode blank_id: !ref modules: encoder: !ref pretrainer: !new:speechbrain.utils.parameter_transfer.Pretrainer loadables: model: !ref