chaanks commited on
Commit
e3c9f37
1 Parent(s): 0007f0e

Upload 2 files

Browse files
Files changed (2) hide show
  1. config.json +3 -0
  2. hyperparams.yaml +65 -0
config.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ {
2
+ "speechbrain_interface": "WhisperASR"
3
+ }
hyperparams.yaml ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # URL for the biggest Fairseq english whisper model.
2
+ whisper_hub: openai/whisper-tiny
3
+
4
+ # Normalize inputs with
5
+ # the same normalization done in the paper. Refer to Appendix C for further information.
6
+ normalized_transcripts: True
7
+
8
+
9
+ language: english
10
+
11
+ auto_mix_prec: False
12
+ sample_rate: 16000
13
+
14
+ # These values are only used for the searchers.
15
+ # They needs to be hardcoded and should not be changed with Whisper.
16
+ # They are used as part of the searching process.
17
+ # The bos token of the searcher will be timestamp_index
18
+ # and will be concatenated with the bos, language and task tokens.
19
+ timestamp_index: 50363
20
+ eos_index: 50257
21
+ bos_index: 50258
22
+
23
+ # Decoding parameters
24
+ min_decode_ratio: 0.0
25
+ max_decode_ratio: 1.0
26
+ test_beam_size: 8
27
+
28
+ # Model parameters
29
+ freeze_whisper: True
30
+ freeze_encoder: True
31
+
32
+
33
+ whisper: !new:speechbrain.lobes.models.huggingface_whisper.HuggingFaceWhisper
34
+ source: !ref <whisper_hub>
35
+ freeze: !ref <freeze_whisper>
36
+ freeze_encoder: !ref <freeze_encoder>
37
+ save_path: pretrained_models
38
+ encoder_only: False
39
+
40
+
41
+ decoder: !new:speechbrain.decoders.seq2seq.S2SWhisperGreedySearch
42
+ model: !ref <whisper>
43
+ bos_index: !ref <timestamp_index>
44
+ eos_index: !ref <eos_index>
45
+ min_decode_ratio: !ref <min_decode_ratio>
46
+ max_decode_ratio: !ref <max_decode_ratio>
47
+
48
+ # test_beam_searcher: !new:speechbrain.decoders.seq2seq.S2SWhisperBeamSearch
49
+ # module: [!ref <whisper>]
50
+ # bos_index: !ref <timestamp_index>
51
+ # eos_index: !ref <eos_index>
52
+ # min_decode_ratio: !ref <min_decode_ratio>
53
+ # max_decode_ratio: !ref <max_decode_ratio>
54
+ # beam_size: !ref <test_beam_size>
55
+
56
+
57
+ modules:
58
+ whisper: !ref <whisper>
59
+ decoder: !ref <decoder>
60
+
61
+ pretrainer: !new:speechbrain.utils.parameter_transfer.Pretrainer
62
+ loadables:
63
+ whisper: !ref <whisper>
64
+ paths:
65
+ whisper: !ref <whisper_hub>/pytorch_model.bin