DavidLiu 3 달 전
부모
커밋
3220d0fab0
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. 5 0
      src/core/voip/bot.py

+ 5 - 0
src/core/voip/bot.py

@@ -318,6 +318,11 @@ class MyCall(pj.Call):
             return
         player_id = murmur3_32(player_file)
         self.player_complete_dict[player_id] = False
+        for f in player_file:
+            if not os.path.isfile(f):
+                self.logger.info(f"Sending bot speaker, not exists, player_file: {player_file}, player_id: {player_id}, isActive: {self.isActive()}")
+                return
+
         # print('self.player_complete_dict[player_id]D:', player_id, player_file, self.player_complete_dict[player_id])
         self.logger.info(f"Sending bot speaker, 111, player_file: {player_file}, player_id: {player_id}, isActive: {self.isActive()}")
         self.audio_player = MyAudioMediaPlayer(player_id, self.audio_media, on_complete=self.on_media_player_complete)