diff --git a/paddlespeech/server/conf/application.yaml b/paddlespeech/server/conf/application.yaml index 8650154e..55f241ec 100644 --- a/paddlespeech/server/conf/application.yaml +++ b/paddlespeech/server/conf/application.yaml @@ -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 diff --git a/paddlespeech/server/engine/asr/python/asr_engine.py b/paddlespeech/server/engine/asr/python/asr_engine.py index 02c40fd1..9ce05d97 100644 --- a/paddlespeech/server/engine/asr/python/asr_engine.py +++ b/paddlespeech/server/engine/asr/python/asr_engine.py @@ -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))