1
0
mirror of synced 2024-11-23 23:21:03 +01:00

Do not adjust vc's sample rate, just return the target resampe rate when required. Fixes #1233 (#1234)

This commit is contained in:
James 2023-09-12 06:24:30 -06:00 committed by GitHub
parent 4aa896d0f3
commit d009111b3f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -209,7 +209,9 @@ class VC:
f0_file,
)
if self.tgt_sr != resample_sr >= 16000:
self.tgt_sr = resample_sr
tgt_sr = resample_sr
else:
tgt_sr = self.tgt_sr
index_info = (
"Index:\n%s." % file_index
if os.path.exists(file_index)
@ -218,7 +220,7 @@ class VC:
return (
"Success.\n%s\nTime:\nnpy: %.2fs, f0: %.2fs, infer: %.2fs."
% (index_info, *times),
(self.tgt_sr, audio_opt),
(tgt_sr, audio_opt),
)
except:
info = traceback.format_exc()