From 623cce4b8865f2b75376148e1d76fbd21923dedb Mon Sep 17 00:00:00 2001 From: IceKyrin <40847087+IceKyrin@users.noreply.github.com> Date: Thu, 1 Dec 2022 12:52:39 +0800 Subject: [PATCH] fix slicer bug --- infer_tools/slicer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/infer_tools/slicer.py b/infer_tools/slicer.py index 81c0df0..bc3743a 100644 --- a/infer_tools/slicer.py +++ b/infer_tools/slicer.py @@ -104,7 +104,7 @@ def slice(self, audio): split_loc_l = split_win_l + np.argmin(abs_amp[split_win_l: split_win_l + self.win_sn]) sil_tags.append((split_loc_l, samples.shape[0])) if len(sil_tags) == 0: - return {0: {"slice": False, "split_time": (0, len(audio))}} + return {"0": {"slice": False, "split_time": f"0,{len(audio)}"}} else: chunks = [] # 第一段静音并非从头开始,补上有声片段