optimize: no json config writeback

This commit is contained in:
源文雨
2023-09-02 13:53:56 +08:00
parent 3f78b73ec7
commit ad85b02ed9
8 changed files with 85 additions and 61 deletions

View File

@@ -210,12 +210,12 @@ class VC:
if self.tgt_sr != resample_sr >= 16000:
self.tgt_sr = resample_sr
index_info = (
"Using index:%s." % file_index
"Index:\n%s." % file_index
if os.path.exists(file_index)
else "Index not used."
)
return (
f"Success.\n {index_info}\nTime:\n npy:{times[0]}s, f0:{times[1]}s, infer:{times[2]}s",
"Success.\n%s\nTime:\nnpy: %.2fs, f0: %.2fs, infer: %.2fs." % (index_info, *times),
(self.tgt_sr, audio_opt),
)
except: