Skip to content

HD Radio in Terminal (macOS Ventura/Tahoe & Windows 11)

Use an RTL-SDR (Blog V3/V4 recommended) and nrsc5 to listen to HD Radio with a single Terminal/PowerShell command. No heavyweight apps needed.

macOS Ventura & later Windows 11 Troubleshooting

What you need

Hardware

  • RTL-SDR (RTL2832U + R820T/2) — Blog V4 works great
  • FM/HD antenna (window placement preferred)

Software

  • nrsc5 (HD Radio decoder)
  • SoX (play) for real-time audio

Station info

Know the **FM frequency** (e.g., 106.1e6) and **HD program** (HD1=1, HD2=2, HD3=3...).

macOS Ventura & later (incl. macOS 26 “Tahoe”)

Works on Apple Silicon and Intel. The smoothest audio path is piping nrsc5 into SoX’s play.

1) Install SoX (audio)

Install Homebrew (skip if you already have it):

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Install SoX:

brew install sox

macOS Ventura/Tahoe note: microphone/speaker permissions aren’t needed for play, but ensure your default output device is correct in System Settings → Sound.

2) Install or place nrsc5

If you already have nrsc5 in your $PATH, you’re set. Otherwise, place the binary somewhere like /usr/local/bin/ or /opt/homebrew/bin/ (Apple Silicon).

Advanced: you can build from source using CMake + libusb + rtl-sdr. (This page focuses on usage; you already had it running earlier.)

Live playback (recommended)

nrsc5 -p -1 -g 25.0 -t wav 106.1e6 1 | play -t wav -
  • -p -1 → auto PPM correction
  • -g 25.0 → tuner gain (try 15–35)
  • 106.1e6 → frequency (Hz notation)
  • 1 → HD1 (use 2 for HD2, etc.)

Record then play

nrsc5 -p -1 -g 25.0 -o out.wav 88.5e6 2
afplay out.wav
If the stick is “busy”: close other SDR apps, or run
pkill -f "sdrpp|rtl_tcp|rtl_fm|CubicSDR"

Windows 11 (PowerShell)

Two Terminal-only paths. Option A is simplest if you can use a prebuilt nrsc5.exe. Option B builds from source via MSYS2.

Option A — Prebuilt nrsc5 + SoX

Install Scoop & Git (user-space, clean):

Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
irm get.scoop.sh | iex
scoop install git

Install SoX:

scoop install sox

Place nrsc5.exe in your PATH (e.g. C:\nrsc5\) and add it:

setx PATH "$($env:PATH);C:\nrsc5"

Live playback:

nrsc5 -p -1 -g 28.0 -t wav 106.1e6 1 | play -t wav -
Driver: Use Zadig to switch the RTL-SDR to WinUSB if nrsc5 can’t open the device.

Option B — Build via MSYS2 (advanced)

Install MSYS2, open “MSYS2 MinGW x64”, then:

pacman -Syu --noconfirm
pacman -S --noconfirm mingw-w64-x86_64-toolchain ^
  mingw-w64-x86_64-cmake mingw-w64-x86_64-pkgconf ^
  mingw-w64-x86_64-libusb mingw-w64-x86_64-rtl-sdr ^
  git

Build nrsc5:

git clone https://github.com/theori-io/nrsc5.git
cd nrsc5
mkdir build && cd build
cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release ..
cmake --build . --config Release

Run (PowerShell):

"C:\msys64\mingw64\bin\nrsc5.exe" -p -1 -g 28.0 -t wav 106.1e6 1 | play -t wav -

Usage Cheatsheet

Tune & play

nrsc5 -p -1 -g 25.0 -t wav <FREQ_HZ> <HD_PROGRAM> | play -t wav -

Example: 106.1e6 1 → 106.1 MHz, HD1.

Record to WAV

nrsc5 -p -1 -g 25.0 -o out.wav 88.5e6 2

Dump album art/AAS

mkdir -p aas
nrsc5 -p -1 --dump-aas-files aas 106.1e6 1

Good starting gains

-g range: 15.0–35.0. Too high = distortion; too low = dropouts.

Troubleshooting

No audio / choppy

  • Use SoX live pipe: ... | play -t wav -
  • Close other SDR apps (they can lock the stick).
  • Try different -g gains; move the antenna.
  • Aim for MER ≥ ~10–13 dB and BER < 0.005.

Device won’t open

  • macOS: pkill -f "sdrpp|rtl_tcp|rtl_fm|CubicSDR"
  • Windows: swap driver to WinUSB via Zadig.
  • Unplug/re-plug the RTL-SDR after closing apps.

Strong analog, weak HD

HD sidebands are often weaker. Try a better antenna, window placement, or an FM band-pass/attenuator to tame local blowtorches.

Quick Bay Area targets

  • KQED 88.5 MHz: 88.5e6 1 / 2 (e.g., BBC)
  • KMEL 106.1 MHz: 106.1e6 1 (HD1) / 2 (HD2)
Rule of thumb: If you’re consistently seeing MER ≥ 10–13 dB and BER < 0.005, audio should be clean and stable.

FAQ

Does this require admin privileges?

No on macOS; on Windows, Scoop is user-space. Zadig needs admin once to set the WinUSB driver.

Why SoX instead of afplay?

SoX’s play handles the realtime WAV stream better and avoids the pipe quirks you saw with afplay.

What about waterfalls/spectrum?

This guide focuses on audio. For waterfalls, run a parallel app (e.g., SDR++) for visualizing RF while letting nrsc5 handle audio.

Need a hand?

If you want me to package this into an installer or add a one-click launcher for your Mac/PC, reach out with your setup and goals.