From d7c92d20e8844740bf6ebccde0006aed64a672c0 Mon Sep 17 00:00:00 2001 From: Adolfo Reyna Date: Sat, 14 Feb 2026 10:21:35 -0500 Subject: [PATCH] Add say voice replies skill --- say-voice-replies.skill | Bin 0 -> 2159 bytes skills/say-voice-replies/SKILL.md | 78 ++++++++++++++++++++++++++++++ 2 files changed, 78 insertions(+) create mode 100644 say-voice-replies.skill create mode 100644 skills/say-voice-replies/SKILL.md diff --git a/say-voice-replies.skill b/say-voice-replies.skill new file mode 100644 index 0000000000000000000000000000000000000000..14524abe83a0f8ab5a0e663991f6d681323ec9e0 GIT binary patch literal 2159 zcmZ{m_dgp51I8mH_SIgYXgRB9ZK77FOC+(2Q=8h`sUlWsYwwiAc+phN)+jOV%(O;m ztyXHwDK0j(d+q!CJy7Q@>4u>laCjtrK9Ys0jhm^a zQZ+Y^PkKURo1DwNz3uPiWp+D-4$4dOqZ9#Yei&?=*?9MDxLKqVU18VS=%w!Zmrnaa zbM5I((8Jd8wwZkGFk(>pao%s|AD`<9P~^W>2aek6?E7u?rO&*ojj`3KfA6zMA^V|5 zppSbaUN~Az1kpcNxaVv0@F5H|$}e$T(@dAzJ-5kXDqW{`+I@{USl>n%)^q}I9W#io zMc6&ZbxIJ?862&FO=7;0?ii&}&$ zEmrrLXJ&roa`n$xFxPBoQokG3--ga916u_aLkrsaE8?4uQ*R6v_rlV#a99!wR8Dm% z&aUwKmgX?mMg^QY7Z5#wWF4KlnLj{AdsF?dsNw9D5c!IeB_7haqNyq7X0pJg5v3TpHMBj!f0c0tZ19>E_j)|AoJK!Z&Hv|W z;-n2)0f7vQ-mn(2(jU_Z7I8(AhFcN~C#BwMVD6mrHl-4+uT%AZyB{b9BQ+&L^ge$I zte!X1(@Fz$rS*Jl6)N5ZocvBlXs`U>VklE?TRfNl%140d4*MMAwvFeekoi|&z?kKF z9ziP>6q5#ut!9cQE4ElY!tLEMM>%MVQ6f3U!SK{(sLK5 z|A1JEkrua#9?F$+ZVX{3|I!!y=%7&}cF?m8-_w11t(wr(97XIt{l-k`5pobZOT}}1 zcIPEFI^LZBDv&ZxeaX;LZa2Gr2zO9#`yythJ_@+AaRog9b9S`j|=TbSz3UHZ#Z#`0bqe?kriWDMc#xW#Xp48 zN&0U`>ffyavJz_J2g3KdPE$|#u5LPQtm9SLW8Hb9x!qlN*%XkRqPzUhd10@u%Kssek}@WpdxjLzsHun9iPh2KpL0b zbmfR^>)ysXac0a<~bxdR1~!Iy!@QfZxNK_`3g(n~hHug!^JP41PZ z_yyv-3v&Ybdtc7P%Mr90w+w41#n6!bx+N#H4ke=S$-IByqj~uNt9LfE$ zw^f$xF(w%v^-k9loY;0Lw068CIz(-k)R!|~Os{v5KeTj92DN<6bm!xhv&Ms^{(8$W z>$pW*p}+Kf!hU4nNFrpQgqL&27%1twzuJU9PxLYOF6a9OPUF$a8?oHbG-t5I5*5oC zMb?5t->)8_J5_C&15r@~z65c*2zOdNiN=~4Xd#tUV+X4Q$_%l>aU0%x_pgD!o>NDC9*NwR%hR!E(7 zyr81e8;h0lbp_lg$DNcZOM{D~*pq#9@=~RQ>#fSoSIgZ#cYNKox5ZChqY^-A=Tkb4 z?2(|LicveNql~3F65mDtE+ zyq%DDoR?9TTN>Z)+)&5ZuC=<+prG0(1RZy;4{(N(J=1-U+-Y&&?fn|3c8V&;ge9-;y-5<%x^t1g7w9N$s literal 0 HcmV?d00001 diff --git a/skills/say-voice-replies/SKILL.md b/skills/say-voice-replies/SKILL.md new file mode 100644 index 0000000..230ca5c --- /dev/null +++ b/skills/say-voice-replies/SKILL.md @@ -0,0 +1,78 @@ +--- +name: say-voice-replies +description: Deliver short, hands-free responses by turning text into macOS `say` voice notes saved in the system temp directory and sending them as Telegram voice messages. Use whenever Adolfo asks for audio answers (e.g., while driving) or you decide speech will land better than text. +--- + +# Say Voice Replies + +## Overview +Use this skill to quickly convert any response into an audio note using the built-in macOS `say` command and deliver it through Telegram as a voice message. The key constraints we uncovered on 2026-02-14 are that the `message` tool refuses files from the workspace and only accepts media written inside the macOS temporary directory, so every workflow below is designed around that. + +## Quick Start +1. Draft the spoken script (aim for 10–25 seconds unless the user asked for longer). +2. Use the macOS default `say` voice and rate unless Adolfo specifically requests a different vibe. +3. Generate the audio in `$TMPDIR` using `say` → send it with the `message` tool using `asVoice: true`. +4. (Optional) Delete the temp file once the voice note is confirmed delivered. + +## Workflow + +### 1. Prepare the narration +- Keep phrasing conversational and note any emoji you want to read out loud. +- If the reply needs structure, say the headings (e.g., “Update one… Update two…”). +- Sum up the audio in text when sending the message (“Audio reply: ETA + blockers”) so the user knows what the note contains before tapping it. + +### 2. Generate a temp file that the `message` tool accepts +MacOS exposes an agent-specific temp dir via `$TMPDIR`, which resolves to `/var/folders/...` — the only location Telegram uploads accepted during testing. + +```bash +TMPFILE=$(mktemp "${TMPDIR:-/tmp}/brovoice_XXXXXX") +OUTFILE="${TMPFILE}.m4a" +``` + +Use `say` to create the audio (AAC keeps the file small and Telegram-friendly): + +```bash +say --data-format=aac \ + "Yo bro, leaving the studio now. Should hit the church in fifteen." \ + -o "$OUTFILE" +``` + +Notes: +- The stock system voice/rate keeps everything consistent; only add `-v ` or `-r ` if Adolfo requests a different vibe. +- If you need emphasis, split into multiple `say` calls and concatenate with `afconvert`, but most replies can be cut in one take. +- `say` writes synchronously; no extra waits are needed before sending. + +### 3. Send the voice note via Telegram +The `message` tool needs three things: + +```json +{ + "action": "send", + "channel": "telegram", + "media": "/var/folders/.../brovoice_a1b2c3.m4a", + "asVoice": true, + "message": "Audio reply: key takeaways + ETA" +} +``` + +Guidelines: +- Always set `asVoice: true` so Telegram renders the clip as a push-to-play voice message instead of a regular file. +- Keep a short text caption that previews the content (helps when the user can’t tap immediately). +- If the user explicitly wants only audio, you can keep the caption minimal (e.g., “Audio-only reply”). + +### 4. Clean up +Once Telegram confirms `{ "ok": true }`, remove the temp file: + +```bash +rm -f "$OUTFILE" +``` + +This avoids leaving dozens of `.m4a` files inside `/var/folders/...`. + +## Tips & Variations +- **Faster follow-ups:** Capture the temp path and reuse it if you plan to cut a second take immediately; otherwise regenerate with `mktemp`. +- **Speaking rate tweaks (optional):** If Adolfo asks for faster/slower delivery, `say -r 160` ≈ relaxed, `-r 190` ≈ energetic; stay under `-r 210` for intelligibility while driving. +- **Edge cases:** If `say` errors (rare on headless sessions), fall back to the built-in `tts` tool—it already writes to the same temp tree and produces a `MEDIA:/path/to/file.mp3` string you can feed directly into `message`. +- **Captioning:** When summarizing long instructions, include bullet cues in the text reply while the audio carries the nuance. + +Stick to this flow whenever Adolfo asks for a voice response (especially while driving) or when tone-of-voice will land better than plain text.