How can I "record" sound directly from an audio file?
Solution 1:
Linux solution:
- Install
pavucontrol
, on my system it came withpulseaudio
. - 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
- Open
pavucontrol
(GUI application). - Navigate to
Input device
and selectAll Input Devices
from the dropdown at the bottom. Navigate to the
recording
tab and find your recording App. (e.g. Discord) there, set its audio input toMonitor of Built-in Analog Stereo
.Go to the
Playback
tab, now play whatever song/sound you want played on discord.- Select
Built-in Audio Analog Stereo
as the audio output of the desired application.
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.
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