如何开始语音质量PESQ测试?

时间:2010-02-24 20:49:22

标签: c++ compilation

我正在尝试进行语音质量测试(pesq),但我不明白如何开始。我尝试编译公共源代码(http://www.itu.int/itu-t/recommendations/index.aspx?ser=P(p.862))但无法启动测试。也许有人对此有用吗?

6 个答案:

答案 0 :(得分:18)

你需要一个C编译器(ITU PESQ reference implementation实际上是C,所以你不需要需要一个C ++编译器,尽管两者都可以正常工作)

例如,在linux上,您将进入source目录并使用gcc进行编译:

$ cd Software/P862_annex_A_2005_CD/source
$ gcc -o PESQ *.c

这会将文件dsp.c, pesqdsp.c, pesqio.c, pesqmain.c, pesqmod.c编译成二进制文件PESQ,然后您可以使用./PESQ运行:

$ ./PESQ
Perceptual Evaluation of Speech Quality (PESQ)
Reference implementation for ITU-T Recommendations P.862, P.862.1 and P.862.2.
Version 2.0 October 2005.

<snip long unenlightening IP notice>

Usage:
 PESQ HELP               Displays this text
 PESQ [options] ref deg
 Run model on reference ref and degraded deg

 Options: +8000 +16000 +swap +wb
  Sample rate - No default. Must select either +8000 or +16000.
  Swap byte order - machine native format by default. Select +swap for byteswap.
  Default mode of operation is P.862 (narrowband handset listening). Select +wb 
  to use P.862.2 wideband extension (headphone listening).

 File names may not begin with a + character.

 Files with names ending .wav or .WAV are assumed to have a 44-byte header, which is automatically skipped.  All other file types are assumed to have no header.

要运行此二进制文件并测试算法,您需要“reference”.wav文件(这是干净的原始语音)和“degraded”.wav文件(这是算法的输出)。只需将两者都传递到PESQ,它就会给你测试的输出。一个示例运行在国际电联的源分发中包含的两个.wav文件中:

$ cd Software/P862_annex_A_2005_CD/conform
$ ../source/PESQ +8000 or105.wav dg105.wav
Perceptual Evaluation of Speech Quality (PESQ)
Reference implementation for ITU-T Recommendations P.862, P.862.1 and P.862.2.
Version 2.0 October 2005.

<snip IP notice>

Reading reference file or105.wav...done.
Reading degraded file dg105.wav...done.
 Level normalization...
 IRS filtering...
 Variable delay compensation...
 Acoustic model processing...

P.862 Prediction (Raw MOS, MOS-LQO):  = 2.237   1.844

+8000参数表示wav文件以8000Hz采样。

答案 1 :(得分:5)

在GCC的最新版本中,您可能必须使用此命令进行编译:

gcc -o PESQ *.c -lm

BR

答案 2 :(得分:3)

除了来自staticfloat的答案,并在AntoineF的答案的基础上,一些gcc版本可能会抛出以下警告:

pesqmain.c: In function 'main':
pesqmain.c:322:17: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long int' [-Wformat=]
     printf ("An error of type %d ", Error_Flag);
             ^
pesqmain.c: In function 'pesq_measure':
pesqmain.c:629:35: warning: format '%d' expects argument of type 'int', but argument 3 has type 'long int' [-Wformat=]
         fprintf (resultsFile, "%d\t", Fs);
                               ^
pesqmain.c:636:34: warning: too many arguments for format [-Wformat-extra-args]
        fprintf (resultsFile, "\n", Fs);

要解决此问题,您可以通过运行以下命令显式忽略这些警告:

gcc -Wno-format -Wno-format-extra-args -o pesq *.c -lm  # works on Ubuntu 16.04, gcc 5.4.0

希望能帮助一些不熟悉像我这样编译C代码的人!

答案 3 :(得分:1)

尝试AQuA软件,它不是ITU-T标准,但很好地解决了VoIP语音质量测试:

http://www.sevana.fi/voice_quality_testing_measurement_analysis.php

答案 4 :(得分:1)

请不要再使用PESQ / ITU-T P.862。由于许多充分的理由,它已被P.863(又名POLQA)取代。

几十年来,人们一直在将PESQ用于并非针对其开发的应用程序(例如,降噪,声学路径等)-仅仅是因为它是“可用的”。对于PESQ-WB,大约12年来没有人注意到实施中存在错误(输入带通的滤波器系数错误)。

请注意,即使可以从ITU-T网站上下载源代码,也需要获得商业许可才能使用它! ITU-T的参考代码仅用于在您的特定平台上重新生成参考结果。

最后:不要仅依靠一个MOS指标来进行语音质量测试。专业人员应使用已经提到的ACQUA软件或类似软件的测量系统。

答案 5 :(得分:0)

  • 取消设置文件
  • 将两个(原始文件和变形文件)文件放在conform文件夹中 执行文件
  • 您将在记事本中获得结果
相关问题