Changeset 2057 for pjproject/trunk/pjsip-apps/src/test-pjsua/mod_pesq.py
- Timestamp:
- Jun 26, 2008 12:26:52 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip-apps/src/test-pjsua/mod_pesq.py
r2052 r2057 26 26 # PESQ_THRESHOLD specifies the minimum acceptable PESQ MOS value, so test can be declared successful 27 27 PESQ = "tools/pesq.exe" 28 PESQ_THRESHOLD = 1.028 PESQ_THRESHOLD = 3.0 29 29 30 30 # UserData … … 39 39 # Test body function 40 40 def test_func(t, user_data): 41 42 if len(t.process) == 0: 43 return 44 41 45 ua1 = t.process[0] 42 46 ua2 = t.process[1] … … 94 98 95 99 # Parse ouput 96 mo_pesq_out = re.compile("Prediction \s+:\s+PESQ_MOS\s+=\s+(.+)\s*").search(pesq_out[0])100 mo_pesq_out = re.compile("Prediction[^=]+=\s+([\d\.]+)\s*").search(pesq_out[0]) 97 101 if (mo_pesq_out == None): 98 102 raise TestError("Failed to fetch PESQ result") … … 101 105 pesq_res = mo_pesq_out.group(1) 102 106 if (float(pesq_res) >= PESQ_THRESHOLD): 103 endpt.trace("Success, PESQ result =" + pesq_res)107 endpt.trace("Success, PESQ result = " + pesq_res) 104 108 else: 105 endpt.trace("Failed, PESQ result =" + pesq_res)109 endpt.trace("Failed, PESQ result = " + pesq_res) 106 110 raise TestError("WAV seems to be degraded badly") 107 111
Note: See TracChangeset
for help on using the changeset viewer.