Jelajahi Sumber

fix: 修改播放逻辑

余尚辉 2 minggu lalu
induk
melakukan
c2f415f086
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  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)