From 53e68c53797aadd5f6e6ea2f1c894ffc0604a377 Mon Sep 17 00:00:00 2001 From: shaohuzhang1 Date: Fri, 25 Jul 2025 11:43:46 +0800 Subject: [PATCH] fix: Voice to text, text to voice form cannot obtain data after collecting nodes --- .../speech_to_text_step_node/impl/base_speech_to_text_node.py | 1 + .../text_to_speech_step_node/impl/base_text_to_speech_node.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/apps/application/flow/step_node/speech_to_text_step_node/impl/base_speech_to_text_node.py b/apps/application/flow/step_node/speech_to_text_step_node/impl/base_speech_to_text_node.py index 13b954e4622..d6bdbcce7eb 100644 --- a/apps/application/flow/step_node/speech_to_text_step_node/impl/base_speech_to_text_node.py +++ b/apps/application/flow/step_node/speech_to_text_step_node/impl/base_speech_to_text_node.py @@ -18,6 +18,7 @@ class BaseSpeechToTextNode(ISpeechToTextNode): def save_context(self, details, workflow_manage): self.context['answer'] = details.get('answer') + self.context['result'] = details.get('answer') if self.node_params.get('is_result', False): self.answer_text = details.get('answer') diff --git a/apps/application/flow/step_node/text_to_speech_step_node/impl/base_text_to_speech_node.py b/apps/application/flow/step_node/text_to_speech_step_node/impl/base_text_to_speech_node.py index 97044729596..330dc5f5804 100644 --- a/apps/application/flow/step_node/text_to_speech_step_node/impl/base_text_to_speech_node.py +++ b/apps/application/flow/step_node/text_to_speech_step_node/impl/base_text_to_speech_node.py @@ -37,6 +37,7 @@ def bytes_to_uploaded_file(file_bytes, file_name="generated_audio.mp3"): class BaseTextToSpeechNode(ITextToSpeechNode): def save_context(self, details, workflow_manage): self.context['answer'] = details.get('answer') + self.context['result'] = details.get('result') if self.node_params.get('is_result', False): self.answer_text = details.get('answer') @@ -73,4 +74,5 @@ def get_details(self, index: int, **kwargs): 'content': self.context.get('content'), 'err_message': self.err_message, 'answer': self.context.get('answer'), + 'result': self.context.get('result') }