# ############################################################################ # Model: E2E ASR with Transformer # Encoder: Transformer Encoder # Decoder: Transformer Decoder + (CTC/ATT joint) beamsearch + TransformerLM # Tokens: unigram # losses: CTC + KLdiv (Label Smoothing loss) # Training: Switchboard # Authors: Jianyuan Zhong, Titouan Parcollet, Samuele Cornell, Dominik Wagner # ############################################################################ # Feature parameters sample_rate: 16000 n_fft: 400 n_mels: 80 ####################### Model parameters ########################### # Transformer transformer_input_size: 1280 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: 2000 # 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 lm_weight: 0.30 test_beam_size: 60 ctc_weight_decode: 0.30 temperature: 1.0 temperature_lm: 1.0 using_eos_threshold: False eos_threshold: 1.5 length_normalization: True using_max_attn_shift: False max_attn_shift: 30 CNN: !new:speechbrain.lobes.models.convolution.ConvolutionFrontEnd input_shape: (8, 10, 80) num_blocks: 3 num_layers_per_block: 1 out_channels: (64, 64, 64) kernel_sizes: (5, 5, 1) strides: (2, 2, 1) residuals: (False, False, True) Transformer: !new:speechbrain.lobes.models.transformer.TransformerASR.TransformerASR # yamllint disable-line rule:line-length input_size: !ref tgt_vocab: !ref d_model: !ref nhead: !ref num_encoder_layers: !ref num_decoder_layers: !ref d_ffn: !ref dropout: !ref activation: !ref encoder_module: transformer attention_type: regularMHA normalize_before: True causal: False lm_model: !new:speechbrain.lobes.models.transformer.TransformerLM.TransformerLM # yamllint disable-line rule:line-length vocab: !ref d_model: 264 d_embedding: 128 nhead: 12 num_encoder_layers: 12 num_decoder_layers: 0 d_ffn: 1024 dropout: 0.1 activation: !name:torch.nn.ReLU normalize_before: False tokenizer: !new:sentencepiece.SentencePieceProcessor 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 asr_model: !new:torch.nn.ModuleList - [!ref , !ref , !ref , !ref ] log_softmax: !new:torch.nn.LogSoftmax dim: -1 normalizer: !new:speechbrain.processing.features.InputNormalization norm_type: global compute_features: !new:speechbrain.lobes.features.Fbank sample_rate: !ref n_fft: !ref n_mels: !ref Tencoder: !new:speechbrain.lobes.models.transformer.TransformerASR.EncoderWrapper transformer: !ref encoder: !new:speechbrain.nnet.containers.LengthsCapableSequential input_shape: [null, null, !ref ] compute_features: !ref normalize: !ref cnn: !ref transformer_encoder: !ref transformerlm_scorer: !new:speechbrain.decoders.scorer.TransformerLMScorer language_model: !ref temperature: !ref ctc_scorer: !new:speechbrain.decoders.scorer.CTCScorer eos_index: !ref blank_index: !ref ctc_fc: !ref scorer: !new:speechbrain.decoders.scorer.ScorerBuilder full_scorers: [!ref , !ref ] weights: transformerlm: !ref ctc: !ref decoder: !new:speechbrain.decoders.S2STransformerBeamSearcher modules: [!ref , !ref ] bos_index: !ref eos_index: !ref min_decode_ratio: !ref max_decode_ratio: !ref beam_size: !ref temperature: !ref using_eos_threshold: !ref eos_threshold: !ref length_normalization: !ref using_max_attn_shift: !ref max_attn_shift: !ref scorer: !ref modules: compute_features: !ref normalizer: !ref pre_transformer: !ref transformer: !ref asr_model: !ref lm_model: !ref encoder: !ref decoder: !ref pretrainer: !new:speechbrain.utils.parameter_transfer.Pretrainer loadables: normalizer: !ref asr: !ref lm: !ref tokenizer: !ref