justin․searls․co

How to transcribe a Podcast with Whisper on an ARM Mac using Homebrew

Goofing around with podcast transcripts today. Here's what I did to transcribe version 26 of the Breaking Change podcast, after a couple hours of being mad at how hard the Internet was making it:

  1. Run brew install whisper-cpp, because I'm fucking sick of cloning one-off Python repos.
  2. Download a model and put it somewhere (I chose ggml-large-v3-turbo-q8_0.bin because it's apparently slower but more accurate than "q5", whatever the hell any of this means)
  3. Since your podcast is probably an MP3, you'll have to convert it to a WAV file for Whisper. Rather than create an interstitial file we'd have to clean up later, we'll just pipe the conversion from ffmpeg. That bit of the command looks like: ffmpeg -i "v26.mp3" -ar 16000 -ac 1 -f wav -
  4. Next is the actual Whisper command, which requires us to reference both the Metal stuff (which ships with whisper-cpp) as well as our model (which I just put in iCloud Drive so I could safely forget about it). I also set it to output SRT (because I wrote a Ruby gem that converts SRT files to human-readable transcripts) and hint that I'm speaking in English. That bit of the command looks like this: GGML_METAL_PATH_RESOURCES="$(brew --prefix whisper-cpp)/share/whisper-cpp" whisper-cpp --model ~icloud-drive/dotfiles/models/whisper/ggml-large-v3-turbo-q8_0.bin --output-srt --language en --output-file "v26.srt"

Here's the above put together into a brief script I named transcribe-podcast that will just transcribe whatever file you pass to it:

# Check if an input file is provided
if [ -z "$1" ]; then
  echo "Usage: $0 input_audio_file"
  exit 1
fi

input_file="$1"
base_name=$(basename "$input_file" | sed 's/\.[^.]*$//')

# Convert input audio to 16kHz mono WAV and pipe to whisper-cpp
ffmpeg -i "$input_file" -ar 16000 -ac 1 -f wav - | \
  GGML_METAL_PATH_RESOURCES="$(brew --prefix whisper-cpp)/share/whisper-cpp" \
  whisper-cpp --model ~/icloud-drive/dotfiles/models/whisper/ggml-large-v3-turbo-q8_0.bin \
  --output-srt --language en --output-file "$base_name" -

If you're writing a script like this for yourself, just replace the path to the --model flag and you too will be able to do cool stuff like this:

$ transcribe-podcast your-podcast.mp3

As for performance, on an M4 Pro with 14 CPU cores, the above three-and-a-half hour podcast took a bit over 11 minutes. On an M2 Ultra with 24 cores, the same file was finished in about 8 minutes. Cool.

Well, this is a terrible workflow that Apple steers people through when replacing a damaged phone:

  1. Apple Support app tells you to disable Find My before sending an Express Replacement iPhone
  2. You receive phone and set it up with Direct Transfer from damaged phone
  3. You realize a week later that replacement phone has Find My (and Activation Lock) disabled because it copied the setting from the damaged phone.

Seems bad.

Breaking Change artwork

v26 - Luigi's Mansion

Breaking Change

I'd write more here, but I've got places to be. Becky, Jeremy, and I are going to engage in some holiday festivities. We have a couple gingerbread houses to make and a tree to trim. And no nog to speak of. Really, that's all you get by way of show notes this time as a result, deal with it.

Send your complaints to podcast@searls.co and they will be read on air.

Some bullet points below the fold:

Show those show notes…

Playing with some local AI stuff this afternoon, and let me just comment on how unfortunate it is that the modern language with the worst packaging and dependency experience happens to be the one everyone uses for AI/ML.

How to fill Apple Passwords without constant Face ID and Touch ID prompts

Having recently begun the long, arduous journey off 1Password and onto Apple Passwords, one of the biggest annoyances is how much friction it adds to the drudgery of signing into a service to have to reach behind my monitor to scan the Touch ID sensor or to ensure I’m sufficiently camera-ready for a Face ID check to pass.

Turns out, you can just turn this off altogether! I would have preferred a reasonable time-based settings like 30 minutes or an hour, but I expected the answer to be, "go pound sand," and this is indeed better than that.

TIL that in recent versions of macOS, most stock apps can’t be deleted by the user. Want to delete News? LaunchPad won’t let you. Command-Delete ain’t it. It’ll bounce right off the trash.

What gives? It’s because they’re not really in /Applications anymore. They’re installed in /System/Applications and that’s a read-only APFS partition. Neat.

Evidence I've changed as a person: someone just stopped me on the street to say, "I'm sorry I just wanted to say you have an incredible energy and I wanted to hand you my card. Your chi is beautiful." And she clearly meant what she was saying. And seemed to be of sound mind.

First time for everything.

Possibly TMI: just me, or do socks and shoes fit more comfortably after trimming your toenails?

I'm not talking massive lengths here—even just a few millimeters and walking around in socks feels way more comfortable. Can’t tell if this is just me having some hypersensitivity disorder.

Does anyone even work at Peloton anymore? On hold for what seems like forever listening to the same muzak loop endlessly.

Reactivating their shitty bike resulted in their backend creating two concurrent subscriptions on a single account. What a garbage product.

Breaking Change artwork

v25 - Ghost Engineering

Breaking Change

I left the country for a few weeks to get that taste out of my mouth but now I'm back and as salty as ever. Brace yourself.

I made a pretty strong appeal that you should e-mail the show at podcast@searls.co, so I won't repeat myself here. DO IT. DO IT NOW.

Hopefully I'll be back at least once more before we call it for 2024. Stay tuned. 📻

Show those show notes…

Train fare in Japan isn't cheap, but one way Japan gets people to choose it anyway is by directly exposing drivers to road infrastructure costs through steep highway fees.

In 8 days I drove 613 miles and racked up about $130 in highway tolls. Would have been more expensive to take trains, but just barely.

How to add a headrest to a Steelcase Leap chair

The Steelcase Leap (v2) is a good office chair in a world of mostly bad office chairs. I've been using it since 2020 and I don't love it, but I definitely hate it less than every other office chair I've ever owned. That's one reason I find myself vexed that Steelcase does not offer an after-market headrest for the chair (and no longer seems to let you configure one with a built-in headrest). In fact, so few office chairs offer headrests that I was briefly tempted to buy a "gaming chair" (do not buy a gaming chair).

And if you're reading this and identify as an Online Ergonomics Expert, I know you're champing at the bit to tell me, "headrests are bad, actually."

But if you're like me and have an incredibly large and heavy head, and/or you spend most of your time at the computer leaning back and pondering what to do next between furious-but-sporadic bouts of typing, then I'm happy to report I have a solution for what ails you.

I tried four different DIY solutions for slapping a third-party headrest onto the Steelcase Leap that were dreamed up by randos on Reddit, but only one of them worked. And the best part is that the winning thread only requires the headrest and a couple of zip ties, meaning that this approach shouldn't void your warranty by requiring you to drill into the back of the chair.

All you need:

  1. This exact headrest made by Engineered Now
  2. These heavy-duty zip ties
  3. These images and maybe also these images that more-or-less tell you how to secure the headrest with the ties to the chair itself

If you're visiting here from a search engine or an AI assistant's generous citation, I hope you find this helpful! I can only speak for myself, but I am quite glad that I didn't have to buy a new chair just to keep my 15-pound head upright at the end of a long day.

Lake Hamana Rest Stop

When Americans think of a highway rest stop, if they were feeling generous they imagine a gorgeous park, filled with children playing and couples strolling. Maybe a second-rate Starbucks and ice cream shop. Possibly even a nice view of the water.

But nothing like this. This puts them all to shame.

Kaze no yu HAZU

After visiting Kourankei, we took a brief break back at the hotel and asked ChatGPT for some ideas of other things to do near Shinshiro. Becky suggested we try Yuya Onsen town and then realized we had exactly 7 minutes to make the only train for the next two hours. So we speed-walked to the station and paid our fare on board the train.

The Yuya Onsen station is not manned. Despite being arguably more beautiful that day than the nationally famous Kourankei, its visitors are almost entirely regional residents getting away for an afternoon or a weekend.

We strolled up to this fabulous onsen hotel and asked if they accommodate same-day (日帰り) visitors at their hot springs baths. They politely told me no.

Fortunately, I didn't immediately fold and declare defeat on the outing. Instead, I thought to ask if they offer any other plans that might include bath access and my phrasing apparently reminded the staff of a special kaiseki lunch plus bath deal. So for ¥4500 per person we got to experience all their baths and have an absolutely wonderful seven-course lunch. You love to see it.

Also, on our way out, we met Kohaku—the hotel's pet owl. He was understandably sleepy.

Building with Becky

It has been very fun and very weird to be traveling across Japan using an app that I built doing workouts designed by my spouse, but it's worked a lot better for me than fucking around with Fitbod and other apps ever did.