fix(discord): keep voice meetings responsive - #42597
joelneleber wants to merge 1 commit into
Conversation
9f5074e to
20371dd
Compare
|
Double-posting to side chat when transcript agent turns are enabled When
When agent turns are disabled (default), only the adapter posts — correct single posting. When enabled, both post — duplicate messages in the side chat. Fix: Remove the Also note: the adapter's Minor (code duplication): |
Double-posting when
|
tonydwb
left a comment
There was a problem hiding this comment.
Code Review Summary
Verdict: Approved
Makes Discord voice meeting mode the default: raw transcripts are posted to the side chat without triggering a full agent turn. This prevents long meetings from becoming slow as session history grows. Operators can opt back into the old behavior with HERMES_DISCORD_VOICE_TRANSCRIPT_AGENT_TURNS=1.
- Good documentation in docstrings explaining the meeting mode rationale
- New test covers the default (no callback) behavior
- Backward compatible via env flag
- No security concerns
Reviewed by Hermes Agent (cron batch)
Double-posting when
|
teknium1
left a comment
There was a problem hiding this comment.
Thanks for targeting a real Discord VC inactivity gap: current main only re-arms the timeout after check_silence() returns a completed utterance (plugins/platforms/discord/adapter.py:3162-3179).
Problems
- The opt-in agent-turn path double-posts transcripts. The added adapter post occurs before the callback, and the callback target still posts at
gateway/run.py:13061-13066. This matches @liuhao1024's review comments. HERMES_DISCORD_VOICE_TRANSCRIPT_AGENT_TURNSis a new non-secret behavior setting, contrary toAGENTS.md:102-107. It also changes the documented default full-agent VC flow (website/docs/user-guide/features/voice-mode.md:244,351-365).
Suggested changes
- Keep one transcript-post owner and add an enabled-agent-turn regression test asserting one side-chat send.
- Split/rescope the inbound-activity timeout fix; if meeting mode remains configurable, use documented
config.yamlplumbing.
Automated hermes-sweeper review.
| ) | ||
| return | ||
|
|
||
| await self._post_voice_transcript_to_side_chat(guild_id, user_id, transcript) |
There was a problem hiding this comment.
When HERMES_DISCORD_VOICE_TRANSCRIPT_AGENT_TURNS=1, the callback immediately below reaches GatewayRunner._handle_voice_channel_input, which still sends the transcript at gateway/run.py:13061-13066. This post therefore creates two identical side-chat messages; make either the adapter or gateway the single posting owner and cover the enabled path.
Summary
/voice joindefault to meeting mode: transcribe voice into the side chat without running a full agent/TTS turn for every utteranceHERMES_DISCORD_VOICE_TRANSCRIPT_AGENT_TURNS=1Test Plan
/home/j/.hermes/hermes-agent/venv/bin/python -m py_compile gateway/run.py plugins/platforms/discord/adapter.py tests/gateway/test_voice_command.py_process_voice_inputdefault transcript-only mode and opt-in agent callback mode_handle_voice_channel_inputdefault transcript-only mode and opt-in agent-turn mode_handle_voice_channel_joindefault meeting message/auto-TTS disabled and opt-in legacy auto-TTS enabledDiscordAdapter._note_voice_activitythrottles timeout resetsNotes
No module named pytest), so I ran compile + targeted smoke checks with the live Hermes venv.scripts/brain-context-check.sh --stagedwas not present in this repo checkout.Brain-Context: n/a (brain-context-check script unavailable in this checkout)