-
Notifications
You must be signed in to change notification settings - Fork 15.7k
feat(extensions): add telegram-tts extension for voice responses #1559
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
|
I wonder if that shouldn't be part of our https://docs.clawd.bot/nodes/media-understanding feature? Edit: Ah this is outbound. Would replace sag. I like. |
b21f7ab to
b66feea
Compare
Add a new extension that provides automatic text-to-speech for chat responses using ElevenLabs API. Features: - `speak` tool for converting text to voice messages - RPC methods: tts.status, tts.enable, tts.disable, tts.convert - User preferences file for persistent TTS state - Configurable voice ID, model, and max text length Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Remove sag CLI dependency - Add direct ElevenLabs API integration via fetch - Add OpenAI TTS as alternative provider - Support multi-provider configuration - Add tts.providers RPC method - Update config schema with OpenAI options - Bump version to 0.2.0 Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Integrate message_sending hook into Telegram delivery path - Send text first, then audio as voice message after - Add /tts_provider command to switch between OpenAI and ElevenLabs - Implement automatic fallback when primary provider fails - Use gpt-4o-mini-tts as default OpenAI model - Add hook integration to route-reply.ts for other channels Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Add /tts_limit command to configure max text length (default 1500) - Auto-summarize long texts with gpt-4o-mini before TTS conversion - Add truncation safeguard if summary exceeds hard limit - Validate targetLength parameter (100-10000) - Use conservative max_tokens for multilingual text - Add prompt injection defense with XML delimiters Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Add latency metrics to summarizeText and textToSpeech functions - Add /tts_status command showing config and last attempt result - Add /tts_summary command for feature flag control - Fix atomic write to clean up temp file on rename failure - Add timer.unref() to prevent blocking process shutdown - Add unit tests for validation functions (13 tests) - Update README with new commands and features Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Export summarizeText in _test for testing - Add 8 tests covering: - Successful summarization with metrics - OpenAI API call parameters verification - targetLength validation (min/max boundaries) - Error handling (API failures, empty responses) Co-Authored-By: Claude Opus 4.5 <[email protected]>
b66feea to
ff71e08
Compare
Contributor
|
Landed via rebase onto main. Thanks @Glucksberg! |
steipete
added a commit
that referenced
this pull request
Jan 24, 2026
Co-authored-by: Glucksberg <[email protected]>
Glucksberg
added a commit
to Glucksberg/clawdbot
that referenced
this pull request
Jan 25, 2026
PR clawdbot#1630 (LINE plugin) accidentally removed the detailed TTS command definition with args and argsMenu, replacing it with a simplified version. This restores the original functionality from PR clawdbot#1559. Fixes regression where /tts no longer showed the inline action menu on Telegram and other native command surfaces. Co-Authored-By: Claude Opus 4.5 <[email protected]>
mcinteerj
pushed a commit
to mcinteerj/moltbot
that referenced
this pull request
Jan 25, 2026
mcinteerj
pushed a commit
to mcinteerj/moltbot
that referenced
this pull request
Jan 25, 2026
) Co-authored-by: Glucksberg <[email protected]>
Glucksberg
added a commit
to Glucksberg/clawdbot
that referenced
this pull request
Jan 28, 2026
PR moltbot#1630 (LINE plugin) accidentally removed the detailed TTS command definition with args and argsMenu, replacing it with a simplified version. This restores the original functionality from PR moltbot#1559. Fixes regression where /tts no longer showed the inline action menu on Telegram and other native command surfaces. Co-Authored-By: Claude Opus 4.5 <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new Telegram TTS extension that converts text responses to audio using ElevenLabs or OpenAI APIs.
Key features:
/audiocommand: On-demand TTS via LLM tool/tts_providercommand to switch between providers/tts_statusshows last attempt info with latency metrics/tts_limitto set max text length before summarizationCommands registered:
/tts_on/tts_off/tts_status/tts_provider/tts_limitTechnical details:
message_sendinghook to intercept outbound messagesMEDIA:/pathdirective for audio deliveryFiles changed:
extensions/telegram-tts/- New extension packageindex.ts- Main extension code (~1000 lines)index.test.ts- Unit tests (21 tests)clawdbot.plugin.json- Plugin manifestpackage.json- Package definitionREADME.md- Documentationsrc/auto-reply/reply/route-reply.ts- Hook integration for routingsrc/telegram/bot/delivery.ts- Hook integration for Telegram deliveryTest plan
pnpm test extensions/telegram-tts)🤖 Generated with Claude Code