Steps:
- I followed the Adafruit tutorials lessons 1,2,3,6 and 7. https://learn.adafruit.com/category/learn-raspberry-pi How about, buy your hardware like I did, from AdaFruit to say thank you.
- To make the headless system wake up with WiFi working, I modified the /etc/network/interfaces file as shown in the picture.
- The
software that does the recording is called streamripper. It is loaded into the Raspberry Pi from
the command window with:
apt-get install streamripper
- You tell streamripper what channel to record and how long to record. You schedule the start of the streamripper commend with an entry in crontab.
- Create a directory were you want the recordings to end up.
- Create and save a file containing the streamripper command like this ( I named this file MoneyTalk.sh) :
streamripper
http://209.203.124.194:8000 -a -A -d /home/pi/Pods -l 14400
- To learn what all the parameters do type streamripper in the command window or search for the doc online.
- To find the URL for the website stream go to shoutcast.com. In the search box type in the call letters for the station, example KFNN. If the station is found, click the down radio button and play the stream with Winamp. The URL is shown in the Winamp play screen.
- In properties for the streamripper command file mark the executable box.
- Shorten the recording time and test run this file from the command line. The mp3 files should appear when the recording starts.
- The crontable tells the system when to start the execution of commands.
- To edit the crontable to add the start time of the recording type: crontab –e Make sure entries in the crontable have a carriage return/line feed at the end of each line.
- There is a picture example of a cron table entry that starts a recording every Sunday at 1PM.
- To ensure long life, you can check the Raspberry Pi CPU temperature from the command line with: /opt/vc/bin/vcgencmd measure_temp In the AdaFruit case in a 25C room, with the board flat on a table, the Pi temperature was 48.7C. With the Pi oriented vertical with the HDMI connector pointing up the Pi was 43.3C
- When the recordings have completed use WinSCP running on your Windows machine to move the files from the Raspberry Pi to your Windows machine.
- Once your have WinSCP and VNC-Viewer working for the first time, if you have trouble connecting at a future date, alternate attempts with the two programs until one works then the other will work as well. You can have both open at the same time.
- Slow connection was only a problem with WiFi. I suggest starting the project with a Pi wired to your router.
- My Pi got lost once and I needed to reboot my wireless router to find it.
- Adafruit Raspberry Pi lesson7 shows you how to autostart the VNC server on the Raspberry Pi.
- WinSCP does not transfer large files unless you configure it correctly. You must uncheck the ‘Optimize connection buffer size’ box when you first set up the connection. This is not a global option. See the picture.
- To remove commercials I like to edit the mp3 files with WavePad Sound Editor by NCH software. This program allows me to remove commercials very quickly. There is a free home version at: http://www.nch.com.au/wavepad/
- To remove a commercial, mouse click where you would like play to begin, hit the space bar to start play, move to the end of the commercial, hold the left mouse button down and move left to highlight the commercial. Let go of the mouse to compete the highlight. Hitting the Delete key removes the highlighted audio.
- I can clean news and commercials from a 3 hour audio file in about 5 minutes;) A 3 hour radio program without news and commercials is 1 hour and 52 minutes long. How about that for a little life back?
- Happy listening to what you want when you want. All the best.
- After a year, I upgraded the Pi B to the Pi B+. I have not had to reboot in several months....