Skip to content

fix: empty transcript blocks commit_user_turn until timeout#5429

Merged
longcw merged 1 commit intomainfrom
longc/fix-empty-transcript-blocks-commit-user-turn
Apr 13, 2026
Merged

fix: empty transcript blocks commit_user_turn until timeout#5429
longcw merged 1 commit intomainfrom
longc/fix-empty-transcript-blocks-commit-user-turn

Conversation

@longcw
Copy link
Copy Markdown
Contributor

@longcw longcw commented Apr 13, 2026

Summary

  • When using manual turn detection, commit_user_turn waits for _final_transcript_received to be set after flushing the STT buffer with silence
  • If the STT returns a FINAL_TRANSCRIPT with empty text (e.g. the user turn was silence), _on_stt_event returned early before setting the event, causing commit_user_turn to block until transcript_timeout
  • Move _final_transcript_received.set() before the empty transcript guard so the wait unblocks regardless of transcript content

When using manual turn detection, commit_user_turn waits for
_final_transcript_received to be set. If the STT returns a final
transcript with empty text (e.g. silence), the event was never set
because the empty check returned early, causing commit_user_turn to
block until transcript_timeout.

Move _final_transcript_received.set() before the empty transcript
guard so the wait is unblocked regardless of transcript content.
@chenghao-mou chenghao-mou requested a review from a team April 13, 2026 06:54
Copy link
Copy Markdown
Contributor

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

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 potential bugs to report.

View in Devin Review to see 1 additional finding.

Open in Devin Review

@longcw longcw merged commit b991e5a into main Apr 13, 2026
26 checks passed
@longcw longcw deleted the longc/fix-empty-transcript-blocks-commit-user-turn branch April 13, 2026 07:14
osimhi213 added a commit to de-id/livekit-agents that referenced this pull request Apr 15, 2026
* upstream/main: (31 commits)
  chore: reduce renovate noise (livekit#5421)
  Rename e2ee to encryption in JobContext.connect (livekit#5454)
  feat: add Runway Characters avatar plugin (livekit#5355)
  Fix FrameProcessor lifecycle for selector based noise cancellation (livekit#5433)
  Feature - Configurable session close transcript timeout (livekit#5328)
  add ToolSearchToolset and ToolProxyToolset for dynamic tool discovery (livekit#5140)
  feat(beta/workflows): add InstructionParts for modular instruction customization (livekit#5077)
  fix: allow multiple AsyncToolsets by deduplicating management tools (livekit#5369)
  fix: empty transcript blocks commit_user_turn until timeout (livekit#5429)
  Feature/krisp viva sdk support (livekit#4370)
  feat: add service_tier parameter to Responses API LLM (livekit#5346)
  fix(inworld): do not leak connections when when cancelled (livekit#5427)
  update: Sarvam STT - add verbose error loggin and remove retry connection (livekit#5373)
  chore(deps): update github workflows (major) (livekit#5424)
  (azure openai): ensure gpt-realtime-1.5 compatibility (livekit#5407)
  chore(deps): update dependency nltk to v3.9.4 [security] (livekit#5418)
  chore(deps): update dependency aiohttp to v3.13.4 [security] (livekit#5416)
  chore(deps): update dependency langchain-core to v1.2.28 [security] (livekit#5417)
  chore: pin GHA by commit (livekit#5415)
  fix(aws): unwrap doubly-encoded JSON tool arguments from Nova Sonic (livekit#5411)
  ...
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.

2 participants