more graceful log and shutdown on unified script
This commit is contained in:
BIN
__pycache__/api_server.cpython-310.pyc
Normal file
BIN
__pycache__/api_server.cpython-310.pyc
Normal file
Binary file not shown.
Binary file not shown.
BIN
__pycache__/unified_soprano_rvc.cpython-310.pyc
Normal file
BIN
__pycache__/unified_soprano_rvc.cpython-310.pyc
Normal file
Binary file not shown.
@@ -241,7 +241,14 @@ class HeadlessRVC:
|
|||||||
finally:
|
finally:
|
||||||
os.chdir(saved_cwd)
|
os.chdir(saved_cwd)
|
||||||
|
|
||||||
|
# Get target sample rate (with fallback)
|
||||||
|
if hasattr(self.rvc, 'tgt_sr') and self.rvc.tgt_sr:
|
||||||
self.tgt_sr = self.rvc.tgt_sr
|
self.tgt_sr = self.rvc.tgt_sr
|
||||||
|
else:
|
||||||
|
# Fallback to config sample rate if tgt_sr not set
|
||||||
|
logger.warning("RVC tgt_sr not set, using config sample rate")
|
||||||
|
self.tgt_sr = self.gui_config.samplerate
|
||||||
|
|
||||||
self.gui_config.samplerate = (
|
self.gui_config.samplerate = (
|
||||||
self.tgt_sr if self.tgt_sr else self.gui_config.samplerate
|
self.tgt_sr if self.tgt_sr else self.gui_config.samplerate
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user