Skip to content

feat(voice): surface FlushSentinel boundaries in transcription_node#5912

Closed
longcw wants to merge 1 commit into
mainfrom
longc/flush-sentinel-transcription-marker
Closed

feat(voice): surface FlushSentinel boundaries in transcription_node#5912
longcw wants to merge 1 commit into
mainfrom
longc/flush-sentinel-transcription-marker

Conversation

@longcw

@longcw longcw commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Summary

A FlushSentinel yielded from llm_node was stripped before the transcription node, so a single reply was always one transcript segment with no way to detect the internal boundaries.

FlushSentinel now takes an optional id and is surfaced into transcription_node as an empty-string FlushSentinelText carrying that id. A custom transcription_node can detect the boundary and read the tag; it is dropped before reaching the TextOutput, so default consumers are unaffected. The published TranscriptionSegment.id is unchanged.

async def llm_node(self, chat_ctx, tools, model_settings):
    yield "Yes, let me look that up. "
    yield FlushSentinel(id="ack")        # flush to TTS, mark a boundary
    ...
    yield "It is 18 degrees and sunny."

async def transcription_node(self, text, model_settings):
    async for chunk in text:
        if isinstance(chunk, FlushSentinelText):
            # boundary reached; chunk.id == the id from the FlushSentinel
            ...
        yield chunk

Notes

This flows through the non-aligned transcription path. With use_tts_aligned_transcript, the transcription input is TTS-derived timed text and carries no FlushSentinel, so the marker does not appear there.

A FlushSentinel was stripped before the transcription node, so a single reply was always one transcript segment with no way to detect the internal boundaries.

FlushSentinel now carries an optional id and is surfaced into the transcription node as an empty-string FlushSentinelText, which a custom node can detect and read the id from. It is dropped before reaching the TextOutput so default consumers are unaffected.
@chenghao-mou chenghao-mou requested a review from a team June 1, 2026 08:17

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

View in Devin Review to see 3 additional findings.

Open in 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.

2 participants