When evaluating audio compressed with a perceptual (lossy) codec, you typically want objective metrics that correlate well with human hearing, not just signal difference.
ITU-R BS.1387 is an international audio quality assessment standard established by the International Telecommunication Union Radiocommunication Sector. Commonly known as PEAQ (Perceptual Evaluation of Audio Quality), it defines objective methods to predict perceived sound quality of audio codecs and broadcast systems. It is widely used for testing perceptual audio coders such as MP3, AAC, and others.
Implement a Python module named PQI.py that input two sequences of audio
samples \(A\) and \(B\) and output a floating point number between 0 and 1 indicating a
Perceptual Quality Index (PQI). 1 should indicate a perfect (numerical) match
between \(A\) and \(B\), and with 0 that \(A\) and \(B\) are different random sequences. The
PQI should take into consideration the perceptive features of the human
beings.