Add voice message transcription support (#54)
* Add voice message transcription support (all channels) Adds OpenAI Whisper transcription for voice messages across all channels: - Telegram: ctx.message.voice - WhatsApp: audioMessage via downloadMediaMessage - Signal: audio attachments from local files - Slack: audio files via url_private_download - Discord: audio attachments Voice messages sent to agent as "[Voice message]: <transcript>" Configuration (config takes priority over env): - lettabot.yaml: transcription.apiKey, transcription.model - Env: OPENAI_API_KEY, TRANSCRIPTION_MODEL Closes #47 Written by Cameron ◯ Letta Code "The best interface is no interface - just talk." * Add voice message documentation to README - Add Voice Messages to features list - Add configuration section for transcription - Document supported channels Written by Cameron ◯ Letta Code * Notify users when voice transcription is not configured Instead of silently ignoring voice messages, send a helpful message linking to the documentation. Written by Cameron ◯ Letta Code * feat: upgrade to letta-code-sdk main + fix Signal voice transcription - Switch from published SDK (v0.0.3) to local main branch (file:../letta-code-sdk) - Update bot.ts for new SDK API: createSession(agentId?, options) signature - Add conversationId tracking to store for proper conversation persistence - Fix Signal voice transcription: read attachments from ~/.local/share/signal-cli/attachments/ - Fix Telegram markdown ESM issue: make markdownToTelegramV2 async with dynamic import - Add transcription config to lettabot.yaml - Add extensive debug logging for queue and session processing Signal voice messages now properly transcribe and send to agent. 🐾 Generated with [Letta Code](https://letta.com) Co-Authored-By: Letta <noreply@letta.com> * fix: update Signal CLI message sender to use daemon JSON-RPC API - Switch from signal-cli-rest-api to signal-cli daemon (port 8090) - Use JSON-RPC send method instead of REST /v2/send - Support group IDs with group: prefix - Handle 201 responses and empty bodies correctly 🐾 Generated with [Letta Code](https://letta.com) Co-Authored-By: Letta <noreply@letta.com> * Add placeholder for untranscribed voice messages on Signal If a voice-only message arrives and transcription fails or is disabled, forward a placeholder so the user knows the message was received. Written by Cameron ◯ Letta Code --------- Co-authored-by: Letta <noreply@letta.com>
This commit is contained in:
26
README.md
26
README.md
@@ -10,6 +10,7 @@ Your personal AI assistant that remembers everything across **Telegram, Slack, D
|
||||
- **Unified Memory** - Single agent remembers everything from all channels
|
||||
- **Persistent Memory** - Agent remembers conversations across sessions (days/weeks/months)
|
||||
- **Local Tool Execution** - Agent can read files, search code, run commands on your machine
|
||||
- **Voice Messages** - Automatic transcription via OpenAI Whisper
|
||||
- **Heartbeat** - Periodic check-ins where the agent reviews tasks
|
||||
- **Scheduling** - Agent can create one-off reminders and recurring tasks
|
||||
- **Streaming Responses** - Real-time message updates as the agent thinks
|
||||
@@ -97,6 +98,31 @@ That's it! Message your bot on Telegram.
|
||||
|
||||
> **Note:** For detailed environment variable reference and multi-channel setup, see [SKILL.md](./SKILL.md)
|
||||
|
||||
## Voice Messages
|
||||
|
||||
LettaBot can transcribe voice messages using OpenAI Whisper. Voice messages are automatically converted to text and sent to the agent with a `[Voice message]:` prefix.
|
||||
|
||||
**Supported channels:** Telegram, WhatsApp, Signal, Slack, Discord
|
||||
|
||||
### Configuration
|
||||
|
||||
Add your OpenAI API key to `lettabot.config.yaml`:
|
||||
|
||||
```yaml
|
||||
transcription:
|
||||
provider: openai
|
||||
apiKey: sk-...
|
||||
model: whisper-1 # optional, defaults to whisper-1
|
||||
```
|
||||
|
||||
Or set via environment variable:
|
||||
|
||||
```bash
|
||||
export OPENAI_API_KEY=sk-...
|
||||
```
|
||||
|
||||
If no API key is configured, voice messages are silently ignored.
|
||||
|
||||
## Skills
|
||||
LettaBot is compatible with [skills.sh](https://skills.sh) and [Clawdhub](https://clawdhub.com/).
|
||||
|
||||
|
||||
Reference in New Issue
Block a user