fix(gateway): transcribe configured Discord audio attachments - #31225
fix(gateway): transcribe configured Discord audio attachments#31225mgreez wants to merge 1 commit into
Conversation
teknium1
left a comment
There was a problem hiding this comment.
Thanks for preserving the default file-attachment behavior and making the proposed STT route channel-scoped.
Problems
- The changed
MessageType.AUDIObranch still routes every path inevent.media_urlsto STT. Current main has per-attachment MIME classification ingateway/run.py:2024-2029; a mixed Discord message whose first attachment is audio can also contain image/document paths, and those must not be transcribed. Seetests/gateway/test_mixed_attachment_routing.py:55-59. tests/gateway/test_discord_audio_attachment_stt.pytests the predicate but not the live_prepare_inbound_message_text→transcribe_audiopath, so the configured and unconfigured end-to-end behaviors are not covered.- The configuration bridge has moved to
gateway/config.py:1156-1235, and the Discord adapter is now underplugins/platforms/discord/adapter.py; this needs a current-main salvage. Please also document the new user-facing setting nearwebsite/docs/user-guide/messaging/discord.md:310-335.
Suggested changes
- Use
_event_media_is_audio(event, i)for the opt-in routing and add mixed-media regression coverage. - Add configured/unconfigured inbound-pipeline tests with mocked
transcribe_audio.
Automated hermes-sweeper review.
| # capture channel can opt in via | ||
| # discord.transcribe_audio_attachment_channels so iPhone/Discord | ||
| # voice notes that arrive as generic audio attachments still get | ||
| # transcribed. |
There was a problem hiding this comment.
Please classify each attachment before appending it here. An AUDIO-typed Discord message can contain mixed media; routing every event.media_urls entry through STT would send accompanying images/documents to transcribe_audio. Current main provides _event_media_is_audio(event, i) for this per-MIME distinction.
|
Vox Lockin lane 07 probe — feature absent on main, PR stale/conflicting; not part of the delivery-reliability class. Probe against origin/main @
Recommendation: rebase and re-open for review as a feature; the diff is clean and the tests ( |
What does this PR do?
Related Issue
Fixes #
Type of Change
Changes Made
How to Test
Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — or N/Acli-config.yaml.exampleif I added/changed config keys — or N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — or N/AFor New Skills
hermes --toolsets skills -q "Use the X skill to do Y"Screenshots / Logs