From 9deb58ba13cbed8b603af5eb2b35ad010b3099ef Mon Sep 17 00:00:00 2001 From: BlueAmulet <43395286+BlueAmulet@users.noreply.github.com> Date: Sat, 1 Apr 2023 14:29:42 -0600 Subject: [PATCH] fix: remove possible leak in unused code --- src/so_vits_svc_fork/inference/infer_tool.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/so_vits_svc_fork/inference/infer_tool.py b/src/so_vits_svc_fork/inference/infer_tool.py index 5604192f6..18e74f480 100644 --- a/src/so_vits_svc_fork/inference/infer_tool.py +++ b/src/so_vits_svc_fork/inference/infer_tool.py @@ -485,7 +485,7 @@ def infer( min_rms = 10 ** (db_thresh / 20) if rms < min_rms: LOG.info(f"Skip silence: RMS={rms:.2f} < {min_rms:.2f}") - return input_audio.copy() + return np.zeros_like(input_audio) else: LOG.info(f"Start inference: RMS={rms:.2f} >= {min_rms:.2f}") infered_audio_c, _ = self.svc_model.infer(