From 112bc366aacc3ba9bff521020ac375d422ce5d92 Mon Sep 17 00:00:00 2001 From: Sarah Date: Fri, 4 Aug 2023 08:41:47 +0200 Subject: [PATCH] add rmvpe to hybrid implementation --- vc_infer_pipeline.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/vc_infer_pipeline.py b/vc_infer_pipeline.py index 43cd829..cb72c68 100644 --- a/vc_infer_pipeline.py +++ b/vc_infer_pipeline.py @@ -224,6 +224,16 @@ class VC(object): if filter_radius > 2: f0 = signal.medfilt(f0, 3) f0 = f0[1:] # Get rid of first frame. + elif method == "rmvpe": + if hasattr(self, "model_rmvpe") == False: + from rmvpe import RMVPE + + print("loading rmvpe model") + self.model_rmvpe = RMVPE( + "rmvpe.pt", is_half=self.is_half, device=self.device + ) + f0 = self.model_rmvpe.infer_from_audio(x, thred=0.03) + f0 = f0[1:] # Get rid of first frame. elif method == "dio": # Potentially buggy? f0, t = pyworld.dio( x.astype(np.double),