diff --git a/ui/src/workflow-canvas/component/NodeMenu.vue b/ui/src/workflow-canvas/component/NodeMenu.vue index b018c48bdf1..d4f8f363336 100644 --- a/ui/src/workflow-canvas/component/NodeMenu.vue +++ b/ui/src/workflow-canvas/component/NodeMenu.vue @@ -29,6 +29,7 @@ const workflowComponentGroups = [ { icon: aiChatIcon, iconClass: 'bg-primary-gradient', label: 'AI 对话', value: WorkflowNodeType.AiChat }, { icon: aiChatIcon, iconClass: 'bg-primary-gradient', label: '意图识别', value: WorkflowNodeType.IntentNode }, { icon: aiChatIcon, iconClass: 'bg-primary-gradient', label: '文本转语音', value: WorkflowNodeType.TextToSpeechNode }, + { icon: aiChatIcon, iconClass: 'bg-primary-gradient', label: '语音转文本', value: WorkflowNodeType.SpeechToTextNode }, { icon: aiChatIcon, iconClass: 'bg-primary-gradient', label: '图片生成', value: WorkflowNodeType.ImageGenerateNode}, { icon: aiChatIcon, iconClass: 'bg-primary-gradient', label: '图片理解', value: WorkflowNodeType.ImageUnderstandNode}, { icon: aiChatIcon, iconClass: 'bg-primary-gradient', label: '问题优化', value: WorkflowNodeType.Question}, diff --git a/ui/src/workflow-canvas/icons/speech-to-text-node-icon.vue b/ui/src/workflow-canvas/icons/speech-to-text-node-icon.vue new file mode 100644 index 00000000000..7a220814144 --- /dev/null +++ b/ui/src/workflow-canvas/icons/speech-to-text-node-icon.vue @@ -0,0 +1,6 @@ + + diff --git a/ui/src/workflow-canvas/nodes/speech-to-text-node/index.ts b/ui/src/workflow-canvas/nodes/speech-to-text-node/index.ts new file mode 100644 index 00000000000..7e0c6c81e7d --- /dev/null +++ b/ui/src/workflow-canvas/nodes/speech-to-text-node/index.ts @@ -0,0 +1,15 @@ +import SpeechToTextNodeVue from './index.vue' +import { WorkflowNodeModel, WorkflowNodeView } from '@/workflow-canvas/core/workflow-node' +import { WorkflowNodeType } from '@/workflow-canvas/types.ts' + +class SpeechToTextNodeView extends WorkflowNodeView { + constructor(props: ConstructorParameters[0]) { + super(props, SpeechToTextNodeVue) + } +} + +export default { + type: WorkflowNodeType.SpeechToTextNode, + model: WorkflowNodeModel, + view: SpeechToTextNodeView, +} diff --git a/ui/src/workflow-canvas/nodes/speech-to-text-node/index.vue b/ui/src/workflow-canvas/nodes/speech-to-text-node/index.vue new file mode 100644 index 00000000000..82ed9652565 --- /dev/null +++ b/ui/src/workflow-canvas/nodes/speech-to-text-node/index.vue @@ -0,0 +1,144 @@ + + + +