Calculating the SNR of Audio Signal (Recommended Libraries)
It is really hard to create something to estimate the SNR in all cases. Each case requires its own treatment according to model of the acquisition of the signal.

For instance, if the model is AWGN noise an the audio is of human voice and data is samples in high sample rate (Let's say above 44.1 [KHz]) then you can use a lot of the bins in the DFT of the signal to estimate the Noise STD.
Then according to the energy in the bins of the data you can estimate the SNR.

Regarding a library, you might find general tools in Mozilla's Deep Speech library.