---
name: homepod-tts
description: 使用 Qwen3-TTS 生成 TTS 语音并通过 HomePod 播放。当用户说"播放语音到HomePod"、"用HomePod对我说话"、"让HomePod播报XXX"时触发。
---

# HomePod TTS

使用 HomePod 播放 TTS 语音（支持情绪识别）。

## 工作流程

1. **自动情绪识别**：根据文本内容自动判断情绪（开心、悲伤、生气、惊讶等）
2. **生成语音**：调用 Qwen3-TTS 生成 WAV 文件
3. **启动 HTTP 服务**：Serving 音频文件供 Home Assistant 访问
4. **发送到 HomePod**：调用 Home Assistant `media_player.play_media` 服务播放

## 情绪识别规则

| 关键词示例 | 检测情绪 |
|-----------|---------|
| 开心、高兴、太棒了、nice | 🎉 开心 |
| 激动、兴奋、冲鸭、加油 | ✨ 兴奋 |
| 难过、伤心、哭了、心痛 | 😢 悲伤 |
| 生气、愤怒、可恶、气死 | 😠 生气 |
| 惊讶、震惊、卧槽、居然 | 😲 惊讶 |
| 害怕、吓人、救命、妈呀 | 😨 恐惧 |
| 警告、注意、严肃、认真 | ⚠️ 严肃 |
| 晚安、早上好、温柔、爱你 | 💕 温柔 |
| 没关系、淡定、稳住 | 🧘 平静 |
| 搞笑、笑话、哈哈 | 😂 幽默 |
| 累了、困了、好累 | 😴 疲惫 |
| 紧张、焦虑、担心 | 😰 紧张 |

无匹配关键词时使用默认情绪：**开心、热情、语速稍快**

## 音量自动调节

播放时自动将 HomePod 音量设为 **40%**，播放完成后自动恢复原音量。

## 动态等待时间

等待时间根据生成的音频时长**自动计算**：`音频时长 + 1秒`

例如：3秒的语音 → 等待4秒后恢复音量


---
Source attribution: kbarbel640-del
Original project: https://github.com/kbarbel640-del/skills/blob/e7e336ac628c3e3bd771aff1aaa469c93778f94a/skills/propersama/homepod-tts/SKILL.md
License: MIT
License information: https://opensource.org/license/mit
Original upstream instructions; downloaded from Mega AI Hub.

## Upstream license notice

MIT License

Copyright (c) 2026 clawdbot

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.



# Mega AI Hub resource metadata

Creator / publisher: kbarbel640-del
Original project: https://github.com/kbarbel640-del/skills/blob/e7e336ac628c3e3bd771aff1aaa469c93778f94a/skills/propersama/homepod-tts/SKILL.md
Attribution basis: Source repository record

Fields of work: Customer Support
Roles: Customer Experience, Technical Support
Specialties: Specialty not specified
Tools: Qwen3 Tts, Home Assistant
Country applicability: Country not specified
Classification basis: Source catalog labels
Instruction SHA-256: f9dd8d7a8ce5300879b07e63002ef7894a2b7b8db7d8db723cf73eaf8067e265
