STEP 02 OF 04

Set up the Raspberry Pi

The Pi listens for pulses from the button, records in one-minute chunks, and ships each finished session to your Mac. You'll need Raspberry Pi OS Bookworm and a clone of the repo on the Pi.

INMP441 Pin 10 · GPIO15 control in, from ESP32 Pins 12 · 35 · 38 I2S audio from the mic Pin 13 · GPIO27 recording LED
2.1 · BOOT CONFIG

Turn on the mic, free up pin 10

Add these lines under [all] in /boot/firmware/config.txt, then reboot. Pin 10 doubles as UART RX, so the serial console has to be off.

Also make sure cmdline.txt has no console=serial0,…. A stock Bookworm install only uses console=tty1.

[all]
# Free physical pin 10 for the ESP32
enable_uart=0

# INMP441 I2S MEMS microphone
dtparam=i2s=on
dtoverlay=googlevoicehat-soundcard
Check: arecord -l lists the card sndrpigooglevoi.
2.2 + 2.3 · CONNECT

Give the Pi a private path to your Mac

Tailscale links the two machines wherever they are. An SSH key lets the uploader copy recordings without ever asking for a password.

Raspberry Pi ~/recordings/ chunk-01 chunk-02 DONE (last) rsync over Tailscale · every 5 s SSH key ed25519 · BatchMode=yes recordings/ Your Mac Remote Login on

2.2 · Join Tailscale

Install Tailscale and log in on both the Pi and the Mac. Note the Mac's machine name (or its 100.x.y.z address) for the next step.

2.3 · Set up SSH keys

On the Mac: System Settings → General → Sharing → Remote Login. Then on the Pi:

ssh-keygen -t ed25519   # if needed
ssh-copy-id <mac-user>@<mac-host>
ssh -o BatchMode=yes <mac-user>@<mac-host> true
✓ The last line returns with no prompt.
2.4 · CONFIGURE

Point it at your Mac

Copy the template and fill in your Mac's user, host and recordings path. .env is git-ignored, so your details stay on the Pi.

cp pi/.env.example pi/.env

# pi/.env
MAC_USER=you
MAC_HOST=your-mac
# relative to the Mac user's home
MAC_RECORDINGS_DIR=Workspace/transcriber/recordings
recorder.service GPIO listener · arecord in 60 s chunks active uploader.service rsyncs finished sessions to the Mac active
2.5 · INSTALL

One script, two services

Run it as your normal user, not root. It installs the packages, a sudoers rule so the recorder can shut the Pi down, both services, and checks your boot config.

./pi/install.sh
systemctl status recorder uploader
journalctl -u recorder -u uploader -f
UNDER THE HOOD

How the Pi reads one wire

Pin 10 idles high on an internal pull-up. The ESP32 pulls it low, and the Pi decides what you meant by how long the pulse lasts.

TOGGLE · 0.05–0.70 s SHUTDOWN · ≥ 0.90 s ignored ~150 ms ~1200 ms 00.050.700.901.20 s

A shutdown pulse stops any recording, writes DONE, and runs shutdown -h now. The ESP32 cuts power 15 seconds later.

Good to know

The SD card fills up

Uploaded sessions stay on the Pi. Clear out old ones now and then.

No real-time clock

Sessions recorded before the Pi syncs time can get the wrong timestamp in their name.

Never commit secrets

Keep SSH keys, Wi-Fi config, Tailscale auth and pi/.env out of git.