Hardware Reference
In-Depth Information
Listening in on conversations from a
distance
What if we want to listen in on some event live as it goes down, but from a safe
distance away from where the Pi's recording—exactly like a baby monitor?
We would need a way of broadcasting whatever is recorded across a network
to another computer that we can listen to. Actually, we already have everything
required to do this, SSH and SoX; one just has to know how to compose the
command lines to wield these powerful tools.
Listening in Windows
You should have the full PuTTY suite installed from the Connecting to the Pi from
Windows section in Chapter 1 , Getting Up to No Good , as we will be using the plink
command for this example.
1. To download SoX for Windows, visit http://sourceforge.net/projects/
sox/files/sox/ and click on the download link for the latest version ( sox-
14.4.1-win32.exe at the time of writing).
2. Run the installer to install SoX.
3. (Optional) To be able to play MP3 files with SoX, download the decoder
library file at http://www.intestinate.com/libmad.dll and put it in the
C:\Program Files (x86)\sox-14-4-1 folder.
4.
Start a command prompt from the Start menu by clicking on the shortcut
or by typing in cmd in the Run/Search field.
The following examples will be executed in the command prompt environment. Note
that the C:\Program Files (x86) directory in the later versions of Windows might
be called C:\Program Files on your computer. Just erase the (x86) part from the
paths if the commands fail.
To start a recording on the Pi and send the output to our Windows machine, use the
following command, but replace [IP address] with the IP address of your Pi and
[password] with your login password:
C:\> "C:\Program Files (x86)\PuTTY\plink" pi@[IP address] -pw [password]
sox -t alsa plughw:1 -t sox - | "C:\Program Files (x86)\sox-14-4-1\sox"
-q -t sox - -d
SoX will behave just as if it was running locally on the Pi with the volume meters
moving on sound input.
 
Search WWH ::




Custom Search