Redirect Audio Out to Mic In (Linux)

[ < Some progress on KAGE | Linux Desktop Monitoring Software > ]

Posted by Noah Petherbridge on Wednesday, February 03 2010 @ 07:49:42 PM
I discovered a neat trick you can do with PulseAudio: redirect the audio output of your computer to the microphone input, so that any application that supports recording from a mic will get your audio output instead.

I needed to do this because I was testing something at work that involved an Asterisk server calling a softphone running on my Linux box, and it wanted me to record a voice prompt and then hang up. This computer didn't have a microphone installed, so I started looking for a way to fake the mic input and make it record an MP3 or something instead.

If your system is using PulseAudio (every recent Fedora and Ubuntu distribution does), the steps to follow are:

1) Open PulseAudio Volume Control

This is pavucontrol on the command line, and in Fedora is provided by the package pavucontrol.

Go to the "Input Devices" tab, and select "Show: Monitors" from the bottom of the window. If your computer is currently playing audio, you should see a bar showing the volume of the output:

Input Devices
The "Input Devices" tab showing monitors.

2) Start running an app that is recording audio, and go to the "Recording" tab and see if your app is listed.

In this screenshot I'm running Audacity and recording audio.

3) Click the input device button ("ALSA Capture from") and pick "Monitor of Internal Audio Analog Stereo")

The "Input Devices" tab showing monitors.

And that's pretty much it. If you see volume bars on the Recording tab now then it's probably working, and the recording app is now recording your audio output.

Here's a full desktop screenshot of me running `play audiodump.wav` (a WMA-to-WAV conversion of the Windows XP Welcome Music) in a terminal, the PulseAudio Volume Control running, and Audacity recording from the mic.

Audio Out to Mic In
Click for bigger screenshot.


[ Blog ]

[ < Some progress on KAGE | Linux Desktop Monitoring Software > ]


There are 9 comments on this page.

Posted on Wednesday, May 12 2010 @ 12:09 PM by John.


I found this useful.

Posted on Wednesday, December 22 2010 @ 04:01 PM by danyle.

yeah, really helped especially with google voice and espeak, thanks.

Posted on Tuesday, December 28 2010 @ 10:30 PM by gtech.

Wow this is great, works perfectly.

Posted on Saturday, July 30 2011 @ 10:20 AM by westen.

hi, can you please tell me how i can get my mic input to be heard over my speakers. massively appreciated

Posted on Tuesday, April 10 2012 @ 08:26 AM by dog.

Im using this for my honours thesis. Thanks! saved me some effort emulating recording process in the software im writing :)

Posted on Saturday, May 26 2012 @ 04:56 AM by srikrishna.

thanks this post is help full.
but this is only redirecting speaker to mic. original mic in is missing. i want both audio out and mic out to mic in is there any solution

Posted on Sunday, December 02 2012 @ 08:45 PM by simon.

Fantastic, thanks, I've been trying to work out how to do this for a long time.

Posted on Saturday, January 19 2013 @ 03:50 PM by avmfree.

Thanks. Very useful.

Posted on Friday, December 06 2013 @ 12:38 PM by cata.

thanks man! I knew about PulseAudio, but didn't know it can redirect sound. Much appreciate!

Add a Comment

Your name:
Your Email: (optional)
Comments can be formatted with Markdown, and you can use
emoticons in your comment.

If you can see this, don't touch the following fields.

» Homepage (RSS)
» About Me
» Photo Albums
» Guestbook
» Contact Me
» Linux (49)
» General (48)
» Perl (34)
» Rant (22)
» Software (15)
» HowTo (11)
» RiveScript (9)
» Minecraft (9)
» Gnome 3 (8)
» Android (8)
» Windows (8)
» Curiosity (7)
» HTML (7)
» Siikir (7)
» Design (6)
» Tk (6)
» Gay (5)
» Java (4)
» Blackhat (4)
» Reviews (4)
» VirtualBox (4)
» Ideas (3)
» DOS (3)
» Python (3)
» Photos (3)
» KAGE (3)
» Xfce (3)
» ttf2eot (3)
» Licensing (3)
» 3D Renderings
» Flash Animation
» JavaScript
» Fonts
» Metacity
» Tutorials
» RiveScript
» Error Generator
» Tk Calculator
» Terminal Apps
» CyanChat Client
Web Tools
» TTF to EOT
» Text Fader
» Favicons
» Distance Calc
» Azulian Encoder
» XBM Masks
» Shell Scripts
» Linux RPMs
» Rophako CMS
» Kirsle::Nano
» Minecraft Server
¤ Pokemon Fuchsia City
¤ DOS and Windows
¤ Raspberry Pi
¤ Google+
¤ Facebook
¤ Twitter
¤ MySpace
¤ Github
Fan Club
» Log In