← All Lessons
Lesson 09

The Voice Memo Pipeline

Record a thought on your phone. Wake up to a structured recap, action items, and a Slack message. All automatic.

You have ideas in the shower, on walks, in the car. By the time you sit down at a computer, half of them are gone. This pipeline catches them the moment they happen and turns them into structured, actionable notes without you touching a keyboard.


What you're building today

A system that watches for new voice memos on your Mac, transcribes them using Groq Whisper, sends the transcript to Claude for classification and action item extraction, posts a formatted recap to Slack, and saves the full transcript to your brain inbox. All triggered automatically when a new recording appears.


Step 1: The architecture

You (record a voice memo on your phone/Mac)
    |  .m4a file syncs to your Mac
macOS Folder Action (detects new file)
    |  triggers script
process-voice-memo.sh
    |  converts to .m4a if needed (ffmpeg)
    |  waits for file to stabilize
    |  transcribes via Groq Whisper API
    |  sends transcript to Claude for processing
    |  Claude returns: title, summary, action items, type
    |  posts formatted recap to Slack #thoughtstream
    |  saves transcript + recap to brain/00-inbox/voice-memos/
    |  logs to processed.txt (never reprocesses)
Done. You never touched a keyboard.

Step 2: What Claude does with your transcript

Claude classifies each voice memo into one of four types:

Then it extracts action items and writes a clean summary. No filler words, no "um"s. Just the signal.


Step 3: The Slack output

Here's what actually shows up in your Slack channel:

🧠 Pricing strategy for Q2 clients
Thinking about moving to value-based pricing for the next round of client work. The hourly model is leaving money on the table.
Actions:
• Research Chris Do's value-based pricing framework
• Draft new rate card with project-based tiers

That's a voice memo you recorded in 45 seconds while walking. Claude turned it into something you can act on.


Step 4: Install the dependencies

# You'll need ffmpeg for audio conversion
brew install ffmpeg

# Python requests for API calls
pip3 install requests

You'll also need:


Step 5: The script

This is the real script. It handles QTA to M4A conversion, file stability checks, retry logic for API calls, transcript truncation for Slack limits, and deduplication.

#!/bin/bash
set -euo pipefail

INPUT_FILE="$1"
FILENAME=$(basename "$INPUT_FILE")
TIMESTAMP=$(date +%Y-%m-%d_%H%M%S)

# Convert if needed, wait for file to stabilize
# (ffmpeg conversion + size stability loop)

# Transcribe via Groq Whisper
TRANSCRIPT=$(python3 -c "
import requests
with open('$INPUT_FILE', 'rb') as f:
    r = requests.post(
        'https://api.groq.com/openai/v1/audio/transcriptions',
        headers={'Authorization': 'Bearer $GROQ_KEY'},
        files={'file': f},
        data={'model': 'whisper-large-v3', 'response_format': 'text'},
        timeout=120
    )
print(r.text.strip())
")

# Send to Claude for classification + action items
CLAUDE_RESULT=$(CLAUDECODE="" claude -p "
Process this voice memo transcript. Output JSON:
{\"title\": \"short title\",
 \"summary\": \"1-2 sentences\",
 \"action_items\": [\"concrete actions\"],
 \"type\": \"task|brain_capture|content_seed|personal\"}

TRANSCRIPT:
$TRANSCRIPT
" --max-turns 1)

# Post to Slack, save to brain/00-inbox/voice-memos/

Step 6: Set up the Folder Action

This is what makes it automatic. macOS Folder Actions watch a folder and run a script when new files appear.

# Open Automator, create a new "Folder Action"
# Set it to watch:
# ~/Library/Group Containers/group.com.apple.VoiceMemos.shared/Recordings
# Add a "Run Shell Script" action with:
/path/to/process-voice-memo.sh "$@"

Or set it up from the command line. The key: your iPhone voice memos sync to this folder automatically via iCloud.


Step 7: The dedup trick

The script tracks every processed file in a simple text file: filename + file size. If the same memo shows up again (iCloud sync delays, re-downloads), it skips it. No database needed. Just a text file.


What you just built

Homework

Record three voice memos today. One about a project you're working on, one about an idea you've been sitting on, and one about a decision you need to make. Check Slack in an hour. See what Claude made of your raw thinking. That's the pipeline working.