Radio recommendation?

What’s the best way to record audio from radio (analog FM)?
I’m a firefighter and I want to collect audio files by monitoring our dispatch channel (analog FM 155.49 MHz) and eliding the silence.
I assume I need a radio and a computer. My first thought is to order one of these RTL-SDR dongles, probably the R820T RT2832U.
Can anyone recommend different hardware or a different source or model of dongle? or another approach entirely?
(My thought is then to try assembling a GNU Radio flow graph that will output audio files, based on these tutorials.)

Do you have a spare radio that can pick up the channel? Does it have a speaker-out port that you can plug into a computer’s mic-in? Will this blow something up? I don’t know!

The RTL-SDR would probably be a decent way to go.

For post-processing (deleting the silence), my first thought would be to use Audacity and write a macro to do whatever you need (audacity has a “Silence Finder” tool built-in):
http://www.autohotkey.com/board/topic/6542-script-help-needed/

This way is a good solution, if a tad bit “heavy” from an
implementation point of view. It likely is the cheapest way to
accomplish your goal, however. You really don’t have to assemble the
flow graph yourself, just use the rtl_fm script provided with
librtlsdr that you’ll need anyway. It outputs raw samples, so you can
then just pipe that to SoX or whatever and generate wave/mp3/whatever
files. If you did want to create a flow graph it shouldn’t be hard
(with a bit of Python) to do carrier detection to only record when
there’s a carrier present, and you could time-tag the files or
whatever you want. rtl_fm does include a squelch though, which will
probably work with the sox ‘silence’ filter to skip silence, I can
experiment with this tonight.

This one you’ve selected looks like it might even come with a suitable
antenna, as most of them come with upper-UHF antennas only (and poor
ones at that). It also has a fairly standard MCX connector so you can
adapt it to a proper VHF antenna if you need to. The sensitivity of
these modules isn’t very good, but if you have a strong signal at your
location the default setup will probably work.

The other option of course is to buy a cheap VHF handheld radio and
plug it into a soundcard (maybe one of those $1 USB ones, if you want
to use this PC for something else) or even a standalone audio
recorder. You can get brand-new VHF radios for like $30 these days
(Baofeng UV-3R for one example).

K

Quoting Jack Bates discourse@talk.vanhack.ca:

So I did some playing around with rtl_fm this evening and it looks like it will do basically what you want with very little effort. When the squelch is closed, it doesn’t output audio samples at all, so you can basically just take the output directly and give it to sox to save as a file:

rtl_fm -F9 -f 143.175M -l500 -s 12k - | sox -t raw -r 12k -es -b 16 -c 1 - <file.wav>

This looks a bit unwieldy, but mostly it’s just the example from the rtl_fm help. The parameters are described pretty well here if you want the rundown. You’ll probably have to tweak the -l parameter for your signal conditions and receiver (it’s the squelch cutoff).

The frequency I played with, 143.175MHz is the City of Vancouver parking enforcement channel, and I guess they have some subaudible tone or DCS code as there was a lot of low-frequency noise. Also who wants to listen to hissing? So I added a 200-3500Hz band pass. I also didn’t like the variability of the output volume, so added a compressor as well:

rtl_fm -F9 -f 143.175M -l500 -s 12k - | sox -t raw -r 12k -es -b 16 -c 1 - <file.wav> sinc 200-3.5k compand 0.1,0.8 6:0,-3

Finally, I decided I wanted to monitor the output and record at the same time:

rtl_fm -F9 -f 143.175M -l500 -s 12k - | \ 
sox --buffer 128 -t raw -r 12k -es -b 16 -c 1 - -p sinc 200-3.5k compand 0.1,0.8 6:0,-3 | \ 
tee >(sox -p <file.wav>) | play --buffer 128 -p

The buffer settings reduce the latency from RF to the speakers (it’s still about 0.8s on my system). I think a lot of that is the filters.

Anyway, the output is pretty darn good, even from a cheap antenna just sitting here on my bench inside. You can have a listen to ~60s of audio (captured over a couple of hours - this parking channel isn’t very busy at midnight): http://www.gotroot.ca/media/rtl-fm-demo.mp3

There are a fair number of times the squelch opens without anyone saying anything; I didn’t investigate stripping these, but probably could be done with the silence module for SoX.

Oh and one more tidbit - you can scan multiple channels with multiple -f parameters, which is pretty neat.

2 Likes

Sweet! Thanks for the band-pass filter and SoX silence effect advice.
Any thoughts how to invoke some action when X seconds of silence is detected after Y seconds of non-silence? e.g. post the audio to a web API?
(Ultimately I want to attempt to send short transmissions from dispatch to Google’s Speech API: http://www.google.com/speech-api/v2/recognize)

I didn’t really play with it, but rtl_fm’s -t flag with a negative parameter will cause it to exit after a transmission (when the squelch closes). I would assume the parameter sets the timeout for squelch closure, so if you set it to a few seconds it would probably catch most replies in the same recording.

Then just throw it in a loop. It’s a bit inefficient to reinitialize the whole rtl-sdr hardware every time there’s a transmission as this would do, but it probably would work okay for channels that aren’t very busy, like I assume your dispatch channel isn’t.

Alternatively, you could just poll the output filesize, and remember where you were in it. When the size increases, read from where you last were.