From 349f63c0e6559210b51e31a6ee01fa17ad34baeb Mon Sep 17 00:00:00 2001 From: Nanang Izzuddin Date: Thu, 26 Jun 2008 18:52:16 +0000 Subject: Ticket #543: Updated PESQ to start/stop manually stream/record instead of using auto-rec/play/hangup, and also updated thresholds git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2063 74dad513-b988-da41-8d7b-12977e46ad98 --- pjsip-apps/src/test-pjsua/mod_pesq.py | 56 ++++++++++++++-------- .../src/test-pjsua/scripts-pesq/100_defaults.py | 6 ++- .../src/test-pjsua/scripts-pesq/101_defaults.py | 5 +- .../src/test-pjsua/scripts-pesq/200_codec_g711a.py | 6 ++- .../src/test-pjsua/scripts-pesq/200_codec_g711u.py | 6 ++- .../src/test-pjsua/scripts-pesq/200_codec_g722.py | 6 ++- .../src/test-pjsua/scripts-pesq/200_codec_gsm.py | 6 ++- .../src/test-pjsua/scripts-pesq/200_codec_ilbc.py | 6 ++- .../scripts-pesq/200_codec_speex_16000.py | 6 ++- .../scripts-pesq/200_codec_speex_8000.py | 6 ++- .../src/test-pjsua/scripts-pesq/201_codec_g711a.py | 6 ++- .../src/test-pjsua/scripts-pesq/201_codec_g711u.py | 6 ++- .../src/test-pjsua/scripts-pesq/201_codec_g722.py | 6 ++- .../src/test-pjsua/scripts-pesq/201_codec_gsm.py | 6 ++- .../src/test-pjsua/scripts-pesq/201_codec_ilbc.py | 6 ++- .../scripts-pesq/201_codec_speex_16000.py | 6 ++- .../scripts-pesq/201_codec_speex_8000.py | 6 ++- 17 files changed, 100 insertions(+), 51 deletions(-) diff --git a/pjsip-apps/src/test-pjsua/mod_pesq.py b/pjsip-apps/src/test-pjsua/mod_pesq.py index 431b312b..ef76def3 100644 --- a/pjsip-apps/src/test-pjsua/mod_pesq.py +++ b/pjsip-apps/src/test-pjsua/mod_pesq.py @@ -15,6 +15,7 @@ import imp import sys import re import subprocess +import wave import inc_const as const from inc_cfg import * @@ -25,7 +26,7 @@ cfg_file = imp.load_source("cfg_file", sys.argv[2]) # PESQ configs # PESQ_THRESHOLD specifies the minimum acceptable PESQ MOS value, so test can be declared successful PESQ = "tools/pesq.exe" -PESQ_THRESHOLD = 3.0 +PESQ_DEFAULT_THRESHOLD = 3.4 # UserData class mod_pesq_user_data: @@ -39,9 +40,6 @@ class mod_pesq_user_data: # Test body function def test_func(t, user_data): - if len(t.process) == 0: - return - ua1 = t.process[0] ua2 = t.process[1] @@ -64,27 +62,41 @@ def test_func(t, user_data): # Get conference clock rate of UA2 for PESQ sample rate option user_data.pesq_sample_rate_opt = "+" + clock_rate + "000" + # Get WAV input length, in seconds + fin = wave.open(user_data.input_filename, "r") + if fin == None: + raise TestError("Failed opening input WAV file") + inwavlen = fin.getnframes() // fin.getframerate() + if (fin.getnframes() % fin.getframerate()) > 0: + inwavlen = inwavlen + 1 + fin.close() + # UA1 making call ua1.send("m") ua1.send(t.inst_params[1].uri) ua1.expect(const.STATE_CALLING) + + # UA2 wait until call established ua2.expect(const.STATE_CONFIRMED) - # Disconnect mic -> rec file to avoid echo recorded when using sound device - ua2.send("cd 0 1") + # Disconnect mic -> rec file, to avoid echo recorded when using sound device + # Disconnect stream -> spk, make it silent + # Connect stream -> rec file, start recording + ua2.send("cd 0 1\ncd 4 0\ncc 4 1") + + # Disconnect mic -> stream, make stream purely sending from file + # Disconnect stream -> spk, make it silent + # Connect file -> stream, start sending + ua1.send("cd 0 4\ncd 4 0\ncc 1 4") - # Auto answer, auto play, auto hangup - # Just wait for call disconnected - # Assumed WAV input is no more than 30 secs - while 1: - line = ua2.proc.stdout.readline() - if line == "": - raise TestError(ua2.name + ": Premature EOF") + time.sleep(inwavlen) + + # Disconnect files from bridge + ua2.send("cd 4 1") + ua2.expect(const.MEDIA_DISCONN_PORT_SUCCESS) + ua1.send("cd 1 4") + ua1.expect(const.MEDIA_DISCONN_PORT_SUCCESS) - # Search for disconnected text - if re.search(const.STATE_DISCONNECTED, line) != None: - break - # Post body function def post_func(t, user_data): @@ -101,9 +113,15 @@ def post_func(t, user_data): if (mo_pesq_out == None): raise TestError("Failed to fetch PESQ result") - # Evaluate the similarity value + # Get threshold + if (cfg_file.pesq_threshold != None) | (cfg_file.pesq_threshold > -0.5 ): + threshold = cfg_file.pesq_threshold + else: + threshold = PESQ_DEFAULT_THRESHOLD + + # Evaluate the PESQ MOS value pesq_res = mo_pesq_out.group(1) - if (float(pesq_res) >= PESQ_THRESHOLD): + if (float(pesq_res) >= threshold): endpt.trace("Success, PESQ result = " + pesq_res) else: endpt.trace("Failed, PESQ result = " + pesq_res) diff --git a/pjsip-apps/src/test-pjsua/scripts-pesq/100_defaults.py b/pjsip-apps/src/test-pjsua/scripts-pesq/100_defaults.py index 32454d76..2901f469 100644 --- a/pjsip-apps/src/test-pjsua/scripts-pesq/100_defaults.py +++ b/pjsip-apps/src/test-pjsua/scripts-pesq/100_defaults.py @@ -11,7 +11,9 @@ if (HAS_SND_DEV == 0): test_param = TestParam( "PESQ defaults pjsua settings", [ - InstanceParam("UA1", ADD_PARAM + " --max-calls=1 --play-file wavs/input.16.wav --auto-play-hangup"), - InstanceParam("UA2", "--null-audio --max-calls=1 --rec-file wavs/tmp.16.wav --clock-rate 16000 --auto-answer 200 --auto-rec") + InstanceParam("UA1", ADD_PARAM + " --max-calls=1 --play-file wavs/input.16.wav"), + InstanceParam("UA2", "--null-audio --max-calls=1 --rec-file wavs/tmp.16.wav --clock-rate 16000 --auto-answer 200") ] ) + +pesq_threshold = None diff --git a/pjsip-apps/src/test-pjsua/scripts-pesq/101_defaults.py b/pjsip-apps/src/test-pjsua/scripts-pesq/101_defaults.py index 16c9eff0..67b53e3f 100644 --- a/pjsip-apps/src/test-pjsua/scripts-pesq/101_defaults.py +++ b/pjsip-apps/src/test-pjsua/scripts-pesq/101_defaults.py @@ -6,8 +6,8 @@ from inc_cfg import * test_param = TestParam( "PESQ defaults pjsua settings (RX side uses snd dev)", [ - InstanceParam("UA1", "--max-calls=1 --play-file wavs/input.16.wav --auto-play-hangup --null-audio"), - InstanceParam("UA2", "--max-calls=1 --rec-file wavs/tmp.16.wav --clock-rate 16000 --auto-answer 200 --auto-rec") + InstanceParam("UA1", "--max-calls=1 --play-file wavs/input.16.wav --null-audio"), + InstanceParam("UA2", "--max-calls=1 --rec-file wavs/tmp.16.wav --clock-rate 16000 --auto-answer 200") ] ) @@ -15,3 +15,4 @@ test_param = TestParam( if (HAS_SND_DEV == 0): test_param.skip = True +pesq_threshold = None diff --git a/pjsip-apps/src/test-pjsua/scripts-pesq/200_codec_g711a.py b/pjsip-apps/src/test-pjsua/scripts-pesq/200_codec_g711a.py index 3360ba9e..9e91c963 100644 --- a/pjsip-apps/src/test-pjsua/scripts-pesq/200_codec_g711a.py +++ b/pjsip-apps/src/test-pjsua/scripts-pesq/200_codec_g711a.py @@ -11,7 +11,9 @@ if (HAS_SND_DEV == 0): test_param = TestParam( "PESQ codec PCMA", [ - InstanceParam("UA1", ADD_PARAM + " --max-calls=1 --add-codec pcma --clock-rate 8000 --play-file wavs/input.8.wav --auto-play-hangup"), - InstanceParam("UA2", "--null-audio --max-calls=1 --add-codec pcma --clock-rate 8000 --rec-file wavs/tmp.8.wav --auto-answer 200 --auto-rec") + InstanceParam("UA1", ADD_PARAM + " --max-calls=1 --add-codec pcma --clock-rate 8000 --play-file wavs/input.8.wav"), + InstanceParam("UA2", "--null-audio --max-calls=1 --add-codec pcma --clock-rate 8000 --rec-file wavs/tmp.8.wav --auto-answer 200") ] ) + +pesq_threshold = 3.5 diff --git a/pjsip-apps/src/test-pjsua/scripts-pesq/200_codec_g711u.py b/pjsip-apps/src/test-pjsua/scripts-pesq/200_codec_g711u.py index c50dc4fe..fa64e7a6 100644 --- a/pjsip-apps/src/test-pjsua/scripts-pesq/200_codec_g711u.py +++ b/pjsip-apps/src/test-pjsua/scripts-pesq/200_codec_g711u.py @@ -11,7 +11,9 @@ if (HAS_SND_DEV == 0): test_param = TestParam( "PESQ codec PCMU", [ - InstanceParam("UA1", ADD_PARAM + " --max-calls=1 --add-codec pcmu --clock-rate 8000 --play-file wavs/input.8.wav --auto-play-hangup"), - InstanceParam("UA2", "--null-sound --max-calls=1 --add-codec pcmu --clock-rate 8000 --rec-file wavs/tmp.8.wav --auto-answer 200 --auto-rec") + InstanceParam("UA1", ADD_PARAM + " --max-calls=1 --add-codec pcmu --clock-rate 8000 --play-file wavs/input.8.wav"), + InstanceParam("UA2", "--null-audio --max-calls=1 --add-codec pcmu --clock-rate 8000 --rec-file wavs/tmp.8.wav --auto-answer 200") ] ) + +pesq_threshold = 3.5 diff --git a/pjsip-apps/src/test-pjsua/scripts-pesq/200_codec_g722.py b/pjsip-apps/src/test-pjsua/scripts-pesq/200_codec_g722.py index 23f29c7e..4cb85dad 100644 --- a/pjsip-apps/src/test-pjsua/scripts-pesq/200_codec_g722.py +++ b/pjsip-apps/src/test-pjsua/scripts-pesq/200_codec_g722.py @@ -11,7 +11,9 @@ if (HAS_SND_DEV == 0): test_param = TestParam( "PESQ codec G722", [ - InstanceParam("UA1", ADD_PARAM + " --max-calls=1 --add-codec g722 --clock-rate 16000 --play-file wavs/input.16.wav --auto-play-hangup"), - InstanceParam("UA2", "--null-sound --max-calls=1 --add-codec g722 --clock-rate 16000 --rec-file wavs/tmp.16.wav --auto-answer 200 --auto-rec") + InstanceParam("UA1", ADD_PARAM + " --max-calls=1 --add-codec g722 --clock-rate 16000 --play-file wavs/input.16.wav"), + InstanceParam("UA2", "--null-audio --max-calls=1 --add-codec g722 --clock-rate 16000 --rec-file wavs/tmp.16.wav --auto-answer 200") ] ) + +pesq_threshold = 3.7 diff --git a/pjsip-apps/src/test-pjsua/scripts-pesq/200_codec_gsm.py b/pjsip-apps/src/test-pjsua/scripts-pesq/200_codec_gsm.py index 8aea1ac2..221372ef 100644 --- a/pjsip-apps/src/test-pjsua/scripts-pesq/200_codec_gsm.py +++ b/pjsip-apps/src/test-pjsua/scripts-pesq/200_codec_gsm.py @@ -11,7 +11,9 @@ if (HAS_SND_DEV == 0): test_param = TestParam( "PESQ codec GSM", [ - InstanceParam("UA1", ADD_PARAM + " --max-calls=1 --add-codec gsm --clock-rate 8000 --play-file wavs/input.8.wav --auto-play-hangup"), - InstanceParam("UA2", "--null-sound --max-calls=1 --add-codec gsm --clock-rate 8000 --rec-file wavs/tmp.8.wav --auto-answer 200 --auto-rec") + InstanceParam("UA1", ADD_PARAM + " --max-calls=1 --add-codec gsm --clock-rate 8000 --play-file wavs/input.8.wav"), + InstanceParam("UA2", "--null-audio --max-calls=1 --add-codec gsm --clock-rate 8000 --rec-file wavs/tmp.8.wav --auto-answer 200") ] ) + +pesq_threshold = 3.0 diff --git a/pjsip-apps/src/test-pjsua/scripts-pesq/200_codec_ilbc.py b/pjsip-apps/src/test-pjsua/scripts-pesq/200_codec_ilbc.py index 91ac0ae9..45480b85 100644 --- a/pjsip-apps/src/test-pjsua/scripts-pesq/200_codec_ilbc.py +++ b/pjsip-apps/src/test-pjsua/scripts-pesq/200_codec_ilbc.py @@ -11,7 +11,9 @@ if (HAS_SND_DEV == 0): test_param = TestParam( "PESQ codec iLBC", [ - InstanceParam("UA1", ADD_PARAM + " --max-calls=1 --add-codec ilbc --clock-rate 8000 --play-file wavs/input.8.wav --auto-play-hangup"), - InstanceParam("UA2", "--null-sound --max-calls=1 --add-codec ilbc --clock-rate 8000 --rec-file wavs/tmp.8.wav --auto-answer 200 --auto-rec") + InstanceParam("UA1", ADD_PARAM + " --max-calls=1 --add-codec ilbc --clock-rate 8000 --play-file wavs/input.8.wav"), + InstanceParam("UA2", "--null-audio --max-calls=1 --add-codec ilbc --clock-rate 8000 --rec-file wavs/tmp.8.wav --auto-answer 200") ] ) + +pesq_threshold = 3.0 diff --git a/pjsip-apps/src/test-pjsua/scripts-pesq/200_codec_speex_16000.py b/pjsip-apps/src/test-pjsua/scripts-pesq/200_codec_speex_16000.py index 04e91521..448e04cb 100644 --- a/pjsip-apps/src/test-pjsua/scripts-pesq/200_codec_speex_16000.py +++ b/pjsip-apps/src/test-pjsua/scripts-pesq/200_codec_speex_16000.py @@ -11,7 +11,9 @@ if (HAS_SND_DEV == 0): test_param = TestParam( "PESQ codec Speex WB", [ - InstanceParam("UA1", ADD_PARAM + " --max-calls=1 --clock-rate 16000 --add-codec speex/16000 --play-file wavs/input.16.wav --auto-play-hangup"), - InstanceParam("UA2", "--null-sound --max-calls=1 --clock-rate 16000 --add-codec speex/16000 --rec-file wavs/tmp.16.wav --auto-answer 200 --auto-rec") + InstanceParam("UA1", ADD_PARAM + " --max-calls=1 --clock-rate 16000 --add-codec speex/16000 --play-file wavs/input.16.wav"), + InstanceParam("UA2", "--null-audio --max-calls=1 --clock-rate 16000 --add-codec speex/16000 --rec-file wavs/tmp.16.wav --auto-answer 200") ] ) + +pesq_threshold = 3.7 diff --git a/pjsip-apps/src/test-pjsua/scripts-pesq/200_codec_speex_8000.py b/pjsip-apps/src/test-pjsua/scripts-pesq/200_codec_speex_8000.py index 3d89bbd1..cf4b169d 100644 --- a/pjsip-apps/src/test-pjsua/scripts-pesq/200_codec_speex_8000.py +++ b/pjsip-apps/src/test-pjsua/scripts-pesq/200_codec_speex_8000.py @@ -11,7 +11,9 @@ if (HAS_SND_DEV == 0): test_param = TestParam( "PESQ codec Speex NB", [ - InstanceParam("UA1", ADD_PARAM + " --max-calls=1 --add-codec speex/8000 --clock-rate 8000 --play-file wavs/input.8.wav --auto-play-hangup"), - InstanceParam("UA2", "--null-sound --max-calls=1 --add-codec speex/8000 --clock-rate 8000 --rec-file wavs/tmp.8.wav --auto-answer 200 --auto-rec") + InstanceParam("UA1", ADD_PARAM + " --max-calls=1 --add-codec speex/8000 --clock-rate 8000 --play-file wavs/input.8.wav"), + InstanceParam("UA2", "--null-audio --max-calls=1 --add-codec speex/8000 --clock-rate 8000 --rec-file wavs/tmp.8.wav --auto-answer 200") ] ) + +pesq_threshold = 3.0 diff --git a/pjsip-apps/src/test-pjsua/scripts-pesq/201_codec_g711a.py b/pjsip-apps/src/test-pjsua/scripts-pesq/201_codec_g711a.py index 7b71b812..b7458c3c 100644 --- a/pjsip-apps/src/test-pjsua/scripts-pesq/201_codec_g711a.py +++ b/pjsip-apps/src/test-pjsua/scripts-pesq/201_codec_g711a.py @@ -6,10 +6,12 @@ from inc_cfg import * test_param = TestParam( "PESQ codec PCMA (RX side uses snd dev)", [ - InstanceParam("UA1", "--max-calls=1 --add-codec pcma --clock-rate 8000 --play-file wavs/input.8.wav --auto-play-hangup --null-audio"), - InstanceParam("UA2", "--max-calls=1 --add-codec pcma --clock-rate 8000 --rec-file wavs/tmp.8.wav --auto-answer 200 --auto-rec") + InstanceParam("UA1", "--max-calls=1 --add-codec pcma --clock-rate 8000 --play-file wavs/input.8.wav --null-audio"), + InstanceParam("UA2", "--max-calls=1 --add-codec pcma --clock-rate 8000 --rec-file wavs/tmp.8.wav --auto-answer 200") ] ) if (HAS_SND_DEV == 0): test_param.skip = True + +pesq_threshold = 3.5 diff --git a/pjsip-apps/src/test-pjsua/scripts-pesq/201_codec_g711u.py b/pjsip-apps/src/test-pjsua/scripts-pesq/201_codec_g711u.py index d73ef74c..43cff651 100644 --- a/pjsip-apps/src/test-pjsua/scripts-pesq/201_codec_g711u.py +++ b/pjsip-apps/src/test-pjsua/scripts-pesq/201_codec_g711u.py @@ -6,10 +6,12 @@ from inc_cfg import * test_param = TestParam( "PESQ codec PCMU (RX side uses snd dev)", [ - InstanceParam("UA1", "--max-calls=1 --add-codec pcmu --clock-rate 8000 --play-file wavs/input.8.wav --auto-play-hangup --null-audio"), - InstanceParam("UA2", "--max-calls=1 --add-codec pcmu --clock-rate 8000 --rec-file wavs/tmp.8.wav --auto-answer 200 --auto-rec") + InstanceParam("UA1", "--max-calls=1 --add-codec pcmu --clock-rate 8000 --play-file wavs/input.8.wav --null-audio"), + InstanceParam("UA2", "--max-calls=1 --add-codec pcmu --clock-rate 8000 --rec-file wavs/tmp.8.wav --auto-answer 200") ] ) if (HAS_SND_DEV == 0): test_param.skip = True + +pesq_threshold = 3.5 diff --git a/pjsip-apps/src/test-pjsua/scripts-pesq/201_codec_g722.py b/pjsip-apps/src/test-pjsua/scripts-pesq/201_codec_g722.py index 33be2965..24c89293 100644 --- a/pjsip-apps/src/test-pjsua/scripts-pesq/201_codec_g722.py +++ b/pjsip-apps/src/test-pjsua/scripts-pesq/201_codec_g722.py @@ -6,10 +6,12 @@ from inc_cfg import * test_param = TestParam( "PESQ codec G722 (RX side uses snd dev)", [ - InstanceParam("UA1", "--max-calls=1 --add-codec g722 --clock-rate 16000 --play-file wavs/input.16.wav --auto-play-hangup --null-audio"), - InstanceParam("UA2", "--max-calls=1 --add-codec g722 --clock-rate 16000 --rec-file wavs/tmp.16.wav --auto-answer 200 --auto-rec") + InstanceParam("UA1", "--max-calls=1 --add-codec g722 --clock-rate 16000 --play-file wavs/input.16.wav --null-audio"), + InstanceParam("UA2", "--max-calls=1 --add-codec g722 --clock-rate 16000 --rec-file wavs/tmp.16.wav --auto-answer 200") ] ) if (HAS_SND_DEV == 0): test_param.skip = True + +pesq_threshold = 3.7 diff --git a/pjsip-apps/src/test-pjsua/scripts-pesq/201_codec_gsm.py b/pjsip-apps/src/test-pjsua/scripts-pesq/201_codec_gsm.py index 922183ac..d250b770 100644 --- a/pjsip-apps/src/test-pjsua/scripts-pesq/201_codec_gsm.py +++ b/pjsip-apps/src/test-pjsua/scripts-pesq/201_codec_gsm.py @@ -6,10 +6,12 @@ from inc_cfg import * test_param = TestParam( "PESQ codec GSM (RX side uses snd dev)", [ - InstanceParam("UA1", "--max-calls=1 --add-codec gsm --clock-rate 8000 --play-file wavs/input.8.wav --auto-play-hangup --null-audio"), - InstanceParam("UA2", "--max-calls=1 --add-codec gsm --clock-rate 8000 --rec-file wavs/tmp.8.wav --auto-answer 200 --auto-rec") + InstanceParam("UA1", "--max-calls=1 --add-codec gsm --clock-rate 8000 --play-file wavs/input.8.wav --null-audio"), + InstanceParam("UA2", "--max-calls=1 --add-codec gsm --clock-rate 8000 --rec-file wavs/tmp.8.wav --auto-answer 200") ] ) if (HAS_SND_DEV == 0): test_param.skip = True + +pesq_threshold = 3.0 diff --git a/pjsip-apps/src/test-pjsua/scripts-pesq/201_codec_ilbc.py b/pjsip-apps/src/test-pjsua/scripts-pesq/201_codec_ilbc.py index ad61f427..e6d4d35f 100644 --- a/pjsip-apps/src/test-pjsua/scripts-pesq/201_codec_ilbc.py +++ b/pjsip-apps/src/test-pjsua/scripts-pesq/201_codec_ilbc.py @@ -6,10 +6,12 @@ from inc_cfg import * test_param = TestParam( "PESQ codec iLBC (RX side uses snd dev)", [ - InstanceParam("UA1", "--max-calls=1 --add-codec ilbc --clock-rate 8000 --play-file wavs/input.8.wav --auto-play-hangup --null-audio"), - InstanceParam("UA2", "--max-calls=1 --add-codec ilbc --clock-rate 8000 --rec-file wavs/tmp.8.wav --auto-answer 200 --auto-rec") + InstanceParam("UA1", "--max-calls=1 --add-codec ilbc --clock-rate 8000 --play-file wavs/input.8.wav --null-audio"), + InstanceParam("UA2", "--max-calls=1 --add-codec ilbc --clock-rate 8000 --rec-file wavs/tmp.8.wav --auto-answer 200") ] ) if (HAS_SND_DEV == 0): test_param.skip = True + +pesq_threshold = 3.0 diff --git a/pjsip-apps/src/test-pjsua/scripts-pesq/201_codec_speex_16000.py b/pjsip-apps/src/test-pjsua/scripts-pesq/201_codec_speex_16000.py index 32543ccc..252e4efe 100644 --- a/pjsip-apps/src/test-pjsua/scripts-pesq/201_codec_speex_16000.py +++ b/pjsip-apps/src/test-pjsua/scripts-pesq/201_codec_speex_16000.py @@ -6,10 +6,12 @@ from inc_cfg import * test_param = TestParam( "PESQ codec Speex WB (RX side uses snd dev)", [ - InstanceParam("UA1", "--max-calls=1 --clock-rate 16000 --add-codec speex/16000 --play-file wavs/input.16.wav --auto-play-hangup --null-audio"), - InstanceParam("UA2", "--max-calls=1 --clock-rate 16000 --add-codec speex/16000 --rec-file wavs/tmp.16.wav --auto-answer 200 --auto-rec") + InstanceParam("UA1", "--max-calls=1 --clock-rate 16000 --add-codec speex/16000 --play-file wavs/input.16.wav --null-audio"), + InstanceParam("UA2", "--max-calls=1 --clock-rate 16000 --add-codec speex/16000 --rec-file wavs/tmp.16.wav --auto-answer 200") ] ) if (HAS_SND_DEV == 0): test_param.skip = True + +pesq_threshold = 3.7 diff --git a/pjsip-apps/src/test-pjsua/scripts-pesq/201_codec_speex_8000.py b/pjsip-apps/src/test-pjsua/scripts-pesq/201_codec_speex_8000.py index e0049c8a..8f04dbc9 100644 --- a/pjsip-apps/src/test-pjsua/scripts-pesq/201_codec_speex_8000.py +++ b/pjsip-apps/src/test-pjsua/scripts-pesq/201_codec_speex_8000.py @@ -6,10 +6,12 @@ from inc_cfg import * test_param = TestParam( "PESQ codec Speex NB (RX side uses snd dev)", [ - InstanceParam("UA1", "--max-calls=1 --add-codec speex/8000 --clock-rate 8000 --play-file wavs/input.8.wav --auto-play-hangup --null-audio"), - InstanceParam("UA2", "--max-calls=1 --add-codec speex/8000 --clock-rate 8000 --rec-file wavs/tmp.8.wav --auto-answer 200 --auto-rec") + InstanceParam("UA1", "--max-calls=1 --add-codec speex/8000 --clock-rate 8000 --play-file wavs/input.8.wav --null-audio"), + InstanceParam("UA2", "--max-calls=1 --add-codec speex/8000 --clock-rate 8000 --rec-file wavs/tmp.8.wav --auto-answer 200") ] ) if (HAS_SND_DEV == 0): test_param.skip = True + +pesq_threshold = 3.0 -- cgit v1.2.3