From f8b4924060bb849680925e81ddf1e10ca406c225 Mon Sep 17 00:00:00 2001
From: jianganghan <hanjiangang@58.com>
Date: 星期四, 25 四月 2024 10:42:19 +0800
Subject: [PATCH] fix bug for blank audio (#1656)

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

diff --git a/funasr/auto/auto_model.py b/funasr/auto/auto_model.py
index 10d012d..32fd560 100644
--- a/funasr/auto/auto_model.py
+++ b/funasr/auto/auto_model.py
@@ -513,7 +513,7 @@
                 distribute_spk(sentence_list, sv_output)
                 result["sentence_info"] = sentence_list
             elif kwargs.get("sentence_timestamp", False):
-                if not len(result["text"]):
+                if not len(result["text"].strip()):
                     sentence_list = []
                 else:
                     sentence_list = timestamp_sentence(

--
Gitblit v1.9.1