4
0
Эх сурвалжийг харах

修改语音的截断时间

hwt 10 цаг өмнө
parent
commit
b440cde01c

+ 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 = 50  # 30帧*30ms=900ms静音后停止 / Stop after 900ms of silence (30 frames * 30ms)
+        MAX_SILENCE_FRAMES = 40  # 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