Basic Audio Piping in Linux: How to record just about anything!

Synopsis: If you can play it through you’re computer’s sound card you can record it or feed it into another application on the same machine. It’s like a screen capture for sound.

When to use this: Anytime you have audio playing in one application that you want to record or process in another. For example, you’re monitoring your security webcam on your web browser and want to record the audio feed.

Or perhaps you’re a Ham, Amateur, Shortwave or Scanner enthusiast listening to a digital signal with your favorite SDR (Software Defined Radio) application such as CubicSDR or Gqrx and you want to send that feed into a decoder such as fldigi.

In the VirtualBox environment you can pipe audio from the Host OS to a Guest OS.

Where does it work? I’ve confirmed this works in Linux Mint with the Mate desktop. (I think this will also work in any Mint, Debian or Ubuntu based distro.)

What about Sound Quality? Recordings are just as good as what’s being played. No better, no worse. You’ll only encounter noticeable loss if you export the captured sound in a compressed format such as a low bitrate mp3.



How to do it:

1. Go to your Sound Preferences, click the ‘input’ tab and under ‘Choose device for sound input’ select Monitor of Built-in audio Analog Stereo. Set the input volume to 100%.

2. Check your levels for a proper recording. I found it best to leave the Input volume at 100% and make any adjustments from the source application to achieve peaking close to the end of scale. If in doubt, set the levels a bit low as too high results in distortion that we cannot fix.


Note sound levels not running off the scale.

Note peak sound levels not running off the scale.


2. Get the Audacity Audio Editor, easily available through your Synaptic Package Manager. Or use an audio recording utility you’re comfortable with.


Note peaks stay within range.

Note peaks stay within range.

3. Launch Audacity and press ‘Record’.

4. Quickly switch to the audio source and press ‘Play’

5. When finished, switch back to Audacity and press ‘Stop’.

6. Optimize and export the audio as an mp3.
– Highlight and trim excess quiet time at beginning and end of track.
– Select the entire track [ctrl-a], go to Effect and select Normalize.
– Click ‘File’ > ‘Export’ and choose mp3. 256k or 320k bitrates retain good audio quality.


These default settings work well.

These default settings work well.


It’s that easy. No audio piping software, no special configuration, no patch cables, not even a second sound card.



  • Kenn Ranous



%d bloggers like this: