瀏覽代碼

fix: 修改播放逻辑

余尚辉 2 周之前
父節點
當前提交
c2f415f086
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/core/voip/bot.py

+ 1 - 1
src/core/voip/bot.py

@@ -91,7 +91,7 @@ class MyAudioMediaPort(pj.AudioMediaPort):
             else:
                 if asr_text and not play_complete:
                     self.user_asr_texts.append(asr_text)
-                if asr_text and play_complete or play_complete and self.user_asr_texts:
+                if (asr_text and play_complete) or (play_complete and self.user_asr_texts):
                     if asr_text:  # 等价于 if asr_text is not None and asr_text != ""
                         self.user_asr_texts.append(asr_text)
                     # self.user_asr_texts.append(asr_text)