Parcourir la source

fix: 修改播放逻辑

余尚辉 il y a 2 semaines
Parent
commit
c2f415f086
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  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)