How can I "record" sound directly from an audio file?

Solution 1:

Linux solution:

  1. Install pavucontrol, on my system it came with pulseaudio.
  2. Add a dummy audio device (basically a virtual soundcard): sudo modprobe snd-aloop. This uses alsa's module which for me uses less than half the CPU time as pulseaudio's null-sink module, that's why I prefer it. To use the pulseaudio module instead, run: pactl load-module module-null-sink
  3. Open pavucontrol (GUI application).
  4. Navigate to Input device and select All Input Devices from the dropdown at the bottom.
  5. Navigate to the recording tab and find your recording App. (e.g. Discord) there, set its audio input to Monitor of Built-in Analog Stereo. pulseaudio

  6. Go to the Playback tab, now play whatever song/sound you want played on discord.

  7. Select Built-in Audio Analog Stereo as the audio output of the desired application. More like Audio Proxy How-To :)

That's it. You can make it as loud as you want now, the audio will directly and only go to discord.

If you want to listen in live (at any volume) while it's playing look at the answer to my question here.

Solution 2:

Windows solutions:

1. Donationware program: VB-CABLE Virtual Audio Device.

VB-CABLE is a virtual audio device working as virtual audio cable. All signals coming in the CABLE input is going to the CABLE output. Then It becomes simple to make computer audio recording or to connect a player application to a recorder one.

enter image description here


2. DIY solution:
For those who'd like to create own solution, one can use examples from WDK that available for
download here

Solution 3:

On Mac you may try Soundflower, this is open source, and it creates supplementary audio inputs and outputs: - Sounflower (2ch) - Soundflower (64ch) and within your apps pref pane you can chose which one to use. Look to https://github.com/mattingalls/Soundflower

Hope that helps