vllm解码日志增加operation、会话id、原生partial队列等待、锁等待和生成耗时
parent
9e87bcc2e0
commit
f27d844ed7
|
|
@ -3202,6 +3202,9 @@ class Qwen3ASRService:
|
|||
partial_decode_ms = (time.perf_counter() - partial_decode_started) * 1000.0
|
||||
ctx.last_partial_decode_samples = int(ctx.segment_audio_buffer.size)
|
||||
current = self._sanitize_candidate_text(current)
|
||||
observed_chars = 0
|
||||
stabilized_chars = 0
|
||||
preview_changed = False
|
||||
partial_display = ""
|
||||
partial_outcome = "empty"
|
||||
if current and not self._is_degenerate_repetition(current):
|
||||
|
|
@ -3212,6 +3215,7 @@ class Qwen3ASRService:
|
|||
else self._update_segment_observed_text
|
||||
)
|
||||
observed = update_observed_text(ctx, current, current_language)
|
||||
observed_chars = len(observed)
|
||||
visible_observed = self._trim_previous_segment_overlap(ctx, observed)
|
||||
if has_native_stream_snapshot:
|
||||
# Qwen returns full-utterance snapshots; stabilize the
|
||||
|
|
@ -3220,11 +3224,14 @@ class Qwen3ASRService:
|
|||
ctx,
|
||||
visible_observed,
|
||||
)
|
||||
stabilized_chars = len(visible_observed)
|
||||
previous_preview = ctx.partial_preview_text
|
||||
partial_display = self._append_only_partial_preview(
|
||||
ctx,
|
||||
visible_observed,
|
||||
native_stream_snapshot=has_native_stream_snapshot,
|
||||
)
|
||||
preview_changed = partial_display != previous_preview
|
||||
partial_display = self._clip_partial_text(partial_display, ctx)
|
||||
if not partial_display:
|
||||
partial_outcome = "filtered_empty"
|
||||
|
|
@ -3300,8 +3307,9 @@ class Qwen3ASRService:
|
|||
# path, without logging transcript contents or changing events.
|
||||
logger.info(
|
||||
"[%s] Realtime partial result: segment=%d source=%s outcome=%s "
|
||||
"decode_ms=%.1f turn_audio_sec=%.2f window_audio_sec=%.2f "
|
||||
"stream_chunk_id=%s candidate_chars=%d display_chars=%d",
|
||||
"partial_resolve_ms=%.1f turn_audio_sec=%.2f window_audio_sec=%.2f "
|
||||
"stream_chunk_id=%s window_rolled=%s candidate_chars=%d observed_chars=%d "
|
||||
"stabilized_chars=%d preview_changed=%s display_chars=%d",
|
||||
task_id,
|
||||
ctx.segment_index,
|
||||
"native_stream" if has_native_stream_snapshot else "window_fallback",
|
||||
|
|
@ -3310,7 +3318,15 @@ class Qwen3ASRService:
|
|||
len(ctx.segment_audio_buffer) / 16000.0,
|
||||
len(ctx.stream_window_buffer) / 16000.0,
|
||||
getattr(ctx.realtime_stream_state, "chunk_count", None),
|
||||
getattr(
|
||||
getattr(ctx.realtime_stream_state, "internal_state", None),
|
||||
"window_rolled",
|
||||
None,
|
||||
),
|
||||
len(current),
|
||||
observed_chars,
|
||||
stabilized_chars,
|
||||
preview_changed,
|
||||
len(partial_display),
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue