Thursday, February 23, 2012

PESQ and its implementation in Octave/Matlab

PESQ stands for ‘Perceptual Evaluation of Speech Quality’ and is an enhanced perceptual measurement for voice quality in telecommunications. If you want a Mean Opinion Score value (or MOS), then PESQ will give it to you. The new PESQ option will be especially relevant for engineers working in telecom, handsets, and handsfree accessories. Because it becomes standard in telecommunication industry, it is very important to measure of speech processing output with this standar. A figure of overview of PESQ system can be seen in Fig.1.

Fig. 1 : Overview of PESQ System[ [1]
Perceptual audio tests measure how people perceive sound quality. While useful for evaluating both small differences in high-quality music, and larger differences in lower-quality voice material, this article focuses on doing the latter using PESQ (Perceptual Evaluation of Speech Quality).

Perceptual voice quality tests are especially valuable for devices that are bandwidth and/or bitrate limited, and that have codecs that significantly alter the sound. In these cases, many compromises must be made, and perceptual tests help to determine what balance of compromises will lead to the best voice intelligibility. In fact, it can be difficult with some of these devices to get consistent or comparable results using standard sine wave audio tests of electrical properties, such as frequency response and distortion. Ultimately, a combination of both perceptual and electrical audio tests can help to give the most complete picture of the performance of these devices.

Subjective vs. Objective Perceptual Tests
In subjective perceptual measurements, a group of people is assembled and asked to judge the sound quality of various audio clips, typically on a scale from 1 to 5. Subjective perceptual measurements require careful selection of a representative audience and careful control over the environment to achieve meaningful results. When all the individual scores are tallied, the result is called the Mean Opinion Score (MOS).

It’s expensive and time consuming to test with real people, and results will vary from group to group. We can overcome these limitations by instead using tools that incorporate algorithms based on psychoacoustic modeling. Psychoacoustic modeling seeks to correlate measurable impairments in the audio with users’ opinion scores. Testing with these tools imparts other advantages, like being able to make small adjustments to a design and quickly observe the results, or being able to do perceptual testing on a production line—things that would be essentially impossible to do with groups of people. These measurements are classified as objective because they are unaffected by human temperament or test conditions, and the results are repeatable.

Fig. 2: Diagram Block of PESQ [1]
Octave/Matlab Implementation
To measure the output of your sound processing algorithm, you can try the PESQ matlab code which can be downloaded here. Then, you can try the following command to calculate the PESQ score between to signals.
pesq('inputfile.wav', 'outputfile.wav')
please note that PESQ only support 8000 and 16000 Hz of sampling frequency. If your sound data are not in those kind of frequencies, you can use resample function to upsample or downsample  your sound data.  

source: 
[1] Audio Precision
Related Posts Plugin for WordPress, Blogger...