Linux – How to record both input and output audio simultaneously

audacityaudiolinux-mintrecording

I'm trying to record a phone call made with Google Voice Chat using Audacity. I'm running Linux Mint 17.

In this example, I'm making an outbound phone call from my computer to a person on a normal phone. I will refer to audio travelling from my computer to the phone as outbound audio, and audio travelling from the phone to my computer as inbound audio.

I followed the section for PulseAudio in this tutorial. This almost works the way I want it to, but not perfectly because I can only record either outbound audio, or inbound audio, but not both simultaneously.

screenshot

In the PulseAudio Volume Control, there are 3 options available (see screenshot). They are:

  1. Monitor of GF108 High Definition Audio Controller Digital Stereo (HDMI)
  2. Monitor of Built-in Audio Analog Stereo
  3. Built-in Audio Analog Stereo.

If I choose option 1, no sound is recorded in Audacity.
If I choose option 2, only inbound audio is recorded.
If I choose option 3, only outbound audio is recorded.

This means that using Audacity, I can only record one side of the conversation at any given time. I'm trying to figure out how to record both sides of the conversation simultaneously.

The closest I have come to achieving my goal is to manually toggle the "ALSA Capture from" option between option 2 and option 3 during a conversation. But this is tedious and does not allow interruptions in the conversation to be recorded.

Is there a way to record both the "Built-in Audio Analog Stereo" and the "Monitor of Built-in Audio Analog Stereo" at the same time? If so, how?

Best Answer

You can try to enable "the stereo mixer" using pactl to load module-loopback

The idea is to mix the source stream from your microphone to the speakers. With a correct set for volume and reciprocal position of microphone and speakers you should be able to avoid the Larson effect. :-)

Load the module-loopback

 pactl load-module module-loopback

and after change the recording device (Alsa capture from) from the built-in to the monitor one.
[You find in Volume control->Recording->Alsa plug in / Alsa capture from].

There's a short video for Ubuntu system on youtube

Notes:

module-loopback
allows one to route audio from a source directly back to a sink.