Many have noticed the announcements playing on the STARnet nodes for the last few weeks.  They’ve been successful in pointing people to the N7JCT web site to obtain information about the nodes.  Several people have, as a result, emailed me with questions or comments.

For those who don’t know, I’m talking about a voice recording that is (currently) playing ever two hours during daylight hours.  As an example, one message says something like “You’re listening to the STAR net.  Information about STAR net can be found on the world wide web at N7JCT dot O R G”.  The purpose of this post is to describe how I made those messages happen.

The first thing I did was to write a quick script.  You want a script.  Trying to do it on the fly is….well, you’ll waste a lot of time and sound (more) dorky.  Maybe if you’re a professional broadcaster you might wing it, but I suspect many of them would advise you to write a script too.  Just do it.

Then open up Audacity and make a recording.  Use the settings for the highest quality your system is capable of.  Make the recording mono, you don’t want or need stereo for this.  Trim up the recording where you’re happy with it, you don’t want extensive periods of silence on either end.  Editing is what that’s called.  Then export it as a WAV file (Microsoft 16 bit PCM).

Take the audio files you create and put them on your asterisk server (your node).  There are many ways to do this, I won’t go into all that.  But you might use Webmin, SSH, scp or even just cart them over on a USB memory or even a CD.  However you do it, put it the files in a location on your server.  I recommend something like /usr/local/share/recordings/masters as these files will be your masters.  You would also have a direcotry like /usr/local/share/recordings/info where the actual files to be played will be stored.  Maybe you’ll have another for ID’s like /usr/local/share/recordings/ID or whathaveyou.

For simplicity let’s now just cd into that directory of masters.  Assume you have put a file in there called STARnet_ID7.wav  Let’s use sox to do the first conversion of the file and we’ll name the new file “info7.wav” in the process:

sox STARnet_ID7.wav -r 8000 -c 1 -s info7.wav resample -ql

Then we need to take that file and run a second conversion on it before asterisk will play it nicely. To do that we use this command which will make a new file “info.ulaw” in the process.

rasterisk -x "file convert info7.wav info7.ulaw"

To get asterisk to play the file from the command line you invoke asterisk with the -rx option. Doing this is just like if you were to go into asterisk with “asterisk -rvvv” and enter it from asterisk command mode. So you tell asterisk you are giving it a commmand for the rpt module. The command is localplay (so it plays only on the node identified and not on any connected nodes). In this case I want to play it on node 27006 and I give it the full location and name of the file. Notice that I only say “info7” and not “info7.gsm” or “info7.ulaw” or whatever. Asterisk will select the best one to play.

asterisk -rx "rpt localplay 27006 /etc/asterisk/custom/Net_Info/info7"