Building a 24/7 Internet Radio Station from 237,000 Episodes

We built a radio station. Not a playlist. Not a podcast feed. A live broadcast — streaming classic American radio dramas 24 hours a day at radio.archiveofamericanradio.org.

This post explains how we built it.

The Problem with On-Demand

We have 237,000 episodes in the archive. That's overwhelming. Most people don't want to browse a catalog — they want to turn something on and listen.

That's what radio does. You tune in, something's playing, you listen. No decisions, no infinite scroll, no paralysis of choice. The station makes the decisions for you.

But we wanted everyone to hear the same thing at the same time. If you're listening at 3:47 PM, you hear what everyone else hears at 3:47 PM. That's what makes it radio instead of just a shuffled playlist.

Wall-Clock Synchronization

The trick is simple: the playlist for each day is deterministic. We know exactly which episodes play and in what order. Given the current time, we can calculate exactly where in the broadcast we should be — down to the millisecond.

When you load the player, it asks the server: "What's playing right now, and how far into it are we?" The server looks at the wall clock, does the math, and returns the current episode and position. The player seeks to that position and starts playing.

Everyone's clock is (roughly) the same. Everyone hears the same thing.

What "Streaming" Means Now

The word "streaming" used to mean something. A stream is continuous — water flowing, data flowing. You connect, bytes arrive, they keep arriving until you disconnect. That's how internet radio worked in 1998.

Then Apple invented HLS in 2009, and "streaming" started meaning something else. HLS chops media into tiny segments — typically 6 seconds each — and serves them as individual HTTP requests. Your browser downloads one chunk, plays it, downloads the next chunk, plays it. It's not a stream. It's a series of small downloads pretending to be a stream.

You wouldn't call a river with a dam every 5 feet a stream. But that's what we call HLS.

We use HLS anyway. It's pragmatic. It works through CDNs, handles network interruptions gracefully, and every browser supports it. Each episode gets segmented into chunks with an m3u8 manifest. The browser fetches chunks and plays them in sequence.

But we add the synchronization layer on top. The player calculates where it should be based on wall-clock time, then seeks to that position immediately. You join in progress, mid-chunk, mid-sentence. Everyone listening at the same moment hears the same thing.

Each episode also has synchronized WebVTT captions generated from word-level timestamps. The captions appear in sync as you listen.

The Backend

A Node.js server on Fly.io manages the broadcast state. It knows today's playlist, tracks the current position, and pre-generates HLS segments for each episode.

Audio files live in Cloudflare R2. When a new day starts (midnight Pacific), the server loads that day's playlist from the database and begins serving the new schedule.

The Cloudflare Worker at radio.archiveofamericanradio.org handles the web player, proxies API requests to the Fly.io server, and serves the HLS segments from R2.

This Day in History

The playlist isn't random. Every episode that plays on January 16th originally aired on a January 16th — maybe in 1947, maybe in 1982. We mined broadcast dates from program logs, newspaper listings, and the recordings themselves.

It's a small detail, but it connects you to the actual history. You're hearing what people heard on this exact date, decades ago.

Voice Synthesis

Between episodes, you'll hear station IDs: "You're listening to The Archive of American Radio."

That voice is synthetic. We cloned a 1940s radio announcer using ElevenLabs, trained on samples from our own archive. The result sounds period-appropriate — like it belongs with the content.

What's Next

We're working on a program guide showing what's coming up. We want to add genre-specific channels (mystery, comedy, sci-fi). And we're building automated audio quality scoring to filter out episodes with severe degradation.

The station is live now at radio.archiveofamericanradio.org. Tune in.