Code covered by the BSD License  

Highlights from
PESQ MATLAB Wrapper

4.66667

4.7 | 3 ratings Rate this file 63 Downloads (last 30 days) File Size: 171 KB File ID: #33820
image thumbnail

PESQ MATLAB Wrapper

by

 

MATLAB wrapper for the PESQ binary. Both narrowband and wideband (WB-PESQ) modes are supported.

| Watch this File

File Information
Description

Implements a MATLAB wrapper function for the PESQ version 2.0 binary [1]. Both narrowband and wideband modes are supported. The narrowband approach (P.862) returns both the raw MOS_PESQ score and its mapping to LQO scale: MOS_LQO as per P.862.1. The wideband extension (P.862.2) returns LQO mapped score: MOS_LQO as per P.862.2. LQO mapping transforms objective scores to allow for linear comparisons with MOS (P.800.1) results of subjective experiments.

This framework is written specifically to work corss-platform on Linux and Windows operating systems. Note, however, that for the wapper to work, the PESQ sources have to be compiled and the binary has to be installed on the target PC. The sources are freely available for download (however with license constraints) from ITU-T website at the following url:
 - http://www.itu.int/rec/T-REC-P.862-200511-I!Amd2/en

Linux makefile can be downloaded from:
 - http://download.dsplabs.com.au/Makefile.linux

Windows makefile and DEV-C++ project file can be downloaded from:
 - http://download.dsplabs.com.au/Makefile.windows
 - http://download.dsplabs.com.au/pesq.dev

DEV-C++ (IDE along with MingW compiler, for compiling on the Windows platform) can be downloaded from:
 - http://www.bloodshed.net/dev/devcpp.html

[1] ITU-T (2005), "P.862: Revised Annex A - Reference implementations
    and conformance testing for ITU-T Recs P.862, P.862.1 and P.862.2"
    url: http://www.itu.int/rec/T-REC-P.862-200511-I!Amd2/en

Acknowledgements

This file inspired Pesq Matlab Driver.

MATLAB release MATLAB 7.12 (R2011a)
Other requirements Linux or Windows
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (4)
23 Jul 2014 Arkadiy Prodeus

5. Function pesqbin.m has bags: its results are NaN, when "reference" and "degraded" arguments are string variables.

For getting correct results, it is necessary make next corrections in pesqbin_linux and pesqbin_windous functions:

First correction:

if ischar(reference)
% WRONG:
%file.reference = reference;
%[ ~, fs, nbits ] = wavread( file.reference );
% RIGHT:
[ ref, fs, nbits ] = wavread( reference );
file.reference = sprintf( '%s%s%s', tmpdir, filesep, '~80b4eb734d.wav' );
wavwrite( 0.999*ref./max(abs(ref)), fs, nbits, file.reference );
else
...

Second correction:

if ischar(degraded)
% WRONG:
%file.degraded = degraded;
%[ ~, fs, nbits ] = wavread( file.degraded );
% RIGHT:
[ deg, fs, nbits ] = wavread( degraded );
file.degraded = sprintf( '%s%s%s', tmpdir, filesep, '~be4dfad7fba.wav' );
wavwrite( 0.999*deg./max(abs(deg)), fs, nbits, file.degraded );
else
...

Notice that we also changed "isstr" on "ischar" because of Matlab recommendations.

20 Jul 2014 Arkadiy Prodeus

The idea is excellent. However, in practice (I use Windows XP), PESQ Matlab Wrapper has some significant drawbacks:

1. We find in description that "binary has to be installed on the target PC"; but only through experimentation we found out that file pesq.exe should be copied to directory C:\WINDOWS\system32 or as an alternative to the directory C:\DOCUME~1\USERNAME\LOCALS~\Temp

2. Calculation results are placed in the file pesq_results.txt, which is stored in the directory C:\DOCUME~1\USERNAME\LOCALS~1\Temp; it is inconvenient because researched audio files are not usually stored in the temporary directory.

3. Calculation results, placed in the file pesq_results.txt, are extremely uncomfortable for subsequent analysis, because identical "temporary" file names are used instead of genuine (and, of course, different) file names; it is especially inconvenient when analyzing the processing results of a set of different audio files.

4. Function pesqbin.m arguments are not the names of audio files, but the names of their corresponding numeric arrays; it confuses the user, as is different from the syntax of the program pesq.exe

22 Jul 2013 hai  
12 Feb 2013 Fabrizio Facchini

Great job!

Contact us