- Timestamp:
- Jun 28, 2008 12:52:20 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip-apps/src/test-pjsua/mod_pesq.py
r2078 r2088 17 17 import subprocess 18 18 import wave 19 import shutil 19 20 import inc_const as const 20 21 … … 138 139 pesq_res = mo_pesq_out.group(1) 139 140 if (float(pesq_res) >= threshold): 140 endpt.trace("Success, PESQ result = " + pesq_res )141 endpt.trace("Success, PESQ result = " + pesq_res + " (target=" + str(threshold) + ").") 141 142 else: 142 endpt.trace("Failed, PESQ result = " + pesq_res) 143 raise TestError("WAV seems to be degraded badly") 143 endpt.trace("Failed, PESQ result = " + pesq_res + " (target=" + str(threshold) + ").") 144 # Save the wav file 145 wavoutname = ARGS[1] 146 wavoutname = re.sub("[\\\/]", "_", wavoutname) 147 wavoutname = re.sub("\.py$", ".wav", wavoutname) 148 wavoutname = "logs/" + wavoutname 149 try: 150 shutil.copyfile(output_filename, wavoutname) 151 print "Output WAV is copied to " + wavoutname 152 except: 153 print "Couldn't copy output WAV, please check if 'logs' directory exists." 154 155 raise TestError("WAV seems to be degraded badly, PESQ = "+ pesq_res + " (target=" + str(threshold) + ").") 144 156 145 157
Note: See TracChangeset
for help on using the changeset viewer.