Monitoring an audio source is a term audio folks use to say that they send the signal from an audio input source (eg. line in or microphone) to an auxiliary audio output (eg. headphones) so that they can listen to the input signal in real time. Windows 10 allows this out of the box, it’s a bit harder to do with Ubuntu.
Here are a few ways to do this
pactl load-module module-loopback
This pushes the default input to the default output. I haven’t researched how to address other in/outputs than the default one.
This command will stop monitoring:
pactl unload-module module-loopback
arecord -f cd --buffer-size=1500 - | aplay --buffer-size=1500 -
arecord records in CD format from the default device and writes it to stdout (the – character). aplay reads from stdin and plays to the standard output device. –buffer-size is optional, but not specifying it produces a rather high latency; you should pick the lowest value that works. On Ubuntu 18.04 and the Acer Nitro 5 a buffer size of 1500 worked well.