picoclaw/pkg/voice
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
..
audio_model_transcriber.go Merge branch 'main' into version 2026-03-23 10:54:08 +08:00
audio_model_transcriber_test.go feat(voice): add audio-model transcription support 2026-03-22 20:07:22 +08:00
elevenlabs_transcriber.go feat: add ElevenLabs Scribe STT transcriber and Telegram SendVoice support (#1905) 2026-03-23 22:11:10 +01:00
elevenlabs_transcriber_test.go feat: add ElevenLabs Scribe STT transcriber and Telegram SendVoice support (#1905) 2026-03-23 22:11:10 +01:00
groq_transcriber.go feat(voice): add audio-model transcription support 2026-03-22 20:07:22 +08:00
groq_transcriber_test.go feat(voice): add audio-model transcription support 2026-03-22 20:07:22 +08:00
transcriber.go feat: add ElevenLabs Scribe STT transcriber and Telegram SendVoice support (#1905) 2026-03-23 22:11:10 +01:00
transcriber_test.go feat: add ElevenLabs Scribe STT transcriber and Telegram SendVoice support (#1905) 2026-03-23 22:11:10 +01:00