| |
| |
| |
| |
| |
| |
| |
| |
| |
|
|
| |
|
|
| seed: 3419 |
| __set_seed: !apply:speechbrain.utils.seed_everything [3419] |
| output_folder: results/conformer_transducer_char/word_fastemit |
| output_wer_folder: results/conformer_transducer_char/word_fastemit/ |
| save_folder: results/conformer_transducer_char/alignment/save |
| checkpoint_folder: results/conformer_transducer_char/word_fastemit/save |
| train_log: results/conformer_transducer_char/word_fastemit/train_log.txt |
| pretrain_source: speechbrain/asr-streaming-conformer-librispeech |
| pretrain_folder: results/conformer_transducer_char/word_fastemit/pretrained |
|
|
| |
| data_folder: /home/datasets/LibriSpeech |
| emilia_data_folder: /home/datasets/Emilia-Dataset/Emilia/EN |
| emilia_train_csv: /home/datasets/Emilia/emilia_en_400h.csv |
|
|
| |
| train_csv: |
| - results/conformer_transducer_char/char_asr/train-clean-100.csv |
| - results/conformer_transducer_char/char_asr/train-clean-360.csv |
| - results/conformer_transducer_char/char_asr/train-other-500.csv |
|
|
| valid_csv: results/conformer_transducer_char/char_asr/dev-clean.csv |
|
|
| test_csv: |
| - results/conformer_transducer_char/char_asr/test-clean.csv |
| - results/conformer_transducer_char/char_asr/test-other.csv |
|
|
| ckpt_interval_minutes: 5 |
| |
| |
| |
| |
| |
| |
| pretrained_lm_tokenizer_path: speechbrain/asr-crdnn-rnnlm-librispeech |
|
|
|
|
| |
|
|
| |
| |
| |
| |
| number_of_epochs: 100 |
| num_workers: 4 |
| batch_size_valid: 4 |
| lr: 0.0004 |
| weight_decay: 0.01 |
| number_of_ctc_epochs: 60 |
| ctc_weight: 0.3 |
| ce_weight: 0.0 |
| max_grad_norm: 5.0 |
| loss_reduction: 'batchmean' |
| precision: fp16 |
|
|
| |
| |
| batch_size: 6 |
| grad_accumulation_factor: 4 |
| sorting: random |
| avg_checkpoints: 10 |
|
|
| |
| sample_rate: 16000 |
| n_fft: 512 |
| n_mels: 80 |
| win_length: 32 |
|
|
| |
| |
| |
| |
| streaming: True |
|
|
| |
| |
| dynchunktrain_config_sampler: !new:speechbrain.utils.dynamic_chunk_training.DynChunkTrainConfigRandomSampler |
| chunkwise_prob: 1.0 |
| chunk_size_min: 4 |
| chunk_size_max: 4 |
| limited_left_context_prob: 1.0 |
| left_context_chunks_min: 32 |
| left_context_chunks_max: 32 |
| |
| |
| valid_config: !new:speechbrain.utils.dynamic_chunk_training.DynChunkTrainConfig |
| chunk_size: 4 |
| left_context_size: 32 |
|
|
| |
| train_dataloader_opts: |
| batch_size: !ref <batch_size> |
| num_workers: !ref <num_workers> |
|
|
| valid_dataloader_opts: |
| batch_size: !ref <batch_size_valid> |
|
|
| test_dataloader_opts: |
| batch_size: !ref <batch_size_valid> |
|
|
| |
| |
| |
| dynamic_batching: True |
| max_batch_len: 80 |
| max_batch_len_val: 50 |
| num_bucket: 200 |
|
|
| dynamic_batch_sampler: |
| max_batch_len: !ref <max_batch_len> |
| max_batch_len_val: !ref <max_batch_len_val> |
| num_buckets: !ref <num_bucket> |
| shuffle_ex: True |
| batch_ordering: random |
| max_batch_ex: 256 |
|
|
| |
|
|
| |
| d_model: 512 |
| joint_dim: 640 |
| nhead: 8 |
| num_encoder_layers: 12 |
| num_decoder_layers: 0 |
| d_ffn: 2048 |
| transformer_dropout: 0.1 |
| activation: !name:torch.nn.GELU |
| output_neurons: 1000 |
| dec_dim: 512 |
| dec_emb_dropout: 0.2 |
| dec_dropout: 0.1 |
| attention_type: RelPosMHAXL |
|
|
| |
| blank_index: 0 |
| bos_index: 0 |
| eos_index: 0 |
| pad_index: 0 |
| beam_size: 10 |
| nbest: 1 |
| |
| |
| state_beam: 2.3 |
| expand_beam: 2.3 |
| lm_weight: 0.50 |
|
|
| |
| use_torchaudio: False |
|
|
| epoch_counter: !new:speechbrain.utils.epoch_loop.EpochCounter |
| limit: !ref <number_of_epochs> |
|
|
| normalize: !new:speechbrain.processing.features.InputNormalization |
| norm_type: global |
| update_until_epoch: 4 |
|
|
| compute_features: !new:speechbrain.lobes.features.Fbank |
| sample_rate: !ref <sample_rate> |
| n_fft: !ref <n_fft> |
| n_mels: !ref <n_mels> |
| win_length: !ref <win_length> |
|
|
| |
|
|
| |
| speed_perturb: !new:speechbrain.augment.time_domain.SpeedPerturb |
| orig_freq: !ref <sample_rate> |
| speeds: [95, 100, 105] |
|
|
| |
| wav_augment: !new:speechbrain.augment.augmenter.Augmenter |
| min_augmentations: 1 |
| max_augmentations: 1 |
| augment_prob: 1.0 |
| augmentations: [!ref <speed_perturb>] |
|
|
|
|
| |
| time_drop: !new:speechbrain.augment.freq_domain.SpectrogramDrop |
| drop_length_low: 12 |
| drop_length_high: 20 |
| drop_count_low: 5 |
| drop_count_high: 5 |
| replace: "zeros" |
|
|
| |
| freq_drop: !new:speechbrain.augment.freq_domain.SpectrogramDrop |
| drop_length_low: 20 |
| drop_length_high: 25 |
| drop_count_low: 2 |
| drop_count_high: 2 |
| replace: "zeros" |
| dim: 2 |
|
|
| |
| time_warp: !new:speechbrain.augment.freq_domain.Warping |
|
|
| fea_augment: !new:speechbrain.augment.augmenter.Augmenter |
| parallel_augment: False |
| concat_original: False |
| repeat_augment: 1 |
| shuffle_augmentations: False |
| min_augmentations: 3 |
| max_augmentations: 3 |
| augment_prob: 1.0 |
| augmentations: [ |
| !ref <time_drop>, |
| !ref <freq_drop>, |
| !ref <time_warp>] |
|
|
| |
|
|
| CNN: !new:speechbrain.lobes.models.convolution.ConvolutionFrontEnd |
| input_shape: (8, 10, 80) |
| num_blocks: 2 |
| num_layers_per_block: 1 |
| out_channels: (64, 32) |
| kernel_sizes: (3, 3) |
| strides: (2, 2) |
| residuals: (False, False) |
|
|
| Transformer: !new:speechbrain.lobes.models.transformer.TransformerASR.TransformerASR |
| input_size: 640 |
| tgt_vocab: !ref <output_neurons> |
| d_model: !ref <d_model> |
| nhead: !ref <nhead> |
| num_encoder_layers: !ref <num_encoder_layers> |
| num_decoder_layers: !ref <num_decoder_layers> |
| d_ffn: !ref <d_ffn> |
| dropout: !ref <transformer_dropout> |
| activation: !ref <activation> |
| encoder_module: conformer |
| attention_type: !ref <attention_type> |
| normalize_before: True |
| causal: False |
|
|
| |
| enc: !new:speechbrain.lobes.models.transformer.TransformerASR.EncoderWrapper |
| transformer: !ref <Transformer> |
|
|
| |
| proj_ctc: !new:speechbrain.nnet.linear.Linear |
| input_size: !ref <joint_dim> |
| n_neurons: !ref <output_neurons> |
|
|
| |
| |
| proj_enc: !new:speechbrain.nnet.linear.Linear |
| input_size: !ref <d_model> |
| n_neurons: !ref <joint_dim> |
| bias: False |
|
|
| proj_dec: !new:speechbrain.nnet.linear.Linear |
| input_size: !ref <dec_dim> |
| n_neurons: !ref <joint_dim> |
| bias: False |
|
|
| |
| ctc_cost: !name:speechbrain.nnet.losses.ctc_loss |
| blank_index: !ref <blank_index> |
| reduction: !ref <loss_reduction> |
|
|
| emb: !new:speechbrain.nnet.embedding.Embedding |
| num_embeddings: !ref <output_neurons> |
| consider_as_one_hot: True |
| blank_id: !ref <blank_index> |
|
|
| dec: !new:speechbrain.nnet.RNN.LSTM |
| input_shape: [null, null, !ref <output_neurons> - 1] |
| hidden_size: !ref <dec_dim> |
| num_layers: 1 |
| re_init: True |
|
|
| |
| |
| |
| |
| |
|
|
| |
| ce_cost: !name:speechbrain.nnet.losses.nll_loss |
| label_smoothing: 0.1 |
|
|
| Tjoint: !new:speechbrain.nnet.transducer.transducer_joint.Transducer_joint |
| joint: sum |
| nonlinearity: !ref <activation> |
|
|
| transducer_lin: !new:speechbrain.nnet.linear.Linear |
| input_size: !ref <joint_dim> |
| n_neurons: !ref <output_neurons> |
| bias: False |
|
|
| log_softmax: !new:speechbrain.nnet.activations.Softmax |
| apply_log: True |
|
|
| transducer_cost: !name:speechbrain.nnet.losses.transducer_loss |
| blank_index: !ref <blank_index> |
| use_torchaudio: !ref <use_torchaudio> |
|
|
| |
| |
| lm_model: !new:speechbrain.lobes.models.RNNLM.RNNLM |
| output_neurons: !ref <output_neurons> |
| embedding_dim: 128 |
| activation: !name:torch.nn.LeakyReLU |
| dropout: 0.0 |
| rnn_layers: 2 |
| rnn_neurons: 2048 |
| dnn_blocks: 1 |
| dnn_neurons: 512 |
| return_hidden: True |
|
|
| |
| |
| modules: |
| CNN: !ref <CNN> |
| enc: !ref <enc> |
| emb: !ref <emb> |
| dec: !ref <dec> |
| Tjoint: !ref <Tjoint> |
| transducer_lin: !ref <transducer_lin> |
| normalize: !ref <normalize> |
| lm_model: !ref <lm_model> |
| proj_ctc: !ref <proj_ctc> |
| proj_dec: !ref <proj_dec> |
| proj_enc: !ref <proj_enc> |
| |
|
|
| |
| |
| model: !new:torch.nn.ModuleList |
| - [!ref <CNN>, !ref <enc>, !ref <emb>, !ref <dec>, !ref <proj_enc>, !ref <proj_dec>, !ref <proj_ctc>, !ref <transducer_lin>] |
|
|
| |
|
|
| |
| tokenizer: !new:sentencepiece.SentencePieceProcessor |
|
|
| Greedysearcher: !new:speechbrain.decoders.transducer.TransducerBeamSearcher |
| decode_network_lst: [!ref <emb>, !ref <dec>, !ref <proj_dec>] |
| tjoint: !ref <Tjoint> |
| classifier_network: [!ref <transducer_lin>] |
| blank_id: !ref <blank_index> |
| beam_size: 1 |
| nbest: 1 |
|
|
| Beamsearcher: !new:speechbrain.decoders.transducer.TransducerBeamSearcher |
| decode_network_lst: [!ref <emb>, !ref <dec>, !ref <proj_dec>] |
| tjoint: !ref <Tjoint> |
| classifier_network: [!ref <transducer_lin>] |
| blank_id: !ref <blank_index> |
| beam_size: !ref <beam_size> |
| nbest: !ref <nbest> |
| lm_module: !ref <lm_model> |
| lm_weight: !ref <lm_weight> |
| state_beam: !ref <state_beam> |
| expand_beam: !ref <expand_beam> |
|
|
| opt_class: !name:torch.optim.AdamW |
| lr: !ref <lr> |
| betas: (0.9, 0.98) |
| eps: 1.e-8 |
| weight_decay: !ref <weight_decay> |
|
|
| |
|
|
| checkpointer: !new:speechbrain.utils.checkpoints.Checkpointer |
| checkpoints_dir: !ref <checkpoint_folder> |
| recoverables: |
| model: !ref <model> |
| normalizer: !ref <normalize> |
| counter: !ref <epoch_counter> |
|
|
| pretrainer: !new:speechbrain.utils.parameter_transfer.Pretrainer |
| collect_in: !ref <pretrain_folder> |
| loadables: |
| model: !ref <model> |
| tokenizer: !ref <tokenizer> |
| normalizer: !ref <normalize> |
| paths: |
| model: !ref <pretrain_source>/model.ckpt |
| tokenizer: !ref <pretrain_source>/tokenizer.ckpt |
| normalizer: !ref <pretrain_source>/normalizer.ckpt |
|
|
| train_logger: !new:speechbrain.utils.train_logger.WandBLogger |
| initializer: !name:wandb.init |
| project: streaming-asr |
| name: conformer_transducer_char |
| dir: results/conformer_transducer_char/streaming_asr/wandb |
| reinit: true |
| resume: false |
|
|
|
|
| error_rate_computer: !name:speechbrain.utils.metric_stats.ErrorRateStats |
|
|
| cer_computer: !name:speechbrain.utils.metric_stats.ErrorRateStats |
| split_tokens: True |
|
|
|
|
| make_tokenizer_streaming_context: !name:speechbrain.tokenizers.SentencePiece.SentencePieceDecoderStreamingContext |
| tokenizer_decode_streaming: !name:speechbrain.tokenizers.SentencePiece.spm_decode_preserve_leading_space |
|
|
| make_decoder_streaming_context: !name:speechbrain.decoders.transducer.TransducerGreedySearcherStreamingContext |
| decoding_function: !name:speechbrain.decoders.transducer.TransducerBeamSearcher.transducer_greedy_decode_streaming |
| - !ref <Greedysearcher> |
|
|
| fea_streaming_extractor: !new:speechbrain.lobes.features.StreamingFeatureWrapper |
| module: !new:speechbrain.nnet.containers.LengthsCapableSequential |
| - !ref <compute_features> |
| - !ref <normalize> |
| - !ref <CNN> |
| |
| |
| |
| properties: !apply:speechbrain.utils.filter_analysis.stack_filter_properties |
| - [!ref <compute_features>, !ref <CNN>] |
|
|