diff --git a/server/voice_changer/RVC/pipeline/Pipeline.py b/server/voice_changer/RVC/pipeline/Pipeline.py index 34612c7f..e44d0e6c 100644 --- a/server/voice_changer/RVC/pipeline/Pipeline.py +++ b/server/voice_changer/RVC/pipeline/Pipeline.py @@ -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) diff --git a/server/voice_changer/RVC/pitchExtractor/CrepePitchExtractor.py b/server/voice_changer/RVC/pitchExtractor/CrepePitchExtractor.py index d1849f02..493ef945 100644 --- a/server/voice_changer/RVC/pitchExtractor/CrepePitchExtractor.py +++ b/server/voice_changer/RVC/pitchExtractor/CrepePitchExtractor.py @@ -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,