From be1486e596016a7c0815c65415b595db66cc3fc7 Mon Sep 17 00:00:00 2001 From: zhanghao <774378400@qq.com> Date: Tue, 3 Mar 2026 16:26:05 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0tts=E8=AF=AD=E9=9F=B3?= =?UTF-8?q?=E6=92=AD=E6=94=BE=E8=8A=82=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/flow/config.js | 22 +++++++++++++++++++++ src/views/flow/nodes/common/serviceNode.vue | 1 + 2 files changed, 23 insertions(+) diff --git a/src/views/flow/config.js b/src/views/flow/config.js index 3eb672b..6ab4a77 100644 --- a/src/views/flow/config.js +++ b/src/views/flow/config.js @@ -150,6 +150,13 @@ const taskTypeOptions = () => { }] } +const voiceOptions = () => { + return [{ + value: 'x4_xiaoyan', + label: 'x4_xiaoyan' + }] +} + export const collapseList = [ { collapseTitle: "相机", @@ -396,6 +403,21 @@ export const collapseList = [ { name: 'text', type: "input", input: "", disabled: true } ], outputParams: [{ name: 'result', type: 'string', desc: '商道大模型的返回文案', disabled: true}] + }, { + icon: dialogueSvg, + name: "tts语音播放", + type: "serviceNode", + desc: "调用tts将文案转换为语音播放", + action: 'AI_TTS', + nodeType: "LLM", + outputType: 'json', + nodeParams: [ + { name: 'url', type: "input", input: "", disabled: true }, + { name: 'text', type: "input", input: "", disabled: true }, + { name: 'speed', type: "input", input: "", max: 100, disabled: true }, + { name: 'voice', type: "input", input: "", componentType: 'select', selectOptions: voiceOptions(), disabled: true }, + { name: 'volume', type: "input", input: "", componentType: 'number', max: 100, disabled: true } + ] } ], }, diff --git a/src/views/flow/nodes/common/serviceNode.vue b/src/views/flow/nodes/common/serviceNode.vue index 3843162..287a913 100644 --- a/src/views/flow/nodes/common/serviceNode.vue +++ b/src/views/flow/nodes/common/serviceNode.vue @@ -110,6 +110,7 @@ v-if="property.componentType === 'number'" v-model="property.input" :min="0" + :max="property.max || Infinity" :controls="false" :step-strictly="true" placeholder="请输入"