Skip to content

fix(inworld): fallback to full text when TTS timestamps are not received#4113

Merged
filipi87 merged 1 commit intopipecat-ai:mainfrom
inworld-ai:ian/lang-timestamps
Mar 27, 2026
Merged

fix(inworld): fallback to full text when TTS timestamps are not received#4113
filipi87 merged 1 commit intopipecat-ai:mainfrom
inworld-ai:ian/lang-timestamps

Conversation

@ianbbqzy
Copy link
Copy Markdown
Contributor

@ianbbqzy ianbbqzy commented Mar 23, 2026

  • When timestamps are not returned by the TTS server, no TTSTextFrames reach the assistant context aggregator, so the agent's turn is committed as empty in the LLM conversation context.
  • This adds a fallback for both the HTTP and WebSocket services: if a TTS request completes without any timestamps, the full input text is pushed as a single TTSTextFrame so the conversation context reflects what the agent spoke.
  • Note: without word-level timestamps, interrupted turns commit the full text rather than only the portion that was spoken. This is a workaround until all supported languages have full timestamp support in the coming weeks

Depends on #4028.

@ianbbqzy ianbbqzy force-pushed the ian/lang-timestamps branch from 862432b to f396592 Compare March 23, 2026 16:46
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 23, 2026

Codecov Report

❌ Patch coverage is 13.51351% with 32 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/pipecat/services/inworld/tts.py 13.51% 32 Missing ⚠️
Files with missing lines Coverage Δ
src/pipecat/services/inworld/tts.py 24.37% <13.51%> (-0.84%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread src/pipecat/services/inworld/tts.py Outdated
Comment thread src/pipecat/services/inworld/tts.py
@ianbbqzy ianbbqzy force-pushed the ian/lang-timestamps branch from f396592 to 7bd1269 Compare March 25, 2026 18:53
@ianbbqzy ianbbqzy force-pushed the ian/lang-timestamps branch from 7bd1269 to 5645909 Compare March 25, 2026 18:55
Copy link
Copy Markdown
Contributor

@filipi87 filipi87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@filipi87 filipi87 merged commit 38c961a into pipecat-ai:main Mar 27, 2026
6 checks passed
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