optimize the streaming f0 exatrators (#1168)

This commit is contained in:
yxlllc
2023-09-02 15:45:50 +08:00
committed by GitHub
parent ad85b02ed9
commit 0fc160c03e
3 changed files with 91 additions and 71 deletions

View File

@@ -601,7 +601,7 @@ class RMVPE:
with torch.no_grad():
n_frames = mel.shape[-1]
mel = F.pad(
mel, (0, 32 * ((n_frames - 1) // 32 + 1) - n_frames), mode="reflect"
mel, (0, 32 * ((n_frames - 1) // 32 + 1) - n_frames), mode="constant"
)
if "privateuseone" in str(self.device):
onnx_input_name = self.model.get_inputs()[0].name