Install sox program
sudo apt install sox
Open the terminal and execute the following command. Your audio will be saved in a new file named "test.wav"
sox -t alsa default test.wav