From 73560448a8d4bb098c1fd38c1fc4292f2c8fb545 Mon Sep 17 00:00:00 2001 From: Matej Tkac <105047985+matej-tkac@users.noreply.github.com> Date: Thu, 10 Aug 2023 03:28:30 +0100 Subject: [PATCH] replace np.int with np.int32 (#948) ref: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations --- gui_v0.py | 2 +- guidml.py | 2 +- rvc_for_realtime.py | 2 +- tools/infer/infer-pm-index256.py | 2 +- vc_infer_pipeline.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/gui_v0.py b/gui_v0.py index 407c9bc..0180c1a 100644 --- a/gui_v0.py +++ b/gui_v0.py @@ -131,7 +131,7 @@ class RVC: ) + 1 f0_mel[f0_mel <= 1] = 1 f0_mel[f0_mel > 255] = 255 - f0_coarse = np.rint(f0_mel).astype(np.int) + f0_coarse = np.rint(f0_mel).astype(np.int32) return f0_coarse, f0bak # 1-0 def infer(self, feats: torch.Tensor) -> np.ndarray: diff --git a/guidml.py b/guidml.py index aadf22d..75ec97e 100644 --- a/guidml.py +++ b/guidml.py @@ -145,7 +145,7 @@ class RVC: ) + 1 f0_mel[f0_mel <= 1] = 1 f0_mel[f0_mel > 255] = 255 - f0_coarse = np.rint(f0_mel).astype(np.int) + f0_coarse = np.rint(f0_mel).astype(np.int32) return f0_coarse, f0bak # 1-0 def infer(self, feats: torch.Tensor) -> np.ndarray: diff --git a/rvc_for_realtime.py b/rvc_for_realtime.py index 132e80c..da48794 100644 --- a/rvc_for_realtime.py +++ b/rvc_for_realtime.py @@ -100,7 +100,7 @@ class RVC: ) + 1 f0_mel[f0_mel <= 1] = 1 f0_mel[f0_mel > 255] = 255 - f0_coarse = np.rint(f0_mel).astype(np.int) + f0_coarse = np.rint(f0_mel).astype(np.int32) return f0_coarse, f0bak def get_f0(self, x, f0_up_key, n_cpu, method="harvest"): diff --git a/tools/infer/infer-pm-index256.py b/tools/infer/infer-pm-index256.py index d182e20..2ab44e1 100644 --- a/tools/infer/infer-pm-index256.py +++ b/tools/infer/infer-pm-index256.py @@ -112,7 +112,7 @@ def get_f0(x, p_len, f0_up_key=0): f0_mel[f0_mel <= 1] = 1 f0_mel[f0_mel > 255] = 255 # f0_mel[f0_mel > 188] = 188 - f0_coarse = np.rint(f0_mel).astype(np.int) + f0_coarse = np.rint(f0_mel).astype(np.int32) return f0_coarse, f0bak diff --git a/vc_infer_pipeline.py b/vc_infer_pipeline.py index 672033b..7b3fe86 100644 --- a/vc_infer_pipeline.py +++ b/vc_infer_pipeline.py @@ -158,7 +158,7 @@ class VC(object): ) + 1 f0_mel[f0_mel <= 1] = 1 f0_mel[f0_mel > 255] = 255 - f0_coarse = np.rint(f0_mel).astype(np.int) + f0_coarse = np.rint(f0_mel).astype(np.int32) return f0_coarse, f0bak # 1-0 def vc(