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
pavucontrol on the command line, and in Fedora is provided by the package
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:
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")
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.
There are 20 comments on this page. Add yours.
I found this useful.
yeah, really helped especially with google voice and espeak, thanks.
Wow this is great, works perfectly.
hi, can you please tell me how i can get my mic input to be heard over my speakers. massively appreciated
Im using this for my honours thesis. Thanks! saved me some effort emulating recording process in the software im writing :)
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
Fantastic, thanks, I've been trying to work out how to do this for a long time.
Thanks. Very useful.
thanks man! I knew about PulseAudio, but didn't know it can redirect sound. Much appreciate!
How to do the exact oposite?
Im participating in some video conferences and im making some kind of echo because of this.
But i cant find a way to do the oposite,
I was banging my head on this problem for the past month! Thanks so much!
5 years ago and still helping. thank you! got the job done.
What about recording both the mic AND the output stream?
hey, i see this works. but there is an echo. on my recording software, how can i fix this?
THANKS a lot man!! <3
I've been trying to find a reasonably decent recording of Tchaikovsky's 1812 Overture with cannons and chorus for a good few years now - classical music is getting harder to find through most of my usual channels. The only place I've had any luck has been YouTube, and although kissyoutube/savemedia.com exists, this song is longer than that service allows for.
Thank you for helping me replace this fundamental classic in my library.
Is there a way to do this completely from the command line for a Linux system that isn't running X at all?
Wow....really a great tip, very useful, in my case, to generate closed captions for on line videos that does not provide this feature =) Thank you so much for sharing this tip !
Thank you so much for sharing and helping me.
Algo Dons mi buen! se le aprecia. Muito Obrigado.
I kept messing with possibilities and found that; for any implementetion where this doesn't do, jackd and qjackctl can be used so as to make a virtual patch cable and then still use this solution