V_MOS2PESQ convert MOS speech quality scores to PESQ p=(m) Inputs: m is a matrix of MOS scores Outputs: p is a matrix, the same size as m, of PESQ scores The PESQ measure is defined in [2]. The mapping function, defined in [3], converts raw PESQ scores (which lie in the range -0.5 to 4.5) onto the MOS-LQO (Mean Opinion Score - Listening Quality Objective [2]) scale in the range 1 to 5. The MOS scale is defined in [1] as 5=Excellent, 4=Good, 3=Fair, 2=Poor, 1=Bad. Refs: [1] ITU-T. Methods for subjective determination of transmission quality. Recommendation P.800, Aug. 1996. [2] ITU-T. Mean opinion score (MOS) terminology. Recommendation P.800.1, July 2006. [2] ITU-T. Perceptual evaluation of speech quality (PESQ), an objective method for end-to-end speech quality assessment of narrowband telephone networks and speech codecs. Recommendation P.862, Feb. 2001. [3] ITU-T. Mapping function for transforming P.862 raw result scores to MOS-LQO. Recommendation P.862.1, Nov. 2003.
0001 function p=v_mos2pesq(m) 0002 %V_MOS2PESQ convert MOS speech quality scores to PESQ p=(m) 0003 %Inputs: m is a matrix of MOS scores 0004 % 0005 %Outputs: p is a matrix, the same size as m, of PESQ scores 0006 % 0007 % The PESQ measure is defined in [2]. The mapping function, defined in [3], 0008 % converts raw PESQ scores (which lie in the range -0.5 to 4.5) onto the 0009 % MOS-LQO (Mean Opinion Score - Listening Quality Objective [2]) scale in the 0010 % range 1 to 5. The MOS scale is defined in [1] as 0011 % 5=Excellent, 4=Good, 3=Fair, 2=Poor, 1=Bad. 0012 % 0013 % Refs: [1] ITU-T. Methods for subjective determination of transmission quality. 0014 % Recommendation P.800, Aug. 1996. 0015 % [2] ITU-T. Mean opinion score (MOS) terminology. 0016 % Recommendation P.800.1, July 2006. 0017 % [2] ITU-T. Perceptual evaluation of speech quality (PESQ), an objective 0018 % method for end-to-end speech quality assessment of narrowband telephone 0019 % networks and speech codecs. Recommendation P.862, Feb. 2001. 0020 % [3] ITU-T. Mapping function for transforming P.862 raw result scores to MOS-LQO. 0021 % Recommendation P.862.1, Nov. 2003. 0022 0023 % Copyright (C) Mike Brookes 2012-2013 0024 % Version: $Id: v_mos2pesq.m 10865 2018-09-21 17:22:45Z dmb $ 0025 % 0026 % VOICEBOX is a MATLAB toolbox for speech processing. 0027 % Home page: http://www.ee.ic.ac.uk/hp/staff/dmb/voicebox/voicebox.html 0028 % 0029 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0030 % This program is free software; you can redistribute it and/or modify 0031 % it under the terms of the GNU General Public License as published by 0032 % the Free Software Foundation; either version 2 of the License, or 0033 % (at your option) any later version. 0034 % 0035 % This program is distributed in the hope that it will be useful, 0036 % but WITHOUT ANY WARRANTY; without even the implied warranty of 0037 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0038 % GNU General Public License for more details. 0039 % 0040 % You can obtain a copy of the GNU General Public License from 0041 % http://www.gnu.org/copyleft/gpl.html or by writing to 0042 % Free Software Foundation, Inc.,675 Mass Ave, Cambridge, MA 02139, USA. 0043 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0044 persistent a b c d 0045 if isempty(a) 0046 a=0.999; 0047 b=4.999-a; 0048 c=-1.4945; 0049 d=4.6607; 0050 end 0051 if nargout>0 0052 p=(log(b./(m-a)-1)-d)/c; 0053 else 0054 if nargin<1 || isempty(m) 0055 pp=linspace(-0.5,4.5,100); 0056 mm=v_pesq2mos(pp); 0057 else 0058 mm=m; 0059 end 0060 p=v_mos2pesq(mm); 0061 plot(mm,p); 0062 ylabel('PESQ (P.862)'); 0063 xlabel('Mean Opimion Score (MOS)'); 0064 end