9
$\begingroup$

Are there any open source packages or libraries available which can be useful in calculating the SNR(signal to noise ratio) of an audio signal.

The input will be just an audio signal and I have to calculate the SNR of that signal. Can anyone suggest any library in python/C/C++ or any other language which does this or can be useful?

$\endgroup$
4
  • 1
    $\begingroup$ Why do you need to calculate SNR? Typically SNR is something you know. It’s a parameter in an equation, or you set up a simulation where you have a signal and add noise to it. Once signal is mixed with noise, SNR can only be estimated provided you know the signal or noise. If you don’t know either, it becomes a guess. $\endgroup$
    – user28715
    Jun 1, 2018 at 5:20
  • $\begingroup$ What is the sampling rate of the signal? It is really hard to create something to estimate the SNR in all cases. Each case requires its own treatment according to model. $\endgroup$
    – Royi
    Jun 1, 2018 at 14:44
  • $\begingroup$ This is not a recommendation for a specific library, but assuming that you want to estimate the SNR, especially if your audio signal is a speech signal, compare this answer. $\endgroup$
    – applesoup
    Jul 31, 2019 at 13:22
  • $\begingroup$ Could you mark an answer or comment what is missing? $\endgroup$
    – Royi
    Sep 29, 2022 at 16:52

1 Answer 1

1
$\begingroup$

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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.