mirror of
https://github.com/w-okada/voice-changer.git
synced 2025-02-02 16:23:58 +03:00
modification
This commit is contained in:
parent
4d6d5a27cb
commit
21f098e8ec
@ -331,8 +331,8 @@ class MMVCv15:
|
||||
else:
|
||||
audio = self._pyTorch_inference(data)
|
||||
return audio
|
||||
except onnxruntime.capi.onnxruntime_pybind11_state.InvalidArgument as e:
|
||||
print(e)
|
||||
except onnxruntime.capi.onnxruntime_pybind11_state.InvalidArgument as _e:
|
||||
print(_e)
|
||||
raise ONNXInputArgumentException()
|
||||
|
||||
def __del__(self):
|
||||
|
@ -52,6 +52,6 @@ class CrepePitchExtractor(PitchExtractor):
|
||||
) + 1
|
||||
f0_mel[f0_mel <= 1] = 1
|
||||
f0_mel[f0_mel > 255] = 255
|
||||
f0_coarse = np.rint(f0_mel).astype(np.int)
|
||||
f0_coarse = np.rint(f0_mel).astype(int)
|
||||
|
||||
return f0_coarse, f0bak
|
||||
|
@ -37,6 +37,6 @@ class DioPitchExtractor(PitchExtractor):
|
||||
) + 1
|
||||
f0_mel[f0_mel <= 1] = 1
|
||||
f0_mel[f0_mel > 255] = 255
|
||||
f0_coarse = np.rint(f0_mel).astype(np.int)
|
||||
f0_coarse = np.rint(f0_mel).astype(int)
|
||||
|
||||
return f0_coarse, f0bak
|
||||
|
@ -38,6 +38,6 @@ class HarvestPitchExtractor(PitchExtractor):
|
||||
) + 1
|
||||
f0_mel[f0_mel <= 1] = 1
|
||||
f0_mel[f0_mel > 255] = 255
|
||||
f0_coarse = np.rint(f0_mel).astype(np.int)
|
||||
f0_coarse = np.rint(f0_mel).astype(int)
|
||||
|
||||
return f0_coarse, f0bak
|
||||
|
@ -98,7 +98,7 @@ class VoiceChangerSettings:
|
||||
|
||||
|
||||
class VoiceChanger:
|
||||
settings: VoiceChangerSettings
|
||||
settings: VoiceChangerSettings = VoiceChangerSettings()
|
||||
voiceChanger: VoiceChangerModel | None = None
|
||||
ioRecorder: IORecorder
|
||||
sola_buffer: AudioInOut
|
||||
@ -352,7 +352,7 @@ class VoiceChanger:
|
||||
def update_settings(self, key: str, val: Any):
|
||||
if self.voiceChanger is None:
|
||||
print("[Voice Changer] Voice Changer is not selected.")
|
||||
return
|
||||
return self.get_info()
|
||||
|
||||
if key in self.settings.intData:
|
||||
setattr(self.settings, key, int(val))
|
||||
@ -567,7 +567,7 @@ class VoiceChanger:
|
||||
print("[Voice Changer] [Exception]", e)
|
||||
return np.zeros(1).astype(np.int16), [0, 0, 0]
|
||||
except ONNXInputArgumentException as e:
|
||||
print("[Voice Changer] [Exception]", e)
|
||||
print("[Voice Changer] [Exception] onnx are waiting valid input.", e)
|
||||
return np.zeros(1).astype(np.int16), [0, 0, 0]
|
||||
except HalfPrecisionChangingException as e:
|
||||
print("[Voice Changer] Switching model configuration....", e)
|
||||
|
Loading…
Reference in New Issue
Block a user