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