Browse Source

fix: 修改按键

余尚辉 2 weeks ago
parent
commit
fbdb59f95f
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/core/voip/bot.py

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

@@ -91,6 +91,7 @@ class MyAudioMediaPort(pj.AudioMediaPort):
             else:
                 if asr_text and not play_complete:
                     self.user_asr_texts.append(asr_text)
+                print('user_asr_texts', 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)
@@ -234,7 +235,6 @@ class MyCall(pj.Call):
     def reset_wait_time(self):
         self.play_complete_flag = False  # 重置播放完成标志
         self.play_start_time = None  # 重置开始计时时间
-        self.digit = ''
     def get_phone(self):
         import re
         call_info = self.getInfo()
@@ -338,6 +338,7 @@ class MyCall(pj.Call):
     def on_media_player_complete(self, player_id):
         print('player complete')
         self.player_complete_dict[player_id] = True
+        self.digit = ''
         self.inputLongStart = time.time()
         #播放完毕执行的动作
         self.say_end_action(self.action)