mirror of
https://github.com/w-okada/voice-changer.git
synced 2025-02-09 03:37:51 +03:00
mend
This commit is contained in:
parent
78ccc10a53
commit
2b452ead0b
@ -180,7 +180,7 @@ class Pipeline(object):
|
|||||||
with torch.no_grad():
|
with torch.no_grad():
|
||||||
audio1 = (
|
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
|
.data
|
||||||
.to(dtype=torch.int16)
|
.to(dtype=torch.int16)
|
||||||
|
@ -27,7 +27,7 @@ class CrepePitchExtractor(PitchExtractor):
|
|||||||
f0_mel_max = 1127 * np.log(1 + f0_max / 700)
|
f0_mel_max = 1127 * np.log(1 + f0_max / 700)
|
||||||
|
|
||||||
f0 = torchcrepe.predict(
|
f0 = torchcrepe.predict(
|
||||||
torch.tensor(audio).unsqueeze(0),
|
audio.unsqueeze(0),
|
||||||
sr,
|
sr,
|
||||||
hop_length=window,
|
hop_length=window,
|
||||||
fmin=f0_min,
|
fmin=f0_min,
|
||||||
|
Loading…
Reference in New Issue
Block a user