mirror of
https://github.com/fumiama/Retrieval-based-Voice-Conversion-WebUI.git
synced 2026-06-09 04:29:50 +08:00
chore(format): run black on dev (#54)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
3b7d7c6d1a
commit
cc11ad460d
@@ -36,10 +36,15 @@ class FCPE(F0Predictor):
|
|||||||
p_len = wav.shape[0] // self.hop_length
|
p_len = wav.shape[0] // self.hop_length
|
||||||
if not torch.is_tensor(wav):
|
if not torch.is_tensor(wav):
|
||||||
wav = torch.from_numpy(wav)
|
wav = torch.from_numpy(wav)
|
||||||
f0 = self.model.infer(
|
f0 = (
|
||||||
wav.float().to(self.device).unsqueeze(0),
|
self.model.infer(
|
||||||
sr=self.sampling_rate,
|
wav.float().to(self.device).unsqueeze(0),
|
||||||
decoder_mode="local_argmax",
|
sr=self.sampling_rate,
|
||||||
threshold=filter_radius,
|
decoder_mode="local_argmax",
|
||||||
).squeeze().cpu().numpy()
|
threshold=filter_radius,
|
||||||
|
)
|
||||||
|
.squeeze()
|
||||||
|
.cpu()
|
||||||
|
.numpy()
|
||||||
|
)
|
||||||
return self._interpolate_f0(self._resize_f0(f0, p_len))[0]
|
return self._interpolate_f0(self._resize_f0(f0, p_len))[0]
|
||||||
|
|||||||
Reference in New Issue
Block a user