Skip to content

Fix word completion tracker stalling on space-before-punctuation#4975

Open
dimamik wants to merge 1 commit into
pipecat-ai:mainfrom
dimamik:fix/word-completion-space-before-punctuation
Open

Fix word completion tracker stalling on space-before-punctuation#4975
dimamik wants to merge 1 commit into
pipecat-ai:mainfrom
dimamik:fix/word-completion-space-before-punctuation

Conversation

@dimamik

@dimamik dimamik commented Jul 7, 2026

Copy link
Copy Markdown

French (and similar) typography puts a space before ? ! : ;, e.g. "Comment ça va ?". advance_by_alnums stops at that space, so once the last word is spoken the cursor stalls just before the punctuation: the frame never reports complete and RTVI clients that commit on the completed status drop the caption.

Snap the tts/user-facing cursors to end-of-text on completion, mirroring the existing llm_pos sweep. Only trailing non-alnum can remain at that point.

Without this, the sentence stays stuck as in-progress and is dropped once the next one starts, instead of committing as a finished caption.

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.

1 participant