Mirco commited on
Commit
a87b222
1 Parent(s): a3560ed

upload best model

Browse files
Files changed (6) hide show
  1. .gitattributes +3 -0
  2. asr.ckpt +3 -0
  3. example.wav +0 -0
  4. hyperparams.yaml +115 -0
  5. normalizer.ckpt +3 -0
  6. tokenizer.ckpt +3 -0
.gitattributes CHANGED
@@ -14,3 +14,6 @@
14
  *.pb filter=lfs diff=lfs merge=lfs -text
15
  *.pt filter=lfs diff=lfs merge=lfs -text
16
  *.pth filter=lfs diff=lfs merge=lfs -text
 
 
 
 
14
  *.pb filter=lfs diff=lfs merge=lfs -text
15
  *.pt filter=lfs diff=lfs merge=lfs -text
16
  *.pth filter=lfs diff=lfs merge=lfs -text
17
+ asr.ckpt filter=lfs diff=lfs merge=lfs -text
18
+ normalizer.ckpt filter=lfs diff=lfs merge=lfs -text
19
+ tokenizer.ckpt filter=lfs diff=lfs merge=lfs -text
asr.ckpt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3662df3a5f9fece1a1e8af38af96a979d61f27678deebd32b060a65bf90020d5
3
+ size 126717109
example.wav ADDED
Binary file (69 kB). View file
 
hyperparams.yaml ADDED
@@ -0,0 +1,115 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # ############################################################################
2
+ # Model: E2E ASR with Transformer
3
+ # Encoder: Transformer Encoder
4
+ # Decoder: Transformer Decoder + (CTC/ATT joint) beamsearch
5
+ # Tokens: BPE with unigram
6
+ # losses: CTC + KLdiv (Label Smoothing loss)
7
+ # Training: AISHELL-1
8
+ # Authors: Jianyuan Zhong, Titouan Parcollet
9
+ # ############################################################################
10
+
11
+ # Feature parameters
12
+ sample_rate: 16000
13
+ n_fft: 400
14
+ n_mels: 80
15
+
16
+ ####################### Model parameters ###########################
17
+ # Transformer
18
+ d_model: 256
19
+ nhead: 4
20
+ num_encoder_layers: 12
21
+ num_decoder_layers: 6
22
+ d_ffn: 2048
23
+ transformer_dropout: 0.1
24
+ activation: !name:torch.nn.GELU
25
+ output_neurons: 5000
26
+ vocab_size: 5000
27
+
28
+ # Outputs
29
+ blank_index: 0
30
+ label_smoothing: 0.1
31
+ pad_index: 0
32
+ bos_index: 1
33
+ eos_index: 2
34
+ unk_index: 0
35
+
36
+ # Decoding parameters
37
+ min_decode_ratio: 0.0
38
+ max_decode_ratio: 1.0 # 1.0
39
+ valid_search_interval: 10
40
+ valid_beam_size: 10
41
+ test_beam_size: 10
42
+ ctc_weight_decode: 0.40
43
+
44
+ ############################## models ################################
45
+
46
+ compute_features: !new:speechbrain.lobes.features.Fbank
47
+ sample_rate: !ref <sample_rate>
48
+ n_fft: !ref <n_fft>
49
+ n_mels: !ref <n_mels>
50
+
51
+ normalize: !new:speechbrain.processing.features.InputNormalization
52
+ norm_type: global
53
+
54
+
55
+ CNN: !new:speechbrain.lobes.models.convolution.ConvolutionFrontEnd
56
+ input_shape: (8, 10, 80)
57
+ num_blocks: 2
58
+ num_layers_per_block: 1
59
+ out_channels: (256, 256)
60
+ kernel_sizes: (3, 3)
61
+ strides: (2, 2)
62
+ residuals: (False, False)
63
+
64
+ Transformer: !new:speechbrain.lobes.models.transformer.TransformerASR.TransformerASR # yamllint disable-line rule:line-length
65
+ input_size: 5120
66
+ tgt_vocab: !ref <output_neurons>
67
+ d_model: !ref <d_model>
68
+ nhead: !ref <nhead>
69
+ num_encoder_layers: !ref <num_encoder_layers>
70
+ num_decoder_layers: !ref <num_decoder_layers>
71
+ d_ffn: !ref <d_ffn>
72
+ dropout: !ref <transformer_dropout>
73
+ activation: !ref <activation>
74
+ normalize_before: True
75
+
76
+ ctc_lin: !new:speechbrain.nnet.linear.Linear
77
+ input_size: !ref <d_model>
78
+ n_neurons: !ref <output_neurons>
79
+
80
+ seq_lin: !new:speechbrain.nnet.linear.Linear
81
+ input_size: !ref <d_model>
82
+ n_neurons: !ref <output_neurons>
83
+
84
+ tokenizer: !new:sentencepiece.SentencePieceProcessor
85
+
86
+ asr_model: !new:torch.nn.ModuleList
87
+ - [!ref <CNN>, !ref <Transformer>, !ref <seq_lin>, !ref <ctc_lin>]
88
+
89
+ modules:
90
+ compute_features: !ref <compute_features>
91
+ pre_transformer: !ref <CNN>
92
+ transformer: !ref <Transformer>
93
+ asr_model: !ref <asr_model>
94
+ normalize: !ref <normalize>
95
+ beam_searcher: !ref <beam_searcher>
96
+
97
+ beam_searcher: !new:speechbrain.decoders.S2STransformerBeamSearch
98
+ modules: [!ref <Transformer>, !ref <seq_lin>, !ref <ctc_lin>]
99
+ bos_index: !ref <bos_index>
100
+ eos_index: !ref <eos_index>
101
+ blank_index: !ref <blank_index>
102
+ min_decode_ratio: !ref <min_decode_ratio>
103
+ max_decode_ratio: !ref <max_decode_ratio>
104
+ beam_size: !ref <test_beam_size>
105
+ ctc_weight: !ref <ctc_weight_decode>
106
+ using_eos_threshold: False
107
+ length_normalization: True
108
+
109
+ log_softmax: !new:torch.nn.LogSoftmax
110
+ dim: -1
111
+
112
+ pretrainer: !new:speechbrain.utils.parameter_transfer.Pretrainer
113
+ loadables:
114
+ asr: !ref <asr_model>
115
+ tokenizer: !ref <tokenizer>
normalizer.ckpt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c976b63ddbb42868e8ec2dc6f68771a4f9f4c9ad4f93011b4b0cec0df74c3d3e
3
+ size 1793
tokenizer.ckpt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9f0478ccc6dac61ce0e6149a84e531ff7d300b133d5717cc9d531b00837ac444
3
+ size 300111