Install
openclaw skills install discord-voice-memo-upgradeProvides a patch for Clawdbot fixing TTS auto-replies on inbound voice memos by disabling block streaming to ensure final payload reaches TTS pipeline.
openclaw skills install discord-voice-memo-upgradeThis skill provides a core patch for Moltbot that fixes voice memo TTS auto-replies. The issue occurs when block streaming prevents the final payload from reaching the TTS synthesis pipeline.
Core Patch / Documentation
This is not a traditional plugin that extends functionality - it's a documentation package with patch files for core Clawdbot modifications.
Use this if you're experiencing:
# 1. Locate your clawdbot installation
CLAWDBOT_PATH=$(which clawdbot)
CLAWDBOT_DIR=$(dirname $(dirname $CLAWDBOT_PATH))
# 2. Backup original files
cp $CLAWDBOT_DIR/lib/node_modules/clawdbot/dist/auto-reply/reply/dispatch-from-config.js \
$CLAWDBOT_DIR/lib/node_modules/clawdbot/dist/auto-reply/reply/dispatch-from-config.js.backup
cp $CLAWDBOT_DIR/lib/node_modules/clawdbot/dist/tts/tts.js \
$CLAWDBOT_DIR/lib/node_modules/clawdbot/dist/tts/tts.js.backup
# 3. Apply patch
cp patch/dispatch-from-config.js $CLAWDBOT_DIR/lib/node_modules/clawdbot/dist/auto-reply/reply/
cp patch/tts.js $CLAWDBOT_DIR/lib/node_modules/clawdbot/dist/tts/
# 4. Restart clawdbot
clawdbot restart
If this patch gets accepted into core Clawdbot, you can simply update:
npm install -g clawdbot@latest
No additional configuration needed beyond existing TTS settings. Ensure you have:
{
"messages": {
"tts": {
"auto": "inbound", // or "always"
"provider": "openai", // or "elevenlabs" or "edge"
"elevenlabs": {
"apiKey": "your-key-here"
}
}
}
}
auto: "inbound"[TTS-DEBUG] inboundAudio=true ttsAutoResolved=inbound ttsWillFire=true
[TTS-APPLY] PASSED all checks, proceeding to textToSpeech
[TTS-SPEECH] ...
The patch includes extensive debug logging. To view:
# Logs will show in your clawdbot console
clawdbot gateway start
Look for:
[TTS-DEBUG] - Shows TTS detection logic[TTS-APPLY] - Shows TTS payload processing decisions[TTS-SPEECH] - Shows TTS synthesis attemptImportant: Before deploying to production, consider:
console.log statements should be removed or made configurableTo remove debug logging, edit the patched files and remove lines containing:
console.log('[TTS-DEBUG]'console.log('[TTS-APPLY]'console.log('[TTS-SPEECH]'If you need to revert the patch:
# Restore backups
CLAWDBOT_PATH=$(which clawdbot)
CLAWDBOT_DIR=$(dirname $(dirname $CLAWDBOT_PATH))
cp $CLAWDBOT_DIR/lib/node_modules/clawdbot/dist/auto-reply/reply/dispatch-from-config.js.backup \
$CLAWDBOT_DIR/lib/node_modules/clawdbot/dist/auto-reply/reply/dispatch-from-config.js
cp $CLAWDBOT_DIR/lib/node_modules/clawdbot/dist/tts/tts.js.backup \
$CLAWDBOT_DIR/lib/node_modules/clawdbot/dist/tts/tts.js
clawdbot restart
Block streaming is used to send incremental text chunks to the user as they're generated. However, TTS synthesis hooks into the "final" payload type by default. When block streaming is enabled:
The patch adds detection logic to identify when TTS should fire:
isInboundAudioContext())When these conditions are met, block streaming is temporarily disabled for that specific reply, ensuring the final payload reaches the TTS pipeline.
dispatchReplyFromConfig()
├─ isInboundAudioContext(ctx) → detects audio
├─ resolveSessionTtsAuto(ctx, cfg) → gets TTS settings
├─ ttsWillFire = conditions met?
└─ getReplyFromConfig({ disableBlockStreaming: ttsWillFire })
└─ maybeApplyTtsToPayload() receives final payload
└─ textToSpeech() synthesizes audio
To improve this patch:
If you encounter issues:
[TTS-DEBUG] outputdisableBlockStreaming: true in logs)Same as Moltbot.