mirror of
https://github.com/w-okada/voice-changer.git
synced 2025-01-23 21:45:00 +03:00
Bugfix: RVC fallback
This commit is contained in:
parent
130ae7e398
commit
bde95029b3
@ -191,11 +191,11 @@ class RVC(VoiceChangerModel):
|
|||||||
result = audio_out.detach().cpu().numpy() * np.sqrt(vol)
|
result = audio_out.detach().cpu().numpy() * np.sqrt(vol)
|
||||||
|
|
||||||
return result
|
return result
|
||||||
except DeviceCannotSupportHalfPrecisionException as e:
|
except DeviceCannotSupportHalfPrecisionException as e: # NOQA
|
||||||
print("[Device Manager] Device cannot support half precision. Fallback to float....")
|
print("[Device Manager] Device cannot support half precision. Fallback to float....")
|
||||||
self.deviceManager.setForceTensor(True)
|
self.deviceManager.setForceTensor(True)
|
||||||
self.prepareModel(self.settings.modelSlotIndex)
|
self.initialize()
|
||||||
raise e
|
# raise e
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@ -10,7 +10,6 @@ import resampy
|
|||||||
|
|
||||||
|
|
||||||
from voice_changer.IORecorder import IORecorder
|
from voice_changer.IORecorder import IORecorder
|
||||||
from voice_changer.utils.LoadModelParams import LoadModelParams
|
|
||||||
|
|
||||||
from voice_changer.utils.Timer import Timer
|
from voice_changer.utils.Timer import Timer
|
||||||
from voice_changer.utils.VoiceChangerModel import AudioInOut, VoiceChangerModel
|
from voice_changer.utils.VoiceChangerModel import AudioInOut, VoiceChangerModel
|
||||||
@ -90,16 +89,6 @@ class VoiceChanger:
|
|||||||
else:
|
else:
|
||||||
return {"status": "OK", "vc": "none"}
|
return {"status": "OK", "vc": "none"}
|
||||||
|
|
||||||
def loadModel(self, props: LoadModelParams):
|
|
||||||
try:
|
|
||||||
if self.voiceChanger is None:
|
|
||||||
raise VoiceChangerIsNotSelectedException("Voice Changer is not selected.")
|
|
||||||
return self.voiceChanger.loadModel(props)
|
|
||||||
except Exception as e:
|
|
||||||
print(traceback.format_exc())
|
|
||||||
print("[Voice Changer] Model Load Error! Check your model is valid.", e)
|
|
||||||
return {"status": "NG"}
|
|
||||||
|
|
||||||
def get_info(self):
|
def get_info(self):
|
||||||
data = asdict(self.settings)
|
data = asdict(self.settings)
|
||||||
if self.voiceChanger is not None:
|
if self.voiceChanger is not None:
|
||||||
|
Loading…
Reference in New Issue
Block a user