From bcfa6142180730de3e61c702275cca5b16ba0939 Mon Sep 17 00:00:00 2001 From: zlei9 Date: Sun, 29 Mar 2026 14:37:45 +0800 Subject: [PATCH] Initial commit with translated description --- SKILL.md | 47 +++++++++++++++++++++++++++++++++++++++++++++++ _meta.json | 6 ++++++ 2 files changed, 53 insertions(+) create mode 100644 SKILL.md create mode 100644 _meta.json diff --git a/SKILL.md b/SKILL.md new file mode 100644 index 0000000..b48c537 --- /dev/null +++ b/SKILL.md @@ -0,0 +1,47 @@ +--- +name: voice-wake-say +description: "在macOS上使用内置say命令大声朗读响应。" +--- + +# Voice Wake Say + +## Overview +Use macOS `say` to read the assistant's response out loud whenever the conversation came from Voice Wake/voice recognition. Do **not** use the `tts` tool (it calls cloud providers). + +## When to Use `say` (CHECK EVERY MESSAGE INDIVIDUALLY) + +**IF** the user message STARTS WITH: `User talked via voice recognition` +- **Step 1:** Acknowledge with `say` first (so the user knows you heard them) +- **Step 2:** Then perform the task +- **Step 3:** Optionally speak again when done if it makes sense + +**IF** the user message does NOT start with that exact phrase +- THEN: Do NOT use `say`. Text-only response only. + +**Critical:** +- Check EACH message individually — context does NOT carry over +- The trigger phrase must be at the VERY START of the message +- For tasks that take time, acknowledge FIRST so the user knows you're working + +## Workflow +1) Detect Voice Wake context +- Trigger ONLY when the latest user/system message STARTS WITH `User talked via voice recognition` +- If the message instructs "repeat prompt first", keep that behavior in the response. + +2) Prepare spoken text +- Use the final response text as the basis. +- Strip markdown/code blocks; if the response is long or code-heavy, speak a short summary and mention that details are on screen. + +3) Speak with `say` (local macOS TTS) +```bash +printf '%s' "$SPOKEN_TEXT" | say +``` + +Optional controls (use only if set): +```bash +printf '%s' "$SPOKEN_TEXT" | say -v "$SAY_VOICE" +printf '%s' "$SPOKEN_TEXT" | say -r "$SAY_RATE" +``` + +## Failure handling +- If `say` is unavailable or errors, still send the text response and note that TTS failed. diff --git a/_meta.json b/_meta.json new file mode 100644 index 0000000..3165fdb --- /dev/null +++ b/_meta.json @@ -0,0 +1,6 @@ +{ + "ownerId": "kn77k3j7wa1fedgd8g1fyz6ydh7z28mv", + "slug": "voice-wake-say", + "version": "1.0.1", + "publishedAt": 1769336291994 +} \ No newline at end of file