picoclaw/pkg/channels/telegram
Orkun Manap dd9adf8a04
feat: add ElevenLabs Scribe STT transcriber and Telegram SendVoice support (#1905)
* feat: add ElevenLabs Scribe STT transcriber and Telegram SendVoice support

Add ElevenLabsTranscriber as an alternative speech-to-text provider using
the ElevenLabs Scribe API (scribe_v1). This enables voice message
transcription for users who already have an ElevenLabs API key, without
requiring a separate Groq account.

Changes:
- Add ElevenLabsTranscriber implementing the Transcriber interface
- Update DetectTranscriber to check providers.elevenlabs.api_key first,
  falling back to Groq for backward compatibility
- Add ElevenLabs to ProvidersConfig
- Add "voice" media type for OGG files with "voice" in filename
- Add SendVoice support in Telegram channel for voice bubble messages
- Add comprehensive tests for ElevenLabs transcriber

Configuration:
  "providers": {
    "elevenlabs": {
      "api_key": "sk_your_key_here"
    }
  }

Closes #1503 (partial)

* fix: move voice-bubble detection into Telegram channel to avoid regression in other channels

Address review feedback: keep inferMediaType returning "audio" for all
OGG files. Voice-bubble detection (SendVoice vs SendAudio) is now done
inside the Telegram channel based on filename, so other channels that
map "audio" explicitly are unaffected.

* fix: align VoiceConfig struct tags to pass golines formatter

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(agent): use ModelName in loop test added by upstream

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 22:11:10 +01:00
..
testdata feat: telegram use parse mode ModeMarkdownV2 instead of ModeHTML (#1018) 2026-03-18 21:29:21 +08:00
command_registration.go feat(commands): centralized command registry with sub-command routing (#959) 2026-03-06 17:31:40 +08:00
command_registration_test.go feat(commands): centralized command registry with sub-command routing (#959) 2026-03-06 17:31:40 +08:00
init.go refactor(channels): add channel subpackages and update gateway imports 2026-02-20 23:25:44 +08:00
parse_markdown_to_md_v2.go feat: telegram use parse mode ModeMarkdownV2 instead of ModeHTML (#1018) 2026-03-18 21:29:21 +08:00
parse_markdown_to_md_v2_test.go feat: telegram use parse mode ModeMarkdownV2 instead of ModeHTML (#1018) 2026-03-18 21:29:21 +08:00
parser_markdown_to_html.go feat: telegram use parse mode ModeMarkdownV2 instead of ModeHTML (#1018) 2026-03-18 21:29:21 +08:00
telegram.go feat: add ElevenLabs Scribe STT transcriber and Telegram SendVoice support (#1905) 2026-03-23 22:11:10 +01:00
telegram_dispatch_test.go fix: Fixed the bug where the bus was closed and consumers had unfinished messages. (#1179) 2026-03-18 00:12:12 +08:00
telegram_group_command_filter_test.go fix: Fixed the bug where the bus was closed and consumers had unfinished messages. (#1179) 2026-03-18 00:12:12 +08:00
telegram_test.go feat: telegram use parse mode ModeMarkdownV2 instead of ModeHTML (#1018) 2026-03-18 21:29:21 +08:00