tokenizer: !new:sentencepiece.SentencePieceProcessor pretrainer: !new:speechbrain.utils.parameter_transfer.Pretrainer loadables: lm: !ref tokenizer: !ref normalizer: !ref asr: !ref # Feature parameters sample_rate: 16000 n_fft: 400 n_mels: 80 hop_length: 20 compute_features: !new:speechbrain.lobes.features.Fbank sample_rate: !ref n_fft: !ref n_mels: !ref hop_length: !ref ####################### Model parameters ########################### # Transformer d_model: 256 nhead: 4 num_encoder_layers: 12 num_decoder_layers: 6 d_ffn: 2048 transformer_dropout: 0.1 activation: !name:torch.nn.GELU output_neurons: 5000 vocab_size: 5000 # Outputs blank_index: 0 label_smoothing: 0.1 pad_index: 0 bos_index: 1 eos_index: 2 unk_index: 0 # Decoding parameters min_decode_ratio: 0.0 max_decode_ratio: 1.0 valid_search_interval: 10 valid_beam_size: 10 test_beam_size: 10 ctc_weight_decode: 0.3 lm_weight: 0.2 ############################## models ################################ CNN: !new:speechbrain.lobes.models.convolution.ConvolutionFrontEnd input_shape: !!python/tuple [8, 10, 8] num_blocks: 2 num_layers_per_block: 1 out_channels: !!python/tuple [256, 256] kernel_sizes: !!python/tuple [3, 3] strides: !!python/tuple [2, 2] residuals: !!python/tuple [False, False] Transformer: !new:speechbrain.lobes.models.transformer.TransformerASR.TransformerASR # yamllint disable-line rule:line-length input_size: 5120 tgt_vocab: !ref d_model: !ref nhead: !ref num_encoder_layers: !ref num_decoder_layers: !ref d_ffn: !ref dropout: !ref activation: !ref normalize_before: True lm_model: !new:speechbrain.lobes.models.transformer.TransformerLM.TransformerLM # yamllint disable-line rule:line-length vocab: !ref d_model: 576 nhead: 6 num_encoder_layers: 6 num_decoder_layers: 0 d_ffn: 1538 dropout: 0.2 activation: !name:torch.nn.GELU normalize_before: False ctc_lin: !new:speechbrain.nnet.linear.Linear input_size: !ref n_neurons: !ref seq_lin: !new:speechbrain.nnet.linear.Linear input_size: !ref n_neurons: !ref encoder: !new:speechbrain.nnet.containers.LengthsCapableSequential input_shape: [null, null, !ref ] compute_features: !ref normalize: !ref cnn: !ref transformer_encoder: !ref asr_model: !new:torch.nn.ModuleList - [!ref , !ref , !ref , !ref ] decoder: !new:speechbrain.decoders.S2STransformerBeamSearch modules: [!ref , !ref , !ref ] bos_index: !ref eos_index: !ref blank_index: !ref min_decode_ratio: !ref max_decode_ratio: !ref beam_size: !ref ctc_weight: !ref lm_weight: !ref lm_modules: !ref temperature: 1.15 temperature_lm: 1.15 using_eos_threshold: False length_normalization: True Tencoder: !new:speechbrain.lobes.models.transformer.TransformerASR.EncoderWrapper transformer: !ref normalizer: !new:speechbrain.processing.features.InputNormalization norm_type: global update_until_epoch: 4 modules: normalizer: !ref encoder: !ref decoder: !ref # define two optimizers here for two-stage training log_softmax: !new:torch.nn.LogSoftmax dim: -1