fix: stt node error
This commit is contained in:
parent
8be91b128f
commit
1a4c1b26ea
@ -61,9 +61,11 @@ 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()
|
||||||
text += sentence['text']
|
if result_sentence is not None:
|
||||||
return text
|
for sentence in result_sentence:
|
||||||
|
text += sentence['text']
|
||||||
|
return text
|
||||||
else:
|
else:
|
||||||
raise Exception('Error: ', result.message)
|
raise Exception('Error: ', result.message)
|
||||||
finally:
|
finally:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user