diff --git a/main/manager-api/src/main/java/xiaozhi/modules/security/controller/LoginController.java b/main/manager-api/src/main/java/xiaozhi/modules/security/controller/LoginController.java index f83e49db..b4bacd42 100644 --- a/main/manager-api/src/main/java/xiaozhi/modules/security/controller/LoginController.java +++ b/main/manager-api/src/main/java/xiaozhi/modules/security/controller/LoginController.java @@ -121,7 +121,7 @@ public class LoginController { @Operation(summary = "公共配置") public Result> pubConfig() { Map config = new HashMap<>(); - config.put("version", "0.3.3"); + config.put("version", "0.3.4"); config.put("allowUserRegister", sysUserService.getAllowUserRegister()); return new Result>().ok(config); } diff --git a/main/manager-api/src/main/resources/db/changelog/202504151205.sql b/main/manager-api/src/main/resources/db/changelog/202504151206.sql similarity index 80% rename from main/manager-api/src/main/resources/db/changelog/202504151205.sql rename to main/manager-api/src/main/resources/db/changelog/202504151206.sql index 0b72121e..cb51cef9 100644 --- a/main/manager-api/src/main/resources/db/changelog/202504151205.sql +++ b/main/manager-api/src/main/resources/db/changelog/202504151206.sql @@ -21,3 +21,8 @@ INSERT INTO `ai_tts_voice` VALUES delete from `sys_params` where id in (103,104); INSERT INTO `sys_params` (id, param_code, param_value, value_type, param_type, remark) VALUES (103, 'server.allow_user_register', 'false', 'boolean', 1, '是否运行管理员以外的人注册'); INSERT INTO `sys_params` (id, param_code, param_value, value_type, param_type, remark) VALUES (104, 'server.fronted_url', 'http://xiaozhi.server.com', 'string', 1, '下发六位验证码时显示的控制面板地址'); + +-- 修正CosyVoiceSiliconflow音色 +delete from `ai_tts_voice` where tts_model_id = 'TTS_CosyVoiceSiliconflow'; +INSERT INTO `ai_tts_voice` VALUES ('TTS_CosyVoiceSiliconflow0001', 'TTS_CosyVoiceSiliconflow', 'CosyVoice男声', 'FunAudioLLM/CosyVoice2-0.5B:alex', '中文', 'https://example.com/cosyvoice/alex.mp3', NULL, 6, NULL, NULL, NULL, NULL); +INSERT INTO `ai_tts_voice` VALUES ('TTS_CosyVoiceSiliconflow0002', 'TTS_CosyVoiceSiliconflow', 'CosyVoice女声', 'FunAudioLLM/CosyVoice2-0.5B:bella', '中文', 'https://example.com/cosyvoice/bella.mp3', NULL, 6, NULL, NULL, NULL, NULL); diff --git a/main/manager-api/src/main/resources/db/changelog/202504151547.sql b/main/manager-api/src/main/resources/db/changelog/202504151547.sql deleted file mode 100644 index e48a077c..00000000 --- a/main/manager-api/src/main/resources/db/changelog/202504151547.sql +++ /dev/null @@ -1,4 +0,0 @@ --- 修正CosyVoiceSiliconflow音色 -delete from `ai_tts_voice` where tts_model_id = 'TTS_CosyVoiceSiliconflow'; -INSERT INTO `ai_tts_voice` VALUES ('TTS_CosyVoiceSiliconflow0001', 'TTS_CosyVoiceSiliconflow', 'CosyVoice男声', 'FunAudioLLM/CosyVoice2-0.5B:alex', '中文', 'https://example.com/cosyvoice/alex.mp3', NULL, 6, NULL, NULL, NULL, NULL); -INSERT INTO `ai_tts_voice` VALUES ('TTS_CosyVoiceSiliconflow0002', 'TTS_CosyVoiceSiliconflow', 'CosyVoice女声', 'FunAudioLLM/CosyVoice2-0.5B:bella', '中文', 'https://example.com/cosyvoice/bella.mp3', NULL, 6, NULL, NULL, NULL, NULL); \ No newline at end of file diff --git a/main/manager-api/src/main/resources/db/changelog/db.changelog-master.yaml b/main/manager-api/src/main/resources/db/changelog/db.changelog-master.yaml index 7060e32c..178f9ebe 100755 --- a/main/manager-api/src/main/resources/db/changelog/db.changelog-master.yaml +++ b/main/manager-api/src/main/resources/db/changelog/db.changelog-master.yaml @@ -52,9 +52,9 @@ databaseChangeLog: encoding: utf8 path: classpath:db/changelog/202504112058.sql - changeSet: - id: 202504151205 + id: 202504151206 author: John changes: - sqlFile: encoding: utf8 - path: classpath:db/changelog/202504151205.sql + path: classpath:db/changelog/202504151206.sql diff --git a/main/xiaozhi-server/config/logger.py b/main/xiaozhi-server/config/logger.py index 96d1fe65..025be960 100644 --- a/main/xiaozhi-server/config/logger.py +++ b/main/xiaozhi-server/config/logger.py @@ -3,7 +3,7 @@ import sys from loguru import logger from config.config_loader import load_config -SERVER_VERSION = "0.3.3" +SERVER_VERSION = "0.3.4" def get_module_abbreviation(module_name, module_dict): diff --git a/main/xiaozhi-server/core/connection.py b/main/xiaozhi-server/core/connection.py index 33d93347..283fe3f6 100644 --- a/main/xiaozhi-server/core/connection.py +++ b/main/xiaozhi-server/core/connection.py @@ -269,8 +269,6 @@ class ConnectionHandler: self.config["selected_module"]["Intent"] = private_config[ "selected_module" ]["Intent"] - if private_config.get("prompt", None) is not None: - self.config["prompt"] = private_config["prompt"] try: modules = initialize_modules( self.logger, diff --git a/main/xiaozhi-server/core/utils/util.py b/main/xiaozhi-server/core/utils/util.py index 7f998c5a..238bf5cb 100644 --- a/main/xiaozhi-server/core/utils/util.py +++ b/main/xiaozhi-server/core/utils/util.py @@ -237,7 +237,7 @@ def initialize_modules( # 初始化LLM模块 if init_llm: - select_llm_module = config["selected_module"]["TTS"] + select_llm_module = config["selected_module"]["LLM"] llm_type = ( select_llm_module if "type" not in config["LLM"][select_llm_module] @@ -307,8 +307,8 @@ def initialize_modules( logger.bind(tag=TAG).info(f"初始化组件: asr成功 {select_asr_module}") # 初始化自定义prompt - if config["prompt"]: + if config.get("prompt", None) is not None: modules["prompt"] = config["prompt"] - logger.bind(tag=TAG).info(f"初始化组件: prompt成功 {modules['prompt'][:30]}") + logger.bind(tag=TAG).info(f"初始化组件: prompt成功 {modules['prompt'][:50]}...") return modules