From 70d6dcf09d255e47929bdd6717b99f3c56558c2b Mon Sep 17 00:00:00 2001
From: 游雁 <zhifu.gzf@alibaba-inc.com>
Date: 星期四, 29 二月 2024 16:26:59 +0800
Subject: [PATCH] Merge branch 'dev_gzf' of github.com:alibaba-damo-academy/FunASR into dev_gzf merge
---
funasr/auto/auto_model.py | 14 +++++++++-----
README_zh.md | 2 +-
README.md | 2 +-
3 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/README.md b/README.md
index 04a3e68..91b9eda 100644
--- a/README.md
+++ b/README.md
@@ -66,7 +66,7 @@
## Model Zoo
FunASR has open-sourced a large number of pre-trained models on industrial data. You are free to use, copy, modify, and share FunASR models under the [Model License Agreement](./MODEL_LICENSE). Below are some representative models, for more models please refer to the [Model Zoo]().
-(Note: 馃 represents the Huggingface model zoo link, 猸� represents the ModelScope model zoo link)
+(Note: 猸� represents the ModelScope model zoo link, 馃 represents the Huggingface model zoo link)
| Model Name | Task Details | Training Data | Parameters |
diff --git a/README_zh.md b/README_zh.md
index 63ad2e2..086b2bc 100644
--- a/README_zh.md
+++ b/README_zh.md
@@ -68,7 +68,7 @@
FunASR寮�婧愪簡澶ч噺鍦ㄥ伐涓氭暟鎹笂棰勮缁冩ā鍨嬶紝鎮ㄥ彲浠ュ湪[妯″瀷璁稿彲鍗忚](./MODEL_LICENSE)涓嬭嚜鐢变娇鐢ㄣ�佸鍒躲�佷慨鏀瑰拰鍒嗕韩FunASR妯″瀷锛屼笅闈㈠垪涓句唬琛ㄦ�х殑妯″瀷锛屾洿澶氭ā鍨嬭鍙傝�僛妯″瀷浠撳簱]()銆�
-锛堟敞锛歔馃]()琛ㄧずHuggingface妯″瀷浠撳簱閾炬帴锛孾猸怾()琛ㄧずModelScope妯″瀷浠撳簱閾炬帴锛�
+锛堟敞锛氣瓙 琛ㄧずModelScope妯″瀷浠撳簱閾炬帴锛岎煠� 琛ㄧずHuggingface妯″瀷浠撳簱閾炬帴锛�
| 妯″瀷鍚嶅瓧 | 浠诲姟璇︽儏 | 璁粌鏁版嵁 | 鍙傛暟閲� |
diff --git a/funasr/auto/auto_model.py b/funasr/auto/auto_model.py
index a6be691..64d4dec 100644
--- a/funasr/auto/auto_model.py
+++ b/funasr/auto/auto_model.py
@@ -392,7 +392,8 @@
# step.3 compute punc model
if self.punc_model is not None:
if not len(result["text"]):
- result['raw_text'] = ''
+ if return_raw_text:
+ result['raw_text'] = ''
else:
self.punc_kwargs.update(cfg)
punc_res = self.inference(result["text"], model=self.punc_model, kwargs=self.punc_kwargs, **cfg)
@@ -434,10 +435,13 @@
distribute_spk(sentence_list, sv_output)
result['sentence_info'] = sentence_list
elif kwargs.get("sentence_timestamp", False):
- sentence_list = timestamp_sentence(punc_res[0]['punc_array'],
- result['timestamp'],
- raw_text,
- return_raw_text=return_raw_text)
+ if not len(result['text']):
+ sentence_list = []
+ else:
+ sentence_list = timestamp_sentence(punc_res[0]['punc_array'],
+ result['timestamp'],
+ raw_text,
+ return_raw_text=return_raw_text)
result['sentence_info'] = sentence_list
if "spk_embedding" in result: del result['spk_embedding']
--
Gitblit v1.9.1