update:豆包tts流式ASR空字符串问题

This commit is contained in:
hrz
2025-06-04 18:33:29 +08:00
parent 03bcf5d2c7
commit 5b8a567f26
4 changed files with 20 additions and 16 deletions
@@ -82,9 +82,9 @@ class ASRProviderBase(ABC):
) # 确保ASR模块返回原始文本
conn.logger.bind(tag=TAG).info(f"识别文本: {raw_text}")
text_len, _ = remove_punctuation_and_length(raw_text)
self.stop_ws_connection()
if text_len > 0:
# 使用自定义模块进行上报
self.stop_ws_connection()
await startToChat(conn, raw_text)
enqueue_asr_report(conn, raw_text, asr_audio_task)