Repository navigation
fix: keep lfm2_audio and lfm3_audio fixed ASR chunks within the cap - #1135
Merged
Merged
Conversation
A last piece under 1 s was merged into the chunk before it, so a fixed chunk could run up to 1 s past audio_chunk_duration_sec, and past max_pass_duration_sec when the two are equal (lfm3_audio's default). The tail and the chunk before it now split their audio evenly.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Fixed ASR chunking in
lfm2_audioandlfm3_audio(audio_chunk_mode=fixed, andautowithout the VAD model) merged a last piece shorter than 1 s into the chunk before it, so a chunk could run up to 1 s pastaudio_chunk_duration_sec. With a 1 s cap, 2.5 s of input went through as 1 s and 1.5 s. With lfm3_audio's default 300 s cap, which equalsmax_pass_duration_sec, 300.5 s went through the encoder in one pass.Solution
audio_chunk_duration_sec; earlier chunks keep the full length.audio_chunk_duration_secdescription drop the "up to 1 s longer" exception.Testing
ctest -R "lfm2_audio|lfm3_audio"on macOS (M3 Ultra, Metal): 22/22 pass. The new session-test cases fail with the old chunking.plan_audio_chunks, for caps of 1 to 3 s and every input length up to three caps: no chunk over the cap, and none under 1 s or half the cap, whichever is less.fixedmode, chunk lengths from the per-chunk audio token logs:The 300.5 s transcripts keep their length and ending. The
fixedcolumn of lfm2_audio's long-audio WER table was not re-run; only its files with a tail under 1 s split differently.Refs #1119