Skip to content

fix(voice): clear committed turn on resumed speech - #7059

Open
Shivakushwah143 wants to merge 2 commits into
livekit:mainfrom
Shivakushwah143:fix/7010-manual-turn-vad
Open

fix(voice): clear committed turn on resumed speech#7059
Shivakushwah143 wants to merge 2 commits into
livekit:mainfrom
Shivakushwah143:fix/7010-manual-turn-vad

Conversation

@Shivakushwah143

Copy link
Copy Markdown

Summary

Fixes #7010.

In manual turn-detection mode, commit_user_turn() sets
_user_turn_committed = True while the end-of-turn task is running.

If VAD emits START_OF_SPEECH before that task completes, the task is
cancelled but _user_turn_committed remains True.

Because the cancelled task never reaches its normal cleanup path, the
manual-mode guard in _on_stt_event() then drops subsequent transcript
events.

This change clears _user_turn_committed when START_OF_SPEECH
cancels the pending end-of-turn task.

Changes

  • Clear _user_turn_committed when resumed speech cancels the pending EOU task.
  • Add regression coverage verifying the committed flag is cleared.
  • Add regression coverage verifying subsequent FINAL_TRANSCRIPT events are not dropped.

Testing

Added focused regression tests in
tests/test_audio_recognition_turn_detection.py.

Local execution was blocked by the current development environment /
dependency setup, but the modified Python files pass syntax validation and
the patch is intentionally limited to the affected state transition.

@Shivakushwah143
Shivakushwah143 requested a review from a team as a code owner August 31, 2026 11:44
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


shiva-kushwah seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

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.

Manual mode: VAD START_OF_SPEECH cancels a committed user turn and strands _user_turn_committed

2 participants