| name | agent-voice |
| description | Add voice interaction to your AI agent. Convert text replies to speech (TTS) and send as Telegram voice messages. Use when a user asks for voice replies, audio responses, TTS setup, or wants their agent to "speak". Supports 100+ voices across 40+ languages via edge-tts (free, no API key). Zero-cost voice I/O for any OpenClaw agent. |
Agent Voice
Send voice replies from your agent via Telegram (or any channel that supports audio).
Setup (one-time)
Run the setup script to install edge-tts:
bash scripts/setup.sh
This creates a Python venv at ~/.openclaw/tts-env and installs edge-tts. Also needs ffmpeg (brew/apt).
Generate voice
bash scripts/tts.sh "你好,这是语音测试" /tmp/voice.ogg
bash scripts/tts.sh "Hello world" /tmp/voice.ogg en-US-BrianMultilingualNeural
Arguments: tts.sh "text" [output_path] [voice_name]
Default voice: en-US-EmmaMultilingualNeural (neutral, clear, multilingual).
Send as Telegram voice message
Use the message tool:
{ "action": "send", "channel": "telegram", "to": "<chat_id>", "media": "/tmp/voice.ogg", "asVoice": true }
Key: asVoice: true sends as voice bubble, not file attachment.
Recommended voices
| Voice | Gender | Style | Best for |
|---|
en-US-EmmaMultilingualNeural | F | Clear, calm | Neutral default, multilingual |
en-US-BrianMultilingualNeural | M | Casual | Neutral male, multilingual |
en-US-AndrewMultilingualNeural | M | Warm, confident | Professional multilingual |
zh-CN-XiaoxiaoNeural | F | Warm | Chinese female |
zh-CN-YunyangNeural | M | Professional | Chinese news/formal |
zh-CN-YunxiNeural | M | Lively | Chinese casual |
List all voices: ~/.openclaw/tts-env/bin/edge-tts --list-voices
Record preference in TOOLS.md
After choosing a voice, add to your TOOLS.md:
### TTS
- Voice: en-US-EmmaMultilingualNeural
Pipeline
Agent text → edge-tts (MP3) → ffmpeg (Opus/OGG) → Telegram voice note
Total latency: ~1-2s. Cost: $0 (edge-tts uses Microsoft's free TTS API).