Skip to content

fix(frontend): handle default no-LFR online features - #3849

Merged
LauraGPT merged 1 commit into
mainfrom
codex/fix-frontend-no-lfr-20261106
Nov 6, 2026
Merged

LauraGPT merged 1 commit into
mainfrom
codex/fix-frontend-no-lfr-20261106

Conversation

@LauraGPT

@LauraGPT LauraGPT commented Nov 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fix the default WavFrontendOnline(lfr_m=1, lfr_n=1) path, which references an uninitialized lfr_splice_frame_idx after skipping LFR. Initialize the consumed-frame cursor from the actual per-item feature length, including zero-length items; the LFR branch continues to replace it with its existing splice cursor.

Real GPU integration exposed a second issue: final offline audio whose length is an exact multiple of the VAD chunk size gets an unnecessary empty chunk. With no LFR right-context frames, that empty call cannot finalize the last score and can discard a pending dynamic-VAD segment. Mark the last nonempty offline chunk final by adding a remainder chunk only when one exists.

Add 42 regressions covering valid lengths, padding, CMVN, packetization, empty frontend flushes, short inputs, and offline finalization with no-LFR/LFR controls. Run them in the existing KWS/frontend workflow and include the VAD model in its path filters.

Validation

  • Unchanged frontend: 24 UnboundLocalError failures and 6 passing short-input controls.
  • The first waveform reference omitted the frontend's existing 32768 PCM scaling. That test-fixture error and its 16 failures were preserved; after correcting the reference without changing tolerances, all 16 waveform cases still failed on unchanged product code and all 30 frontend cases passed on the repair.
  • The new offline-finalization regression reproduced 5 failures with 7 passing controls before the chunk-count fix.
  • Final candidate: all 214 selected CPU cases passed, including KWS, frontend, VAD, realtime websocket and example contracts.
  • Real NVIDIA L20Z: 16 direct FP32/BF16 CUDA feature cases passed. Initial VAD integration retained 6 fixed-threshold passes and 6 dynamic-invariance failures. After the finalization fix, all 12 VAD integration cases passed, with 26,200 CUDA profiler events; the unchanged 16 feature cases were source-hash bound and reused, not rerun.
  • The VAD integration uses real feature extraction and VAD state handling with an analytic CUDA posterior encoder. No pretrained weights/downloads, ASR quality claim, or complete-suite claim.
  • Exact-head hosted CI is required before normal merge; merged-main CI is accepted separately.

Scope

No model weights, dependencies, release versions, repository protections, or production configuration change. The generic explicit streaming-empty-input early-return path is unchanged; this PR does not claim to solve every empty-EOS or short-tail case. Root 1.4.22 is already published and does not contain this candidate. The ONNX offline VAD work in #3846 is separate.

Type Of Change

  • Bug fix
  • Regression tests
  • Model/training change

Handle default online frontend features without an unbound cursor and finalize the last nonempty offline VAD chunk.

Signed-off-by: LauraGPT <zhifu.gzf@alibaba-inc.com>
@LauraGPT
LauraGPT merged commit 57485f7 into main Nov 6, 2026
3 checks passed
LauraGPT added a commit that referenced this pull request Nov 7, 2026
Deliver no-LFR frontend and final VAD chunk fixes (#3849), plus supplied SentencePiece vocabulary IDs (#3783).

Signed-off-by: LauraGPT <zhifu.gzf@alibaba-inc.com>
@LauraGPT LauraGPT mentioned this pull request Nov 7, 2026
LauraGPT added a commit that referenced this pull request Nov 7, 2026
Deliver tested no-LFR frontend, final VAD chunk and supplied tokenizer vocabulary fixes (#3849, #3783).

Signed-off-by: LauraGPT <zhifu.gzf@alibaba-inc.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant