From 72fecc8e038070affbf223f8965871e8a1c8c001 Mon Sep 17 00:00:00 2001
From: shixian.shi <shixian.shi@alibaba-inc.com>
Date: 星期五, 24 十一月 2023 14:29:33 +0800
Subject: [PATCH] update asr_spk inference for shot utt

---
 funasr/utils/speaker_utils.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/funasr/utils/speaker_utils.py b/funasr/utils/speaker_utils.py
index 38ef11c..edaf58b 100644
--- a/funasr/utils/speaker_utils.py
+++ b/funasr/utils/speaker_utils.py
@@ -35,7 +35,8 @@
             assert seg[0] >= audio[
                 i - 1][1], 'modelscope error: Wrong time stamps.'
         audio_dur += seg[1] - seg[0]
-    assert audio_dur > 5, 'modelscope error: The effective audio duration is too short.'
+    return audio_dur
+    # assert audio_dur > 5, 'modelscope error: The effective audio duration is too short.'
 
 
 def sv_preprocess(inputs: Union[np.ndarray, list]):

--
Gitblit v1.9.1