Chapter 4
Up one level
The source code for Chapter
4, "Make Your House Talk". The files in this
folder support the How To Make Your House Talk
project in our book. You're welcome to play
around with them if you're not reading the book,
but they probably won't make much sense to you.
The book, Home Hacking Projects for Geeks, shows
you how to turn these files into a voice that
reads the weather to you in the morning--even if
your computer is in another room. Hint: in the
book, I show you how to hook up some wireless
speakers, too.
NOTE: The GetTempFromZip application no longer works because the free Web service it depends on has been shut down. Unfortunately, I haven't been able to find another source for temperature or weather data. If you know of a source, please write me at hacker@northrup.org.
-
GetTempFromZip Source Code - Here's the source code (a Visual Studio .NET solution) to the GetTempFromZip executable. The source code included in the book is very simple--literally two lines. I didn't have to be concerned about wasting space with this download, though, so I added help messages and some bounds checking to verify that the nice people providing the Web service don't start returning foul language instead of the current temperature. It's scary enough to wake up to a robot voice telling you the temperature; if he told me that he was going to eat my soul, I'd probably wake up screaming.
-
GetTempFromZip
Executable File -
- Sorry, there's no fancy setup routine here. Just download this zip file, extract the executable file, save it wherever you like, and run it from a command prompt. It's a console application that returns the current temperature given your zip code, and it's only intended to be used from within a script.
-
Say Source
Code -
- This is the source code for the Say executable, a Visual Studio .NET command-line application that converts text into speech. This tool is intended to be used as part of a batch file or script.
-
Say Executable -
- Extract this zip file, which includes both an executable and a .DLL library, to a folder. Then, you can run the tool from a script or command line. It's easy--it'll take whatever you type at the command line and turn it into speech. For example, issuing the command, "Say Congrats, Kurt and Beatriz!" would cause your computer to send good tidings to my favorite couple.
-
SpeakWeather Perl Script -
- Here's the Perl script that drives the other tools, directly from the book. There's no comments in it, but the book explains exactly how the script works and how you need to edit it.