Skip to content

Commit d9a467f

Browse files
committed
feat: move TTS into core (#1559) (thanks @Glucksberg)
1 parent aef88cd commit d9a467f

26 files changed

Lines changed: 1522 additions & 1649 deletions

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Docs: https://docs.clawd.bot
1818
- Markdown: add per-channel table conversion (bullets for Signal/WhatsApp, code blocks elsewhere). (#1495) Thanks @odysseus0.
1919
- Tlon: add Urbit channel plugin (DMs, group mentions, thread replies). (#1544) Thanks @wca4a.
2020
- Channels: allow per-group tool allow/deny policies across built-in + plugin channels. (#1546) Thanks @adam91holt.
21+
- TTS: move Telegram TTS into core with auto-replies, commands, and gateway methods. (#1559) Thanks @Glucksberg.
2122

2223
### Fixes
2324
- Skills: gate bird Homebrew install to macOS. (#1569) Thanks @bradleypriest.

docs/gateway/configuration.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1446,6 +1446,44 @@ active agent’s `identity.emoji` when set, otherwise `"👀"`. Set it to `""` t
14461446
`removeAckAfterReply` removes the bot’s ack reaction after a reply is sent
14471447
(Slack/Discord/Telegram only). Default: `false`.
14481448

1449+
#### `messages.tts`
1450+
1451+
Enable text-to-speech for outbound replies. When on, Clawdbot generates audio
1452+
using ElevenLabs or OpenAI and attaches it to responses. Telegram uses Opus
1453+
voice notes; other channels send MP3 audio.
1454+
1455+
```json5
1456+
{
1457+
messages: {
1458+
tts: {
1459+
enabled: true,
1460+
mode: "final", // final | all (include tool/block replies)
1461+
provider: "elevenlabs",
1462+
maxTextLength: 4000,
1463+
timeoutMs: 30000,
1464+
prefsPath: "~/.clawdbot/settings/tts.json",
1465+
elevenlabs: {
1466+
apiKey: "elevenlabs_api_key",
1467+
voiceId: "voice_id",
1468+
modelId: "eleven_multilingual_v2"
1469+
},
1470+
openai: {
1471+
apiKey: "openai_api_key",
1472+
model: "gpt-4o-mini-tts",
1473+
voice: "alloy"
1474+
}
1475+
}
1476+
}
1477+
}
1478+
```
1479+
1480+
Notes:
1481+
- `messages.tts.enabled` can be overridden by local user prefs (see `/tts_on`, `/tts_off`).
1482+
- `prefsPath` stores local overrides (enabled/provider/limit/summarize).
1483+
- `maxTextLength` is a hard cap for TTS input; summaries are truncated to fit.
1484+
- `/tts_limit` and `/tts_summary` control per-user summarization settings.
1485+
- `apiKey` values fall back to `ELEVENLABS_API_KEY`/`XI_API_KEY` and `OPENAI_API_KEY`.
1486+
14491487
### `talk`
14501488

14511489
Defaults for Talk mode (macOS/iOS/Android). Voice IDs fall back to `ELEVENLABS_VOICE_ID` or `SAG_VOICE_ID` when unset.

docs/tools/slash-commands.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,13 @@ Text + native (when enabled):
6767
- `/config show|get|set|unset` (persist config to disk, owner-only; requires `commands.config: true`)
6868
- `/debug show|set|unset|reset` (runtime overrides, owner-only; requires `commands.debug: true`)
6969
- `/usage off|tokens|full|cost` (per-response usage footer or local cost summary)
70+
- `/tts_on` (enable TTS replies)
71+
- `/tts_off` (disable TTS replies)
72+
- `/tts_provider [openai|elevenlabs]` (set or show TTS provider)
73+
- `/tts_limit <chars>` (max chars before TTS summarization)
74+
- `/tts_summary on|off` (toggle TTS auto-summary)
75+
- `/tts_status` (show TTS status)
76+
- `/audio <text>` (convert text to a TTS audio reply)
7077
- `/stop`
7178
- `/restart`
7279
- `/dock-telegram` (alias: `/dock_telegram`) (switch replies to Telegram)

extensions/telegram-tts/README.md

Lines changed: 0 additions & 146 deletions
This file was deleted.

extensions/telegram-tts/clawdbot.plugin.json

Lines changed: 0 additions & 117 deletions
This file was deleted.

0 commit comments

Comments
 (0)