Browse Source

fix: 修改log

余尚辉 5 months ago
parent
commit
812674dd8b
1 changed files with 3 additions and 3 deletions
  1. 3 3
      src/core/voip/bot.py

+ 3 - 3
src/core/voip/bot.py

@@ -91,7 +91,7 @@ class MyAudioMediaPort(pj.AudioMediaPort):
                 self.call.wait_time_check(current_time, self.call.wait_time)
 
             # 如果为超长类型的按键服务 超过30s未输入完成执行超时操作
-            if self.call.inputType == '1' and play_complete and not asr_text:
+            if self.call.inputType == '1.0' and play_complete and not asr_text:
                 self.call.wait_time_check(current_time, 30)
 
             message_queue_size = self.call.message_queue.qsize()
@@ -261,7 +261,7 @@ class MyCall(pj.Call):
         digit = prm.digit
         # 假设为超长类型按键 把用户输入的按键进行拼接 如果为# 则把用户输入所有按键放入队列并发送文本机器人
         # 如果为非正常按键服务 输入以后直接发送文本机器人
-        if self.inputType == '1':
+        if self.inputType == '1.0':
             if digit != '#':
                 self.digit += digit
                 # print(f"Received DTMF digit12: {self.digit}")
@@ -332,8 +332,8 @@ class MyCall(pj.Call):
         self.player.startTransmit(self.aud_med)
 
     def on_receiver_asr_result(self, message, *args):
-        # print('asr返回内容:',message)
         if not self.is_play_complete() or self.txtLock:   # 判断是否播放完成 否则不记录用户说的内容
+            print('机器人播放过程asr返回内容:',message)
             return
         message = json.loads(message)
         if message["header"]["status"] == 20000000: