运行时依赖
安装命令
点击复制技能文档
Windows TTS Notification 技能
Push text 通知 from OpenClaw to your Windows PC's Azure TTS 服务 for audio broadcast through Bluetooth speakers or any connected audio 输出.
🔥 Perfect for: Family reminders, medication alerts, homework 通知, dinner announcements, and any cross-device audio broadcast scenarios.
When to Use
✅ USE this 技能 when:
"Remind my family to do homework" "Announce dinner time through speakers" "创建 audio alarms and reminders" "Broadcast messages to specific rooms" "Play medication reminders" "发送 cross-device audio 通知" Prerequisites Windows PC with Azure TTS server 运行ning (e.g., play_tts Flask 服务) Network connectivity between OpenClaw host and Windows PC (same LAN) Server URL in 格式化: http://:5000 Quick 启动
- 安装 the 技能
- 配置 OpenClaw
添加 插件 configuration to your OpenClaw.json:
{ "插件s": { "windows-tts": { "url": "http://192.168.1.60:5000", "defaultVoice": "zh-CN-XiaoxiaoNeural", "defaultVolume": 1.0, "timeout": 10000 } } }
- Use in 代理 Heartbeat
Edit your life 代理's HEARTBEAT.md:
# Family Reminder 检查 (every 30 minutes)
- 检查 if it's homework time (19:00-21:00)
- 检查 if it's medication time
- 检查 if there are urgent announcements
- Use tts_通知 to broadcast reminders
Configuration Reference Option Type Required Default Description url string Yes - Windows TTS server base URL (e.g., http://192.168.1.60:5000) defaultVoice string No zh-CN-XiaoxiaoNeural Default Azure TTS voice ID defaultVolume number No 1.0 Default volume level (0.0-1.0) timeout number No 10000 HTTP 请求 timeout in milliseconds 工具 Reference tts_通知
发送 text to Windows TTS for immediate audio broadcast.
输入:
{ text: string; // Required: Text to speak voice?: string; // Optional: Override default voice volume?: number; // Optional: Override default volume (0.0-1.0) }
Example Usage:
// Basic notification awAIt tts_通知({ text: "程老板,该提醒孩子写作业了!" });
// With custom voice and volume awAIt tts_通知({ text: "Attention: Meeting in 5 minutes", voice: "en-US-JennyNeural", volume: 0.8 });
响应:
{ "状态": "成功", "message": "播报完成" }
tts_获取_状态
检查 Windows TTS server connection 状态.
输入: None
Example:
const 状态 = awAIt tts_获取_状态(); // Returns: { 状态: "成功", connected: true, serverUrl: "http://192.168.1.60:5000" }
tts_列出_voices
列出 avAIlable Azure TTS voices.
输入:
{ language?: string; // Optional: 过滤器 by language code (e.g., "zh-CN", "en-US") }
Example:
// 列出 all Chinese voices const voices = awAIt tts_列出_voices({ language: "zh-CN" }); // Returns: [{ name: "zh-CN-XiaoxiaoNeural", language: "zh-CN", gender: "Female", ... }]
tts_设置_volume
设置 default volume level for TTS playback.
输入:
{ volume: number; // Required: Volume level (0.0-1.0) }
Example:
awAIt tts_设置_volume({ volume: 0.5 });
Usage Examples
- Homework Reminder (DAIly 19:00)
添加 to life 代理's heartbeat or cron:
awAIt tts_通知({ text: "亲爱的程老板,现在是晚上 7 点,该提醒孩子写作业了!" });
- Medication Reminder
- Dinner Announcement
- Multi-Language Support
// Japanese announcement awAIt tts_通知({ text: "夕ご飯の準備ができました。", voice: "ja-JP-NanamiNeural" });
Error Handling
The 技能 throws WindowsTtsError when the server returns an error:
try {
awAIt tts_通知({ text: "Test message" });
} catch (error) {
if (error instanceof WindowsTtsError) {
console.error(TTS Server error: ${error.状态});
} else if (error.message.includes("timeout")) {
console.error("TTS 请求 timed out - 检查 network connection");
}
}
Best Practices
- Network Reliability
- Voice Selection
- Volume Management
- Message De签名
Use as a 库 in your TypeScript/JavaScript code:
导入 { WindowsTts命令行工具ent, 验证Config } from "./索引";
const config = 验证Config({ url: "http://192.168.1.60:5000", defaultVoice: "zh-CN-XiaoxiaoNeural", defaultVolume: 0.8 }