Skip to content

feat(gateway): echo voice transcripts back to user before agent reply - #25196

Closed
dgsratiu wants to merge 1 commit into
NousResearch:mainfrom
dgsratiu:feature/echo-voice-transcript
Closed

feat(gateway): echo voice transcripts back to user before agent reply#25196
dgsratiu wants to merge 1 commit into
NousResearch:mainfrom
dgsratiu:feature/echo-voice-transcript

Conversation

@dgsratiu

Copy link
Copy Markdown

Summary

  • When STT transcription succeeds, immediately sends the transcribed text back to the user as a 🎤 "..." message before the agent processes it
  • Lets users confirm what was heard without waiting for the full agent response
  • Matches the echoTranscript: true behaviour familiar from other agent frameworks

Implementation

Stores successful transcripts on _pending_voice_transcripts during _enrich_message_with_transcription, then flushes them via the platform adapter at the call site before the agent turn begins. Failures are silently swallowed so a send error never blocks the agent response.

Test plan

  • Send a voice message via Telegram — should see 🎤 "transcribed text" echoed back immediately, followed by the agent reply
  • Send a voice message when STT is misconfigured — echo should not fire, existing error message still sent
  • Send a text message — no change in behaviour

🤖 Generated with Claude Code

When STT transcription succeeds, immediately send the transcribed text
back to the user as a 🎤 "..." message before the agent processes it.
This mirrors the echoTranscript behaviour from OpenClaw and lets users
confirm what was heard without waiting for the full agent response.

Implementation: stores successful transcripts on _pending_voice_transcripts
during _enrich_message_with_transcription, then flushes them via the
platform adapter in the calling site before the agent turn begins.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have comp/gateway Gateway runner, session dispatch, delivery tool/tts Text-to-speech and transcription duplicate This issue or pull request already exists labels May 13, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Duplicate of #13727 (and #22123). Third independent implementation of the STT transcript echo feature. #13727 is the original with stt.send_transcription config key.

@teknium1

Copy link
Copy Markdown
Contributor

This is an automated hermes-sweeper review. The transcript-echo behavior requested here is now implemented on main.

Evidence:

  • gateway/run.py:7609 calls _enrich_message_with_transcription(...), receives _successful_transcripts, and sends each transcript back through the platform adapter before the agent turn continues.
  • gateway/run.py:11541 defines _enrich_message_with_transcription(...) -> tuple[str, List[str]]; successful STT results are collected as raw transcript strings for caller-side echo.
  • gateway/run.py:11682, gateway/run.py:14691, and gateway/run.py:15059 also echo transcripts in the active-run interrupt/dequeue paths, so queued voice messages get the same behavior.
  • The implementing commit is d55304c39f204dd8b9e23f3bb681cc2f3472dc56 (fix(gateway): transcribe voice messages during active agent runs), whose message explicitly notes that it echoes raw transcripts back to the user.

The duplicate note linking #13727/#22123 was useful context; this narrower PR's requested behavior is covered by the implementation now present on main.

@teknium1 teknium1 closed this Jun 12, 2026
@teknium1 teknium1 added the sweeper:implemented-on-main Sweeper: behavior already present on current main label Jun 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/gateway Gateway runner, session dispatch, delivery duplicate This issue or pull request already exists P3 Low — cosmetic, nice to have sweeper:implemented-on-main Sweeper: behavior already present on current main tool/tts Text-to-speech and transcription type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants