update doc and yaml
Browse files- README.md +6 -5
- hyperparams.yaml +2 -2
README.md
CHANGED
@@ -62,16 +62,17 @@ Please notice that we encourage you to read our tutorials and learn more about
|
|
62 |
```python
|
63 |
from speechbrain.inference.ASR import EncoderDecoderASR
|
64 |
|
|
|
65 |
asr_model = EncoderDecoderASR.from_hparams(source="speechbrain/asr-conformer-largescaleasr", savedir="pretrained_models/asr-conformer-largescaleasr")
|
66 |
|
67 |
-
# For
|
68 |
-
asr_model.
|
69 |
|
70 |
-
# For
|
71 |
-
asr_model.
|
72 |
|
73 |
# For even faster decoding
|
74 |
-
asr_model.transcribe_file("speechbrain/asr-conformer-largescaleasr/example.wav"
|
75 |
```
|
76 |
|
77 |
### Inference on GPU
|
|
|
62 |
```python
|
63 |
from speechbrain.inference.ASR import EncoderDecoderASR
|
64 |
|
65 |
+
# For a full decoding with a large beam size (can be slow):
|
66 |
asr_model = EncoderDecoderASR.from_hparams(source="speechbrain/asr-conformer-largescaleasr", savedir="pretrained_models/asr-conformer-largescaleasr")
|
67 |
|
68 |
+
# For greedy decoding:
|
69 |
+
asr_model = EncoderDecoderASR.from_hparams(source="speechbrain/asr-conformer-largescaleasr", savedir="pretrained_models/asr-conformer-largescaleasr", overrides={"test_beam_size":"1"})
|
70 |
|
71 |
+
# For Attn. only decoding (faster):
|
72 |
+
asr_model = EncoderDecoderASR.from_hparams(source="speechbrain/asr-conformer-largescaleasr", savedir="pretrained_models/asr-conformer-largescaleasr", overrides={"scorer":None, "ctc_weight_decode":0.0})
|
73 |
|
74 |
# For even faster decoding
|
75 |
+
asr_model.transcribe_file("speechbrain/asr-conformer-largescaleasr/example.wav")
|
76 |
```
|
77 |
|
78 |
### Inference on GPU
|
hyperparams.yaml
CHANGED
@@ -34,7 +34,7 @@ eos_index: 2
|
|
34 |
# Decoding parameters
|
35 |
min_decode_ratio: 0.0
|
36 |
max_decode_ratio: 1.0
|
37 |
-
test_beam_size:
|
38 |
ctc_weight_decode: 0.3
|
39 |
scorer_beam_scale: 0.3
|
40 |
transformer_beam_search: True
|
@@ -112,7 +112,7 @@ decoder: !new:speechbrain.decoders.S2STransformerBeamSearcher
|
|
112 |
eos_index: !ref <eos_index>
|
113 |
min_decode_ratio: !ref <min_decode_ratio>
|
114 |
max_decode_ratio: !ref <max_decode_ratio>
|
115 |
-
beam_size:
|
116 |
temperature: 1.15
|
117 |
using_eos_threshold: True
|
118 |
scorer: !ref <scorer>
|
|
|
34 |
# Decoding parameters
|
35 |
min_decode_ratio: 0.0
|
36 |
max_decode_ratio: 1.0
|
37 |
+
test_beam_size: 10
|
38 |
ctc_weight_decode: 0.3
|
39 |
scorer_beam_scale: 0.3
|
40 |
transformer_beam_search: True
|
|
|
112 |
eos_index: !ref <eos_index>
|
113 |
min_decode_ratio: !ref <min_decode_ratio>
|
114 |
max_decode_ratio: !ref <max_decode_ratio>
|
115 |
+
beam_size: !ref <test_beam_size>
|
116 |
temperature: 1.15
|
117 |
using_eos_threshold: True
|
118 |
scorer: !ref <scorer>
|