Hardware Reference
In-Depth Information
• Finally, let's make sure you never have to type one of those long commands
again by creating a simple shortcut on the desktop. Type in the following
command from the command prompt:
C:\> notepad %UserProfile%\Desktop\PiRec.cmd
Click on Yes when a dialog box appears to create a new file, paste one of the long
commands, then save and exit. You should now be able to double-click on the
shortcut on your desktop to start a new listening or recording session.
Listening in Mac OS X or Linux
Since Mac OS X and most Linux distributions include an SSH client, all we need is
SoX. To install SoX on Linux, use the package manager of your distribution to add
the sox package. For Mac, follow these steps:
1. Visit http://sourceforge.net/projects/sox/files/sox/ and click on
the download link for the latest version ( sox-14.4.1-macosx.zip at the
time of writing) and save it to your desktop.
2. Double-click on the SoX ZIP file to extract it.
3. Open up a Terminal (located in /Applications/Utilities on the Mac).
4. Type cd ~/Desktop/sox-14.4.1 to change to the extracted SoX directory.
Then type sudo cp sox /usr/bin to copy the sox binary to a location in
our default path.
5. (Optional) To be able to encode and play MP3 files with SoX, the
recommended method is to install SoX through Homebrew . Visit
http://brew.sh and follow the installation instructions. Then type
brew install sox to build and install an MP3-capable SoX.
To start a recording on the Pi and send the output to your computer, use the
following command, but replace [IP address] with the IP address of your Pi:
$ ssh pi@[IP address] sox -t alsa plughw:1 -t sox - | 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.
Let's break down the command:
ssh pi@[IP address] sox -t alsa plughw:1 -t sox - starts a sox
command on the Pi itself but sends the output to our machine through the
SSH link.
 
Search WWH ::




Custom Search