Getting tone and volume from microphone

Hi,

I have multiple always on PCs in multiple locations in the house. I would like to listen the microphones of these PCs to get baseline for volume and tone. I have figured out that it could be something like this:

  1. Start ffmpeg process
  2. Run the process for 1 minute. Calculate max volume and avg tone in Hz.
  3. Send volume and tone with MQTT to HA.
  4. Restart the process

Have anyone tried anything similar? This would allow applications like:

  • Detect any unexpected noises when house is empty.
  • Detect firealarms
  • Detect if HVAC or other machines start generating unexpected noises (and those are about to break soon)

I have seen some partial solutions on the web but nothing I could use out of the box with HA.