dtwdemo
来自「speech signal process tools」· 代码 · 共 61 行
TXT
61 行
#! /bin/sh# @(#)dtwdemo 1.1 6/18/91 ERL - dtw demo#USE_ESPS_COMMON=off#export USE_ESPS_COMMONESPS_VERBOSE=0export ESPS_VERBOSEif test `mach_type` = CONVEX then echo This script will fail if you do not have write permission on this directory. else if test ! -w . then echo "You do not have write permission in this directory." exit 1 fifi# turn off params warnings#rm -f params; touch paramsecho " "echo "DTWDEMO: First make test signal by adding three swept sine waves"testsd -p10000 -f100 -C1000 -l1000 100.sdtestsd -p10000 -f1200 -C1200 -l700 1200.sdtestsd -p10000 -f2500 -C1500 -l300 - | addsd - 1200.sd - | addsd - 100.sd 3sine.sum.sdecho " "echo 'DTWDEMO: Display synthesized waveform (shown in upper left)'echo " "plotsd -W"=450x300+0+0" 3sine.sum.sdsleep 5echo "DTWDEMO: Divide signal into 4 frames, compute maximum entropy"echo 'DTWDEMO: spectrum analysis, and present as grey scale image (see lower left).'echo "DTWDEMO: This is the input test signal used in the dynamic time warping."echo " "refcof -l2000 -o7 -r1:8000 3sine.sum.sd - | tee test.seq | me_spec - - | \image -Ls -B0 -t"Time" -V"Frequency" -G-25:0 -D -W"=500x250+0+625" -&sleep 5echo "DTWDEMO: Divide signal into 5 frames and present as grey scale image"echo 'DTWDEMO: This is the reference before dynamic time warping (see upper right).'refcof -l2000 -o7 -r1:10000 3sine.sum.sd - | tee ref.seq | me_spec - - | \image -Ls -B0 -t"Time" -V"Frequency" -G-25:0 -D -W"=500x250+625+0" -&echo " "sleep 5echo "DTWDEMO: Compute distance bewteen reference and input signal, and"echo 'DTWDEMO: compute and display result of warping (see lower right).'echo " "echo "DTWDEMO: %dtw reference.sequence input.sequence warped.sequence"echo " "echo "DTWDEMO: dtw distance = `dtw ref.seq test.seq warped.sequence`"echo " "addgen -F -gsrc_sf -tdouble -v5 warped.sequenceme_spec warped.sequence - | image -Ls -B0 -t"Time" -V"Frequency" -G-25:0 -D -W"=500x250+625+625" -&echo "DTWDEMO: warping function is shown in upper left."echo " "pplain -e15 warped.sequence | testsd -a - - | plotsd -W"=350x350+0+0" -&echo "DTWDEMO: All Done"rm -f 100.sd 1200.sd 3sine.sum.sd ref.seq test.seq warped.sequenceecho " "
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?