Radio Recorder

From Kyle's Wiki
Jump to: navigation, search

The radio recorder is a simple radio recorder that uses a bash script to filter out all the noise and give me daily summaries of the radio chatter.

Hardware

<graph> digraph sound { rankdir=LR; node [color=lightblue2, style=filled]; "Radio 1" -> "Impedance Transformer" "Radio 2" -> "Impedance Transformer" "Radio 3" -> "Impedance Transformer" "Radio 4" -> "Impedance Transformer" "Radio 5" -> "Impedance Transformer" "Impedance Transformer" -> "Sound Card Line-In" "Sound Card Line-In" -> "arecord" "arecord" -> sox sox -> oggenc oggenc -> "rsync up to my server" } </graph>

Interface

The interface is simply a directory listing: [1]

Script

#!/bin/bash
while [ 1 ]; do
	OUTFILE=`date +%F-%H-%M-%S`
	echo Recording Audio with noise reduction....
	sox -S -t alsa default -t .wav /tmp/$OUTFILE.1.wav  noisered /etc/channel-noise  &
	PID=$!
	sleep 12h
	kill $PID
	echo Killed... Waiting for write...
	sleep 5s	
	echo removing Scilence....
	sox -S /tmp/$OUTFILE.1.wav -t .ogg /tmp/$OUTFILE.ogg silence -l 1 3000 1% -5 5000 1%
	echo Uploading...
	rsync -aPv /tmp/*.ogg [email protected]:/raid/radio-recordings/
	if [ $? -eq 0 ]; then
	echo Upload Done.
	rm /tmp/$OUTFILE.1.wav
	else
	echo Upload not done
	fi
done
Personal tools
Namespaces

Variants
Actions
Efforts
Toolbox
Meta