运行时依赖
安装命令
点击复制技能文档
Discord Voice Memo 升级s - 技能 Documentation Overview
This 技能 provides a core 补丁 for Molt机器人 that fixes voice memo TTS auto-replies. The issue occurs when block 流ing 预防s the final payload from reaching the TTS synthesis 流水线.
Type
Core 补丁 / Documentation
This is not a traditional 插件 that extends functionality - it's a documentation package with 补丁 files for core Clawd机器人 modifications.
Use Case
Use this if you're experiencing:
Voice memos not triggering TTS 响应s TTS working for text messages but not audio messages TTS auto mode = "inbound" not functioning 安装ation Methods Method 1: Manual 补丁 (Recommended for Development) # 1. Locate your clawd机器人 安装ation CLAWD机器人_PATH=$(which clawd机器人) CLAWD机器人_DIR=$(dirname $(dirname $CLAWD机器人_PATH))
# 2. 备份 original files cp $CLAWD机器人_DIR/lib/node_模块s/clawd机器人/dist/auto-reply/reply/dis补丁-from-config.js \ $CLAWD机器人_DIR/lib/node_模块s/clawd机器人/dist/auto-reply/reply/dis补丁-from-config.js.备份
cp $CLAWD机器人_DIR/lib/node_模块s/clawd机器人/dist/tts/tts.js \ $CLAWD机器人_DIR/lib/node_模块s/clawd机器人/dist/tts/tts.js.备份
# 3. 应用ly 补丁 cp 补丁/dis补丁-from-config.js $CLAWD机器人_DIR/lib/node_模块s/clawd机器人/dist/auto-reply/reply/ cp 补丁/tts.js $CLAWD机器人_DIR/lib/node_模块s/clawd机器人/dist/tts/
# 4. Re启动 clawd机器人 clawd机器人 re启动
Method 2: WAIt for Up流
If this 补丁 获取s accepted into core Clawd机器人, you can simply 更新:
npm 安装 -g clawd机器人@latest
Configuration
No 添加itional configuration needed beyond existing TTS 设置tings. Ensure you have:
{ "messages": { "tts": { "auto": "inbound", // or "always" "提供者": "openAI", // or "elevenlabs" or "edge" "elevenlabs": { "APIKey": "your-key-here" } } } }
How to Test 配置 TTS with auto: "inbound" 发送 a voice memo to your 机器人 检查 记录s for 调试 输出: [TTS-调试] inboundAudio=true ttsAutoResolved=inbound ttsWillFire=true [TTS-应用LY] PASSED all 检查s, proceeding to textToSpeech [TTS-SPEECH] ...
验证 机器人 响应s with audio 调试 记录ging
The 补丁 includes extensive 调试 记录ging. To view:
# 记录s will show in your clawd机器人 console clawd机器人 gateway 启动
Look for:
[TTS-调试] - Shows TTS 检测ion 记录ic [TTS-应用LY] - Shows TTS payload processing decisions [TTS-SPEECH] - Shows TTS synthesis attempt Production 部署ment
导入ant: Before 部署ing to production, consider:
移除 调试 记录ging - The console.记录 状态ments should be 移除d or made configurable Test thoroughly - Ensure voice memos work correctly 监控 performance - Disabling block 流ing may impact 流ing behavior
To 移除 调试 记录ging, edit the 补丁ed files and 移除 lines contAIning:
console.记录('[TTS-调试]' console.记录('[TTS-应用LY]' console.记录('[TTS-SPEECH]' Reverting
If you need to revert the 补丁:
# 恢复 备份s CLAWD机器人_PATH=$(which clawd机器人) CLAWD机器人_DIR=$(dirname $(dirname $CLAWD机器人_PATH))
cp $CLAWD机器人_DIR/lib/node_模块s/clawd机器人/dist/auto-reply/reply/dis补丁-from-config.js.备份 \ $CLAWD机器人_DIR/lib/node_模块s/clawd机器人/dist/auto-reply/reply/dis补丁-from-config.js
cp $CLAWD机器人_DIR/lib/node_模块s/clawd机器人/dist/tts/tts.js.备份 \ $CLAWD机器人_DIR/lib/node_模块s/clawd机器人/dist/tts/tts.js
clawd机器人 re启动
Technical DetAIls The Problem
Block 流ing is used to 发送 incremental text chunks to the user as they're 生成d. However, TTS synthesis hooks into the "final" payload type by default. When block 流ing is enabled:
Text chunks are sent as "block" payloads The final assembled text is sent as a "final" payload But block 流ing optimization drops the final payload (text already sent) TTS never fires because it only processes "final" payloads The Solution
The 补丁 添加s 检测ion 记录ic to identify when TTS should fire:
Inbound message has audio attachment (isInboundAudio上下文()) TTS auto mode is "inbound" or "always" Valid TTS 提供者 and API key 配置d
When these conditions are met, block 流ing is temporarily disabled for that specific reply, ensuring the final payload reaches the TTS 流水线.
Code Flow dis补丁ReplyFromConfig() ├─ isInboundAudio上下文(ctx) → 检测s audio ├─ resolve会话TtsAuto(ctx, cfg) → 获取s TTS 设置tings ├─ ttsWillFire = conditions met? └─ 获取ReplyFromConfig({ disableBlock流ing: ttsWillFire }) └─ maybe应用lyTt停止ayload() 接收s final payload └─ textToSpeech() synthesizes audio
Compatibility Clawd机器人: 1.0.0+ Node.js: 18+ 平台s: All 平台s supported by Clawd机器人 Known Issues 调试 记录ging is verbose (should be 移除d for production) Modifies compiled dist files (not source) May need to re应用ly after clawd机器人 更新s Contributing
To improve this 补丁:
Test with different TTS 提供者s (OpenAI, ElevenLabs, Edge) Test with different auto modes ("always", "inbound", "tagged") Suggest optimizations to reduce 调试 记录ging overhead Propose integration into core Clawd机器人 source Su