From e905aefc942201371e40af957caaf0c9457c9609 Mon Sep 17 00:00:00 2001 From: Bifang <915779419@qq.com> Date: Thu, 8 Oct 2026 13:56:50 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A6=81=E7=94=A8=E6=AE=B5=E8=90=BD=E6=9C=80?= =?UTF-8?q?=E5=A4=A7=E5=8F=A5=E6=95=B0=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/services/qwen3_websocket_asr.py | 15 ++------------- test_web/index.html | 5 ----- 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/app/services/qwen3_websocket_asr.py b/app/services/qwen3_websocket_asr.py index f7028f4..b6b04d8 100644 --- a/app/services/qwen3_websocket_asr.py +++ b/app/services/qwen3_websocket_asr.py @@ -1030,9 +1030,6 @@ class Qwen3ASRService: ) return int(window_sec * 16000) - def _max_sentence_count(self, ctx: ConnectionContext) -> int: - return max(int(ctx.params.get("max_sentence_count", 8) or 8), 1) - def _max_partial_text_chars(self, ctx: ConnectionContext) -> int: return max( int( @@ -2953,7 +2950,6 @@ class Qwen3ASRService: "pre_roll_ms", settings.REALTIME_VAD_PRE_ROLL_MS, ), - "max_sentence_count": payload.get("max_sentence_count", 8), "max_partial_text_chars": payload.get( "max_partial_text_chars", ctx.DEFAULT_MAX_PARTIAL_TEXT_CHARS, @@ -3232,15 +3228,8 @@ class Qwen3ASRService: ) ctx.state = ConnectionState.STREAMING - if self._sentence_count(visible_observed) >= self._max_sentence_count(ctx): - await self._commit_retranscribe_turn( - websocket, - ctx, - task_id, - "sentence_limit", - ) - continue - + # Follow FunASR's VAD-driven segment lifecycle; punctuation count + # should not force an otherwise active realtime speech segment to commit. if self._should_commit_complete_sentence(ctx, visible_observed): await self._commit_retranscribe_turn( websocket, diff --git a/test_web/index.html b/test_web/index.html index 64cc167..85a86e4 100644 --- a/test_web/index.html +++ b/test_web/index.html @@ -2188,10 +2188,6 @@ -