# How can I find SNR, PEAQ, and ODG values by comparing two audios?

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?

• 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. – 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)$$