RadioArchiver: The Pure-Python Broadcast Black Box

How a minimalist script uses wall-clock alignment and zero external dependencies to solve a 90-day legal compliance problem for radio stations.

7 min read · stcatcom/RadioArchiver

A massive, monolithic server rack sitting isolated in the middle of a perfectly raked traditional Japanese zen garden, connected by a thick cable to a distant radio tower. This illustrates the robust, set-and-forget nature of compliance archival hardware.
RadioArchiver turns standard operating file systems into highly queryable time-series databases.
Key Takeaways

Terrestrial broadcasters face a relentless physical reality. In jurisdictions like Japan, strict broadcast laws mandate the retention of all transmissions for exactly 90 days. This is not a theoretical exercise in data storage. It means writing up to 2.1 Terabytes of 24-bit, 48kHz audio reliably to a RAID1 array. You cannot drop a single second of audio.

Banning the Industry Standard

To solve this problem, most developers would immediately reach for FFmpeg. It is the undisputed king of media processing. The developer of RadioArchiver made a conscious decision to ban it entirely.

IT policies on air-gapped broadcast workstations often prohibit installing complex, compiled media codecs. By relying on a pure-Python stack using the sounddevice, numpy, and wave modules, the tool ensures absolute portability. It trades storage efficiency for bulletproof execution. Raw PCM WAV files eat disk space, but they never suffer from codec crashes or framing errors.

A split composition showing a tangled, leaking web of pipes on the left, and a single, perfectly straight glass tube with smooth flowing water on the right. This contrasts complex media frameworks with raw Python wave buffering.
Removing compiled media dependencies eliminates the most common points of failure in continuous recording environments.

The Wall-Clock Database

The project's most clever architectural decision lies in how it chunks audio. Standard recording software splits files based on arbitrary durations, like every 60 seconds. RadioArchiver splits files based on the system clock's exact minute mark.

If the application starts recording at 12:00:30, the very first file will be exactly 30 seconds long. Subsequent files will start precisely at 12:01:00, 12:02:00, and so on. This transforms the standard operating file system into a highly queryable time-series database. Finding a specific broadcast segment requires zero database lookups. The filename itself is the index.

The pure-Python engine uses a strict double-buffering strategy to guarantee zero milliseconds are lost while the disk spins up to write the previous chunk.

The Rack Room vs. The Studio

Software design often ignores the physical environment of the user. RadioArchiver acknowledges that a broadcast station has two distinct zones. The system runs a local Tkinter GUI designed for the broadcast engineer standing at a server rack. Simultaneously, it spins up a Flask server on the local network.

This dual interface means producers sitting in soundproof booths can pull exact audio clips from their iPads without ever touching the mission-critical recording PC.

Signal vs. Noise

The open-source radio ecosystem is filled with highly specialized tools. Many focus on real-time transcription or trunked radio monitoring. RadioArchiver is strictly a compliance logger.

The idea is to take live scanner audio, such as authenticated streams from Broadcastify, and continuously turn it into readable text with minimal babysitting.

Nite, Developer of RadioTranscriber · RadioTranscriber Blog

While tools like RadioTranscriber focus on extracting meaning from audio, RadioArchiver focuses entirely on preserving the exact physical waveform for legal scrutiny. When compared to custom bash scripts or complex SDR setups, its value proposition is absolute simplicity.

ProjectPrimary Use CaseSplitting LogicExternal Dependencies
RadioArchiverLegal Compliance LoggingWall-Clock Minute MarkZero (Pure Python)
Trunk RecorderPublic Safety ScanningCall-BasedC++, SDR Libraries
Custom Cron ScriptsGeneral ArchivingArbitrary DurationFFmpeg, Bash