mirror of
https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI.git
synced 2025-05-06 20:01:37 +08:00
chore(format): run black on dev (#2002)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
parent
0ab3a3296e
commit
fb69a36068
@ -405,7 +405,10 @@ class RVC:
|
|||||||
if f0method == "rmvpe":
|
if f0method == "rmvpe":
|
||||||
f0_extractor_frame = 5120 * ((f0_extractor_frame - 1) // 5120 + 1) - 160
|
f0_extractor_frame = 5120 * ((f0_extractor_frame - 1) // 5120 + 1) - 160
|
||||||
pitch, pitchf = self.get_f0(
|
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
|
shift = block_frame_16k // 160
|
||||||
self.cache_pitch[:-shift] = self.cache_pitch[shift:].clone()
|
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_pitch[4 - pitch.shape[0] :] = pitch[3:-1]
|
||||||
self.cache_pitchf[4 - pitch.shape[0] :] = pitchf[3:-1]
|
self.cache_pitchf[4 - pitch.shape[0] :] = pitchf[3:-1]
|
||||||
cache_pitch = self.cache_pitch[None, -p_len:]
|
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()
|
t4 = ttime()
|
||||||
feats = F.interpolate(feats.permute(0, 2, 1), scale_factor=2).permute(0, 2, 1)
|
feats = F.interpolate(feats.permute(0, 2, 1), scale_factor=2).permute(0, 2, 1)
|
||||||
feats = feats[:, :p_len, :]
|
feats = feats[:, :p_len, :]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user