I have two audios, A and B. B is the noisy version of A. I want to know how much B is different from A. Can I do this by calculating signal to noise ratio (SNR), Objective difference grade (ODG), and Perceptual Evaluation of Audio Quality (PEAQ)?

How can I calculate them in Matlab?

  • $\begingroup$ One person's Noise is another Person's Signal. You can't say "SNR" without defining either Signal or Noise. Furthermore, as far as I can interpret your question, you're asking for code written to your specification, which would be off-topic. Also, for example, the PEAQ wikipedia page already links to matlab code. I expect you've done your part of the research and have found that already, so maybe you have a problem with it, which would be worth spelling out here. $\endgroup$ – Marcus Müller Mar 27 '17 at 7:35

I recommend calculating the correlation coefficient; the correlation coefficient will directly tell you how much B is (linearly) different from A, and you can compute the SNR in dB from the correlation coefficient $\rho$ using

$$SNR = 10log_{10}\left(\frac{\rho^2}{1-\rho^2}\right)$$

Given you have a noise-free version of your waveform, this would be a perfect application for the approach above. In this case "noise" is any deviation from your noise-free waveform once the two signals are properly scaled (which the computation will do).

See this similar post where I detail the correlation coefficient calculation:

Noise detection


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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