update: 增加火山流式情感字段支持

This commit is contained in:
Sakura-RanChen
2025-12-30 16:46:04 +08:00
parent c511766e9d
commit d1f6774e58
4 changed files with 61 additions and 9 deletions
@@ -25,6 +25,7 @@ UPDATE `ai_model_config` SET
- max_sentence_silence: VAD断句静音时长阈值(200-6000ms)
' WHERE `id` = 'ASR_AliyunBLStream';
-- 更新豆包流式ASR供应器,增加配置
delete from `ai_model_provider` where id = 'SYSTEM_ASR_DoubaoStreamASR';
INSERT INTO `ai_model_provider` (`id`, `model_type`, `provider_code`, `name`, `fields`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES
@@ -46,7 +47,6 @@ UPDATE `ai_model_config` SET
language当该键为空时西https://www.volcengine.com/docs/6561/1354869
' WHERE `id` = 'ASR_DoubaoStreamASR';
-- 更新豆包流式ASR模型配置,增加enable_multilingual默认值
UPDATE `ai_model_config` SET
`config_json` = JSON_SET(
@@ -57,3 +57,38 @@ UPDATE `ai_model_config` SET
WHERE `id` = 'ASR_DoubaoStreamASR'
AND JSON_EXTRACT(`config_json`, '$.enable_multilingual') IS NULL
AND JSON_EXTRACT(`config_json`, '$.language') IS NULL;
-- 更新HuoshanDoubleStreamTTS供应器配置,增加多情感音色参数
UPDATE `ai_model_provider`
SET `fields` = '[{"key": "ws_url", "type": "string", "label": "WebSocket地址"}, {"key": "appid", "type": "string", "label": "应用ID"}, {"key": "access_token", "type": "string", "label": "访问令牌"}, {"key": "resource_id", "type": "string", "label": "资源ID"}, {"key": "speaker", "type": "string", "label": "默认音色"}, {"key": "enable_ws_reuse", "type": "boolean", "label": "是否开启链接复用", "default": true}, {"key": "speech_rate", "type": "number", "label": "语速(-50~100)"}, {"key": "loudness_rate", "type": "number", "label": "音量(-50~100)"}, {"key": "pitch", "type": "number", "label": "音高(-12~12)"}, {"key": "emotion_scale", "type": "number", "label": "情感强度(1-5)"}, {"key": "emotion", "type": "string", "label": "情感类型"}]'
WHERE `id` = 'SYSTEM_TTS_HSDSTTS';
-- 更新默认值
UPDATE `ai_model_config` SET
`config_json` = JSON_SET(
`config_json`,
'$.emotion', 'neutral',
'$.emotion_scale', 4
)
WHERE `id` = 'TTS_HuoshanDoubleStreamTTS'
AND JSON_EXTRACT(`config_json`, '$.emotion') IS NULL
AND JSON_EXTRACT(`config_json`, '$.emotion_scale') IS NULL;
-- 增加文档链接和备注
UPDATE `ai_model_config` SET
`doc_link` = 'https://console.volcengine.com/speech/service/10007',
`remark` = '火山引擎语音合成服务配置说明:
1. 访 https://www.volcengine.com/
2. 访 https://console.volcengine.com/speech/service/10007
3. appid和access_token
5. ID固定为volc.service_type.10029
6. WebSocket连接复用true减少链接损耗
7. -50~1000-50~100
8. -50~1000-50~100
9. -12~120-12~12
10.
https://www.volcengine.com/docs/6561/1257544
- emotion_scale1~54
- emotionneutralhappysadangryfearfuldisgustedsurprised
' WHERE `id` = 'TTS_HuoshanDoubleStreamTTS';
@@ -474,9 +474,9 @@ databaseChangeLog:
encoding: utf8
path: classpath:db/changelog/202512221117.sql
- changeSet:
id: 202512291452
id: 202512301430
author: RanChen
changes:
- sqlFile:
encoding: utf8
path: classpath:db/changelog/202512291452.sql
path: classpath:db/changelog/202512301430.sql