bs_dist.tst
来自「speech signal process tools」· TST 代码 · 共 1,159 行 · 第 1/3 页
TST
1,159 行
#!/bin/sh# This material contains unpublished, proprietary software of # Entropic Research Laboratory, Inc. Any reproduction, distribution, # or publication of this work must be authorized in writing by Entropic # Research Laboratory, Inc., and must bear the notice: ## "Copyright (c) 1998 Entropic Research Laboratory, Inc. # All rights reserved."## The copyright notice above does not evidence any actual or intended # publication of this source code. ## @(#)bs_dist.tst 1.4 9/22/98 ERL# # Written by: Rod Johnson# Checked by:# Revised by:# # Brief description: Test script for bs_dist program.# "bs_dist.tst clean" just removes the test files.# "bs_dist.tst" runs the tests and leaves the test files in place.# ##!# So far, only BSD computation is checked; MBSD not yet implemented## CLEAN UP TEST FILESrm -f tstA.bark tstB.bark log1.txt err1.txt out1.fea ref1.fea dif1.fea tmp.fea \ tmp.sd dif.sd \ log2.txt err2.txt out2.fea ref2.fea dif2.fea log3.txt err3.txt \ testparam log4.txt err4.txt out4.fea ref4.fea dif4.fea case "$1" inclean) exit 0;;esac## TURN OFF COMMON PROCESSINGUSE_ESPS_COMMON=off; export USE_ESPS_COMMONESPS_VERBOSE=0; export ESPS_VERBOSE## MAKE TEST FILEecho "Making test FEA_SPEC file tstA.bark."esig2fea - tstA.bark <<aArDvArKEsignal 0.0B ASCII 48 2391 -1Tag: LONG <r>tot_power: FLOAT <r>re_spec_val: FLOAT 15 <r>band_high: DOUBLE 1 <g> [0] 4232.134445996039nan: LONG 1 <g> [0] 10bark_high: DOUBLE 1 <g> [0] 15.91000000000000band_low: DOUBLE 1 <g> [0] 91.34927693803206src_sf: DOUBLE 1 <g> [0] 8000.000000000000add_const: DOUBLE 1 <g> [0] 0.000000000000000frmlen: LONG 1 <g> [0] 64freqs: FLOAT 15 <g> [0] 151.56738 257.29684 370.19000 493.39005 [4] 630.32709 784.81384 961.15143 1164.2496 [8] 1399.7629 1674.2487 1995.3490 2372.0042 [12] 2814.7009 3335.7651 3949.7041frame_meth: SHORT 1 <g> [0] 1frame_meth.enumStrings: CHAR 3 9 <g> [0][0] "NONE\0\0\0\0\0" [1][0] "FIXED\0\0\0\0" [2][0] "VARIABLE\0"bark_low: DOUBLE 1 <g> [0] 0.9100000000000000contin: SHORT 1 <g> [0] 0contin.enumStrings: CHAR 2 4 <g> [0][0] "NO\0\0" [1][0] "YES\0"bark_freqs: FLOAT 15 <g> [0] 1.5000000 2.5000000 3.5000000 4.5000000 [4] 5.5000000 6.5000000 7.5000000 8.5000000 [8] 9.5000000 10.500000 11.500000 12.500000 [12] 13.500000 14.500000 15.500000start: LONG 1 <g> [0] 231record_freq: DOUBLE 1 <g> [0] 500.0000000000000spec_type: SHORT 1 <g> [0] 2spec_type.enumStrings: CHAR 5 5 <g> [0][0] "NONE\0" [1][0] "PWR\0\0" [2][0] "DB\0\0\0" [3][0] "REAL\0" [4][0] "CPLX\0"freq_format: SHORT 1 <g> [0] 6freq_format.enumStrings: CHAR 7 10 <g> [0][0] "NONE\0\0\0\0\0\0" [1][0] "SYM_CTR\0\0\0" [2][0] "SYM_EDGE\0\0" [3][0] "ASYM_CTR\0\0" [4][0] "ASYM_EDGE\0" [5][0] "ARB_VAR\0\0\0" [6][0] "ARB_FIXED\0"num_freqs: LONG 1 <g> [0] 15start_time: DOUBLE 1 <g> [0] 0.4640000000000000mult_const: DOUBLE 1 <g> [0] 1.000000000000000FeaSubtype: SHORT <g> 7FeaSubtype.enumStrings: CHAR 10 10 <g> [0][0] "NONE\0\0\0\0\0\0" [1][0] "FEA_VQ\0\0\0\0" [2][0] "FEA_ANA\0\0\0" [3][0] "FEA_STAT\0\0" [4][0] "FEA_QHIST\0" [5][0] "FEA_DST\0\0\0" [6][0] "FEA_2KB\0\0\0" [7][0] "FEA_SPEC\0\0" [8][0] "FEA_SD\0\0\0\0" [9][0] "FEA_FILT\0\0"recordFreq: DOUBLE <g> 500.0000000000000startTime: DOUBLE 1 <g> [0] 0.4640000000000000[Record 0] [tot_power] 242555.52 [re_spec_val] [0] 29.663557 28.396418 30.219484 28.876633 [4] 21.482067 13.720979 10.888761 11.709397 [8] 17.294838 30.010786 43.255474 42.783257 [12] 42.324333 39.251869 31.454790 [Tag] 3681[Record 1] [tot_power] 174389.59 [re_spec_val] [0] 30.743521 33.547001 33.439911 29.605940 [4] 22.213465 13.075278 6.3877974 9.1696949 [8] 12.798846 28.049150 41.557106 41.516144 [12] 40.040428 35.797543 27.943287 [Tag] 3697[Record 2] [tot_power] 86975.258 [re_spec_val] [0] 28.405716 27.902861 29.256514 26.689030 [4] 18.940176 9.9866962 7.9458594 9.8666840 [8] 13.559008 26.825006 37.589119 38.206085 [12] 37.591721 35.140175 28.534016 [Tag] 3713[Record 3] [tot_power] 129552.16 [re_spec_val] [0] 27.952274 28.903540 29.411940 26.646486 [4] 19.329670 11.644895 6.0899677 8.7205639 [8] 11.806746 25.650608 35.932850 39.725712 [12] 40.715481 38.432133 31.121347 [Tag] 3729[Record 4] [tot_power] 99775.734 [re_spec_val] [0] 28.753832 31.423605 30.557861 26.522779 [4] 19.482857 11.082741 7.5231328 6.8076739 [8] 10.115880 21.537640 35.529922 38.626617 [12] 38.585304 37.689140 30.944572 [Tag] 3745[Record 5] [tot_power] 83910.047 [re_spec_val] [0] 25.954548 23.927059 23.438707 20.714729 [4] 13.488000 6.9182453 6.1874480 5.3739300 [8] 13.200861 21.067284 35.856934 37.075962 [12] 35.364731 39.540543 33.286533 [Tag] 3761[Record 6] [tot_power] 69719.844 [re_spec_val] [0] 25.626835 26.512770 25.430645 22.093824 [4] 15.265566 8.8331690 6.4415836 2.8061519 [8] 9.6351757 21.139547 35.278156 37.634693 [12] 36.046173 36.760857 30.213367 [Tag] 3777[Record 7] [tot_power] 42249.426 [re_spec_val] [0] 25.891169 27.302652 24.902618 20.003052 [4] 13.753987 6.8842916 3.6105883 0.90215135 [8] 5.3185997 14.947868 28.620888 33.137825 [12] 35.471382 35.012844 29.311127 [Tag] 3793[Record 8] [tot_power] 48271.855 [re_spec_val] [0] 23.011572 21.580339 16.709719 10.136030 [4] 7.8402333 4.5077543 1.2551110 4.7663202 [8] 5.2770996 14.549771 22.676336 29.975960 [12] 36.041245 38.024395 32.582455 [Tag] 3809[Record 9] [tot_power] 46305.453 [re_spec_val] [0] 21.462326 19.949072 15.450261 11.750896 [4] 4.3953686 -1.3462790 4.0604372 4.8471174 [8] 5.3158236 12.938688 23.592873 28.327595 [12] 36.237144 37.826572 31.319035 [Tag] 3825aArDvArKecho "Making test FEA_SPEC file tstB.bark."esig2fea - tstB.bark <<aArDvArKEsignal 0.0B ASCII 48 2481 -1Tag: LONG <r>tot_power: FLOAT <r>re_spec_val: FLOAT 15 <r>band_high: DOUBLE 1 <g> [0] 4232.134445996039nan: LONG 1 <g> [0] 10bark_high: DOUBLE 1 <g> [0] 15.91000000000000band_low: DOUBLE 1 <g> [0] 91.34927693803206src_sf: DOUBLE 1 <g> [0] 8000.000000000000add_const: DOUBLE 1 <g> [0] 0.000000000000000frmlen: LONG 1 <g> [0] 64freqs: FLOAT 15 <g> [0] 151.56738 257.29684 370.19000 493.39005 [4] 630.32709 784.81384 961.15143 1164.2496 [8] 1399.7629 1674.2487 1995.3490 2372.0042 [12] 2814.7009 3335.7651 3949.7041frame_meth: SHORT 1 <g> [0] 1frame_meth.enumStrings: CHAR 3 9 <g> [0][0] "NONE\0\0\0\0\0" [1][0] "FIXED\0\0\0\0" [2][0] "VARIABLE\0"bark_low: DOUBLE 1 <g> [0] 0.9100000000000000contin: SHORT 1 <g> [0] 0contin.enumStrings: CHAR 2 4 <g> [0][0] "NO\0\0" [1][0] "YES\0"bark_freqs: FLOAT 15 <g> [0] 1.5000000 2.5000000 3.5000000 4.5000000 [4] 5.5000000 6.5000000 7.5000000 8.5000000 [8] 9.5000000 10.500000 11.500000 12.500000 [12] 13.500000 14.500000 15.500000start: LONG 1 <g> [0] 231record_freq: DOUBLE 1 <g> [0] 500.0000000000000spec_type: SHORT 1 <g> [0] 2spec_type.enumStrings: CHAR 5 5 <g> [0][0] "NONE\0" [1][0] "PWR\0\0" [2][0] "DB\0\0\0" [3][0] "REAL\0" [4][0] "CPLX\0"freq_format: SHORT 1 <g> [0] 6freq_format.enumStrings: CHAR 7 10 <g> [0][0] "NONE\0\0\0\0\0\0" [1][0] "SYM_CTR\0\0\0" [2][0] "SYM_EDGE\0\0" [3][0] "ASYM_CTR\0\0" [4][0] "ASYM_EDGE\0" [5][0] "ARB_VAR\0\0\0" [6][0] "ARB_FIXED\0"num_freqs: LONG 1 <g> [0] 15start_time: DOUBLE 1 <g> [0] 0.4640000000000000mult_const: DOUBLE 1 <g> [0] 1.000000000000000FeaSubtype: SHORT <g> 7FeaSubtype.enumStrings: CHAR 10 10 <g> [0][0] "NONE\0\0\0\0\0\0" [1][0] "FEA_VQ\0\0\0\0" [2][0] "FEA_ANA\0\0\0" [3][0] "FEA_STAT\0\0" [4][0] "FEA_QHIST\0" [5][0] "FEA_DST\0\0\0" [6][0] "FEA_2KB\0\0\0" [7][0] "FEA_SPEC\0\0" [8][0] "FEA_SD\0\0\0\0" [9][0] "FEA_FILT\0\0"recordFreq: DOUBLE <g> 500.0000000000000startTime: DOUBLE 1 <g> [0] 0.4640000000000000[Record 0] [tot_power] 397994.44 [re_spec_val] [0] 32.018623 31.108500 32.563793 31.758924 [4] 24.988129 19.581486 15.488555 20.978283 [8] 22.781315 32.585117 45.199688 44.812080 [12] 44.410549 41.360691 33.895874 [Tag] 3681[Record 1] [tot_power] 270401.06 [re_spec_val] [0] 32.813587 36.175819 35.783970 31.572130 [4] 24.197098 18.802086 17.654106 19.309597 [8] 20.881960 31.569962 43.477551 42.963657 [12] 41.996323 37.973164 31.265919 [Tag] 3697[Record 2] [tot_power] 145414.94 [re_spec_val] [0] 30.932507 30.306520 31.367304 29.157520 [4] 21.316811 13.917584 15.785312 14.362242 [8] 17.995085 29.523840 39.412792 40.518703 [12] 39.978100 37.639103 31.622145 [Tag] 3713[Record 3] [tot_power] 243444.05 [re_spec_val] [0] 30.698753 31.671505 32.073204 29.510229 [4] 22.263414 14.955903 10.139651 13.165384 [8] 15.072941 28.609068 38.771400 42.662777 [12] 43.549992 41.277531 34.002434 [Tag] 3729[Record 4] [tot_power] 181956.33 [re_spec_val] [0] 31.607059 33.692760 32.861916 28.746243 [4] 21.627264 14.046458 13.250893 13.401849 [8] 13.185095 24.165268 37.871647 40.964314 [12] 41.025005 40.276840 33.732368 [Tag] 3745[Record 5] [tot_power] 157657.42 [re_spec_val] [0] 28.473217 26.525639 26.222191 23.240984 [4] 16.025423 9.7309465 10.007570 9.6405325 [8] 15.268126 23.800482 38.534725 39.981258 [12] 38.240608 42.485420 36.204845 [Tag] 3761[Record 6] [tot_power] 132161.28 [re_spec_val] [0] 28.602467 29.179214 27.958626 24.610664 [4] 17.791395 11.496871 9.3453283 5.6887913 [8] 12.417234 24.072973 38.103664 40.329197 [12] 38.650494 39.288956 32.775776 [Tag] 3777[Record 7] [tot_power] 80088.234 [re_spec_val] [0] 28.886436 30.288443 27.700891 22.903807 [4] 16.707336 9.7523394 6.3724313 3.6298389 [8] 8.1320410 17.887991 31.578312 35.989456 [12] 38.262886 37.682182 32.003349 [Tag] 3793[Record 8] [tot_power] 91504.445 [re_spec_val] [0] 25.769403 24.424160 19.434307 12.848168 [4] 10.384578 7.0570717 4.0224533 7.4407725 [8] 7.8347178 17.166056 25.488081 32.799145 [12] 38.812801 40.685162 35.200878 [Tag] 3809[Record 9] [tot_power] 87776.914 [re_spec_val] [0] 24.127790 22.603765 18.285845 14.589011 [4] 7.1649194 1.3761685 6.9716907 7.6187549 [8] 8.1290894 15.518770 26.212460 31.045504 [12] 39.174236 40.793091 34.230946 [Tag] 3825aArDvArK## RUN PROGRAM (1) --- near-minimal optionsecho 'Running command (1):'echo ' ./bs_dist -A tstA.bark tstB.bark out1.fea >log1.txt 2>err1.txt'./bs_dist -A tstA.bark tstB.bark out1.fea >log1.txt 2>err1.txtcat err1.txt## CHECK OUTPUT (1)## --- STDOUT OUTPUT (1)echo '... checking stdout output'x=`cat log1.txt`pat="0.0393814424239233225964"case "$x" in'') echo "* * * ERROR: no output to stdout";;*) case `echo "scale=20;" \ "if (($x) < 0.9999 * ($pat)) \"NOT\";" \ "if (($pat) < 0.9999 * ($x)) \"NOT\";" \ "\"OK\"" | bc` in OK) : ;; *) echo "* * * ERROR: output distortion is $x; should be $pat" ;; esac;;esac
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?