fix(tts): include feishu in want_opus guard for native voice delivery - #45637
Closed
KeyArgo wants to merge 2 commits into
Closed
fix(tts): include feishu in want_opus guard for native voice delivery#45637KeyArgo wants to merge 2 commits into
KeyArgo wants to merge 2 commits into
Conversation
The want_opus guard at tools/tts_tool.py:1890 was:
want_opus = (platform == "telegram")
This gated opus conversion (for native voice-bubble delivery) to
Telegram only. minimax TTS outputs mp3, not ogg, so it needs
ffmpeg conversion to become voice-bubble compatible on Feishu.
Since v2026.6.5 (commit ed9087f), Feishu users with minimax TTS
were getting the mp3 sent as a file attachment instead of as a
voice bubble.
Fix: extend the guard to include feishu alongside telegram.
want_opus = platform in {"telegram", "feishu"}
Fixes NousResearch#45557
Collaborator
Adds regression coverage for the feishu branch of the want_opus guard fix. Mirrors the existing test_edge_telegram_converts_to_opus_voice test but with HERMES_SESSION_PLATFORM=feishu. This catches any future regression where feishu is removed from the want_opus set or the conversion path stops applying to feishu. Follows the pattern in tests/tools/test_tts_opus_routing.py.
This was referenced Jun 13, 2026
Contributor
Author
|
Closing as duplicate of #45555 (Asanilo, opened 2026-06-13 11:24 UTC). The fix is identical. The test commit on branch will remain for the record. |
LLQWQ
pushed a commit
to LLQWQ/hermes-agent
that referenced
this pull request
Jun 26, 2026
Three changes to enable native Feishu voice bubbles instead of file attachments: 1. tools/tts_tool.py: Add 'feishu' to want_opus guard so TTS generates .ogg (opus) format for Feishu, matching the existing Telegram behavior. Related: NousResearch#45637 2. plugins/platforms/feishu/adapter.py - upload duration: Include audio duration in CreateFileRequestBody when uploading opus files. Duration is extracted by parsing the OGG container (pure Python, no ffprobe dependency). 3. plugins/platforms/feishu/adapter.py - thread routing fallback: Feishu's create message API rejects msg_type='audio' with receive_id_type='thread_id' (error 99992402). As a workaround, when audio send fails in a thread: a) Try the reply API by fetching the last message in the thread b) Fall back to chat_id routing (main chat) if reply also fails Fixes NousResearch#18831 Fixes NousResearch#16524
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The
want_opusguard attools/tts_tool.py:1890was:This gated opus conversion (for native voice-bubble delivery) to
Telegram only.
minimaxTTS outputs mp3, not ogg, so it needsffmpeg conversion to become voice-bubble compatible on Feishu.
Since v2026.6.5 (commit ed9087f, "fix(tts): keep native audio
outside Telegram voice delivery"), Feishu users with minimax TTS
were getting the mp3 sent as a file attachment instead of as a
voice bubble.
Fix
Extend the guard to include feishu alongside telegram:
Behavior change
Fixes #45557