mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-29 18:46:59 +00:00
Lark's native "audio" msg_type is an in-app voice recording — uploaded audio files arrive as "file"/"media". But _resolve_normalized_message_type resolved the "audio" preferred type to MessageType.AUDIO, which the gateway treats as a non-transcribed file attachment (run.py: AUDIO -> audio_file_paths, "never STT"; VOICE -> audio_paths, "always STT"). Result: a Feishu voice note reached the agent as an untranscribable audio attachment and was silently ignored — the user's spoken message never became text. Every other platform that receives native voice notes (Telegram, Discord, Slack, WhatsApp, Signal, Matrix, WeChat, WeCom, DingTalk, QQ, BlueBubbles, Mattermost, Yuanbao) classifies them as MessageType.VOICE. Feishu was the only one classifying them as AUDIO. This is the follow-up to #28993, which added native voice-note transcription for Discord + DingTalk but did not cover Feishu. Return MessageType.VOICE for the "audio" branch. The branch is reached only for Lark's top-level audio msg_type (set in the normalizer; file uploads map to "document"), so VOICE is unconditionally correct here — no risk of auto-transcribing an uploaded music/audio file. - plugins/platforms/feishu/adapter.py: _resolve_normalized_message_type audio branch returns VOICE instead of resolving to AUDIO via mime. - tests/gateway/test_feishu.py: test_extract_audio_message_downloads_and_caches asserted the old AUDIO behavior on a fixture literally named voice.ogg — updated to expect VOICE (the corrected classification). - tests/gateway/test_feishu_voice_message_type.py: new focused regression tests (audio->VOICE with and without mime; photo/document/text unaffected). Rebased onto current main: the Feishu platform moved from the single-file gateway/platforms/feishu.py into the plugins/platforms/feishu/ package; the fix applies to the same _resolve_normalized_message_type logic at its new home. Verified the new voice tests fail when the branch resolves to AUDIO and pass with VOICE, while the photo/document/text cases are unaffected either way. Note: classification is mock-tested here; the downstream STT pipeline is the shared, already-proven path (#28993). End-to-end verification on a live Feishu account would be a welcome confirmation. Refs #28993 (sibling-gap: Feishu was the platform left uncovered). |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| adapter.py | ||
| feishu_comment.py | ||
| feishu_comment_rules.py | ||
| feishu_meeting_invite.py | ||
| plugin.yaml | ||