How to record microphone with set birate, sampling and mono channel?

Hi everyone, I’m trying to record my microphone in a certain format, so far I have managed only to record it with the default settings, but I need it to be with these settings: 16kHz or 8kHz, 16-bit, and mono PCM.

This is what I am doing:

The wav file this is producing is of 48 kHz, 32 bit and stereo. Is there any way to record it in the settings I want or to convert it to them?
Thanks in advance for the help!