This commit is contained in:
nadare 2023-05-28 16:47:13 +09:00
parent 78ccc10a53
commit 2b452ead0b
2 changed files with 2 additions and 2 deletions

View File

@ -180,7 +180,7 @@ class Pipeline(object):
with torch.no_grad():
audio1 = (
(
torch.clip(self.inferencer.infer(feats, p_len, pitch, pitchf, sid)[0][0, 0], -1., 1.) * 32767.5 - .5
torch.clip(self.inferencer.infer(feats, p_len, pitch, pitchf, sid)[0][0, 0].to(dtype=torch.float32), -1., 1.) * 32767.5 - .5
)
.data
.to(dtype=torch.int16)

View File

@ -27,7 +27,7 @@ class CrepePitchExtractor(PitchExtractor):
f0_mel_max = 1127 * np.log(1 + f0_max / 700)
f0 = torchcrepe.predict(
torch.tensor(audio).unsqueeze(0),
audio.unsqueeze(0),
sr,
hop_length=window,
fmin=f0_min,