fix: stt node error

This commit is contained in:
wxg0103 2025-02-05 17:58:47 +08:00
parent 8be91b128f
commit 1a4c1b26ea

View File

@ -61,7 +61,9 @@ class AliyunBaiLianSpeechToText(MaxKBBaseModel, BaseSpeechToText):
result = recognition.call(temp_file_path) result = recognition.call(temp_file_path)
text = '' text = ''
if result.status_code == 200: if result.status_code == 200:
for sentence in result.get_sentence(): result_sentence = result.get_sentence()
if result_sentence is not None:
for sentence in result_sentence:
text += sentence['text'] text += sentence['text']
return text return text
else: else: