Skip to content

Commit

Permalink
fix: correct STT model path and improve logging in provider manager a…
Browse files Browse the repository at this point in the history
…nd pip installer
  • Loading branch information
Soulter committed Feb 27, 2025
1 parent a991f8a commit 878da13
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion astrbot/core/config/default.py
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@
"enable": False,
"id": "sensevoice",
"type": "sensevoice_stt_selfhost",
"stt_model": "icc/SenseVoiceSmall",
"stt_model": "iic/SenseVoiceSmall",
"is_emotion": False,
},
"OpenAI_TTS(API)": {
Expand Down
2 changes: 1 addition & 1 deletion astrbot/core/provider/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ async def load_provider(self, provider_config: dict):

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):
Expand Down
3 changes: 2 additions & 1 deletion astrbot/core/utils/pip_installer.py
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -20,7 +21,7 @@ def install(self, package_name: str = None, requirements_path: str = None, mirro
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)

Expand Down

0 comments on commit 878da13

Please sign in to comment.