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="请输入"