num_units: 1750 tokenizer: !new:sentencepiece.SentencePieceProcessor # Audio input normalization: # Yes, the input should be 22050 and then features computed with the # wrong sample rate... audio_normalizer: !new:speechbrain.dataio.preprocess.AudioNormalizer sample_rate: 22050 # Feature parameters sample_rate: 16000 n_fft: 400 n_mels: 40 # Model parameters activation: !name:torch.nn.LeakyReLU dropout: 0.15 cnn_blocks: 2 cnn_channels: (64, 128) inter_layer_pooling_size: (2, 2) cnn_kernelsize: (3, 3) time_pooling_size: 4 rnn_class: !name:speechbrain.nnet.RNN.LSTM rnn_layers: 3 rnn_neurons: 512 rnn_bidirectional: True dnn_blocks: 1 dnn_neurons: 512 emb_size: 128 dec_neurons: 512 dec_layers: 1 output_neurons: !ref #Number of tokens (same as LM) blank_index: 0 bos_index: 0 eos_index: 0 unk_index: 0 min_decode_ratio: 0.0 max_decode_ratio: 1.0 valid_beam_size: 4 test_beam_size: 12 eos_threshold: 1.2 using_max_attn_shift: False max_attn_shift: 240 ctc_weight_decode: 0.0 coverage_penalty: 3.0 temperature: 2.0 # Feature extraction compute_features: !new:speechbrain.lobes.features.Fbank sample_rate: !ref n_fft: !ref n_mels: !ref # Feature normalization (mean and std) normalize: !new:speechbrain.processing.features.InputNormalization norm_type: global # The CRDNN model is an encoder that combines CNNs, RNNs, and DNNs. encoder: !new:speechbrain.lobes.models.CRDNN.CRDNN input_shape: [null, null, !ref ] activation: !ref dropout: !ref cnn_blocks: !ref cnn_channels: !ref cnn_kernelsize: !ref inter_layer_pooling_size: !ref time_pooling: True using_2d_pooling: False time_pooling_size: !ref rnn_class: !ref rnn_layers: !ref rnn_neurons: !ref rnn_bidirectional: !ref rnn_re_init: True dnn_blocks: !ref dnn_neurons: !ref use_rnnp: False # Embedding (from indexes to an embedding space of dimension emb_size). embedding: !new:speechbrain.nnet.embedding.Embedding num_embeddings: !ref embedding_dim: !ref # Attention-based RNN decoder. decoder: !new:speechbrain.nnet.RNN.AttentionalRNNDecoder enc_dim: !ref input_size: !ref rnn_type: gru attn_type: location hidden_size: !ref attn_dim: 1024 num_layers: !ref scaling: 1.0 channels: 10 kernel_size: 100 re_init: True dropout: !ref # Linear transformation on the top of the decoder. seq_lin: !new:speechbrain.nnet.linear.Linear input_size: !ref n_neurons: !ref # Linear transformation on the top of the encoder. ctc_lin: !new:speechbrain.nnet.linear.Linear input_size: !ref n_neurons: !ref # Final softmax (for log posteriors computation). log_softmax: !new:speechbrain.nnet.activations.Softmax apply_log: True # Gathering all the submodels in a single model object. model: !new:torch.nn.ModuleList - - !ref - !ref - !ref - !ref - !ref full_encode_step: !new:speechbrain.nnet.containers.LengthsCapableSequential input_shape: [null, null, !ref ] compute_features: !ref normalize: !ref model: !ref test_search: !new:speechbrain.decoders.S2SRNNBeamSearcher embedding: !ref decoder: !ref linear: !ref ctc_linear: !ref bos_index: !ref eos_index: !ref blank_index: !ref min_decode_ratio: !ref max_decode_ratio: !ref beam_size: !ref eos_threshold: !ref using_max_attn_shift: !ref max_attn_shift: !ref coverage_penalty: !ref ctc_weight: !ref temperature: !ref # Objects in "modules" dict will have their parameters moved to the correct # device, as well as having train()/eval() called on them by the Brain class modules: encoder: !ref decoder: !ref pretrainer: !new:speechbrain.utils.parameter_transfer.Pretrainer loadables: model: !ref normalizer: !ref tokenizer: !ref