mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-11-24 04:19:48 +01:00
fix: "ASR", "LLM", "TTS"为空时的情况
This commit is contained in:
parent
86f5be23fe
commit
9a405a756f
1 changed files with 6 additions and 0 deletions
|
|
@ -82,6 +82,8 @@ def ensure_directories(config):
|
|||
|
||||
# ASR/TTS模块输出目录
|
||||
for module in ["ASR", "TTS"]:
|
||||
if config.get(module) is None:
|
||||
continue
|
||||
for provider in config.get(module, {}).values():
|
||||
output_dir = provider.get("output_dir", "")
|
||||
if output_dir:
|
||||
|
|
@ -93,6 +95,10 @@ def ensure_directories(config):
|
|||
selected_provider = selected_modules.get(module_type)
|
||||
if not selected_provider:
|
||||
continue
|
||||
if config.get(module) is None:
|
||||
continue
|
||||
if config.get(selected_provider) is None:
|
||||
continue
|
||||
provider_config = config.get(module_type, {}).get(selected_provider, {})
|
||||
output_dir = provider_config.get("output_dir")
|
||||
if output_dir:
|
||||
|
|
|
|||
Loading…
Reference in a new issue