The following command allow you to record high quality sound with ffmpeg, depending on your sound card.
ffmpeg -f pulse -ac 2 -i default -c:a pcm_s24le -ar 96000 output.wav