Explorar el Código

fix: 修改播放逻辑

余尚辉 hace 2 semanas
padre
commit
c2f415f086
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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)