Ver código fonte

修改语音的截断时间

hwt 6 horas atrás
pai
commit
c46ebac0c9
1 arquivos alterados com 1 adições e 1 exclusões
  1. 1 1
      brain/PlannerNode2/largemodel/largemodel/asr.py

+ 1 - 1
brain/PlannerNode2/largemodel/largemodel/asr.py

@@ -407,7 +407,7 @@ class ASRNode(Node):
         self.record_status_pub.publish(Bool(data=True))
         audio_buffer = []
         silence_counter = 0
-        MAX_SILENCE_FRAMES = 30  # 30帧*30ms=900ms静音后停止 / Stop after 900ms of silence (30 frames * 30ms)
+        MAX_SILENCE_FRAMES = 50  # 30帧*30ms=900ms静音后停止 / Stop after 900ms of silence (30 frames * 30ms)
         speaking = False  # 语音活动标志 / Flag indicating speech activity
         frame_counter = 0  # 计数器 / Frame counter
         empty_count = 0  # 连续空帧计数 / Consecutive empty frame count