From bde50175cdd322a3f0e48bf4afa58869b6b74ea5 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 5 Jun 2024 09:08:22 +0000 Subject: [PATCH] chore(format): run black on main --- gui_v1.py | 2 +- infer/lib/rtrvc.py | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/gui_v1.py b/gui_v1.py index c5e7179..37624f0 100644 --- a/gui_v1.py +++ b/gui_v1.py @@ -116,7 +116,7 @@ if __name__ == "__main__": self.pth_path: str = "" self.index_path: str = "" self.pitch: int = 0 - self.formant=0.0 + self.formant = 0.0 self.sr_type: str = "sr_model" self.block_time: float = 0.25 # s self.threhold: int = -60 diff --git a/infer/lib/rtrvc.py b/infer/lib/rtrvc.py index 8da568c..6e5a5e8 100644 --- a/infer/lib/rtrvc.py +++ b/infer/lib/rtrvc.py @@ -405,7 +405,10 @@ class RVC: if f0method == "rmvpe": f0_extractor_frame = 5120 * ((f0_extractor_frame - 1) // 5120 + 1) - 160 pitch, pitchf = self.get_f0( - input_wav[-f0_extractor_frame:], self.f0_up_key - self.formant_shift, self.n_cpu, f0method + input_wav[-f0_extractor_frame:], + self.f0_up_key - self.formant_shift, + self.n_cpu, + f0method, ) shift = block_frame_16k // 160 self.cache_pitch[:-shift] = self.cache_pitch[shift:].clone() @@ -413,7 +416,9 @@ class RVC: self.cache_pitch[4 - pitch.shape[0] :] = pitch[3:-1] self.cache_pitchf[4 - pitch.shape[0] :] = pitchf[3:-1] cache_pitch = self.cache_pitch[None, -p_len:] - cache_pitchf = self.cache_pitchf[None, -p_len:] * return_length2 / return_length + cache_pitchf = ( + self.cache_pitchf[None, -p_len:] * return_length2 / return_length + ) t4 = ttime() feats = F.interpolate(feats.permute(0, 2, 1), scale_factor=2).permute(0, 2, 1) feats = feats[:, :p_len, :]