Browse Source

讯飞asr测试,debug

Davidliu 1 month ago
parent
commit
1d6f4025df
1 changed files with 4 additions and 0 deletions
  1. 4 0
      src/core/voip/bot.py

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

@@ -69,6 +69,7 @@ class MyAudioMediaPort(pj.AudioMediaPort):
         self.audio_media = audio_media
         self.asr = asr
         self.first = True
+        self.counter = 0
 
         self.user_asr_texts = []
 
@@ -83,6 +84,9 @@ class MyAudioMediaPort(pj.AudioMediaPort):
             if self.first:
                 self.first = False
                 self.call.logger.warn("Received audio frame: %s, %s, %s", self.call.session_id,frame.buf,frame.size)
+            if self.counter % 200 ==0:
+                self.call.logger.warn("Received audio frame: %s, %s, %s", self.call.session_id, frame.buf, frame.size)
+            self.counter += 1
             self.asr.send_audio(frame.buf)
 
         try: