hermes - 💡(How to fix) Fix Auto-TTS only fires once for multi-chunk responses (not per chunk) [2 pull requests]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Root Cause

In gateway/platforms/base.py, the auto-TTS generation happens once on text_content (the full response text) before _send_with_retry is called. _send_with_retry handles chunking internally, so by the time the message is split, TTS has already been attached to the whole response — but only the final send gets the audio.

The TTS should fire per chunk, not once on the full text.

Fix Action

Fixed

RAW_BUFFERClick to expand / collapse

Bug Description

When voice.auto_tts is enabled and a response is long enough to split into multiple Telegram messages (chunks), TTS audio is only generated and attached to the last chunk. Earlier chunks are delivered as plain text without audio.

Root Cause

In gateway/platforms/base.py, the auto-TTS generation happens once on text_content (the full response text) before _send_with_retry is called. _send_with_retry handles chunking internally, so by the time the message is split, TTS has already been attached to the whole response — but only the final send gets the audio.

The TTS should fire per chunk, not once on the full text.

Steps to Reproduce

  1. Enable voice.auto_tts: true
  2. Send a message that triggers a response longer than Telegram's 4096 char limit
  3. Observe: only the last chunk gets a voice bubble, earlier chunks are plain text

Expected Behavior

Each chunk gets its own TTS audio, delivered as a voice bubble with the chunk text as caption.

Notes

  • This is platform-agnostic — the same issue affects any platform where _send_with_retry chunks long messages
  • Discovered while testing the OGG format fix in PR #31937
  • Not specific to Edge TTS — all TTS providers are affected

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING