From 74c4c2f7c79c4190b45e30168286a4d208a261b5 Mon Sep 17 00:00:00 2001 From: Ftps Date: Sun, 19 Nov 2023 04:06:52 +0900 Subject: [PATCH] return --- rvc/modules/vc/modules.py | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/rvc/modules/vc/modules.py b/rvc/modules/vc/modules.py index 6d1740a..a7aba4f 100644 --- a/rvc/modules/vc/modules.py +++ b/rvc/modules/vc/modules.py @@ -144,24 +144,15 @@ class VC: protect, f0_file, ) - if self.tgt_sr != resample_sr >= 16000: - tgt_sr = resample_sr - else: - tgt_sr = self.tgt_sr - index_info = ( - "Index:\n%s." % file_index - if os.path.exists(file_index) - else "Index not used." - ) - return ( - "Success.\n%s\nTime:\nnpy: %.2fs, f0: %.2fs, infer: %.2fs." - % (index_info, *times), - (tgt_sr, audio_opt), - ) - except: + + tgt_sr = resample_sr if self.tgt_sr != resample_sr >= 16000 else self.tgt_sr + + return tgt_sr, audio_opt, times, None + + except Exception: info = traceback.format_exc() logger.warning(info) - return info, (None, None) + return None, None, None, info def vc_multi( self,