parec
Parec is a command-line audio recording utility that is part of the PulseAudio sound server. It records audio from a PulseAudio source and writes the raw PCM data to standard output, or to a file if the output is redirected. The source can be the default recording source or a user-specified one, such as a microphone or a monitor source associated with a playback sink.
As a client of the PulseAudio Simple API, parec does not perform any encoding itself. Users typically
Common use cases include capturing system audio by selecting the monitor source of a sink or recording
Options generally allow selecting the input source, and configuring output characteristics such as sample format, sample
See also: PulseAudio, pacat, pactl, audio sources, and monitor sources within PulseAudio.