From aa3cfd887a72d042272410a57ac2e1353f6ddd86 Mon Sep 17 00:00:00 2001 From: Soulter <905617992@qq.com> Date: Thu, 27 Feb 2025 11:33:53 +0800 Subject: [PATCH] fix: correct STT model path and improve logging in provider manager and pip installer --- astrbot/core/config/default.py | 2 +- astrbot/core/provider/manager.py | 2 +- astrbot/core/utils/pip_installer.py | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/astrbot/core/config/default.py b/astrbot/core/config/default.py index 672b9f741..402f04fde 100644 --- a/astrbot/core/config/default.py +++ b/astrbot/core/config/default.py @@ -588,7 +588,7 @@ CONFIG_METADATA_2 = { "enable": False, "id": "sensevoice", "type": "sensevoice_stt_selfhost", - "stt_model": "icc/SenseVoiceSmall", + "stt_model": "iic/SenseVoiceSmall", "is_emotion": False, }, "OpenAI_TTS(API)": { diff --git a/astrbot/core/provider/manager.py b/astrbot/core/provider/manager.py index 3d97cdd13..8bdf912a4 100644 --- a/astrbot/core/provider/manager.py +++ b/astrbot/core/provider/manager.py @@ -219,7 +219,7 @@ class ProviderManager(): self.inst_map[provider_config['id']] = inst except Exception as e: - traceback.print_exc() + logger.error(traceback.format_exc()) logger.error(f"实例化 {provider_config['type']}({provider_config['id']}) 提供商适配器失败:{e}") async def reload(self, provider_config: dict): diff --git a/astrbot/core/utils/pip_installer.py b/astrbot/core/utils/pip_installer.py index cf595d512..672df6bc9 100644 --- a/astrbot/core/utils/pip_installer.py +++ b/astrbot/core/utils/pip_installer.py @@ -1,6 +1,7 @@ import logging from pip import main as pip_main +logger = logging.getLogger("astrbot") class PipInstaller(): def __init__(self, pip_install_arg: str): self.pip_install_arg = pip_install_arg @@ -20,7 +21,7 @@ class PipInstaller(): if self.pip_install_arg: args.extend(self.pip_install_arg.split()) - print(f"Pip 包管理器: {' '.join(args)}") + logger.info(f"Pip 包管理器: pip {' '.join(args)}") result_code = pip_main(args)