Update asr_engine.py (#2302)

* Update asr_engine.py

* Update asr_engine.py

* Update application.yaml

must add parameter "num_decoding_left_chunks" so as to modify this in other scenarios.

* Update asr_engine.py

* Update application.yaml

* Update application.yaml

* Update asr_engine.py
pull/2351/head
Zhao Yuting 2 years ago committed by GitHub
parent 2c4c254f71
commit c28064fec2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -25,6 +25,7 @@ asr_python:
cfg_path: # [optional]
ckpt_path: # [optional]
decode_method: 'attention_rescoring'
num_decoding_left_chunks: -1
force_yes: True
device: # set 'gpu:id' or 'cpu'
@ -38,6 +39,7 @@ asr_inference:
lang: 'zh'
sample_rate: 16000
cfg_path:
num_decoding_left_chunks: -1
decode_method:
force_yes: True

@ -66,11 +66,12 @@ class ASREngine(BaseEngine):
)
logger.error(e)
return False
self.executor._init_from_path(
self.config.model, self.config.lang, self.config.sample_rate,
self.config.cfg_path, self.config.decode_method,
self.config.ckpt_path)
model_type = self.config.model, lang = self.config.lang, sample_rate = self.config.sample_rate,
cfg_path = self.config.cfg_path, decode_method = self.config.decode_method,
ckpt_path = self.config.ckpt_path)
logger.info("Initialize ASR server engine successfully on device: %s." %
(self.device))

Loading…
Cancel
Save