fix: fix the defect of multiple audio display errors

--bug=1050737 --user=王孝刚 【应用编排】-用两个组件分别生成两段语音,在MK演示中无法播放两段语音 https://www.tapd.cn/57709429/s/1635779
This commit is contained in:
wxg0103 2024-12-24 09:51:44 +08:00
parent 24b77e220b
commit 0cd9c8fe00

View File

@ -57,7 +57,7 @@ class BaseTextToSpeechNode(ITextToSpeechNode):
}
file_url = FileSerializer(data={'file': file, 'meta': meta}).upload()
# 拼接一个audio标签的src属性
audio_label = f'<audio src="{file_url}" controls style = "width: 300px; height: 43px" class ="border-r-4"/>'
audio_label = f'<audio src="{file_url}" controls style = "width: 300px; height: 43px"></audio>'
return NodeResult({'answer': audio_label, 'result': audio_label}, {})
def get_details(self, index: int, **kwargs):