فهرست منبع

fix english hotwords bug

hnluo 2 سال پیش
والد
کامیت
e83292715f
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      funasr/bin/asr_infer.py

+ 1 - 1
funasr/bin/asr_infer.py

@@ -609,7 +609,7 @@ class Speech2TextParaformer:
             hotword_str_list = []
             hotword_str_list = []
             for hw in hotword_list_or_file.strip().split():
             for hw in hotword_list_or_file.strip().split():
                 hotword_str_list.append(hw)
                 hotword_str_list.append(hw)
-                hw_list = hw
+                hw_list = hw.strip().split()
                 if seg_dict is not None:
                 if seg_dict is not None:
                     hw_list = seg_tokenize(hw_list, seg_dict)
                     hw_list = seg_tokenize(hw_list, seg_dict)
                 hotword_list.append(self.converter.tokens2ids(hw_list))
                 hotword_list.append(self.converter.tokens2ids(hw_list))