featohtk.tst

来自「speech signal process tools」· TST 代码 · 共 1,733 行 · 第 1/5 页

TST
1,733
字号
#! /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.     ## @(#)featohtk.tst	1.1	3/17/98	ERL# # Written by:  Rod Johnson# Checked by:# Revised by:# # Brief description:  Test script for featohtk program.#   "featohtk.tst clean" just removes the test files.#   "featohtk.tst" runs the tests and leaves the test files in place.# ## CLEAN UP TEST FILEScase "$1" inclean)    rm -f \	tst[ABCD].fea tst[EF].sd tst[1-9].htk tst1[0-9].htk tst2[0-3].htk \	htk[1-9].fea htk1[0].fea htk2[0-3].sd \	cmp[1-9].fea cmp1[0].fea cmp2[013].sd fmt[1-9] fmt1[0] fmt2[0-3]    exit 0 ;;esac## MAKE TEST FEA FILE --- FLOAT parametersecho "Making test FEA file tstA.fea (FLOAT parameters)."esig2fea - tstA.fea <<aArDvArKEsignal   0.0B  ASCII     48    186     -1lpc_power: DOUBLE 1 <r>raw_power: FLOAT 1 <r>spec_param: FLOAT 12 <r>record_freq: DOUBLE 1 <g> 160.0start_time: DOUBLE 1 <g> 0.068750[Record 0]  [lpc_power] 927.42932  [raw_power] 1423.2400  [spec_param]    [0]      0.28137207    -0.39353985     0.17607225    -0.22316065    [4]      0.15006225    -0.14152966     0.11980563    -0.10191841    [8]     0.090150878   -0.084244661    0.062338550   -0.088505752[Record 1]  [lpc_power] 2922.3127  [raw_power] 4258.8999  [spec_param]    [0]      0.27897111   -0.049545702     0.24509712    -0.27239212    [4]    -0.034412865    -0.10871434    -0.19859451   -0.085225292    [8]     -0.19471112    -0.12768260    -0.15221642     0.12193012[Record 2]  [lpc_power] 2058.4460  [raw_power] 3493.5901  [spec_param]    [0]      0.36667153    0.037211671     0.24771327    -0.22217131    [4]     -0.13403705   -0.092992097    -0.33920684   -0.094665490    [8]     -0.15213959   -0.093598701    -0.19457534     0.19896972[Record 3]  [lpc_power] 9424.0449  [raw_power] 77480.953  [spec_param]    [0]      0.89542192    0.017055569    -0.45795065    -0.29343635    [4]     -0.31801096   -0.021213403    0.013620988    0.016556688    [8]      0.14626795    0.039126333    -0.16830522   -0.057130225aArDvArK## RUN PROGRAM (1) --- minimal optionsecho 'Running command (1):'echo '    featohtk -k LPREFC -f spec_param tstA.fea tst1.htk'featohtk -k LPREFC -f spec_param tstA.fea tst1.htk## CHECK OUTPUT (1)echo '... checking output.'## --- HEADER (1)if od -b tst1.htk \	| head -1 \	| grep ' 000 000 000 004 000 000 364 044 000 060 000 002 ' >/dev/nullthen :else echo '* * * ERROR: bad header on tst1.htk'fi## --- DATA (1)## --- Convert to ESPScat >fmt1 <<aArDvArKspec_param FLOAT 12aArDvArKESPS_EDR="on"; export ESPS_EDRaddfeahd -c "featohtk test(1)" -E -S12 fmt1 tst1.htk htk1.fea 2>/dev/null## --- Make comparison fileesig2fea - cmp1.fea <<aArDvArKEsignal   0.0B  ASCII     48    139     -1spec_param: FLOAT 12 <r>record_freq: DOUBLE 1 <g> 160.0start_time: DOUBLE 1 <g> 0.068750[Record 0]    [0]      0.28137207    -0.39353985     0.17607225    -0.22316065    [4]      0.15006225    -0.14152966     0.11980563    -0.10191841    [8]     0.090150878   -0.084244661    0.062338550   -0.088505752[Record 1]    [0]      0.27897111   -0.049545702     0.24509712    -0.27239212    [4]    -0.034412865    -0.10871434    -0.19859451   -0.085225292    [8]     -0.19471112    -0.12768260    -0.15221642     0.12193012[Record 2]    [0]      0.36667153    0.037211671     0.24771327    -0.22217131    [4]     -0.13403705   -0.092992097    -0.33920684   -0.094665490    [8]     -0.15213959   -0.093598701    -0.19457534     0.19896972[Record 3]    [0]      0.89542192    0.017055569    -0.45795065    -0.29343635    [4]     -0.31801096   -0.021213403    0.013620988    0.016556688    [8]      0.14626795    0.039126333    -0.16830522   -0.057130225aArDvArK## --- Compareif pspsdiff -H htk1.fea cmp1.fea | grep '.*'then echo '* * * ERROR: bad data in tst1.htk'fi## RUN PROGRAM (2) --- contiguous subrangeecho 'Running command (2):'echo '    featohtk -k LPREFC -f spec_param"[4:7]" tstA.fea tst2.htk'featohtk -k LPREFC -f spec_param"[4:7]" tstA.fea tst2.htk## CHECK OUTPUT (2)echo '... checking output.'## --- HEADER (2)if od -b tst2.htk \	| head -1 \	| grep ' 000 000 000 004 000 000 364 044 000 020 000 002 ' >/dev/nullthen :else echo '* * * ERROR: bad header on tst2.htk'fi## --- DATA (2)## --- Convert to ESPScat >fmt2 <<aArDvArKspec_param FLOAT 4aArDvArKESPS_EDR="on"; export ESPS_EDRaddfeahd -c "featohtk test(2)" -E -S12 fmt2 tst2.htk htk2.fea 2>/dev/null## --- Make comparison fileesig2fea - cmp2.fea <<aArDvArKEsignal   0.0B  ASCII     48    138     -1spec_param: FLOAT 4 <r>record_freq: DOUBLE 1 <g> 160.0start_time: DOUBLE 1 <g> 0.068750[Record 0]    [0]      0.15006225    -0.14152966     0.11980563    -0.10191841[Record 1]    [0]    -0.034412865    -0.10871434    -0.19859451   -0.085225292[Record 2]    [0]     -0.13403705   -0.092992097    -0.33920684   -0.094665490[Record 3]    [0]     -0.31801096   -0.021213403    0.013620988    0.016556688aArDvArK## --- Compareif pspsdiff -H htk2.fea cmp2.fea | grep '.*'then echo '* * * ERROR: bad data in tst2.htk'fi## RUN PROGRAM (3) --- noncontiguous subrangeecho 'Running command (3):'echo '    featohtk -k LPREFC -f spec_param"[2:3,6:11]" tstA.fea tst3.htk'featohtk -k LPREFC -f spec_param"[2:3,6:11]" tstA.fea tst3.htk## CHECK OUTPUT (3)echo '... checking output.'## --- HEADER (3)if od -b tst3.htk \	| head -1 \	| grep ' 000 000 000 004 000 000 364 044 000 040 000 002 ' >/dev/nullthen :else echo '* * * ERROR: bad header on tst3.htk'fi## --- DATA (3)## --- Convert to ESPScat >fmt3 <<aArDvArKspec_param FLOAT 8aArDvArKESPS_EDR="on"; export ESPS_EDRaddfeahd -c "featohtk test(3)" -E -S12 fmt3 tst3.htk htk3.fea 2>/dev/null## --- Make comparison fileesig2fea - cmp3.fea <<aArDvArKEsignal   0.0B  ASCII     48    138     -1spec_param: FLOAT 8 <r>record_freq: DOUBLE 1 <g> 160.0start_time: DOUBLE 1 <g> 0.068750[Record 0]    [0]      0.17607225    -0.22316065     0.11980563    -0.10191841    [4]     0.090150878   -0.084244661    0.062338550   -0.088505752[Record 1]    [0]      0.24509712    -0.27239212    -0.19859451   -0.085225292    [4]     -0.19471112    -0.12768260    -0.15221642     0.12193012[Record 2]    [0]      0.24771327    -0.22217131    -0.33920684   -0.094665490    [4]     -0.15213959   -0.093598701    -0.19457534     0.19896972[Record 3]    [0]     -0.45795065    -0.29343635    0.013620988    0.016556688    [4]      0.14626795    0.039126333    -0.16830522   -0.057130225aArDvArK## --- Compareif pspsdiff -H htk3.fea cmp3.fea | grep '.*'then echo '* * * ERROR: bad data in tst3.htk'fi## RUN PROGRAM (4) --- contiguous subrange, Energy parameter (FLOAT)echo 'Running command (4):'echo '    featohtk ' \	'-k LPREFC -f spec_param"[0:2]" -E raw_power tstA.fea tst4.htk'featohtk -k LPREFC -f spec_param"[0:2]" -E raw_power tstA.fea tst4.htk## CHECK OUTPUT (4)echo '... checking output.'## --- HEADER (4)if od -b tst4.htk \	| head -1 \	| grep ' 000 000 000 004 000 000 364 044 000 020 000 102 ' >/dev/nullthen :else echo '* * * ERROR: bad header on tst4.htk'fi## --- DATA (4)## --- Convert to ESPScat >fmt4 <<aArDvArKspec_param FLOAT 3raw_power FLOAT 1aArDvArKESPS_EDR="on"; export ESPS_EDRaddfeahd -c "featohtk test(4)" -E -S12 fmt4 tst4.htk htk4.fea 2>/dev/null## --- Make comparison fileesig2fea - cmp4.fea <<aArDvArKEsignal   0.0B  ASCII     48    161     -1spec_param: FLOAT 3 <r>raw_power: FLOAT 1 <r>record_freq: DOUBLE 1 <g> 160.0start_time: DOUBLE 1 <g> 0.068750[Record 0]    [0]      0.28137207    -0.39353985     0.17607225    [0]       1423.2400[Record 1]    [0]      0.27897111   -0.049545702     0.24509712    [0]       4258.8999[Record 2]    [0]      0.36667153    0.037211671     0.24771327    [0]       3493.5901[Record 3]    [0]      0.89542192    0.017055569    -0.45795065    [0]       77480.953aArDvArK## --- Compareif pspsdiff -H htk4.fea cmp4.fea | grep '.*'then echo '* * * ERROR: bad data in tst4.htk'fi## RUN PROGRAM (5) --- noncontiguous subrange,#	0-order cepstral parameter (DOUBLE)echo 'Running command (5):'echo '    featohtk ' \	'-k MFCC -f spec_param"[0:3,6:8]" -O lpc_power tstA.fea tst5.htk'featohtk -k MFCC -f spec_param"[0:3,6:8]" -O lpc_power tstA.fea tst5.htk## CHECK OUTPUT (5)echo '... checking output.'## --- HEADER (5)if od -b tst5.htk \	| head -1 \

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?