$npx -y skills add SpillwaveSolutions/automating-mac-apps-plugin --skill automating-voice-memosAutomates Apple Voice Memos (Mac Catalyst, no dictionary) via JXA using filesystem/SQLite access and System Events UI scripting. Use when asked to "automate Voice Memos", "export voice recordings", "access Voice Memos database", or "transcribe voice memos".
| 1 | # Automating Voice Memos (no dictionary, data+UI hybrid) |
| 2 | |
| 3 | ## Relationship to the macOS automation skill |
| 4 | - This is a standalone skill for Voice Memos automation. |
| 5 | - For setup help, see the `automating-mac-apps` skill for permissions (Full Disk Access, Accessibility) and the ObjC bridge basics. |
| 6 | - Prerequisites: Basic JXA (JavaScript for Automation) knowledge; install via macOS System Preferences > Security & Privacy. |
| 7 | |
| 8 | ## Core Framing |
| 9 | - **Catalyst App**: Voice Memos is an iOS app adapted for macOS without full macOS APIs, hence no AppleScript dictionary for automation. |
| 10 | - **UI-first**: Prefer UI scripting/keyboard shortcuts for exports to avoid touching the database/container. |
| 11 | - **Data (optional)**: Use data-layer control only if needed (ObjC + sqlite3). This requires broader permissions. |
| 12 | - **Permissions**: Accessibility for UI automation; Full Disk Access only if you read/write the container/DB. |
| 13 | |
| 14 | ## Workflow (default) |
| 15 | 1) UI-first (no FDA): export via menu/shortcut to a folder you control. |
| 16 | 2) Optional data path: resolve storage paths; query CloudRecordings.db (Apple epoch +978307200) only if required. |
| 17 | 3) For UI actions (recording/export), drive the app with System Events (shortcuts preferred over clicks). |
| 18 | 4) For editing, prefer external tools (ffmpeg) after export; avoid writing directly into the container unless you accept FDA. |
| 19 | |
| 20 | ## Quickstart (UI-only export; no Full Disk Access) |
| 21 | - Open Voice Memos and select a recording. |
| 22 | - Export/share UI: the Share sheet can send audio to Notes/other apps (no direct File > Export). |
| 23 | - Transcript copy (UI-only, no FDA): |
| 24 | - Run: `osascript skills/automating-voice-memos/scripts/copy_transcript_to_file.applescript "/path/to/output.txt"` |
| 25 | - Defaults: Desktop/voice-memo-transcript.txt if no arg. |
| 26 | - Shows transcript (if available), selects all, copies, and writes to the target file via clipboard. |
| 27 | |
| 28 | ## Permissions |
| 29 | - **Accessibility**: System Settings > Privacy & Security > Accessibility > Enable for System Events and your automation app (Terminal/Python/Script Editor). |
| 30 | - **Full Disk Access**: Only if you read/write the Voice Memos container/DB directly. UI-only exports do not require FDA. |
| 31 | - **Verify**: For UI-only, confirm you can open the Export menu and interact with the save dialog. For data access, verify `${home}/Library/Group Containers/group.com.apple.VoiceMemos.shared/`. |
| 32 | |
| 33 | ## Validation Checklist |
| 34 | After implementing Voice Memos automation: |
| 35 | - [ ] Verify Accessibility permissions granted for Terminal/Script Editor |
| 36 | - [ ] Confirm Voice Memos app opens and responds to UI scripting |
| 37 | - [ ] Test transcript copy script executes without errors |
| 38 | - [ ] Validate output file contains expected transcript text |
| 39 | - [ ] For data access: verify Full Disk Access and database path exists |
| 40 | |
| 41 | ## Troubleshooting |
| 42 | - **Permission denied**: Verify Full Disk Access and Accessibility permissions. |
| 43 | - **Database locked**: Close Voice Memos app before querying. |
| 44 | - **File not found**: Check macOS version for correct storage path. |
| 45 | - **UI automation failures**: Ensure Voice Memos is focused and Accessibility is enabled. |
| 46 | |
| 47 | ## When Not to Use |
| 48 | - For cross-platform audio recording (use ffmpeg or platform-agnostic tools) |
| 49 | - When you need programmatic audio capture (use AVFoundation directly) |
| 50 | - For iOS Voice Memos automation (no API available) |
| 51 | - When Full Disk Access cannot be granted |
| 52 | |
| 53 | ## What to load |
| 54 | - Start with basics & prerequisites: `automating-voice-memos/references/voice-memos-basics.md` (setup and core concepts). |
| 55 | - UI automation: `automating-voice-memos/references/voice-memos-ui.md` (shortcuts, AX scripting). |
| 56 | - Data access (if needed): `automating-voice-memos/references/voice-memos-data.md` (storage paths, epochs, database schema). |
| 57 | - Recipes: `automating-voice-memos/references/voice-memos-recipes.md` (exports, transcripts, recording control). |