NOAA Weather Radio

This section describes the software I've written to broadcast the NOAA Weather Radio on the Internet.

The National Weather Service operates a network of hundreds of radio stations nationwide that continuously broadcast weather information and messages. This software has three major purposes:

Block diagram antenna radio sound card rec splitter capture log streamer


The following is a list of (hardware and software) components that make up the weather radio system.


By definition, all radio signals involve an antenna. Currently I am using the short "rubber ducky" antenna that came with my scanner. This probably needs improvement.


The radio I am using is a Uniden Bearcat BC60XLT handheld scanner I bought on Ebay for about $40. I just leave it tuned to the weather radio frequency.

sound card

The sound card (an old SoundBlaster 16 in my case) converts the audio signal from the headphone jack on the scanner to a stream of bytes which is what all the software uses.


The rec program is responsible for opening the /dev/dsp sound device (under Linux) and setting the right recording parameters (11.025 kHz sample rate, 16 bit mono).


The splitter program receives a digitized stream as input and sends it to multiple outputs.


The capture program watches for the SAME digital signal that precedes important messages. When such a message is received, capture automatically records the audio portion of the message and saves it in MP3 format.


The log program records the raw digitized audio data on disk for later analysis. Since the raw audio data is rather large (about 80 MB per hour), log automatically keeps only the last few hours of data.


The streamer program makes the audio stream available over HTTP in MP3 format. It also sends information about the stream to the Shoutcast server so people can find the stream.

Two Stations

One day I realized that I was really only using half of the capability of the sound card. Since the Soundblaster 16 is a stereo device (as are virtually all sound cards these days), I was only using half of it by capturing one radio signal. I made a special cable that combines the audio signals from two different sources into the left and right channels of a single jack.

On the other end, rec needs to open the sound device for stereo input. The output of rec is piped into demux which separates the left and right channels into two mono channels that can be used as above.

Here is a diagram showing how two stations can be handled simultaneously with one sound card. It is possible to extend this by using more than one sound card, if you are in a location where three or more NOAA Weather Radio stations can all be received clearly.

Future Directions

At some point I would like to replace the radio, sound card, and rec with GNU Radio or other Software Defined Radio (SDR) system.

Complete Component List

record EAS alert portions of audio stream to MP3 files
demultiplex a stereo audio stream into two mono streams
email EAS alert messages to one or more users
encode text into SAME modulation (used for testing)
extract station history log to XML
record EAS alert into database
log raw audio to disk
determine appropriate "title" for stream based on current alerts
play a raw stream back
record a stream from the sound card to a file
split a stream to multiple outputs
suppress audio during periods of relative silence
serve streaming audio to clients

Source Code

The source code is available at ghewgill/nwr on Github. The source is licensed under the GNU GPL.

Greg Hewgill <>