mirror of
https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI.git
synced 2024-12-29 19:15:04 +08:00
Do not adjust vc's sample rate, just return the target resampe rate when required. Fixes #1233 (#1234)
This commit is contained in:
parent
4aa896d0f3
commit
d009111b3f
@ -209,7 +209,9 @@ class VC:
|
|||||||
f0_file,
|
f0_file,
|
||||||
)
|
)
|
||||||
if self.tgt_sr != resample_sr >= 16000:
|
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_info = (
|
||||||
"Index:\n%s." % file_index
|
"Index:\n%s." % file_index
|
||||||
if os.path.exists(file_index)
|
if os.path.exists(file_index)
|
||||||
@ -218,7 +220,7 @@ class VC:
|
|||||||
return (
|
return (
|
||||||
"Success.\n%s\nTime:\nnpy: %.2fs, f0: %.2fs, infer: %.2fs."
|
"Success.\n%s\nTime:\nnpy: %.2fs, f0: %.2fs, infer: %.2fs."
|
||||||
% (index_info, *times),
|
% (index_info, *times),
|
||||||
(self.tgt_sr, audio_opt),
|
(tgt_sr, audio_opt),
|
||||||
)
|
)
|
||||||
except:
|
except:
|
||||||
info = traceback.format_exc()
|
info = traceback.format_exc()
|
||||||
|
Loading…
Reference in New Issue
Block a user