# ############################################################################ # Model: Small CRDNN model for Voice Activity Detection # Author: Mirco Ravanelli, 2021 # ############################################################################ # Feature parameters sample_rate: 16000 time_resolution: 0.01 # in seconds (e.g,, 0.01 = 10 ms) n_fft: 400 n_mels: 40 # Model parameters activation: !name:torch.nn.LeakyReLU dropout: 0.15 cnn_blocks: 2 cnn_channels: (16, 32) cnn_kernelsize: (3, 3) rnn_layers: 2 rnn_neurons: 32 rnn_bidirectional: True dnn_blocks: 1 dnn_neurons: 16 output_neurons: 1 device: 'cpu' # or 'cuda' # Feature/Model objects compute_features: !new:speechbrain.lobes.features.Fbank sample_rate: !ref n_fft: !ref n_mels: !ref hop_length: !ref * 1000 # in ms mean_var_norm: !new:speechbrain.processing.features.InputNormalization norm_type: sentence cnn: !new:speechbrain.nnet.containers.Sequential input_shape: [null, null, !ref ] norm1: !name:speechbrain.nnet.normalization.LayerNorm cnn1: !name:speechbrain.lobes.models.CRDNN.CNN_Block channels: 16 kernel_size: (3, 3) cnn2: !name:speechbrain.lobes.models.CRDNN.CNN_Block channels: 32 kernel_size: (3, 3) rnn: !new:speechbrain.nnet.RNN.GRU input_shape: [null, null, 320] hidden_size: !ref num_layers: !ref bidirectional: True dnn: !new:speechbrain.nnet.containers.Sequential input_shape: [null, null, !ref * 2] dnn1: !name:speechbrain.lobes.models.CRDNN.DNN_Block neurons: !ref dnn2: !name:speechbrain.lobes.models.CRDNN.DNN_Block neurons: !ref lin: !name:speechbrain.nnet.linear.Linear n_neurons: !ref bias: False model: !new:torch.nn.ModuleList - [!ref , !ref , !ref ] modules: compute_features: !ref model: !ref cnn: !ref rnn: !ref dnn: !ref mean_var_norm: !ref pretrainer: !new:speechbrain.utils.parameter_transfer.Pretrainer loadables: model: !ref mean_var_norm: !ref