Skip to content

Commit

Permalink
removed extra returned value that blows up the pipeline in case the i…
Browse files Browse the repository at this point in the history
…nferred audio segment is empty (all zeros)
  • Loading branch information
AznamirWoW committed Dec 24, 2024
1 parent 12e6a97 commit d41a741
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions rvc/lib/predictors/FCPE.py
Original file line number Diff line number Diff line change
Expand Up @@ -904,9 +904,7 @@ def compute_f0(self, wav, p_len=None):
p_len = x.shape[0] // self.hop_length if p_len is None else p_len
f0 = self.fcpe(x, sr=self.sample_rate, threshold=self.threshold)[0, :, 0]
if torch.all(f0 == 0):
return f0.cpu().numpy() if p_len is None else np.zeros(p_len), (
f0.cpu().numpy() if p_len is None else np.zeros(p_len)
)
return f0.cpu().numpy() if p_len is None else np.zeros(p_len)
return self.post_process(x, self.sample_rate, f0, p_len)[0]

def compute_f0_uv(self, wav, p_len=None):
Expand Down

0 comments on commit d41a741

Please sign in to comment.