mirror of
https://github.com/w-okada/voice-changer.git
synced 2025-03-14 20:03:59 +03:00
handle pipeline initialization
This commit is contained in:
parent
fa6944ce9e
commit
43920fda4c
@ -32,6 +32,7 @@ from Exceptions import (
|
|||||||
NoModeLoadedException,
|
NoModeLoadedException,
|
||||||
NotEnoughDataExtimateF0,
|
NotEnoughDataExtimateF0,
|
||||||
ONNXInputArgumentException,
|
ONNXInputArgumentException,
|
||||||
|
PipelineNotInitializedException,
|
||||||
VoiceChangerIsNotSelectedException,
|
VoiceChangerIsNotSelectedException,
|
||||||
)
|
)
|
||||||
from voice_changer.utils.VoiceChangerParams import VoiceChangerParams
|
from voice_changer.utils.VoiceChangerParams import VoiceChangerParams
|
||||||
@ -316,6 +317,9 @@ class VoiceChangerV2(VoiceChangerIF):
|
|||||||
except DeviceCannotSupportHalfPrecisionException:
|
except DeviceCannotSupportHalfPrecisionException:
|
||||||
# RVC.pyでfallback処理をするので、ここはダミーデータ返すだけ。
|
# RVC.pyでfallback処理をするので、ここはダミーデータ返すだけ。
|
||||||
return np.zeros(1).astype(np.int16), [0, 0, 0]
|
return np.zeros(1).astype(np.int16), [0, 0, 0]
|
||||||
|
except PipelineNotInitializedException:
|
||||||
|
logger.warn("[Voice Changer] Waiting generate pipeline...")
|
||||||
|
return np.zeros(1024).astype(np.int16), [0, 0, 0]
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.warn(f"[Voice Changer] VC PROCESSING EXCEPTION!!! {e}")
|
logger.warn(f"[Voice Changer] VC PROCESSING EXCEPTION!!! {e}")
|
||||||
logger.exception(e)
|
logger.exception(e)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user