Spaces:
Sleeping
Sleeping
Using squeezeformer
Browse files
app.py
CHANGED
@@ -8,7 +8,7 @@ import nemo.collections.asr as nemo_asr
|
|
8 |
|
9 |
|
10 |
asr_model = nemo_asr.models.EncDecCTCModelBPE. \
|
11 |
-
from_pretrained("
|
12 |
|
13 |
asr_model.preprocessor.featurizer.dither = 0.0
|
14 |
asr_model.preprocessor.featurizer.pad_to = 0
|
@@ -21,7 +21,7 @@ buffer_len = 8.0
|
|
21 |
chunk_len = 4.8
|
22 |
total_buffer = round(buffer_len * asr_model.cfg.sample_rate)
|
23 |
overhead_len = round((buffer_len - chunk_len) * asr_model.cfg.sample_rate)
|
24 |
-
model_stride =
|
25 |
|
26 |
|
27 |
model_stride_in_secs = asr_model.cfg.preprocessor.window_stride * model_stride
|
|
|
8 |
|
9 |
|
10 |
asr_model = nemo_asr.models.EncDecCTCModelBPE. \
|
11 |
+
from_pretrained("theodotus/stt_uk_squeezeformer_ctc_sm",map_location="cpu")
|
12 |
|
13 |
asr_model.preprocessor.featurizer.dither = 0.0
|
14 |
asr_model.preprocessor.featurizer.pad_to = 0
|
|
|
21 |
chunk_len = 4.8
|
22 |
total_buffer = round(buffer_len * asr_model.cfg.sample_rate)
|
23 |
overhead_len = round((buffer_len - chunk_len) * asr_model.cfg.sample_rate)
|
24 |
+
model_stride = 4
|
25 |
|
26 |
|
27 |
model_stride_in_secs = asr_model.cfg.preprocessor.window_stride * model_stride
|