Skip to content

fix(telegram): deliver TTS as additive final audio#872

Draft
artemgetmann wants to merge 4 commits into
mainfrom
codex/telegram-tts-additive-20260607
Draft

fix(telegram): deliver TTS as additive final audio#872
artemgetmann wants to merge 4 commits into
mainfrom
codex/telegram-tts-additive-20260607

Conversation

@artemgetmann

Copy link
Copy Markdown
Owner

Review Fast Path

  • User path fixed: Telegram /tts on final replies now deliver durable final text first, then a separate audio/voice message below it.
  • Proof: targeted tests, lint/build, isolated live Telegram baseline pass, and live TTS scenario pass on runtime commit 1952d587af.
  • Shared-state footgun removed: TTS no longer mutates a final text payload into a Telegram audio caption or delays final text delivery.
  • Still hurts: progress-plus-tts live scenario still needs a reliable prompt/harness trigger for a separate progress event; TTS shape passed, progress emission did not.

Why This Matters

Scope Boundary

  • Changed final-mode TTS delivery for generic and ACP dispatch paths.
  • Added a media-only TTS supplement helper and tests.
  • Updated Telegram live harness readback to expose media_type and verify separate audio after final text.
  • Did not restart or touch the shared main Telegram runtime.
  • Did not broaden TTS provider/config behavior.

Verification

  • pnpm test -- src/commands/telegram.test.ts src/cli/telegram-cli.test.ts src/auto-reply/reply/dispatch-from-config.test.ts src/auto-reply/reply/dispatch-acp-delivery.test.ts src/auto-reply/reply/dispatch-acp.test.ts src/tts/tts.test.ts pass: 136 tests.
  • pnpm test -- extensions/telegram/src/progress-controller.test.ts extensions/telegram/src/bot-message-dispatch.api-sequence.test.ts extensions/telegram/src/bot-message-dispatch.high-route-api-sequence.test.ts src/agents/pi-embedded-subscribe.reply-tags.test.ts src/agents/pi-embedded-subscribe.handlers.tools.test.ts src/auto-reply/reply/agent-runner-payloads.test.ts src/auto-reply/reply/dispatch-from-config.test.ts src/auto-reply/reply/dispatch-acp-delivery.test.ts src/auto-reply/reply/dispatch-acp.test.ts src/tts/tts.test.ts src/commands/telegram.test.ts src/cli/telegram-cli.test.ts pass: 187 tests.
  • pnpm lint pass.
  • pnpm build pass.
  • git diff --check pass.

Live Telegram Proof

  • Isolated runtime ensure:
    • branch=codex/telegram-tts-additive-20260607
    • runtime_worktree=/Users/user/Programming_Projects/openclaw/.worktrees/telegram-tts-additive-20260607
    • runtime_commit=1952d587afbe07e1569064ab80fc9a697089f912
    • current_lane_bot=@Artem_jarvis_exec_bot
  • Baseline pass:
    • pnpm openclaw:local telegram smoke baseline --json
    • artifact: .artifacts/telegram-smoke/20260607T110911Z-baseline-771cd206.json
    • reply: Baseline ping received and confirmed.
  • TTS additive pass:
    • pnpm openclaw:local telegram scenario tts-final-caption --json
    • artifact: .artifacts/telegram-smoke/20260607T111615Z-tts-final-caption-d23788d0.json
    • final text message: 52365
    • separate voice/audio message: 52366
    • empty_voice_only_final_detected=false
    • mergeReadiness=sufficient
  • Reset baseline:
    • /tts off sent after live checks
    • bot confirmed: 🔇 TTS disabled.

Known Gap

  • progress-plus-tts on this isolated lane produced final text plus separate audio, but the model placed the progress note in the final text instead of emitting a separate progress event.
  • Latest failing artifacts:
    • .artifacts/telegram-smoke/20260607T110958Z-progress-plus-tts-4b1019f4.json
    • .artifacts/telegram-smoke/20260607T111043Z-progress-long-task-25862d4a.json
  • This is why the PR is draft: the additive TTS behavior is proven, but combined progress-plus-TTS live proof still needs a better progress trigger or manual GUI/transcript proof.

AI Assistance

  • AI-assisted
  • Testing degree: targeted + isolated live-tested

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