Instead of capturing the sound coming from the microphone, id just like to ping it every couple of seconds to capture the decibels and pitch as data points.
You would have to choose between Analog microphones of Digital microphones.
The analog microphones will give you mV/Pa relation where you can parametrize your results in dB.
Digital mic like ICS43434, will git a bitstream. On both you would have to get the root mean square RMS value, and use the parseval theorem to transform into decibels (dB).
And also if you want to measure something similar as our ear works, you have to apply a A-weighting into the process.