From cfa9401d9d95809dadbbc0dd3fea2cd870378928 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8C=97=E5=BF=B5?= Date: Fri, 24 Feb 2023 11:03:20 +0800 Subject: [PATCH] modify contextual hotword parameter --- funasr/bin/asr_inference_paraformer.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/funasr/bin/asr_inference_paraformer.py b/funasr/bin/asr_inference_paraformer.py index 487f75041..b807a3452 100644 --- a/funasr/bin/asr_inference_paraformer.py +++ b/funasr/bin/asr_inference_paraformer.py @@ -660,11 +660,9 @@ def inference_modelscope( hotword_list_or_file = None if param_dict is not None: hotword_list_or_file = param_dict.get('hotword') - if 'hotword' in kwargs: hotword_list_or_file = kwargs['hotword'] - - if speech2text.hotword_list is None: + if hotword_list_or_file is not None or 'hotword' in kwargs: speech2text.hotword_list = speech2text.generate_hotwords_list(hotword_list_or_file) # 3. Build data-iterator