774056846 4 months ago
parent
commit
0363506e2f
2 changed files with 3 additions and 2 deletions
  1. 2 1
      src/core/voip/asr.py
  2. 1 1
      src/core/voip/bot.py

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

@@ -133,7 +133,8 @@ class TestSt:
 
     def test_on_result_chg(self, message, *args):
         # print("test_on_chg:{}".format(message))
-        pass
+        if self.message_receiver:
+            self.message_receiver(message, *args)
 
     def test_on_completed(self, message, *args):
         # print("on_completed:args=>{} message=>{}".format(args, message))

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

@@ -327,7 +327,7 @@ class MyCall(pj.Call):
                 result = message["payload"]["result"]
                 print("asr返回内容Result:", result)
                 self.user_asr_text_queue.put(result)
-            else:
+            elif message["header"]["name"] == "TranscriptionResultChanged":
                 self.reset_wait_time()
         else:
             print(f"Status is not {message['header']['status']}")