From 178df90dc3f4ba9eea982ae8ba1a9a46c6f50d0d Mon Sep 17 00:00:00 2001
From: zhifu gao <zhifu.gzf@alibaba-inc.com>
Date: 星期二, 21 二月 2023 11:02:28 +0800
Subject: [PATCH] Merge pull request #139 from alibaba-damo-academy/dev_sx

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

diff --git a/funasr/utils/timestamp_tools.py b/funasr/utils/timestamp_tools.py
index f966aee..317c223 100644
--- a/funasr/utils/timestamp_tools.py
+++ b/funasr/utils/timestamp_tools.py
@@ -5,6 +5,8 @@
 from typing import Any, List, Tuple, Union
 
 def time_stamp_lfr6_pl(us_alphas, us_cif_peak, char_list, begin_time=0.0, end_time=None):
+    if not len(char_list):
+        return []
     START_END_THRESHOLD = 5
     TIME_RATE = 10.0 * 6 / 1000 / 3  #  3 times upsampled
     if len(us_alphas.shape) == 3:

--
Gitblit v1.9.1