mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-07-22 15:13:55 +08:00
update:增加腾讯TTS、腾讯ASR供应器 (#918)
Co-authored-by: 欣南科技 <huangrongzhuang@xin-nan.com>
This commit is contained in:
+1
-1
@@ -291,7 +291,7 @@ public class ConfigServiceImpl implements ConfigService {
|
||||
|
||||
result.put("selected_module", selectedModule);
|
||||
if (StringUtils.isNotBlank(prompt)) {
|
||||
prompt = prompt.replace("{{assistant_name}}", "小智");
|
||||
prompt = prompt.replace("{{assistant_name}}", StringUtils.isBlank(assistantName) ? "小智" : assistantName);
|
||||
}
|
||||
result.put("prompt", prompt);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
-- 删除无用模型供应器
|
||||
delete from `ai_model_provider` where id = 'SYSTEM_LLM_doubao';
|
||||
delete from `ai_model_provider` where id = 'SYSTEM_LLM_chatglm';
|
||||
delete from `ai_model_provider` where id = 'SYSTEM_TTS_302ai';
|
||||
delete from `ai_model_provider` where id = 'SYSTEM_TTS_gizwits';
|
||||
|
||||
-- 添加模型供应器
|
||||
delete from `ai_model_provider` where id = 'SYSTEM_ASR_TencentASR';
|
||||
INSERT INTO `ai_model_provider` (`id`, `model_type`, `provider_code`, `name`, `fields`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES
|
||||
('SYSTEM_ASR_TencentASR', 'ASR', 'tencent', '腾讯语音识别', '[{"key":"appid","label":"应用ID","type":"string"},{"key":"secret_id","label":"Secret ID","type":"string"},{"key":"secret_key","label":"Secret Key","type":"string"},{"key":"output_dir","label":"输出目录","type":"string"}]', 4, 1, NOW(), 1, NOW());
|
||||
|
||||
-- 添加腾讯语音合成模型供应器
|
||||
delete from `ai_model_provider` where id = 'SYSTEM_TTS_TencentTTS';
|
||||
INSERT INTO `ai_model_provider` (`id`, `model_type`, `provider_code`, `name`, `fields`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES
|
||||
('SYSTEM_TTS_TencentTTS', 'TTS', 'tencent', '腾讯语音合成', '[{"key":"appid","label":"应用ID","type":"string"},{"key":"secret_id","label":"Secret ID","type":"string"},{"key":"secret_key","label":"Secret Key","type":"string"},{"key":"output_dir","label":"输出目录","type":"string"},{"key":"region","label":"区域","type":"string"},{"key":"voice","label":"音色ID","type":"string"}]', 5, 1, NOW(), 1, NOW());
|
||||
|
||||
-- 添加腾讯语音合成音色
|
||||
delete from `ai_tts_voice` where id = 'TTS_TencentTTS0001';
|
||||
INSERT INTO `ai_tts_voice` VALUES ('TTS_TencentTTS0001', 'TTS_TencentTTS', '智瑜', '101001', '中文', NULL, NULL, 1, NULL, NULL, NULL, NULL);
|
||||
@@ -65,3 +65,10 @@ databaseChangeLog:
|
||||
- sqlFile:
|
||||
encoding: utf8
|
||||
path: classpath:db/changelog/202504181536.sql
|
||||
- changeSet:
|
||||
id: 202504211118
|
||||
author: John
|
||||
changes:
|
||||
- sqlFile:
|
||||
encoding: utf8
|
||||
path: classpath:db/changelog/202504211118.sql
|
||||
Reference in New Issue
Block a user