speechbrain
French
English
speech-to-speech-translation
chaanks commited on
Commit
8150753
1 Parent(s): 78a57d8

Upload 5 files

Browse files
Files changed (5) hide show
  1. CKPT.yaml +6 -0
  2. example-fr.wav +0 -0
  3. hyperparams.yaml +103 -0
  4. model.ckpt +3 -0
  5. wav2vec2.ckpt +3 -0
CKPT.yaml ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ # yamllint disable
2
+ ACC: 0.7129038190400294
3
+ BLEU: 21.728645936237385
4
+ end-of-epoch: true
5
+ epoch: 26
6
+ unixtime: 1692191754.0513365
example-fr.wav ADDED
Binary file (105 kB). View file
 
hyperparams.yaml ADDED
@@ -0,0 +1,103 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ # Pretrain folder (HuggingFace)
3
+ pretrained_path: chaanks/transformer-s2ut-fr-en-hubert-k100
4
+
5
+ sample_rate: 16000
6
+
7
+ # URL for the HuggingFace model we want to load as encoder
8
+ wav2vec2_hub: LeBenchmark/wav2vec2-FR-7K-large
9
+
10
+ # Outputs
11
+ vocab_size: 103
12
+ blank_index: 102
13
+ bos_index: 100
14
+ eos_index: 101
15
+ pad_index: 102
16
+ label_smoothing: 0.0
17
+
18
+ # Encoder
19
+ features_dim: 1024
20
+
21
+ # Length Regulator
22
+ enc_kernel_size: 3
23
+ enc_stride: 2
24
+
25
+ # Transformer decoder
26
+ embedding_size: 512
27
+ d_model: 512
28
+ nhead: 8
29
+ num_encoder_layers: 0
30
+ num_decoder_layers: 6
31
+ d_ffn: 2048
32
+ transformer_dropout: 0.1
33
+ activation: !name:torch.nn.GELU
34
+ output_neurons: !ref <vocab_size>
35
+ attention_type: "regularMHA"
36
+
37
+ # Decoding parameters
38
+ min_decode_ratio: 0.0
39
+ max_decode_ratio: 1.0
40
+
41
+ wav2vec2: !new:speechbrain.lobes.models.huggingface_wav2vec.HuggingFaceWav2Vec2
42
+ source: !ref <wav2vec2_hub>
43
+ output_norm: True
44
+ freeze: True
45
+ freeze_feature_extractor: True
46
+ apply_spec_augment : False
47
+ save_path: wav2vec2_checkpoints
48
+
49
+ length_regulator: !new:speechbrain.nnet.CNN.Conv1d
50
+ input_shape: [null, null, !ref <features_dim>]
51
+ out_channels: !ref <embedding_size>
52
+ kernel_size: !ref <enc_kernel_size>
53
+ stride: !ref <enc_stride>
54
+
55
+ transformer_decoder: !new:speechbrain.lobes.models.transformer.TransformerST.TransformerST # yamllint disable-line rule:line-length
56
+ input_size: !ref <embedding_size>
57
+ tgt_vocab: !ref <output_neurons>
58
+ d_model: !ref <d_model>
59
+ nhead: !ref <nhead>
60
+ num_encoder_layers: !ref <num_encoder_layers>
61
+ num_decoder_layers: !ref <num_decoder_layers>
62
+ d_ffn: !ref <d_ffn>
63
+ dropout: !ref <transformer_dropout>
64
+ activation: !ref <activation>
65
+ attention_type: !ref <attention_type>
66
+ normalize_before: True
67
+ causal: False
68
+
69
+ log_softmax: !new:speechbrain.nnet.activations.Softmax
70
+ apply_log: True
71
+
72
+ seq_lin: !new:speechbrain.nnet.linear.Linear
73
+ input_size: !ref <d_model>
74
+ n_neurons: !ref <output_neurons>
75
+
76
+ model: !new:torch.nn.ModuleList
77
+ - [!ref <length_regulator>, !ref <transformer_decoder>, !ref <seq_lin>]
78
+
79
+ encoder: !new:speechbrain.nnet.containers.LengthsCapableSequential
80
+ wav2vec2: !ref <wav2vec2>
81
+ length_regulator: !ref <length_regulator>
82
+
83
+ decoder_beamsearch: !new:speechbrain.decoders.seq2seq.S2STransformerBeamSearch
84
+ modules: [!ref <transformer_decoder>, !ref <seq_lin>, null]
85
+ bos_index: !ref <bos_index>
86
+ eos_index: !ref <eos_index>
87
+ blank_index: !ref <blank_index>
88
+ min_decode_ratio: !ref <min_decode_ratio>
89
+ max_decode_ratio: !ref <max_decode_ratio>
90
+ beam_size: 10
91
+ temperature: 1.0
92
+
93
+ modules:
94
+ encoder: !ref <encoder>
95
+ decoder: !ref <decoder_beamsearch>
96
+
97
+ pretrainer: !new:speechbrain.utils.parameter_transfer.Pretrainer
98
+ loadables:
99
+ model: !ref <model>
100
+ wav2vec2: !ref <wav2vec2>
101
+ paths:
102
+ wav2vec2: !ref <pretrained_path>/wav2vec2.ckpt
103
+ model: !ref <pretrained_path>/model.ckpt
model.ckpt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cb148a9d323300633ec2d92033c038999513221423e1599edbb40eea9e233b45
3
+ size 113826149
wav2vec2.ckpt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6efb994180ba798c2bb679403d755a92288735a36010b12d179fbe5e97a6f4ec
3
+ size 1261924189