Skip to content

fix(telegram): keep audio attachments as files#24883

Closed
felix-windsor wants to merge 1 commit into
NousResearch:mainfrom
felix-windsor:codex/fix-telegram-audio-attachments
Closed

fix(telegram): keep audio attachments as files#24883
felix-windsor wants to merge 1 commit into
NousResearch:mainfrom
felix-windsor:codex/fix-telegram-audio-attachments

Conversation

@felix-windsor

Copy link
Copy Markdown
Contributor

Summary

  • treat Telegram message.audio as an attached file/document instead of a voice message
  • allow audio documents such as mp3/m4a/ogg/wav/flac to be cached and passed to the agent as files
  • skip automatic STT for document audio while preserving STT for Telegram voice notes

Fixes #24870

Tests

  • scripts/run_tests.sh tests/gateway/test_telegram_documents.py tests/gateway/test_stt_config.py tests/gateway/test_tts_media_routing.py
  • .venv/bin/ruff check gateway/platforms/base.py gateway/platforms/telegram.py gateway/run.py tests/gateway/test_telegram_documents.py tests/gateway/test_stt_config.py

@alt-glitch alt-glitch added type/bug Something isn't working comp/gateway Gateway runner, session dispatch, delivery platform/telegram Telegram bot adapter P2 Medium — degraded but workaround exists labels May 13, 2026
@felix-windsor felix-windsor force-pushed the codex/fix-telegram-audio-attachments branch from e107995 to 87b69af Compare May 18, 2026 02:17
@felix-windsor

Copy link
Copy Markdown
Contributor Author

Rebased on latest main (as of 2026-05-18) and force-pushed.

Local verification:

  • ./scripts/run_tests.sh tests/gateway/test_telegram_documents.py tests/gateway/test_stt_config.py

(Still seeing no CI statuses reported on the PR head; may need maintainer Actions approval for fork PRs.)

@felix-windsor felix-windsor force-pushed the codex/fix-telegram-audio-attachments branch from 87b69af to a3c8cdc Compare May 18, 2026 12:36
@felix-windsor felix-windsor force-pushed the codex/fix-telegram-audio-attachments branch from a3c8cdc to 9b6b15c Compare May 19, 2026 03:16
@teknium1

Copy link
Copy Markdown
Contributor

Closing in favor of #24879 — both fix the same bug (Telegram message.audio being misclassified as voice and auto-transcribed, #24870). #24879 was submitted first and has a cleaner narrative + cleaner split:

  • Introduces audio_file_paths as a separate inbound list (vs. extending document handling)
  • Narrows audio_paths selector to MessageType.VOICE only
  • Per-Bot-API-field handling table in the PR body

Functionally similar overall. Thanks.

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/telegram Telegram bot adapter type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Telegram: audio file attachments misclassified as voice messages, routed to STT pipeline

3 participants