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 @@ -