Install
openclaw plugins install edge-tts-for-oc@latestopenclaw plugins install edge-tts-for-oc@latestOpenClaw plugin: voice replies using Microsoft Edge TTS via edge-tts CLI.
Natural-sounding Chinese/English speech synthesis for your AI agent.
Text is great, but sometimes you want to hear your agent's replies. This plugin synthesizes OpenClaw's responses using Microsoft Edge's neural TTS engine via edge-tts — no API key required.
⚠️ Privacy: reply text is sent to Microsoft's Edge TTS cloud service for synthesis. Do not use this plugin if your agent handles sensitive or private information.
| Feature | Description |
|---|---|
| Auto-speak mode | Automatically speak every reply (always mode) |
| Model-triggered | Model calls speak tool on demand (auto mode) |
| Configurable voice | Any Edge TTS voice (300+ voices across 100+ languages) |
| Text cleaning | Strips markdown, code blocks, emoji for natural speech |
| Multi-player auto-detect | ✅ mpv / ffplay / pw-play / cvlc / paplay |
| Playback volume | 100% for mpv / ffplay / cvlc (pw-play & paplay follow system volume) |
| Platform | Linux |
pip install edge-tts
# Audio player (install at least one)
sudo pacman -S mpv # recommended
# or: ffplay / pipewire / vlc / pulseaudio
cd /path/to/edge-tts-for-openclaw
npm install
openclaw plugins install --link .
openclaw plugins install clawhub:edge-tts-for-oc
After installing, enable the plugin:
// ~/.openclaw/openclaw.json
{
plugins: {
allow: ["edge-tts-for-oc"],
entries: {
"edge-tts-for-oc": {
enabled: true,
config: {
voice: "zh-CN-YunxiaNeural", // default voice
autoSpeak: "auto", // "always" | "auto"
},
},
},
},
}
Then restart:
openclaw gateway restart
speak tool to the modelOpenClaw gates plugin tools behind its tool policy. If your config sets tools.profile to an allowlist profile (for example the default coding), the plugin's speak tool is not visible to the model until you explicitly allow it:
{
tools: {
profile: "coding",
alsoAllow: ["speak"], // expose the plugin's speak tool
},
}
Alternatively, add it via CLI:
openclaw config set tools.alsoAllow '["speak"]' --strict-json --merge
If
tools.profileis unset orfull, thespeaktool is exposed automatically and noalsoAllowentry is needed.
| Field | Type | Default | Description |
|---|---|---|---|
voice | string | zh-CN-YunxiaNeural | Edge TTS voice name. List voices: edge-tts --list-voices |
autoSpeak | "always" | "auto" | "auto" | always: speak every reply. auto: only speak when model calls the speak tool. |
always)Every reply is automatically spoken aloud.
auto)The model can call the speak tool to read text aloud:
speak(text: "构建成功!所有测试通过。")
edge-tts --list-voices | grep -i zh-CN
edge-tts (Python package)mpv (recommended), or ffplay / pw-play / cvlc / paplayThis plugin sends reply text to Microsoft's Edge TTS cloud service (edge-tts CLI) for speech synthesis. No text is logged or stored locally. If your agent handles sensitive or private content, disable auto-speak or avoid this plugin.
MIT