Skip to content

fix: collapse decode-loop repeats when assembling streaming ASR segments - #444

Open
Ben Younes (ousamabenyounes) wants to merge 1 commit into
microsoft:mainfrom
ousamabenyounes:fix/issue-415
Open

Ben Younes (ousamabenyounes) wants to merge 1 commit into
microsoft:mainfrom
ousamabenyounes:fix/issue-415

Conversation

@ousamabenyounes

Copy link
Copy Markdown

On a decode loop (issue #415, usually triggered by non-speech audio) the model emits the same text chunk after chunk; chunk_segments rendered every copy, so the transcript repeated. Mute all but the first of a run of 3+ byte-identical consecutive chunks before segment assembly (timeline slots preserved, one/two repeats kept as genuine speech).

Test verification (RED → GREEN)

With the fix reverted, the new test fails (RED):

[loop] 8 looped chunks -> clause appears 8x: 'the cat sat on the mat. the cat sat on the mat. the cat sat on the mat. the cat sat on the mat. the cat sat on the mat. the cat sat on the mat. the cat sat on the mat. the cat sat on the mat.'
Traceback (most recent call last):
  File "/home/ousama/contribute-work/microsoft__VibeVoice/vllm_plugin/tests/test_asr_streaming_repeat.py", line 47, in <module>
    test_loop_collapses()
    ~~~~~~~~~~~~~~~~~~~^^
  File "/home/ousama/contribute-work/microsoft__VibeVoice/vllm_plugin/tests/test_asr_streaming_repeat.py", line 35, in test_loop_collapses
    assert hits == 1, f"decode loop still repeats the clause {hits}x (issue #415)"
           ^^^^^^^^^
AssertionError: decode loop still repeats the clause 8x (issue #415)

With the fix applied, the test passes (GREEN):

GREEN attempt 1/2 (exit 0)
[loop] 8 looped chunks -> clause appears 1x: 'the cat sat on the mat.'
[emphasis] genuine double repeat -> 'No' appears 2x: 'No. No.'
PASS

Full local suite

Command: python3 -m compileall -q vllm_plugin/asr_streaming.py vllm_plugin/tests/test_asr_streaming_repeat.py && python3 vllm_plugin/tests/test_asr_streaming_repeat.py

[loop] 8 looped chunks -> clause appears 1x: 'the cat sat on the mat.'
[emphasis] genuine double repeat -> 'No' appears 2x: 'No. No.'
PASS

Fix #415

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.

Encountered a bug where the content keeps repeating during transcription

1 participant