Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

session.say() transcription is never TTS-aligned — scripted turns drift then flush in one chunk at playback end #2067

Copy link
Copy link

Description

@EtanHey
Issue body actions

Version: @livekit/agents 1.5.2 (say path unchanged in 1.5.3 dist)

Setup: TTS with aligned transcripts enabled (cartesia + add_timestamps: true; useTtsAlignedTranscript default true). LLM-generated turns caption in sync (aligned mode working). Scripted turns via session.say(text) do not.

Actual: say() captions stream at the estimated fixed pace (STANDARD_SPEECH_RATE 3.83 hyphens/s), fall progressively behind actual speech, and when playout finishes the TranscriptionSynchronizer flushes the entire remaining text in one visible chunk. On a ~15s scripted greeting this reads as several seconds of trailing captions, then a wall of text at the end.

Why: AgentActivity.ttsTask (the say pipeline, agent_activity.js ~L1753) tees the raw text straight into transcriptionNode and never consults ttsGenData.timedTextsFut — even though performTTSInference runs in that same path and the TTS frames DO carry USERDATA_TIMED_TRANSCRIPT. The aligned swap exists only in the generation path (~L2075).

Expected: say() turns use the same aligned timed-transcript input as generations when the TTS advertises alignedTranscript — scripted openers/goodbyes are exactly the turns where text is known upfront and users notice desync most.

Context: we hit this on a production voice-screening product where the scripted opener is the first thing every candidate sees; the mismatch reads as "captions broken" even though the rest of the call is aligned.

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.