Skip to content

Commit

Permalink
Merge pull request #90 from RinLovesYou/main
Browse files Browse the repository at this point in the history
add rmvpe to hybrid implementation
  • Loading branch information
kalomaze committed Aug 21, 2023
2 parents 7c46f9c + 112bc36 commit 62f7a26
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions vc_infer_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,16 @@ def get_f0_hybrid_computation(
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),
Expand Down

0 comments on commit 62f7a26

Please sign in to comment.