Fix alignment error of rmvpe for real-time GUI (#1275)

* loudness factor control and gpu-accelerated noise reduction

* loudness factor control and gpu-accelerated noise reduction

* loudness factor control and gpu-accelerated noise reduction

* streaming noise reduction and other optimizations

* streaming noise reduction and other optimizations

* fix alignment error of rmvpe
This commit is contained in:
yxlllc 2023-09-18 22:31:00 +08:00 committed by GitHub
parent aa2ed8e646
commit cfba44f24f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -623,7 +623,7 @@ if __name__ == "__main__":
# infer # infer
f0_extractor_frame = self.block_frame_16k + 800 f0_extractor_frame = self.block_frame_16k + 800
if self.config.f0method == "rmvpe": if self.config.f0method == "rmvpe":
f0_extractor_frame = 5120 * ((f0_extractor_frame - 1) // 5120 + 1) f0_extractor_frame = 5120 * ((f0_extractor_frame - 1) // 5120 + 1) - 160
infer_wav = self.rvc.infer( infer_wav = self.rvc.infer(
self.input_wav_res, self.input_wav_res,
self.input_wav_res[-f0_extractor_frame:].cpu().numpy(), self.input_wav_res[-f0_extractor_frame:].cpu().numpy(),