Skip to content

Commit 0ba733e

Browse files
Merge branch 'main' of https://github.com/maxkb-dev/maxkb
2 parents b4834b1 + 506187e commit 0ba733e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

apps/common/util/common.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,8 @@ def split_and_transcribe(file_path, model, max_segment_length_ms=59000, audio_fo
214214

215215

216216
def _remove_empty_lines(text):
217+
if not text:
218+
raise AppApiException(500, '文本转语音节点,文本内容不能为空')
217219
result = '\n'.join(line for line in text.split('\n') if line.strip())
218220
return markdown_to_plain_text(result)
219221

0 commit comments

Comments
 (0)