mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-29 18:46:59 +00:00
Salvaged from PR #62040 (@giladbau), simplified per post-#73072 main: the central _repair_ogg_container transcode makes an explicit .ogg output path sufficient — no target_platform plumbing through the TTS tool needed. Root cause (class-level): both gateway auto-TTS delivery call sites relied on the TTS tool reading HERMES_SESSION_PLATFORM to pick Ogg/Opus vs MP3, but that contextvar is cleared by _clear_session_env before the base adapter's post-handler auto-TTS block runs, so want_opus was always False on that path → MP3 → Telegram sent an audio attachment instead of a native voice bubble (#57049, #36685). The runner's _send_voice_reply had the sibling bug: it hardcoded .ogg for Telegram only, leaving Matrix and Feishu runner voice replies as MP3 (#14841, #45557). Fix: new build_auto_tts_output_path(platform) in gateway/platforms/base.py hands an explicit .ogg temp path when the platform is in the TTS tool's OPUS_VOICE_PLATFORMS set (single source of truth — telegram/matrix/feishu/ whatsapp/signal), .mp3 otherwise. Used by BOTH delivery call sites: - BasePlatformAdapter auto-TTS block (also honors the tool's success flag and cleans up requested + returned paths) - GatewayRunner._send_voice_reply (replaces the telegram-only ternary) Fixes #57049 Fixes #36685 Refs #14841 #45557 |
||
|---|---|---|
| .. | ||
| qqbot | ||
| __init__.py | ||
| _http_client_limits.py | ||
| ADDING_A_PLATFORM.md | ||
| api_server.py | ||
| base.py | ||
| bluebubbles.py | ||
| helpers.py | ||
| msgraph_webhook.py | ||
| signal.py | ||
| signal_format.py | ||
| signal_rate_limit.py | ||
| webhook.py | ||
| webhook_filters.py | ||
| weixin.py | ||
| whatsapp_cloud.py | ||
| whatsapp_common.py | ||
| yuanbao.py | ||
| yuanbao_media.py | ||
| yuanbao_proto.py | ||
| yuanbao_sticker.py | ||