From 1159adbca076fa1a33bf4292ec5043e536285c5c Mon Sep 17 00:00:00 2001
From: zhifu gao <zhifu.gzf@alibaba-inc.com>
Date: 星期一, 22 一月 2024 11:55:36 +0800
Subject: [PATCH] funasr1.0 update (#1278)

---
 funasr/auto/auto_model.py |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/funasr/auto/auto_model.py b/funasr/auto/auto_model.py
index bedc17d..ca6189d 100644
--- a/funasr/auto/auto_model.py
+++ b/funasr/auto/auto_model.py
@@ -132,7 +132,8 @@
         self.punc_kwargs = punc_kwargs
         self.spk_model = spk_model
         self.spk_kwargs = spk_kwargs
-        self.model_path = kwargs["model_path"]
+        self.model_path = kwargs.get("model_path")
+
   
         
     def build_model(self, **kwargs):
@@ -390,7 +391,7 @@
             if self.punc_model is not None:
                 self.punc_kwargs.update(cfg)
                 punc_res = self.inference(result["text"], model=self.punc_model, kwargs=self.punc_kwargs, **cfg)
-                result["text_with_punc"] = punc_res[0]["text"]
+                result["text"] = punc_res[0]["text"]
                      
             # speaker embedding cluster after resorted
             if self.spk_model is not None:

--
Gitblit v1.9.1