Skip to content

Commit

Permalink
Merge pull request #32 from IceKyrin/patch-1
Browse files Browse the repository at this point in the history
fix slicer bug
  • Loading branch information
prophesier authored Dec 2, 2022
2 parents be61788 + 623cce4 commit 63f2197
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion infer_tools/slicer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []
# 第一段静音并非从头开始,补上有声片段
Expand Down

0 comments on commit 63f2197

Please sign in to comment.