mengzhe.cmz 3 лет назад
Родитель
Сommit
586c7024ef

+ 0 - 1
egs_modelscope/punctuation/punc_ct-transformer_zh-cn-common-vadrealtime-vocab272727/infer.py

@@ -13,7 +13,6 @@ logger.setLevel(logging.CRITICAL)
 inference_pipeline = pipeline(
     task=Tasks.punctuation,
     model='damo/punc_ct-transformer_zh-cn-common-vad_realtime-vocab272727',
-    model_revision="v1.0.0",
     output_dir="./tmp/"
 )
 

+ 1 - 1
funasr/bin/punctuation_infer_vadrealtime.py

@@ -69,6 +69,7 @@ class Text2Punc:
             precache = "".join(cache)
         else:
             precache = ""
+            cache = []
         data = {"text": precache + text}
         result = self.preprocessor(data=data, uid="12938712838719")
         split_text = self.preprocessor.pop_split_text_data(result)
@@ -233,7 +234,6 @@ def inference_modelscope(
                 item = {'key': key, 'value': ""}
                 results.append(item)
                 return results
-            #import pdb;pdb.set_trace()
             result, _, cache = text2punc(line, cache)
             item = {'key': key, 'value': result, 'cache': cache}
             results.append(item)