|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sample_rate: 16000 |
|
n_fft: 512 |
|
n_mels: 80 |
|
win_length: 32 |
|
|
|
|
|
token_type: unigram |
|
character_coverage: 1.0 |
|
|
|
|
|
|
|
|
|
d_model: 768 |
|
joint_dim: 512 |
|
nhead: 8 |
|
num_encoder_layers: 12 |
|
num_decoder_layers: 0 |
|
d_ffn: 2048 |
|
transformer_dropout: 0.1 |
|
activation: !name:torch.nn.GELU |
|
output_neurons: 1024 |
|
dec_dim: 512 |
|
dec_emb_dropout: 0.2 |
|
dec_dropout: 0.1 |
|
|
|
|
|
blank_index: 0 |
|
bos_index: 1 |
|
eos_index: 2 |
|
pad_index: 0 |
|
beam_size: 10 |
|
nbest: 1 |
|
|
|
|
|
state_beam: 2.3 |
|
expand_beam: 2.3 |
|
|
|
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> |
|
|
|
|
|
|
|
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: RelPosMHAXL |
|
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 |
|
|
|
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 |
|
|
|
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 |
|
|
|
|
|
|
|
modules: |
|
CNN: !ref <CNN> |
|
enc: !ref <enc> |
|
emb: !ref <emb> |
|
dec: !ref <dec> |
|
Tjoint: !ref <Tjoint> |
|
transducer_lin: !ref <transducer_lin> |
|
normalize: !ref <normalize> |
|
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>] |
|
|
|
|
|
|
|
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 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tokenizer: !new:sentencepiece.SentencePieceProcessor |
|
|
|
pretrainer: !new:speechbrain.utils.parameter_transfer.Pretrainer |
|
loadables: |
|
model: !ref <model> |
|
normalizer: !ref <normalize> |
|
tokenizer: !ref <tokenizer> |
|
|
|
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>] |
|
|