Skip to content

fix(gateway): suppress duplicate voice transcripts#19428

Merged
teknium1 merged 1 commit into
mainfrom
hermes/hermes-8c54fd4a
May 3, 2026
Merged

fix(gateway): suppress duplicate voice transcripts#19428
teknium1 merged 1 commit into
mainfrom
hermes/hermes-8c54fd4a

Conversation

@teknium1
Copy link
Copy Markdown
Contributor

@teknium1 teknium1 commented May 3, 2026

Salvage of #19273 by @John-tip onto current main.

Summary

Discord voice capture / STT occasionally emits the same utterance twice a few seconds apart, producing a second queued agent run and overlapping spoken replies. Dedup exact and near-exact repeats per (guild, user) over a 12-second window (SequenceMatcher ≥0.95 for near matches).

Changes

  • gateway/run.py: _is_duplicate_voice_transcript() + call site in _handle_voice_channel_input; getattr(..., None) fallback pattern for the new instance attribute (+54/-0)
  • tests: exact and near-duplicate suppression regressions

Validation

scripts/run_tests.sh tests/gateway/test_voice_command.py → 180 passed

Original PR: #19273

Deduplicate exact and near-exact Discord voice STT transcripts per guild/user over a short window to avoid duplicate delayed agent replies.

Adds regression tests for exact and near-duplicate voice transcript suppression.
@teknium1 teknium1 merged commit 1bd975c into main May 3, 2026
9 of 10 checks passed
@teknium1 teknium1 deleted the hermes/hermes-8c54fd4a branch May 3, 2026 23:59
@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/gateway Gateway runner, session dispatch, delivery platform/discord Discord bot adapter tool/tts Text-to-speech and transcription labels May 4, 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 P2 Medium — degraded but workaround exists platform/discord Discord bot adapter tool/tts Text-to-speech and transcription type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants