Skip to content

fix(voice): commit interrupted speech without a synchronized transcript - #1916

Merged
u9g merged 3 commits into
mainfrom
fix/phantom-utterance-interrupted-transcript
Jun 30, 2026
Merged

fix(voice): commit interrupted speech without a synchronized transcript#1916
u9g merged 3 commits into
mainfrom
fix/phantom-utterance-interrupted-transcript

Conversation

@ShayneP

@ShayneP ShayneP commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

On a midplayout interruption, forwardedTextFor and the realtime reply path returned synchronizedTranscript ?? '', so an interrupted-but-heard reply with no playback-aligned transcript (common with avatar outputs) produced no conversation_item_added and was dropped from chatCtx. Fall back to the forwarded generation text, matching the Python SDK's forwarded_text behaviour.

On a mid-playout interruption, forwardedTextFor and the realtime reply path
returned synchronizedTranscript ?? '', so an interrupted-but-heard reply with
no playback-aligned transcript (common with avatar outputs) produced no
conversation_item_added and was dropped from chatCtx. Fall back to the
forwarded generation text, matching the Python SDK's forwarded_text behavior.
@changeset-bot

changeset-bot Bot commented Jun 30, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: dfe9dfb

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 35 packages
Name Type
@livekit/agents Patch
@livekit/agents-plugin-anam Patch
@livekit/agents-plugin-assemblyai Patch
@livekit/agents-plugin-baseten Patch
@livekit/agents-plugin-bey Patch
@livekit/agents-plugin-cartesia Patch
@livekit/agents-plugin-cerebras Patch
@livekit/agents-plugin-deepgram Patch
@livekit/agents-plugin-did Patch
@livekit/agents-plugin-elevenlabs Patch
@livekit/agents-plugin-fishaudio Patch
@livekit/agents-plugin-google Patch
@livekit/agents-plugin-hedra Patch
@livekit/agents-plugin-hume Patch
@livekit/agents-plugin-inworld Patch
@livekit/agents-plugin-lemonslice Patch
@livekit/agents-plugin-liveavatar Patch
@livekit/agents-plugin-livekit Patch
@livekit/agents-plugin-minimax Patch
@livekit/agents-plugin-mistral Patch
@livekit/agents-plugin-mistralai Patch
@livekit/agents-plugin-neuphonic Patch
@livekit/agents-plugin-openai Patch
@livekit/agents-plugin-perplexity Patch
@livekit/agents-plugin-phonic Patch
@livekit/agents-plugin-resemble Patch
@livekit/agents-plugin-rime Patch
@livekit/agents-plugin-runway Patch
@livekit/agents-plugin-sarvam Patch
@livekit/agents-plugin-silero Patch
@livekit/agents-plugin-soniox Patch
@livekit/agents-plugin-tavus Patch
@livekit/agents-plugins-test Patch
@livekit/agents-plugin-trugen Patch
@livekit/agents-plugin-xai Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@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.

Open in Devin Review

@ShayneP
ShayneP requested a review from a team June 30, 2026 15:02
Comment thread agents/src/voice/agent_activity.ts Outdated
@@ -2593,7 +2593,7 @@ export class AgentActivity implements RecognitionHooks {
const forwardedTextFor = (output: SegmentOutput): string => {

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.

Comment thread agents/src/voice/agent_activity.ts Outdated
@@ -3427,7 +3427,7 @@ export class AgentActivity implements RecognitionHooks {
const interrupted = output.played === 'partial';
let forwardedText = output.textOut?.text || '';

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.

Hoist the per-segment forwarded-text logic into a single forwardedTextFor
helper (mirroring Python's _ForwardOutput.forwarded_text) used by both the
pipeline and realtime reply paths, replacing the duplicated inline logic.
Introduce a shared ForwardOutput interface backing SegmentOutput and
MessageOutput.
@u9g
u9g merged commit 49f7567 into main Jun 30, 2026
8 checks passed
@u9g
u9g deleted the fix/phantom-utterance-interrupted-transcript branch June 30, 2026 16:04
@github-actions github-actions Bot mentioned this pull request Jun 30, 2026
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