From 326b45b1759d93db4ad444ca79e12cd7901e9b0b Mon Sep 17 00:00:00 2001 From: BlueAmulet <43395286+BlueAmulet@users.noreply.github.com> Date: Sun, 2 Apr 2023 22:51:03 -0600 Subject: [PATCH] fix: remove possible leak in unused code --- src/so_vits_svc_fork/inference/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/so_vits_svc_fork/inference/core.py b/src/so_vits_svc_fork/inference/core.py index fbbcd794..00185c2f 100644 --- a/src/so_vits_svc_fork/inference/core.py +++ b/src/so_vits_svc_fork/inference/core.py @@ -487,7 +487,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(