SPTK-3.9/0000755001051300105040000000000012637167720007154 500000000000000SPTK-3.9/bin/0000755001051300105040000000000012637167720007724 500000000000000SPTK-3.9/bin/Makefile.mak0000644001051300105040000003527412442245016012053 00000000000000CC = cl CL = link CPU = win32 SPTKCFG = /I..\include SYSCFG = /O2 /Ot /GL /FD /EHsc /MT /W3 /nologo /c /Zi /TC /D "NDEBUG" /D "HAVE_MEMSET" /D "HAVE_STRING_H" /D "WIN32" /D "_WINDOWS" /D "_CONSOLE" /D "_MBCS" /D "_CRT_SECURE_NO_WARNINGS" !IFNDEF DOUBLE SYSCFG = $(SYSCFG) /D "FORMAT=\"float\"" !ELSE SYSCFG = $(SYSCFG) /D "FORMAT=\"double\"" !ENDIF CFLAGS = $(SYSCFG) $(SPTKCFG) SPTKLIB = ..\lib\SPTK.lib SYSLIB = kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib LIBS = /NOLOGO /SUBSYSTEM:CONSOLE /MACHINE:X86 $(SPTKLIB) $(SYSLIB) all: acep.exe acorr.exe agcep.exe amcep.exe \ average.exe b2mc.exe bcp.exe bcut.exe c2acr.exe \ c2ir.exe c2sp.exe cat2.exe cdist.exe clip.exe da.exe dct.exe\ decimate.exe delay.exe delta.exe df2.exe dfs.exe dmp.exe ds.exe dtw.exe echo2.exe \ excite.exe extract.exe fd.exe fdrw.exe fft.exe fft2.exe fftcep.exe fftr.exe fftr2.exe \ fig.exe frame.exe freqt.exe gc2gc.exe gcep.exe glsadf.exe gmm.exe gmmp.exe gnorm.exe \ grpdelay.exe histogram.exe idct.exe ifft.exe ifft2.exe ifftr.exe \ ignorm.exe impulse.exe imsvq.exe interpolate.exe ivq.exe \ lbg.exe levdur.exe linear_intpl.exe lmadf.exe lpc.exe lpc2c.exe lpc2lsp.exe \ lpc2par.exe lsp2lpc.exe lspcheck.exe lspdf.exe ltcdf.exe mc2b.exe mcep.exe \ merge.exe mfcc.exe mgc2mgc.exe mgc2sp.exe mgcep.exe mglsadf.exe minmax.exe mlpg.exe \ mlsacheck.exe mlsadf.exe msvq.exe nan.exe norm0.exe nrand.exe pca.exe pcas.exe \ par2lpc.exe phase.exe pitch.exe poledf.exe psgr.exe \ ramp.exe rawtowav.exe reverse.exe rmse.exe root_pol.exe sin.exe smcep.exe snr.exe \ sopr.exe spec.exe step.exe swab.exe symmetrize.exe train.exe transpose.exe uels.exe ulaw.exe \ us.exe vc.exe vopr.exe vq.exe vstat.exe vsum.exe window.exe x2x.exe \ zcross.exe zerodf.exe acep.exe : acep\acep.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj acorr.exe : acorr\acorr.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj agcep.exe : agcep\agcep.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj amcep.exe : amcep\amcep.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj average.exe : average\average.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj b2mc.exe : b2mc\b2mc.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj bcp.exe : bcp\bcp.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj bcut.exe : bcut\bcut.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj c2acr.exe : c2acr\c2acr.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj c2ir.exe : c2ir\c2ir.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj c2sp.exe : c2sp\c2sp.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj cat2.exe : cat2\cat2.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj cdist.exe : cdist\cdist.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj clip.exe : clip\clip.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj da.exe : da\dawrite.obj da\winplay.obj $(CC) $(CFLAGS) /c da\dawrite.c $(CC) $(CFLAGS) /c da\winplay.c $(CL) /LTCG /OUT:$@ $(LIBS) winmm.lib dawrite.obj winplay.obj dct.exe : dct\dct.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj decimate.exe : decimate\decimate.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj delay.exe : delay\delay.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj delta.exe : delta\delta.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj df2.exe : df2\df2.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj dfs.exe : dfs\dfs.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj dmp.exe : dmp\dmp.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj ds.exe : ds\ds.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj dtw.exe : dtw\dtw.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj echo2.exe : echo2\echo2.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj excite.exe : excite\excite.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj extract.exe : extract\extract.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj fd.exe : fd\fd.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj fdrw.exe : fig+fdrw\fdrw.obj fig+fdrw\plot.obj fig+fdrw\plsub.obj $(CC) $(CFLAGS) /c fig+fdrw\fig.c $(CC) $(CFLAGS) /c fig+fdrw\plot.c $(CC) $(CFLAGS) /c fig+fdrw\plsub.c $(CL) /LTCG /OUT:$@ $(LIBS) fdrw.obj plot.obj plsub.obj fft.exe : fft\fft.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj fft2.exe : fft2\fft2.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj fftcep.exe : fftcep\fftcep.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj fftr.exe : fftr\fftr.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj fftr2.exe : fftr2\fftr2.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj fig.exe : fig+fdrw\fig.obj fig+fdrw\fig0.obj fig+fdrw\fig1.obj \ fig+fdrw\plot.obj fig+fdrw\plsub.obj $(CC) $(CFLAGS) /c fig+fdrw\fig.c $(CC) $(CFLAGS) /c fig+fdrw\fig0.c $(CC) $(CFLAGS) /c fig+fdrw\fig1.c $(CC) $(CFLAGS) /c fig+fdrw\plot.c $(CC) $(CFLAGS) /c fig+fdrw\plsub.c $(CL) /LTCG /OUT:$@ $(LIBS) fig.obj fig0.obj fig1.obj plot.obj plsub.obj frame.exe : frame\frame.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj freqt.exe : freqt\freqt.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj gc2gc.exe : gc2gc\gc2gc.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj gcep.exe : gcep\gcep.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj glsadf.exe : glsadf\glsadf.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj gmm.exe : gmm\gmm.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj gmmp.exe : gmm\gmmp.obj $(CC) $(CFLAGS) /c gmm\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj gnorm.exe : gnorm\gnorm.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj grpdelay.exe : grpdelay\grpdelay.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj histogram.exe : histogram\histogram.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj idct.exe : idct\idct.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj ifft.exe : ifft\ifft.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj ifft2.exe : ifft2\ifft2.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj ifftr.exe : ifftr\ifftr.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj ignorm.exe : ignorm\ignorm.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj impulse.exe : impulse\impulse.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj imsvq.exe : imsvq\imsvq.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj interpolate.exe : interpolate\interpolate.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj ivq.exe : ivq\ivq.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj lbg.exe : lbg\lbg.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj levdur.exe : levdur\levdur.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj linear_intpl.exe : linear_intpl\linear_intpl.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj lmadf.exe : lmadf\lmadf.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj lpc.exe : lpc\lpc.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj lpc2c.exe : lpc2c\lpc2c.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj lpc2lsp.exe : lpc2lsp\lpc2lsp.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj lpc2par.exe : lpc2par\lpc2par.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj lsp2lpc.exe : lsp2lpc\lsp2lpc.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj lspcheck.exe : lspcheck\lspcheck.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj lspdf.exe : lspdf\lspdf.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj ltcdf.exe : ltcdf\ltcdf.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj mc2b.exe : mc2b\mc2b.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj mcep.exe : mcep\mcep.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj merge.exe : merge\merge.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj mfcc.exe : mfcc\mfcc.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj mgc2mgc.exe : mgc2mgc\mgc2mgc.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj mgc2sp.exe : mgc2sp\mgc2sp.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj mgcep.exe : mgcep\mgcep.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj mglsadf.exe : mglsadf\mglsadf.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj minmax.exe : minmax\minmax.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj mlpg.exe : mlpg\mlpg.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj mlsacheck.exe : mlsacheck\mlsacheck.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj mlsadf.exe : mlsadf\mlsadf.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj msvq.exe : msvq\msvq.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj nan.exe : nan\nan.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj norm0.exe : norm0\norm0.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj nrand.exe : nrand\nrand.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj par2lpc.exe : par2lpc\par2lpc.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj pca.exe : pca\pca.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj pcas.exe : pca\pcas.obj $(CC) $(CFLAGS) /c pca\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj phase.exe : phase\phase.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj pitch.exe : pitch\pitch.obj pitch\snack\jkGetF0.obj pitch\snack\sigproc.obj \ pitch\swipe\swipe.obj pitch\swipe\vector.obj $(CC) $(CFLAGS) /c pitch\pitch.c $(CC) $(CFLAGS) /c pitch\snack\jkGetF0.c $(CC) $(CFLAGS) /c pitch\snack\sigproc.c $(CC) $(CFLAGS) /c pitch\swipe\swipe.c $(CC) $(CFLAGS) /c pitch\swipe\vector.c $(CL) /LTCG /OUT:$@ $(LIBS) pitch.obj jkGetF0.obj sigproc.obj swipe.obj vector.obj poledf.exe : poledf\poledf.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj psgr.exe : psgr\psgr.obj psgr\dict.obj psgr\plot.obj psgr\eps.obj $(CC) $(CFLAGS) /c psgr\psgr.c $(CC) $(CFLAGS) /c psgr\dict.c $(CC) $(CFLAGS) /c psgr\plot.c $(CL) /LTCG /OUT:$@ $(LIBS) psgr.obj dict.obj plot.obj eps.obj ramp.exe : ramp\ramp.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj rawtowav.exe : rawtowav\rawtowav.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj reverse.exe : reverse\reverse.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj rmse.exe : rmse\rmse.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj root_pol.exe : root_pol\root_pol.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj sin.exe : sin\sin.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj smcep.exe : smcep\smcep.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj snr.exe : snr\snr.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj sopr.exe : sopr\sopr.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj spec.exe : spec\spec.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj step.exe : step\step.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj swab.exe : swab\swab.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj symmetrize.exe : symmetrize\symmetrize.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj train.exe : train\train.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj transpose.exe : transpose\transpose.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj uels.exe : uels\uels.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj ulaw.exe : ulaw\ulaw.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj us.exe : us\us.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj vc.exe : vc\vc.obj vc\_vc.obj vc\hts_engine_API\HTS_misc.obj vc\hts_engine_API\HTS_pstream.obj \ vc\hts_engine_API\HTS_sstream.obj $(CC) $(CFLAGS) /c vc\vc.c $(CC) $(CFLAGS) /c vc\_vc.c $(CC) $(CFLAGS) /c vc\hts_engine_API\HTS_misc.c $(CC) $(CFLAGS) /c vc\hts_engine_API\HTS_pstream.c $(CC) $(CFLAGS) /c vc\hts_engine_API\HTS_sstream.c $(CL) /LTCG /OUT:$@ $(LIBS) vc.obj _vc.obj HTS_misc.obj HTS_pstream.obj HTS_sstream.obj vopr.exe : vopr\vopr.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj vq.exe : vq\vq.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj vstat.exe : vstat\vstat.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj vsum.exe : vsum\vsum.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj window.exe : window\window.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj x2x.exe : x2x\x2x.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj xgr.exe : xgr\xgr.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj zcross.exe : zcross\zcross.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj zerodf.exe : zerodf\zerodf.obj $(CC) $(CFLAGS) /c $(@B)\$(@B).c $(CL) /LTCG /OUT:$@ $(LIBS) $(@B).obj clean: del *.exe del *.obj SPTK-3.9/bin/ds/0000755001051300105040000000000012637167701010331 500000000000000SPTK-3.9/bin/ds/titech/0000755001051300105040000000000012637167701011611 500000000000000SPTK-3.9/bin/ds/titech/COPYING0000644001051300105040000000513512442245037012561 00000000000000/* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ Filter coefficients were designed by Prof. Takao Kobayashi. SPTK-3.9/bin/ds/titech/lpfcoef.7to40000644001051300105040000000116512442245037013662 00000000000000-2.02059e-07 -4.19377e-06 -2.35035e-05 -7.48734e-05 -0.00015442 -0.000188281 -5.05567e-06 0.00058044 0.00151677 0.00221077 0.00150458 -0.00168565 -0.00707619 -0.0118392 -0.0109136 0.000190744 0.0207728 0.0414233 0.0455294 0.0178206 -0.0427124 -0.113043 -0.148084 -0.098023 0.0647626 0.323179 0.611992 0.839454 0.925782 0.839454 0.611992 0.323179 0.0647626 -0.098023 -0.148084 -0.113043 -0.0427124 0.0178206 0.0455294 0.0414233 0.0207728 0.000190744 -0.0109136 -0.0118392 -0.00707619 -0.00168565 0.00150458 0.00221077 0.00151677 0.00058044 -5.05567e-06 -0.000188281 -0.00015442 -7.48734e-05 -2.35035e-05 -4.19377e-06 -2.02059e-07 SPTK-3.9/bin/ds/Makefile.am0000644001051300105040000000054712442245037012304 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include -DLIB=\"$(pkgdatadir)\" bin_PROGRAMS = ds ds_SOURCES = ds.c ds_LDADD = @top_builddir@/lib/libSPTK.a dist_pkgdata_DATA = lpfcoef.2to1 \ lpfcoef.3to2 \ lpfcoef.4to3 \ lpfcoef.5to2dn \ lpfcoef.5to2up \ titech/lpfcoef.7to4 SPTK-3.9/bin/ds/lpfcoef.2to10000644001051300105040000003527512442245037012403 00000000000000-1.237610280924172911909408867359e-08 -4.682061444327700883150100708008e-06 2.002883547902456484735012054443e-08 2.752773752945358864963054656982e-06 -1.745039490685940108960494399071e-08 -3.553015403667814098298549652100e-06 2.230383699952653842046856880188e-08 4.500375780480680987238883972168e-06 -2.704678081499878317117691040039e-08 -5.613997927866876125335693359375e-06 3.235243895005623926408588886261e-08 6.913689958309987559914588928223e-06 -3.819311800157265679445117712021e-08 -8.421580787398852407932281494141e-06 4.560770960893023584503680467606e-08 1.016062287817476317286491394043e-05 -5.413015458088921150192618370056e-08 -1.215599240822484716773033142090e-05 6.409479880176149890758097171783e-08 1.443379278498468920588493347168e-05 -7.457692419166050967760384082794e-08 -1.702298504824284464120864868164e-05 8.617757174533835495822131633759e-08 1.995422280742786824703216552734e-05 -9.853298621465000906027853488922e-08 -2.326085632375907152891159057617e-05 1.129042388470224977936595678329e-07 2.697783747862558811902999877930e-05 -1.290094076011882862076163291931e-07 -3.114228456979617476463317871094e-05 1.469552586286226869560778141022e-07 3.579236363293603062629699707031e-05 -1.654233727776954765431582927704e-07 -4.096979319001547992229461669922e-05 1.849144837251515127718448638916e-07 4.671774513553828001022338867188e-05 -2.058888952660709037445485591888e-07 -5.308435720507986843585968017578e-05 2.304383173168389475904405117035e-07 6.011775258230045437812805175781e-05 -2.574127222487732069566845893860e-07 -6.786907033529132604598999023438e-05 2.860429049178492277860641479492e-07 7.638969691470265388488769531250e-05 -3.146031417600170243531465530396e-07 -8.573821105528622865676879882812e-05 3.468564671038620872423052787781e-07 9.597474854672327637672424316406e-05 -3.827994135008339071646332740784e-07 -1.071623555617406964302062988281e-04 4.204221397685614647343754768372e-07 1.193594944197684526443481445312e-04 -4.553513406335696345195174217224e-07 -1.326397614320740103721618652344e-04 5.007002528145676478743553161621e-07 1.470747956773266196250915527344e-04 -5.435196612779691349714994430542e-07 -1.627299207029864192008972167969e-04 5.903929718442668672651052474976e-07 1.796919241314753890037536621094e-04 -6.409630373127583879977464675903e-07 -1.980325760086998343467712402344e-04 6.926090350134472828358411788940e-07 2.178402792196720838546752929688e-04 -7.485267019546881783753633499146e-07 -2.391980524407699704170227050781e-04 8.063688596848805900663137435913e-07 2.621978637762367725372314453125e-04 -8.681308258928766008466482162476e-07 -2.869313175324350595474243164062e-04 9.319155651610344648361206054688e-07 3.134969447273761034011840820312e-04 -9.990169473894638940691947937012e-07 -3.419941058382391929626464843750e-04 1.068268261406046804040670394897e-06 3.725284477695822715759277343750e-04 -1.141461780207464471459388732910e-06 -4.052075964864343404769897460938e-04 1.217279077536659315228462219238e-06 4.401454061735421419143676757812e-04 -1.296607251788373105227947235107e-06 -4.774585249833762645721435546875e-04 1.378198362544935662299394607544e-06 5.172696546651422977447509765625e-04 -1.463164267079264391213655471802e-06 -5.597051931545138359069824218750e-04 1.551402078803221229463815689087e-06 6.048984359949827194213867187500e-04 -1.642834376980317756533622741699e-06 -6.529870443046092987060546875000e-04 1.736429680931905750185251235962e-06 7.041161297820508480072021484375e-04 -1.832982775340497028082609176636e-06 -7.584355189464986324310302734375e-04 1.932700570250744931399822235107e-06 8.161038858816027641296386718750e-04 -2.035603984040790237486362457275e-06 -8.772865985520184040069580078125e-04 2.140093101843376643955707550049e-06 9.421585709787905216217041015625e-04 -2.247291376988869160413742065430e-06 -1.010902342386543750762939453125e-03 2.357751782255945727229118347168e-06 1.083712559193372726440429687500e-03 -2.470085973982349969446659088135e-06 -1.160793704912066459655761718750e-03 2.583815330581273883581161499023e-06 1.242363592609763145446777343750e-03 -2.701902758417418226599693298340e-06 -1.328653655946254730224609375000e-03 2.819449946400709450244903564453e-06 1.419911743141710758209228515625e-03 -2.940887043223483487963676452637e-06 -1.516401767730712890625000000000e-03 3.062703626710572279989719390869e-06 1.618408830836415290832519531250e-03 -3.186815547451260499656200408936e-06 -1.726238871924579143524169921875e-03 3.311917225801153108477592468262e-06 1.840224373154342174530029296875e-03 -3.438377461861819028854370117188e-06 -1.960724825039505958557128906250e-03 3.565422957763075828552246093750e-06 2.088133012875914573669433593750e-03 -3.693470944199361838400363922119e-06 -2.222878159955143928527832031250e-03 3.821904101641848683357238769531e-06 2.365432446822524070739746093750e-03 -3.950779955630423501133918762207e-06 -2.516316249966621398925781250000e-03 4.079677637491840869188308715820e-06 2.676106058061122894287109375000e-03 -4.208548944006906822323799133301e-06 -2.845442388206720352172851562500e-03 4.337428890721639618277549743652e-06 3.025042125955224037170410156250e-03 -4.465787242224905639886856079102e-06 -3.215709468349814414978027343750e-03 4.593270659825066104531288146973e-06 3.418350126594305038452148437500e-03 -4.720162451121723279356956481934e-06 -3.633990883827209472656250000000e-03 4.845640887651825323700904846191e-06 3.863800084218382835388183593750e-03 -4.969931069354061037302017211914e-06 -4.109115339815616607666015625000e-03 5.092166702524991706013679504395e-06 4.371474031358957290649414062500e-03 -5.212708856561221182346343994141e-06 -4.652654286473989486694335937500e-03 5.330924068402964621782302856445e-06 4.954726900905370712280273437500e-03 -5.446781415230361744761466979980e-06 -5.280113779008388519287109375000e-03 5.559599685511784628033638000488e-06 5.631670821458101272583007812500e-03 -5.670003247360000386834144592285e-06 -6.012788508087396621704101562500e-03 5.776900252385530620813369750977e-06 6.427523214370012283325195312500e-03 -5.880875505681615322828292846680e-06 -6.880766246467828750610351562500e-03 5.981193680781871080398559570312e-06 7.378476206213235855102539062500e-03 -6.077601028664503246545791625977e-06 -7.927978411316871643066406250000e-03 6.170565939100924879312515258789e-06 8.538387715816497802734375000000e-03 -6.259148904064204543828964233398e-06 -9.221177548170089721679687500000e-03 6.343596396618522703647613525391e-06 9.991002269089221954345703125000e-03 -6.423458216886501759290695190430e-06 -1.086687203496694564819335937500e-02 6.498701623058877885341644287109e-06 1.187390089035034179687500000000e-02 -6.569086053787032142281532287598e-06 -1.304595451802015304565429687500e-02 6.634385044890223070979118347168e-06 1.442982722073793411254882812500e-02 -6.694514468108536675572395324707e-06 -1.609204150736331939697265625000e-02 6.749262411176459863781929016113e-06 1.813045702874660491943359375000e-02 -6.798628874093992635607719421387e-06 -2.069516666233539581298828125000e-02 6.842290076747303828597068786621e-06 2.402867004275321960449218750000e-02 -6.880486125737661495804786682129e-06 -2.854988910257816314697265625000e-02 6.912788194313179701566696166992e-06 3.505018725991249084472656250000e-02 -6.939487775525776669383049011230e-06 -4.522543773055076599121093750000e-02 6.960167866054689511656761169434e-06 6.348504871129989624023437500000e-02 -6.974958978389622643589973449707e-06 -1.059970557689666748046875000000e-01 6.983942057559033855795860290527e-06 3.182744681835174560546875000000e-01 4.999930262565612792968750000000e-01 3.182744681835174560546875000000e-01 6.983942057559033855795860290527e-06 -1.059970557689666748046875000000e-01 -6.974958978389622643589973449707e-06 6.348504871129989624023437500000e-02 6.960167866054689511656761169434e-06 -4.522543773055076599121093750000e-02 -6.939487775525776669383049011230e-06 3.505018725991249084472656250000e-02 6.912788194313179701566696166992e-06 -2.854988910257816314697265625000e-02 -6.880486125737661495804786682129e-06 2.402867004275321960449218750000e-02 6.842290076747303828597068786621e-06 -2.069516666233539581298828125000e-02 -6.798628874093992635607719421387e-06 1.813045702874660491943359375000e-02 6.749262411176459863781929016113e-06 -1.609204150736331939697265625000e-02 -6.694514468108536675572395324707e-06 1.442982722073793411254882812500e-02 6.634385044890223070979118347168e-06 -1.304595451802015304565429687500e-02 -6.569086053787032142281532287598e-06 1.187390089035034179687500000000e-02 6.498701623058877885341644287109e-06 -1.086687203496694564819335937500e-02 -6.423458216886501759290695190430e-06 9.991002269089221954345703125000e-03 6.343596396618522703647613525391e-06 -9.221177548170089721679687500000e-03 -6.259148904064204543828964233398e-06 8.538387715816497802734375000000e-03 6.170565939100924879312515258789e-06 -7.927978411316871643066406250000e-03 -6.077601028664503246545791625977e-06 7.378476206213235855102539062500e-03 5.981193680781871080398559570312e-06 -6.880766246467828750610351562500e-03 -5.880875505681615322828292846680e-06 6.427523214370012283325195312500e-03 5.776900252385530620813369750977e-06 -6.012788508087396621704101562500e-03 -5.670003247360000386834144592285e-06 5.631670821458101272583007812500e-03 5.559599685511784628033638000488e-06 -5.280113779008388519287109375000e-03 -5.446781415230361744761466979980e-06 4.954726900905370712280273437500e-03 5.330924068402964621782302856445e-06 -4.652654286473989486694335937500e-03 -5.212708856561221182346343994141e-06 4.371474031358957290649414062500e-03 5.092166702524991706013679504395e-06 -4.109115339815616607666015625000e-03 -4.969931069354061037302017211914e-06 3.863800084218382835388183593750e-03 4.845640887651825323700904846191e-06 -3.633990883827209472656250000000e-03 -4.720162451121723279356956481934e-06 3.418350126594305038452148437500e-03 4.593270659825066104531288146973e-06 -3.215709468349814414978027343750e-03 -4.465787242224905639886856079102e-06 3.025042125955224037170410156250e-03 4.337428890721639618277549743652e-06 -2.845442388206720352172851562500e-03 -4.208548944006906822323799133301e-06 2.676106058061122894287109375000e-03 4.079677637491840869188308715820e-06 -2.516316249966621398925781250000e-03 -3.950779955630423501133918762207e-06 2.365432446822524070739746093750e-03 3.821904101641848683357238769531e-06 -2.222878159955143928527832031250e-03 -3.693470944199361838400363922119e-06 2.088133012875914573669433593750e-03 3.565422957763075828552246093750e-06 -1.960724825039505958557128906250e-03 -3.438377461861819028854370117188e-06 1.840224373154342174530029296875e-03 3.311917225801153108477592468262e-06 -1.726238871924579143524169921875e-03 -3.186815547451260499656200408936e-06 1.618408830836415290832519531250e-03 3.062703626710572279989719390869e-06 -1.516401767730712890625000000000e-03 -2.940887043223483487963676452637e-06 1.419911743141710758209228515625e-03 2.819449946400709450244903564453e-06 -1.328653655946254730224609375000e-03 -2.701902758417418226599693298340e-06 1.242363592609763145446777343750e-03 2.583815330581273883581161499023e-06 -1.160793704912066459655761718750e-03 -2.470085973982349969446659088135e-06 1.083712559193372726440429687500e-03 2.357751782255945727229118347168e-06 -1.010902342386543750762939453125e-03 -2.247291376988869160413742065430e-06 9.421585709787905216217041015625e-04 2.140093101843376643955707550049e-06 -8.772865985520184040069580078125e-04 -2.035603984040790237486362457275e-06 8.161038858816027641296386718750e-04 1.932700570250744931399822235107e-06 -7.584355189464986324310302734375e-04 -1.832982775340497028082609176636e-06 7.041161297820508480072021484375e-04 1.736429680931905750185251235962e-06 -6.529870443046092987060546875000e-04 -1.642834376980317756533622741699e-06 6.048984359949827194213867187500e-04 1.551402078803221229463815689087e-06 -5.597051931545138359069824218750e-04 -1.463164267079264391213655471802e-06 5.172696546651422977447509765625e-04 1.378198362544935662299394607544e-06 -4.774585249833762645721435546875e-04 -1.296607251788373105227947235107e-06 4.401454061735421419143676757812e-04 1.217279077536659315228462219238e-06 -4.052075964864343404769897460938e-04 -1.141461780207464471459388732910e-06 3.725284477695822715759277343750e-04 1.068268261406046804040670394897e-06 -3.419941058382391929626464843750e-04 -9.990169473894638940691947937012e-07 3.134969447273761034011840820312e-04 9.319155651610344648361206054688e-07 -2.869313175324350595474243164062e-04 -8.681308258928766008466482162476e-07 2.621978637762367725372314453125e-04 8.063688596848805900663137435913e-07 -2.391980524407699704170227050781e-04 -7.485267019546881783753633499146e-07 2.178402792196720838546752929688e-04 6.926090350134472828358411788940e-07 -1.980325760086998343467712402344e-04 -6.409630373127583879977464675903e-07 1.796919241314753890037536621094e-04 5.903929718442668672651052474976e-07 -1.627299207029864192008972167969e-04 -5.435196612779691349714994430542e-07 1.470747956773266196250915527344e-04 5.007002528145676478743553161621e-07 -1.326397614320740103721618652344e-04 -4.553513406335696345195174217224e-07 1.193594944197684526443481445312e-04 4.204221397685614647343754768372e-07 -1.071623555617406964302062988281e-04 -3.827994135008339071646332740784e-07 9.597474854672327637672424316406e-05 3.468564671038620872423052787781e-07 -8.573821105528622865676879882812e-05 -3.146031417600170243531465530396e-07 7.638969691470265388488769531250e-05 2.860429049178492277860641479492e-07 -6.786907033529132604598999023438e-05 -2.574127222487732069566845893860e-07 6.011775258230045437812805175781e-05 2.304383173168389475904405117035e-07 -5.308435720507986843585968017578e-05 -2.058888952660709037445485591888e-07 4.671774513553828001022338867188e-05 1.849144837251515127718448638916e-07 -4.096979319001547992229461669922e-05 -1.654233727776954765431582927704e-07 3.579236363293603062629699707031e-05 1.469552586286226869560778141022e-07 -3.114228456979617476463317871094e-05 -1.290094076011882862076163291931e-07 2.697783747862558811902999877930e-05 1.129042388470224977936595678329e-07 -2.326085632375907152891159057617e-05 -9.853298621465000906027853488922e-08 1.995422280742786824703216552734e-05 8.617757174533835495822131633759e-08 -1.702298504824284464120864868164e-05 -7.457692419166050967760384082794e-08 1.443379278498468920588493347168e-05 6.409479880176149890758097171783e-08 -1.215599240822484716773033142090e-05 -5.413015458088921150192618370056e-08 1.016062287817476317286491394043e-05 4.560770960893023584503680467606e-08 -8.421580787398852407932281494141e-06 -3.819311800157265679445117712021e-08 6.913689958309987559914588928223e-06 3.235243895005623926408588886261e-08 -5.613997927866876125335693359375e-06 -2.704678081499878317117691040039e-08 4.500375780480680987238883972168e-06 2.230383699952653842046856880188e-08 -3.553015403667814098298549652100e-06 -1.745039490685940108960494399071e-08 2.752773752945358864963054656982e-06 2.002883547902456484735012054443e-08 -4.682061444327700883150100708008e-06 -1.237610280924172911909408867359e-08 SPTK-3.9/bin/ds/lpfcoef.3to20000644001051300105040000000567312442245037012404 00000000000000-0.00000207861603485071100294590 -0.00000026733701474768167827278 0.00000787742737884400412440300 0.00002083149229292757809162140 0.00002527162541809957474470139 0.00000111873600872058887034655 -0.00005889813110115937888622284 -0.00012528910883702337741851807 -0.00012911873636767268180847168 -0.00000288511250801093410700560 0.00024447636678814888000488281 0.00047288826317526400089263916 0.00044930339208804070949554443 0.00000620898072156705893576145 -0.00075431878212839365005493164 -0.00137708312831819057464599609 -0.00124217686243355274200439453 -0.00001163053275377023965120316 0.00192089041229337453842163086 0.00336875231005251407623291016 0.00292880460619926452636718750 0.00001944409268617164343595505 -0.00426516029983758926391601562 -0.00726389000192284584045410156 -0.00614703679457306861877441406 -0.00002948570727312471717596054 0.00856846850365400314331054688 0.01429103314876556396484375000 0.01186878699809312820434570312 0.00004099227226106449961662292 -0.01608676835894584655761718750 -0.02650957182049751281738281250 -0.02181259728968143463134765625 -0.00005263184357318095862865448 0.02937634848058223724365234375 0.04849086329340934753417968750 0.04018242657184600830078125000 0.00006271777965594083070755005 -0.05627608299255371093750000000 -0.09626765549182891845703125000 -0.08420566469430923461914062500 -0.00006959075835766270756721497 0.14640828967094421386718750000 0.31490007042884826660156250000 0.44899895787239074707031250000 0.50007206201553344726562500000 0.44899895787239074707031250000 0.31490007042884826660156250000 0.14640828967094421386718750000 -0.00006959075835766270756721497 -0.08420566469430923461914062500 -0.09626765549182891845703125000 -0.05627608299255371093750000000 0.00006271777965594083070755005 0.04018242657184600830078125000 0.04849086329340934753417968750 0.02937634848058223724365234375 -0.00005263184357318095862865448 -0.02181259728968143463134765625 -0.02650957182049751281738281250 -0.01608676835894584655761718750 0.00004099227226106449961662292 0.01186878699809312820434570312 0.01429103314876556396484375000 0.00856846850365400314331054688 -0.00002948570727312471717596054 -0.00614703679457306861877441406 -0.00726389000192284584045410156 -0.00426516029983758926391601562 0.00001944409268617164343595505 0.00292880460619926452636718750 0.00336875231005251407623291016 0.00192089041229337453842163086 -0.00001163053275377023965120316 -0.00124217686243355274200439453 -0.00137708312831819057464599609 -0.00075431878212839365005493164 0.00000620898072156705893576145 0.00044930339208804070949554443 0.00047288826317526400089263916 0.00024447636678814888000488281 -0.00000288511250801093410700560 -0.00012911873636767268180847168 -0.00012528910883702337741851807 -0.00005889813110115937888622284 0.00000111873600872058887034655 0.00002527162541809957474470139 0.00002083149229292757809162140 0.00000787742737884400412440300 -0.00000026733701474768167827278 -0.00000207861603485071100294590 SPTK-3.9/bin/ds/lpfcoef.4to30000644001051300105040000003574512442245037012411 00000000000000-4.077852736372733488678932189941e-06 8.552464350941590964794158935547e-06 7.552842362201772630214691162109e-06 5.341167252481682226061820983887e-06 2.284962192788952961564064025879e-07 -6.047683655197033658623695373535e-06 -9.786171176529023796319961547852e-06 -7.814232958480715751647949218750e-06 -8.633795900436780357267707586288e-09 9.791090633370913565158843994141e-06 1.543256257718894630670547485352e-05 1.212153438245877623558044433594e-05 2.967903256489989871624857187271e-09 -1.481579420214984565973281860352e-05 -2.308210605406202375888824462891e-05 -1.793405863281805068254470825195e-05 7.895547327052554464899003505707e-09 2.153749119315762072801589965820e-05 3.325694706290960311889648437500e-05 2.562648296589031815528869628906e-05 -2.508528851308255980256944894791e-08 -3.034656037925742566585540771484e-05 -4.652918869396671652793884277344e-05 -3.561162156984210014343261718750e-05 4.792014607346573029644787311554e-08 4.168938903603702783584594726562e-05 6.354766810545697808265686035156e-05 4.837068627239204943180084228516e-05 -7.565300563783239340409636497498e-08 -5.607522325590252876281738281250e-05 -8.506537415087223052978515625000e-05 -6.444555765483528375625610351562e-05 1.141239067692367825657129287720e-07 7.409376848954707384109497070312e-05 1.119191001635044813156127929688e-04 8.444502600468695163726806640625e-05 -1.655688208757055690512061119080e-07 -9.637876792112365365028381347656e-05 -1.450558338547125458717346191406e-04 -1.090631703846156597137451171875e-04 2.147368718397046905010938644409e-07 1.236759708262979984283447265625e-04 1.855253067333251237869262695312e-04 1.390514080412685871124267578125e-04 -2.827729019827529555186629295349e-07 -1.567664585309103131294250488281e-04 -2.344976237509399652481079101562e-04 -1.752708340063691139221191406250e-04 3.726551653926435392349958419800e-07 1.965562842087820172309875488281e-04 2.932634961325675249099731445312e-04 2.186386263929307460784912109375e-04 -4.684183068093261681497097015381e-07 -2.440222015138715505599975585938e-04 -3.632252919487655162811279296875e-04 -2.701802586670964956283569335938e-04 5.820817250423715449869632720947e-07 3.002247540280222892761230468750e-04 4.459300544112920761108398437500e-04 3.310049360152333974838256835938e-04 -7.132247219487908296287059783936e-07 -3.663357056211680173873901367188e-04 -5.430589080788195133209228515625e-04 -4.023323999717831611633300781250e-04 8.585698196839075535535812377930e-07 4.436054732650518417358398437500e-04 6.564245559275150299072265625000e-04 4.854636790696531534194946289062e-04 -1.025576693791663274168968200684e-06 -5.334140732884407043457031250000e-04 -7.880076300352811813354492187500e-04 -5.818302161060273647308349609375e-04 1.211358608088630717247724533081e-06 6.372306961566209793090820312500e-04 9.399292757734656333923339843750e-04 6.929562659934163093566894531250e-04 -1.417971020600816700607538223267e-06 -7.566526765003800392150878906250e-04 -1.114490674808621406555175781250e-03 -8.205043268389999866485595703125e-04 1.646494183660252019762992858887e-06 8.933997014537453651428222656250e-04 1.314167631790041923522949218750e-03 9.662528755143284797668457031250e-04 -1.892980662887566722929477691650e-06 -1.049328129738569259643554687500e-03 -1.541637815535068511962890625000e-03 -1.132139703258872032165527343750e-03 2.164540092053357511758804321289e-06 1.226440304890275001525878906250e-03 1.799797406420111656188964843750e-03 1.320248120464384555816650390625e-03 -2.455852609273279085755348205566e-06 -1.426918664947152137756347656250e-03 -2.091786125674843788146972656250e-03 -1.532848924398422241210937500000e-03 2.768712874967604875564575195312e-06 1.653129234910011291503906250000e-03 2.421031007543206214904785156250e-03 1.772418734617531299591064453125e-03 -3.101436504948651418089866638184e-06 -1.907665049657225608825683593750e-03 -2.791284583508968353271484375000e-03 -2.041677013039588928222656250000e-03 3.454601028352044522762298583984e-06 2.193381078541278839111328125000e-03 3.206692636013031005859375000000e-03 2.343633677810430526733398437500e-03 -3.824875875579891726374626159668e-06 -2.513452898710966110229492187500e-03 -3.671872429549694061279296875000e-03 -2.681649290025234222412109375000e-03 4.211697159917093813419342041016e-06 2.871439093723893165588378906250e-03 4.192016087472438812255859375000e-03 3.059512004256248474121093750000e-03 -4.612086740962695330381393432617e-06 -3.271382069215178489685058593750e-03 -4.773034248501062393188476562500e-03 -3.481548745185136795043945312500e-03 5.027570750826271250844001770020e-06 3.717921674251556396484375000000e-03 5.421737208962440490722656250000e-03 3.952759318053722381591796875000e-03 -5.450989647215465083718299865723e-06 -4.216460045427083969116210937500e-03 -6.146077066659927368164062500000e-03 -4.479005932807922363281250000000e-03 5.885431164642795920372009277344e-06 4.773376043885946273803710937500e-03 6.955488584935665130615234375000e-03 5.067266989499330520629882812500e-03 -6.324735295493155717849731445312e-06 -5.396318621933460235595703125000e-03 -7.861318066716194152832031250000e-03 -5.725971888750791549682617187500e-03 6.765933903807308524847030639648e-06 6.094611249864101409912109375000e-03 8.877459913492202758789062500000e-03 6.465481594204902648925781250000e-03 -7.205006113508716225624084472656e-06 -6.879803258925676345825195312500e-03 -1.002119760960340499877929687500e-02 -7.298741955310106277465820312500e-03 7.640202056791167706251144409180e-06 7.766464725136756896972656250000e-03 1.131443213671445846557617187500e-02 8.242234587669372558593750000000e-03 -8.067098860919941216707229614258e-06 -8.773315697908401489257812500000e-03 -1.278544031083583831787109375000e-02 -9.317340329289436340332031250000e-03 8.484441423206590116024017333984e-06 9.924899786710739135742187500000e-03 1.447149273008108139038085937500e-02 1.055239699780941009521484375000e-02 -8.887631338438950479030609130859e-06 -1.125411130487918853759765625000e-02 -1.642282679677009582519531250000e-02 -1.198583282530307769775390625000e-02 9.274732292396947741508483886719e-06 1.280613057315349578857421875000e-02 1.870891638100147247314453125000e-02 1.367115415632724761962890625000e-02 -9.640635653340723365545272827148e-06 -1.464479044079780578613281250000e-02 -2.142866887152194976806640625000e-02 -1.568515226244926452636718750000e-02 9.982368283090181648731231689453e-06 1.686330139636993408203125000000e-02 2.472785115242004394531250000000e-02 1.814210414886474609375000000000e-02 -1.029725262924330309033393859863e-05 -1.960327848792076110839843750000e-02 -2.883043140172958374023437500000e-02 -2.121967822313308715820312500000e-02 1.058201996784191578626632690430e-05 2.309069596230983734130859375000e-02 3.409885615110397338867187500000e-02 2.520976215600967407226562500000e-02 -1.083421739167533814907073974609e-05 -2.770930528640747070312500000000e-02 -4.116008803248405456542968750000e-02 -3.062732331454753875732421875000e-02 1.105142018786864355206489562988e-05 3.416684269905090332031250000000e-02 5.119963735342025756835937500000e-02 3.847297281026840209960937500000e-02 -1.123254332924261689186096191406e-05 -4.392713680863380432128906250000e-02 -6.675968319177627563476562500000e-02 -5.098024755716323852539062500000e-02 1.137523395300377160310745239258e-05 6.058492138981819152832031250000e-02 9.445263445377349853515625000000e-02 7.435557991266250610351562500000e-02 -1.147826151282060891389846801758e-05 -9.595435857772827148437500000000e-02 -1.585287749767303466796875000000e-01 -1.346701085567474365234375000000e-01 1.154056371888145804405212402344e-05 2.248655557632446289062500000000e-01 4.772557616233825683593750000000e-01 6.751551628112792968750000000000e-01 7.499884366989135742187500000000e-01 6.751551628112792968750000000000e-01 4.772557616233825683593750000000e-01 2.248655557632446289062500000000e-01 1.154056371888145804405212402344e-05 -1.346701085567474365234375000000e-01 -1.585287749767303466796875000000e-01 -9.595435857772827148437500000000e-02 -1.147826151282060891389846801758e-05 7.435557991266250610351562500000e-02 9.445263445377349853515625000000e-02 6.058492138981819152832031250000e-02 1.137523395300377160310745239258e-05 -5.098024755716323852539062500000e-02 -6.675968319177627563476562500000e-02 -4.392713680863380432128906250000e-02 -1.123254332924261689186096191406e-05 3.847297281026840209960937500000e-02 5.119963735342025756835937500000e-02 3.416684269905090332031250000000e-02 1.105142018786864355206489562988e-05 -3.062732331454753875732421875000e-02 -4.116008803248405456542968750000e-02 -2.770930528640747070312500000000e-02 -1.083421739167533814907073974609e-05 2.520976215600967407226562500000e-02 3.409885615110397338867187500000e-02 2.309069596230983734130859375000e-02 1.058201996784191578626632690430e-05 -2.121967822313308715820312500000e-02 -2.883043140172958374023437500000e-02 -1.960327848792076110839843750000e-02 -1.029725262924330309033393859863e-05 1.814210414886474609375000000000e-02 2.472785115242004394531250000000e-02 1.686330139636993408203125000000e-02 9.982368283090181648731231689453e-06 -1.568515226244926452636718750000e-02 -2.142866887152194976806640625000e-02 -1.464479044079780578613281250000e-02 -9.640635653340723365545272827148e-06 1.367115415632724761962890625000e-02 1.870891638100147247314453125000e-02 1.280613057315349578857421875000e-02 9.274732292396947741508483886719e-06 -1.198583282530307769775390625000e-02 -1.642282679677009582519531250000e-02 -1.125411130487918853759765625000e-02 -8.887631338438950479030609130859e-06 1.055239699780941009521484375000e-02 1.447149273008108139038085937500e-02 9.924899786710739135742187500000e-03 8.484441423206590116024017333984e-06 -9.317340329289436340332031250000e-03 -1.278544031083583831787109375000e-02 -8.773315697908401489257812500000e-03 -8.067098860919941216707229614258e-06 8.242234587669372558593750000000e-03 1.131443213671445846557617187500e-02 7.766464725136756896972656250000e-03 7.640202056791167706251144409180e-06 -7.298741955310106277465820312500e-03 -1.002119760960340499877929687500e-02 -6.879803258925676345825195312500e-03 -7.205006113508716225624084472656e-06 6.465481594204902648925781250000e-03 8.877459913492202758789062500000e-03 6.094611249864101409912109375000e-03 6.765933903807308524847030639648e-06 -5.725971888750791549682617187500e-03 -7.861318066716194152832031250000e-03 -5.396318621933460235595703125000e-03 -6.324735295493155717849731445312e-06 5.067266989499330520629882812500e-03 6.955488584935665130615234375000e-03 4.773376043885946273803710937500e-03 5.885431164642795920372009277344e-06 -4.479005932807922363281250000000e-03 -6.146077066659927368164062500000e-03 -4.216460045427083969116210937500e-03 -5.450989647215465083718299865723e-06 3.952759318053722381591796875000e-03 5.421737208962440490722656250000e-03 3.717921674251556396484375000000e-03 5.027570750826271250844001770020e-06 -3.481548745185136795043945312500e-03 -4.773034248501062393188476562500e-03 -3.271382069215178489685058593750e-03 -4.612086740962695330381393432617e-06 3.059512004256248474121093750000e-03 4.192016087472438812255859375000e-03 2.871439093723893165588378906250e-03 4.211697159917093813419342041016e-06 -2.681649290025234222412109375000e-03 -3.671872429549694061279296875000e-03 -2.513452898710966110229492187500e-03 -3.824875875579891726374626159668e-06 2.343633677810430526733398437500e-03 3.206692636013031005859375000000e-03 2.193381078541278839111328125000e-03 3.454601028352044522762298583984e-06 -2.041677013039588928222656250000e-03 -2.791284583508968353271484375000e-03 -1.907665049657225608825683593750e-03 -3.101436504948651418089866638184e-06 1.772418734617531299591064453125e-03 2.421031007543206214904785156250e-03 1.653129234910011291503906250000e-03 2.768712874967604875564575195312e-06 -1.532848924398422241210937500000e-03 -2.091786125674843788146972656250e-03 -1.426918664947152137756347656250e-03 -2.455852609273279085755348205566e-06 1.320248120464384555816650390625e-03 1.799797406420111656188964843750e-03 1.226440304890275001525878906250e-03 2.164540092053357511758804321289e-06 -1.132139703258872032165527343750e-03 -1.541637815535068511962890625000e-03 -1.049328129738569259643554687500e-03 -1.892980662887566722929477691650e-06 9.662528755143284797668457031250e-04 1.314167631790041923522949218750e-03 8.933997014537453651428222656250e-04 1.646494183660252019762992858887e-06 -8.205043268389999866485595703125e-04 -1.114490674808621406555175781250e-03 -7.566526765003800392150878906250e-04 -1.417971020600816700607538223267e-06 6.929562659934163093566894531250e-04 9.399292757734656333923339843750e-04 6.372306961566209793090820312500e-04 1.211358608088630717247724533081e-06 -5.818302161060273647308349609375e-04 -7.880076300352811813354492187500e-04 -5.334140732884407043457031250000e-04 -1.025576693791663274168968200684e-06 4.854636790696531534194946289062e-04 6.564245559275150299072265625000e-04 4.436054732650518417358398437500e-04 8.585698196839075535535812377930e-07 -4.023323999717831611633300781250e-04 -5.430589080788195133209228515625e-04 -3.663357056211680173873901367188e-04 -7.132247219487908296287059783936e-07 3.310049360152333974838256835938e-04 4.459300544112920761108398437500e-04 3.002247540280222892761230468750e-04 5.820817250423715449869632720947e-07 -2.701802586670964956283569335938e-04 -3.632252919487655162811279296875e-04 -2.440222015138715505599975585938e-04 -4.684183068093261681497097015381e-07 2.186386263929307460784912109375e-04 2.932634961325675249099731445312e-04 1.965562842087820172309875488281e-04 3.726551653926435392349958419800e-07 -1.752708340063691139221191406250e-04 -2.344976237509399652481079101562e-04 -1.567664585309103131294250488281e-04 -2.827729019827529555186629295349e-07 1.390514080412685871124267578125e-04 1.855253067333251237869262695312e-04 1.236759708262979984283447265625e-04 2.147368718397046905010938644409e-07 -1.090631703846156597137451171875e-04 -1.450558338547125458717346191406e-04 -9.637876792112365365028381347656e-05 -1.655688208757055690512061119080e-07 8.444502600468695163726806640625e-05 1.119191001635044813156127929688e-04 7.409376848954707384109497070312e-05 1.141239067692367825657129287720e-07 -6.444555765483528375625610351562e-05 -8.506537415087223052978515625000e-05 -5.607522325590252876281738281250e-05 -7.565300563783239340409636497498e-08 4.837068627239204943180084228516e-05 6.354766810545697808265686035156e-05 4.168938903603702783584594726562e-05 4.792014607346573029644787311554e-08 -3.561162156984210014343261718750e-05 -4.652918869396671652793884277344e-05 -3.034656037925742566585540771484e-05 -2.508528851308255980256944894791e-08 2.562648296589031815528869628906e-05 3.325694706290960311889648437500e-05 2.153749119315762072801589965820e-05 7.895547327052554464899003505707e-09 -1.793405863281805068254470825195e-05 -2.308210605406202375888824462891e-05 -1.481579420214984565973281860352e-05 2.967903256489989871624857187271e-09 1.212153438245877623558044433594e-05 1.543256257718894630670547485352e-05 9.791090633370913565158843994141e-06 -8.633795900436780357267707586288e-09 -7.814232958480715751647949218750e-06 -9.786171176529023796319961547852e-06 -6.047683655197033658623695373535e-06 2.284962192788952961564064025879e-07 5.341167252481682226061820983887e-06 7.552842362201772630214691162109e-06 8.552464350941590964794158935547e-06 -4.077852736372733488678932189941e-06 SPTK-3.9/bin/ds/lpfcoef.5to2dn0000644001051300105040000000142112442245037012713 000000000000001.499249265179969370365142822266e-06 1.322897500358521938323974609375e-03 -1.051198432833189144730567932129e-05 -1.055694743990898132324218750000e-02 3.620622374000959098339080810547e-05 4.527866095304489135742187500000e-02 -7.999139779713004827499389648438e-05 -1.481104493141174316406250000000e-01 1.251430512638762593269348144531e-04 6.120690703392028808593750000000e-01 9.998552799224853515625000000000e-01 6.120690703392028808593750000000e-01 1.251430512638762593269348144531e-04 -1.481104493141174316406250000000e-01 -7.999139779713004827499389648438e-05 4.527866095304489135742187500000e-02 3.620622374000959098339080810547e-05 -1.055694743990898132324218750000e-02 -1.051198432833189144730567932129e-05 1.322897500358521938323974609375e-03 1.499249265179969370365142822266e-06 SPTK-3.9/bin/ds/lpfcoef.5to2up0000644001051300105040000003522512442245037012747 000000000000006.387704161170404404401779174805e-07 -4.515240107139106839895248413086e-06 -1.761427711244323290884494781494e-06 1.567887125020206440240144729614e-06 2.980397539431578479707241058350e-06 6.879835368067688250448554754257e-09 -3.811486521954066120088100433350e-06 -2.654343234098632819950580596924e-06 2.953450575660099275410175323486e-06 5.345986210159026086330413818359e-06 1.151028428125755453947931528091e-08 -6.575725819857325404882431030273e-06 -4.504966000240528956055641174316e-06 4.942358373227762058377265930176e-06 8.818994501780252903699874877930e-06 1.628553292221113224513828754425e-08 -1.058403631759574636816978454590e-05 -7.165857368818251416087150573730e-06 7.783684850437566637992858886719e-06 1.374565908918157219886779785156e-05 2.209593930047049070708453655243e-08 -1.619560316612478345632553100586e-05 -1.087052078219130635261535644531e-05 1.171634266938781365752220153809e-05 2.052845411526504904031753540039e-05 3.072794996228367381263524293900e-08 -2.384798608545679599046707153320e-05 -1.589681596669834107160568237305e-05 1.703143971099052578210830688477e-05 2.965232670248951762914657592773e-05 3.850470875477185472846031188965e-08 -3.405303868930786848068237304688e-05 -2.257091909996233880519866943359e-05 2.406158273515757173299789428711e-05 4.167163933743722736835479736328e-05 5.185690454823088657576590776443e-08 -4.739915675600059330463409423828e-05 -3.126986848656088113784790039062e-05 3.319363531772978603839874267578e-05 5.723383583244867622852325439453e-05 6.301993948909512255340814590454e-08 -6.456874689320102334022521972656e-05 -4.242195427650585770606994628906e-05 4.486988109420053660869598388672e-05 7.706763426540419459342956542969e-05 8.270316698144597467035055160522e-08 -8.632958633825182914733886718750e-05 -5.651724859490059316158294677734e-05 5.958947440376505255699157714844e-05 1.020035997498780488967895507812e-04 1.009742121027557004708796739578e-07 -1.135523416451178491115570068359e-04 -7.410784746753051877021789550781e-05 7.791500684106722474098205566406e-05 1.329794467892497777938842773438e-04 1.219183332068496383726596832275e-07 -1.472080330131575465202331542969e-04 -9.580593177815899252891540527344e-05 1.004793230094946920871734619141e-04 1.710270444164052605628967285156e-04 1.478097857443572138436138629913e-07 -1.883846562122926115989685058594e-04 -1.222968421643599867820739746094e-04 1.279715652344748377799987792969e-04 2.172981912735849618911743164062e-04 1.754190037672742619179189205170e-07 -2.382776583544909954071044921875e-04 -1.543350081192329525947570800781e-04 1.611670741112902760505676269531e-04 2.730654086917638778686523437500e-04 2.067770026314974529668688774109e-07 -2.982087898999452590942382812500e-04 -1.927538687596097588539123535156e-04 2.009140735026448965072631835938e-04 3.397309919819235801696777343750e-04 2.421662941287650028243660926819e-07 -3.696343046613037586212158203125e-04 -2.384701074333861470222473144531e-04 2.481476112734526395797729492188e-04 4.188346210867166519165039062500e-04 2.806133636568119982257485389709e-07 -4.541548842098563909530639648438e-04 -2.924927975982427597045898437500e-04 3.038957656826823949813842773438e-04 5.120731657370924949645996093750e-04 3.224476472496462520211935043335e-07 -5.535341333597898483276367187500e-04 -3.559329488780349493026733398438e-04 3.692918398883193731307983398438e-04 6.213191663846373558044433593750e-04 3.679868143535713898018002510071e-07 -6.697245407849550247192382812500e-04 -4.300235596019774675369262695312e-04 4.455956222955137491226196289062e-04 7.486517424695193767547607421875e-04 4.172608214503270573914051055908e-07 -8.048978634178638458251953125000e-04 -5.161361768841743469238281250000e-04 5.342105869203805923461914062500e-04 8.963986183516681194305419921875e-04 4.685896897171915043145418167114e-07 -9.614944574423134326934814453125e-04 -6.158179603517055511474609375000e-04 6.367221940308809280395507812500e-04 1.067189034074544906616210937500e-03 5.229931048233993351459503173828e-07 -1.142287044785916805267333984375e-03 -7.308281492441892623901367187500e-04 7.549424190074205398559570312500e-04 1.264038146473467350006103515625e-03 5.800912958875414915382862091064e-07 -1.350475475192070007324218750000e-03 -8.632051176391541957855224609375e-04 8.909731986932456493377685546875e-04 1.490459078922867774963378906250e-03 6.385217830029432661831378936768e-07 -1.589813851751387119293212890625e-03 -1.015350804664194583892822265625e-03 1.047303550876677036285400390625e-03 1.750625437125563621520996093750e-03 6.986544462961319368332624435425e-07 -1.864799065515398979187011718750e-03 -1.190152368508279323577880859375e-03 1.226939610205590724945068359375e-03 2.049600705504417419433593750000e-03 7.600140747854311484843492507935e-07 -2.180937444791197776794433593750e-03 -1.391164027154445648193359375000e-03 1.433596014976501464843750000000e-03 2.393673406913876533508300781250e-03 8.212992383960227016359567642212e-07 -2.545135095715522766113281250000e-03 -1.622863812372088432312011718750e-03 1.671978388912975788116455078125e-03 2.790849423035979270935058593750e-03 8.825541613077803049236536026001e-07 -2.966274274513125419616699218750e-03 -1.891042920760810375213623046875e-03 1.948204590007662773132324218750e-03 3.251593792811036109924316406250e-03 9.427726581634487956762313842773e-07 -3.456095932051539421081542968750e-03 -2.203399781137704849243164062500e-03 2.270452678203582763671875000000e-03 3.789978567510843276977539062500e-03 1.001693249236268457025289535522e-06 -4.030573181807994842529296875000e-03 -2.570471027866005897521972656250e-03 2.649985719472169876098632812500e-03 4.425507038831710815429687500000e-03 1.057883650901203509420156478882e-06 -4.712135996669530868530273437500e-03 -3.007153980433940887451171875000e-03 3.102836431935429573059082031250e-03 5.186135880649089813232421875000e-03 1.111444930756988469511270523071e-06 -5.533411633223295211791992187500e-03 -3.535282798111438751220703125000e-03 3.652691841125488281250000000000e-03 6.113510578870773315429687500000e-03 1.161395630333572626113891601562e-06 -6.543845869600772857666015625000e-03 -4.188253544270992279052734375000e-03 4.336122423410415649414062500000e-03 7.272567134350538253784179687500e-03 1.206921410812356043606996536255e-06 -7.822175510227680206298828125000e-03 -5.019844043999910354614257812500e-03 5.212714895606040954589843750000e-03 8.770421147346496582031250000000e-03 1.247899604095437098294496536255e-06 -9.501787833869457244873046875000e-03 -6.122483406215906143188476562500e-03 6.386457942426204681396484375000e-03 1.079705636948347091674804687500e-02 1.283769734072848223149776458740e-06 -1.182778831571340560913085937500e-02 -7.669353857636451721191406250000e-03 8.056284859776496887207031250000e-03 1.372411288321018218994140625000e-02 1.313750772169441916048526763916e-06 -1.530414912849664688110351562500e-02 -1.002664398401975631713867187500e-02 1.065580453723669052124023437500e-02 1.838891394436359405517578125000e-02 1.337501771558891050517559051514e-06 -2.115616016089916229248046875000e-02 -1.412483584135770797729492187500e-02 1.534233801066875457763671875000e-02 2.715304493904113769531250000000e-02 1.354579353574081324040889739990e-06 -3.333434462547302246093750000000e-02 -2.322229556739330291748046875000e-02 2.658177167177200317382812500000e-02 5.025376379489898681640625000000e-02 1.364802074022009037435054779053e-06 -7.554759830236434936523437500000e-02 -6.230462342500686645507812500000e-02 9.350618720054626464843750000000e-02 3.026974201202392578125000000000e-01 4.000013768672943115234375000000e-01 3.026974201202392578125000000000e-01 9.350618720054626464843750000000e-02 -6.230462342500686645507812500000e-02 -7.554759830236434936523437500000e-02 1.364802074022009037435054779053e-06 5.025376379489898681640625000000e-02 2.658177167177200317382812500000e-02 -2.322229556739330291748046875000e-02 -3.333434462547302246093750000000e-02 1.354579353574081324040889739990e-06 2.715304493904113769531250000000e-02 1.534233801066875457763671875000e-02 -1.412483584135770797729492187500e-02 -2.115616016089916229248046875000e-02 1.337501771558891050517559051514e-06 1.838891394436359405517578125000e-02 1.065580453723669052124023437500e-02 -1.002664398401975631713867187500e-02 -1.530414912849664688110351562500e-02 1.313750772169441916048526763916e-06 1.372411288321018218994140625000e-02 8.056284859776496887207031250000e-03 -7.669353857636451721191406250000e-03 -1.182778831571340560913085937500e-02 1.283769734072848223149776458740e-06 1.079705636948347091674804687500e-02 6.386457942426204681396484375000e-03 -6.122483406215906143188476562500e-03 -9.501787833869457244873046875000e-03 1.247899604095437098294496536255e-06 8.770421147346496582031250000000e-03 5.212714895606040954589843750000e-03 -5.019844043999910354614257812500e-03 -7.822175510227680206298828125000e-03 1.206921410812356043606996536255e-06 7.272567134350538253784179687500e-03 4.336122423410415649414062500000e-03 -4.188253544270992279052734375000e-03 -6.543845869600772857666015625000e-03 1.161395630333572626113891601562e-06 6.113510578870773315429687500000e-03 3.652691841125488281250000000000e-03 -3.535282798111438751220703125000e-03 -5.533411633223295211791992187500e-03 1.111444930756988469511270523071e-06 5.186135880649089813232421875000e-03 3.102836431935429573059082031250e-03 -3.007153980433940887451171875000e-03 -4.712135996669530868530273437500e-03 1.057883650901203509420156478882e-06 4.425507038831710815429687500000e-03 2.649985719472169876098632812500e-03 -2.570471027866005897521972656250e-03 -4.030573181807994842529296875000e-03 1.001693249236268457025289535522e-06 3.789978567510843276977539062500e-03 2.270452678203582763671875000000e-03 -2.203399781137704849243164062500e-03 -3.456095932051539421081542968750e-03 9.427726581634487956762313842773e-07 3.251593792811036109924316406250e-03 1.948204590007662773132324218750e-03 -1.891042920760810375213623046875e-03 -2.966274274513125419616699218750e-03 8.825541613077803049236536026001e-07 2.790849423035979270935058593750e-03 1.671978388912975788116455078125e-03 -1.622863812372088432312011718750e-03 -2.545135095715522766113281250000e-03 8.212992383960227016359567642212e-07 2.393673406913876533508300781250e-03 1.433596014976501464843750000000e-03 -1.391164027154445648193359375000e-03 -2.180937444791197776794433593750e-03 7.600140747854311484843492507935e-07 2.049600705504417419433593750000e-03 1.226939610205590724945068359375e-03 -1.190152368508279323577880859375e-03 -1.864799065515398979187011718750e-03 6.986544462961319368332624435425e-07 1.750625437125563621520996093750e-03 1.047303550876677036285400390625e-03 -1.015350804664194583892822265625e-03 -1.589813851751387119293212890625e-03 6.385217830029432661831378936768e-07 1.490459078922867774963378906250e-03 8.909731986932456493377685546875e-04 -8.632051176391541957855224609375e-04 -1.350475475192070007324218750000e-03 5.800912958875414915382862091064e-07 1.264038146473467350006103515625e-03 7.549424190074205398559570312500e-04 -7.308281492441892623901367187500e-04 -1.142287044785916805267333984375e-03 5.229931048233993351459503173828e-07 1.067189034074544906616210937500e-03 6.367221940308809280395507812500e-04 -6.158179603517055511474609375000e-04 -9.614944574423134326934814453125e-04 4.685896897171915043145418167114e-07 8.963986183516681194305419921875e-04 5.342105869203805923461914062500e-04 -5.161361768841743469238281250000e-04 -8.048978634178638458251953125000e-04 4.172608214503270573914051055908e-07 7.486517424695193767547607421875e-04 4.455956222955137491226196289062e-04 -4.300235596019774675369262695312e-04 -6.697245407849550247192382812500e-04 3.679868143535713898018002510071e-07 6.213191663846373558044433593750e-04 3.692918398883193731307983398438e-04 -3.559329488780349493026733398438e-04 -5.535341333597898483276367187500e-04 3.224476472496462520211935043335e-07 5.120731657370924949645996093750e-04 3.038957656826823949813842773438e-04 -2.924927975982427597045898437500e-04 -4.541548842098563909530639648438e-04 2.806133636568119982257485389709e-07 4.188346210867166519165039062500e-04 2.481476112734526395797729492188e-04 -2.384701074333861470222473144531e-04 -3.696343046613037586212158203125e-04 2.421662941287650028243660926819e-07 3.397309919819235801696777343750e-04 2.009140735026448965072631835938e-04 -1.927538687596097588539123535156e-04 -2.982087898999452590942382812500e-04 2.067770026314974529668688774109e-07 2.730654086917638778686523437500e-04 1.611670741112902760505676269531e-04 -1.543350081192329525947570800781e-04 -2.382776583544909954071044921875e-04 1.754190037672742619179189205170e-07 2.172981912735849618911743164062e-04 1.279715652344748377799987792969e-04 -1.222968421643599867820739746094e-04 -1.883846562122926115989685058594e-04 1.478097857443572138436138629913e-07 1.710270444164052605628967285156e-04 1.004793230094946920871734619141e-04 -9.580593177815899252891540527344e-05 -1.472080330131575465202331542969e-04 1.219183332068496383726596832275e-07 1.329794467892497777938842773438e-04 7.791500684106722474098205566406e-05 -7.410784746753051877021789550781e-05 -1.135523416451178491115570068359e-04 1.009742121027557004708796739578e-07 1.020035997498780488967895507812e-04 5.958947440376505255699157714844e-05 -5.651724859490059316158294677734e-05 -8.632958633825182914733886718750e-05 8.270316698144597467035055160522e-08 7.706763426540419459342956542969e-05 4.486988109420053660869598388672e-05 -4.242195427650585770606994628906e-05 -6.456874689320102334022521972656e-05 6.301993948909512255340814590454e-08 5.723383583244867622852325439453e-05 3.319363531772978603839874267578e-05 -3.126986848656088113784790039062e-05 -4.739915675600059330463409423828e-05 5.185690454823088657576590776443e-08 4.167163933743722736835479736328e-05 2.406158273515757173299789428711e-05 -2.257091909996233880519866943359e-05 -3.405303868930786848068237304688e-05 3.850470875477185472846031188965e-08 2.965232670248951762914657592773e-05 1.703143971099052578210830688477e-05 -1.589681596669834107160568237305e-05 -2.384798608545679599046707153320e-05 3.072794996228367381263524293900e-08 2.052845411526504904031753540039e-05 1.171634266938781365752220153809e-05 -1.087052078219130635261535644531e-05 -1.619560316612478345632553100586e-05 2.209593930047049070708453655243e-08 1.374565908918157219886779785156e-05 7.783684850437566637992858886719e-06 -7.165857368818251416087150573730e-06 -1.058403631759574636816978454590e-05 1.628553292221113224513828754425e-08 8.818994501780252903699874877930e-06 4.942358373227762058377265930176e-06 -4.504966000240528956055641174316e-06 -6.575725819857325404882431030273e-06 1.151028428125755453947931528091e-08 5.345986210159026086330413818359e-06 2.953450575660099275410175323486e-06 -2.654343234098632819950580596924e-06 -3.811486521954066120088100433350e-06 6.879835368067688250448554754257e-09 2.980397539431578479707241058350e-06 1.567887125020206440240144729614e-06 -1.761427711244323290884494781494e-06 -4.515240107139106839895248413086e-06 6.387704161170404404401779174805e-07 SPTK-3.9/bin/ds/Makefile.in0000644001051300105040000004720112637167411012320 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = ds$(EXEEXT) subdir = bin/ds ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(dist_pkgdata_DATA) \ $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgdatadir)" PROGRAMS = $(bin_PROGRAMS) am_ds_OBJECTS = ds.$(OBJEXT) ds_OBJECTS = $(am_ds_OBJECTS) ds_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(ds_SOURCES) DIST_SOURCES = $(ds_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } DATA = $(dist_pkgdata_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include -DLIB=\"$(pkgdatadir)\" ds_SOURCES = ds.c ds_LDADD = @top_builddir@/lib/libSPTK.a dist_pkgdata_DATA = lpfcoef.2to1 \ lpfcoef.3to2 \ lpfcoef.4to3 \ lpfcoef.5to2dn \ lpfcoef.5to2up \ titech/lpfcoef.7to4 all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/ds/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/ds/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) ds$(EXEEXT): $(ds_OBJECTS) $(ds_DEPENDENCIES) $(EXTRA_ds_DEPENDENCIES) @rm -f ds$(EXEEXT) $(AM_V_CCLD)$(LINK) $(ds_OBJECTS) $(ds_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ds.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` install-dist_pkgdataDATA: $(dist_pkgdata_DATA) @$(NORMAL_INSTALL) @list='$(dist_pkgdata_DATA)'; test -n "$(pkgdatadir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgdatadir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgdatadir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgdatadir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgdatadir)" || exit $$?; \ done uninstall-dist_pkgdataDATA: @$(NORMAL_UNINSTALL) @list='$(dist_pkgdata_DATA)'; test -n "$(pkgdatadir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pkgdatadir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) $(DATA) installdirs: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgdatadir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dist_pkgdataDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-dist_pkgdataDATA .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dist_pkgdataDATA install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am uninstall-binPROGRAMS uninstall-dist_pkgdataDATA .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/ds/ds.c0000644001051300105040000003112312637156632011024 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * Sampling Rate Conversion (Down Sampling) * * * * 1994. 5 T.Kobayashi * * 1997. 2 G.Hirabayashi * * 1998. 6 M.Tamura * * * * usage: * * ds [ options ] [ infile ] > stdout * * options: * * -s s : conversion type [21] * * 21 down sampling by 2:1 * * 32 down sampling by 3:2 * * 43 down sampling by 4:3 * * 52 down sampling by 5:2 * * 54 down sampling by 5:4 * * 74 down sampling by 7:4 * * infile: * * data sequence (float) [stdin] * * stdout: * * converted data sequence (float) * * notice: * * Default LPF coefficients File * * 2:1 -> /usr/local/share/SPTK/lpfcoef.2to1 * * 3:2 -> /usr/local/share/SPTK/lpfcoef.3to2 * * 4:3 -> /usr/local/share/SPTK/lpfcoef.4to3 * * 5:2 -> /usr/local/share/SPTK/lpfcoef.5to2up * * 5:2 -> /usr/local/share/SPTK/lpfcoef.5to2dn * * 5:4 -> /usr/local/share/SPTK/lpfcoef.5to2up * * 5:4 -> /usr/local/share/SPTK/lpfcoef.5to2dn * * 7:4 -> /usr/local/share/SPTK/lpfcoef.7to4 * * * ************************************************************************/ static char *rcs_id = "$Id: ds.c,v 1.27 2015/12/14 01:14:13 uratec Exp $"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define DECRATE7_4 7 #define INTRATE7_4 4 #define DECRATE5 5 #define INTRATE5 2 #define DECRATE4_3 4 #define INTRATE4_3 3 #define DECRATE3_2 3 #define INTRATE3_2 2 #define DECRATE2_1 2 #define INTRATE2_1 1 #define RBSIZE 512 #define SIZE 256 #define STYPE 21 #ifndef LIB #define LIB "/usr/local/share/SPTK" #endif #define COEF2_1 LIB "/lpfcoef.2to1" #define COEF3_2 LIB "/lpfcoef.3to2" #define COEF4_3 LIB "/lpfcoef.4to3" #define COEF5UP LIB "/lpfcoef.5to2up" #define COEF5DN LIB "/lpfcoef.5to2dn" #define COEF7_4 LIB "/lpfcoef.7to4" #define mod(x) ((x) & (RBSIZE -1)) static char *cmnd, *coef, *coef1; static int start = -1, intrate, decrate, type = STYPE; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - sampling rate conversion (down sampling)\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -s s : conversion type [%d]\n", STYPE); fprintf(stderr, " 21 down sampling by 2:1\n"); fprintf(stderr, " 32 down sampling by 3:2\n"); fprintf(stderr, " 43 down sampling by 4:3\n"); fprintf(stderr, " 52 down sampling by 5:2\n"); fprintf(stderr, " 54 down sampling by 5:4\n"); fprintf(stderr, " 74 down sampling by 7:4\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " data sequence (%s) [stdin]\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " converted data sequence (%s)\n", FORMAT); fprintf(stderr, " notice:\n"); fprintf(stderr, " Default LPF coefficients File\n"); fprintf(stderr, " 2:1 -> %s\n", COEF2_1); fprintf(stderr, " 3:2 -> %s\n", COEF3_2); fprintf(stderr, " 4:3 -> %s\n", COEF4_3); fprintf(stderr, " 5:2 -> %s\n", COEF5UP); fprintf(stderr, " 5:2 -> %s\n", COEF5DN); fprintf(stderr, " 5:4 -> %s\n", COEF5UP); fprintf(stderr, " 5:4 -> %s\n", COEF5DN); fprintf(stderr, " 7:4 -> %s\n", COEF7_4); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char *argv[]) { FILE *fp = stdin; void decimate(FILE * fp); if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) if (*(*++argv) == '-') { switch (*(*argv + 1)) { case 's': type = atoi(*++argv); --argc; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else fp = getfp(*argv, "rb"); switch (type) { case 21: coef = COEF2_1; decrate = DECRATE2_1; intrate = INTRATE2_1; break; case 32: coef = COEF3_2; decrate = DECRATE3_2; intrate = INTRATE3_2; break; case 43: coef = COEF4_3; decrate = DECRATE4_3; intrate = INTRATE4_3; break; case 52: case 54: coef = COEF5DN; coef1 = COEF5UP; decrate = DECRATE5; intrate = INTRATE5; break; case 74: coef = COEF7_4; decrate = DECRATE7_4; intrate = INTRATE7_4; break; default: fprintf(stderr, "%s : Given dec/int rate %d is not supported!\n", cmnd, type); return (1); } decimate(fp); fclose(fp); return 0; } void decimate(FILE * fp) { int is_cont, i, k, nread, count, nwr, delay; double x[SIZE], y[SIZE]; void firin(double in); void firin0(void); double firout(int os); void firinit(void); firinit(); delay = start; for (count = is_cont = 1; is_cont;) { if ((nread = freadf(x, sizeof(*x), SIZE, fp)) == 0) { is_cont = 0; nread = (decrate * start) / intrate; if (type == 54) nread /= 2; for (k = 0; k < nread; k++) x[k] = 0; } for (nwr = k = 0; k < nread; k++) { firin(x[k]); for (i = 0; i < intrate; i++) { if (--count == 0) { y[nwr++] = firout(i); count = decrate; } } if (type == 54) { firin0(); for (i = 0; i < intrate; i++) { if (--count == 0) { y[nwr++] = firout(i); count = decrate; } } } } if (delay) { if (nwr > delay) { nwr -= delay; if (fwritef(y + delay, sizeof(*y), nwr, stdout) != nwr) { fprintf(stderr, "%s : File write error!\n", cmnd); exit(1); } delay = 0; } else { delay -= nwr; } } else { if (fwritef(y, sizeof(*y), nwr, stdout) != nwr) { fprintf(stderr, "%s : File write error!\n", cmnd); exit(1); } } } } static double rb[RBSIZE], rb2[RBSIZE], hdn[RBSIZE + 1], hup[RBSIZE + 1]; static int flengdn = -1, flengup = -1, indx = 0, indx2 = 0; void firin(double in) { double out; int k, l; indx = mod(indx - 1); switch (type) { case 52: rb2[indx] = in; out = 0; for (k = 0, l = indx; k <= flengup; k++, l = mod(l + 1)) out += rb2[l] * hup[k]; rb[indx] = out; break; case 54: indx2 = mod(indx2 - 1); rb2[indx2] = 2 * in; out = 0; for (k = 0, l = indx2; k <= flengup; k += intrate, l = mod(l + 1)) out += rb2[l] * hup[k]; rb[indx] = out; break; default: rb[indx] = in; } } void firin0(void) { double out; int k, l; out = 0; for (k = 1, l = indx2; k <= flengup; k += intrate, l = mod(l + 1)) out += rb2[l] * hup[k]; indx = mod(indx - 1); rb[indx] = out; } double firout(int os) { double out; int k, l; out = 0; for (k = os, l = indx; k <= flengdn; k += intrate, l = mod(l + 1)) out += rb[l] * hdn[k]; return (out); } void firinit(void) { FILE *fp; fp = getfp(coef, "rt"); flengdn = freada(hdn, RBSIZE + 1, fp); fclose(fp); if (--flengdn < 0) { fprintf(stderr, "%s : Cannot read filter coefficients!\n", cmnd); exit(1); } if (type == 52 || type == 54) { fp = getfp(coef1, "rt"); flengup = freada(hup, RBSIZE + 1, fp); fclose(fp); if (--flengup < 0) { fprintf(stderr, "%s : Cannot read filter coefficients!\n", cmnd); exit(1); } start = (((flengup / 2) * intrate) + (flengdn / 2)) / decrate; } else start = flengdn / (2 * decrate); } SPTK-3.9/bin/pitch/0000755001051300105040000000000012637167712011034 500000000000000SPTK-3.9/bin/pitch/snack/0000755001051300105040000000000012637167712012133 500000000000000SPTK-3.9/bin/pitch/snack/COPYING0000644001051300105040000001065212637165714013112 00000000000000 Copyright (C) 2000-2005 Jonas Beskow and Kre Sjlander The following terms apply to all files associated with the software unless explicitly disclaimed in individual files. The authors hereby grant permission to use, copy, modify, distribute, and license this software and its documentation for any purpose, provided that existing copyright notices are retained in all copies and that this notice is included verbatim in any distributions. No written agreement, license, or royalty fee is required for any of the authorized uses. Modifications to this software may be copyrighted by their authors and need not follow the licensing terms described here, provided that the new terms are clearly indicated on the first page of each file where they apply. IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. /* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ SPTK-3.9/bin/pitch/snack/jkGetF0.c0000644001051300105040000020145512633453603013451 00000000000000/* * This software has been licensed to the Centre of Speech Technology, KTH * by Microsoft Corp. with the terms in the accompanying file BSD.txt, * which is a BSD style license. * * "Copyright (c) 1990-1996 Entropic Research Laboratory, Inc. * All rights reserved" * * Written by: Derek Lin * Checked by: * Revised by: David Talkin * * Brief description: Estimates F0 using normalized cross correlation and * dynamic programming. * */ /* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /**************************************************************** $Id: jkGetF0.c,v 1.15 2015/12/14 05:45:39 uratec Exp $ *****************************************************************/ #if 0 #include "snack.h" #endif /* 0 */ #include #include #include #include #include #ifndef TRUE # define TRUE 1 # define FALSE 0 #endif #ifndef FLT_MAX #if 0 # define FLT_MAX (3.40282347E+38f) #else # define FLT_MAX (3.40282346E+38f) #endif #endif #ifndef M_PI # define M_PI (3.1415926536f) #endif #include "jkGetF0.h" int debug_level = 0; void free_dp_f0(); #if 0 #else static int check_f0_params(); typedef struct _float_list { float f; struct _float_list *next; } float_list; #endif /* 0 */ #if 0 int Get_f0(Sound *sound, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { float *fdata; int done; long buff_size, actsize; double sf, start_time; F0_params *par, *read_f0_params(); float *f0p, *vuvp, *rms_speech, *acpkp; int i, vecsize; int init_dp_f0(), dp_f0(); static int framestep = -1; long sdstep = 0, total_samps; int ndone = 0; Tcl_Obj *list; double framestep2 = 0.0, wind_dur; int arg, startpos = 0, endpos = -1, fmax, fmin; static CONST84 char *subOptionStrings[] = { "-start", "-end", "-maxpitch", "-minpitch", "-progress", "-framelength", "-method", "-windowlength", NULL }; enum subOptions { START, END, F0MAX, F0MIN, PROGRESS, FRAME, METHOD, WINLEN }; if (sound->cmdPtr != NULL) { Tcl_DecrRefCount(sound->cmdPtr); sound->cmdPtr = NULL; } par = (F0_params *) ckalloc(sizeof(F0_params)); par->cand_thresh = 0.3f; par->lag_weight = 0.3f; par->freq_weight = 0.02f; par->trans_cost = 0.005f; par->trans_amp = 0.5f; par->trans_spec = 0.5f; par->voice_bias = 0.0f; par->double_cost = 0.35f; par->min_f0 = 50; par->max_f0 = 550; par->frame_step = 0.01f; par->wind_dur = 0.0075f; par->n_cands = 20; par->mean_f0 = 200; /* unused */ par->mean_f0_weight = 0.0f; /* unused */ par->conditioning = 0; /*unused */ for (arg = 2; arg < objc; arg += 2) { int index; if (Tcl_GetIndexFromObj(interp, objv[arg], subOptionStrings, "option", 0, &index) != TCL_OK) { return TCL_ERROR; } if (arg + 1 == objc) { Tcl_AppendResult(interp, "No argument given for ", subOptionStrings[index], " option", (char *) NULL); return TCL_ERROR; } switch ((enum subOptions) index) { case START: { if (Tcl_GetIntFromObj(interp, objv[arg+1], &startpos) != TCL_OK) return TCL_ERROR; break; } case END: { if (Tcl_GetIntFromObj(interp, objv[arg+1], &endpos) != TCL_OK) return TCL_ERROR; break; } case F0MAX: { if (Tcl_GetIntFromObj(interp, objv[arg+1], &fmax) != TCL_OK) return TCL_ERROR; par->max_f0 = (float) fmax; break; } case F0MIN: { if (Tcl_GetIntFromObj(interp, objv[arg+1], &fmin) != TCL_OK) return TCL_ERROR; par->min_f0 = (float) fmin; break; } case PROGRESS: { char *str = Tcl_GetStringFromObj(objv[arg+1], NULL); if (strlen(str) > 0) { Tcl_IncrRefCount(objv[arg+1]); sound->cmdPtr = objv[arg+1]; } break; } case FRAME: { if (Tcl_GetDoubleFromObj(interp, objv[arg+1], &framestep2) != TCL_OK) return TCL_ERROR; par->frame_step = (float) framestep2; break; } case METHOD: { break; } case WINLEN: { if (Tcl_GetDoubleFromObj(interp, objv[arg+1], &wind_dur) != TCL_OK) return TCL_ERROR; par->wind_dur = (float) wind_dur; break; } } } if (startpos < 0) startpos = 0; if (endpos >= (sound->length - 1) || endpos == -1) endpos = sound->length - 1; if (startpos > endpos) return TCL_OK; sf = (double) sound->samprate; if (framestep > 0) /* If a value was specified with -S, use it. */ par->frame_step = (float) (framestep / sf); start_time = 0.0f; if(check_f0_params(interp, par, sf)){ Tcl_AppendResult(interp, "invalid/inconsistent parameters -- exiting.", NULL); return TCL_ERROR; } total_samps = endpos - startpos + 1; if(total_samps < ((par->frame_step * 2.0) + par->wind_dur) * sf) { Tcl_AppendResult(interp, "input range too small for analysis by get_f0.", NULL); return TCL_ERROR; } /* Initialize variables in get_f0.c; allocate data structures; * determine length and overlap of input frames to read. */ if (init_dp_f0(sf, par, &buff_size, &sdstep) || buff_size > INT_MAX || sdstep > INT_MAX) { Tcl_AppendResult(interp, "problem in init_dp_f0().", NULL); return TCL_ERROR; } if (debug_level) Fprintf(stderr, "init_dp_f0 returned buff_size %ld, sdstep %ld.\n",buff_size, sdstep); if (buff_size > total_samps) buff_size = total_samps; actsize = min(buff_size, sound->length); fdata = (float *) ckalloc(sizeof(float) * max(buff_size, sdstep)); list = Tcl_NewListObj(0, NULL); Snack_ProgressCallback(sound->cmdPtr, interp, "Computing pitch", 0.0); ndone = startpos; while (TRUE) { done = (actsize < buff_size) || (total_samps == buff_size); Snack_GetSoundData(sound, ndone, fdata, actsize); /*if (sound->debug > 0) Snack_WriteLog("dp_f0...\n");*/ if (dp_f0(fdata, (int) actsize, (int) sdstep, sf, par, &f0p, &vuvp, &rms_speech, &acpkp, &vecsize, done)) { Tcl_AppendResult(interp, "problem in dp_f0().", NULL); return TCL_ERROR; } /*if (sound->debug > 0) Snack_WriteLogInt("done dp_f0",vecsize);*/ for (i = vecsize - 1; i >= 0; i--) { Tcl_Obj *frameList; frameList = Tcl_NewListObj(0, NULL); Tcl_ListObjAppendElement(interp, list, frameList); Tcl_ListObjAppendElement(interp, frameList, Tcl_NewDoubleObj((double)f0p[i])); Tcl_ListObjAppendElement(interp, frameList, Tcl_NewDoubleObj((double)vuvp[i])); Tcl_ListObjAppendElement(interp, frameList, Tcl_NewDoubleObj((double)rms_speech[i])); Tcl_ListObjAppendElement(interp, frameList, Tcl_NewDoubleObj((double)acpkp[i])); } if (done) break; ndone += sdstep; actsize = min(buff_size, sound->length - ndone); total_samps -= sdstep; if (actsize > total_samps) actsize = total_samps; if (1) { int res = Snack_ProgressCallback(sound->cmdPtr, interp, "Computing pitch", (double) ndone / sound->length); if (res != TCL_OK) { return TCL_ERROR; } } } Snack_ProgressCallback(sound->cmdPtr, interp, "Computing pitch", 1.0); ckfree((void *)fdata); ckfree((void *)par); free_dp_f0(); Tcl_SetObjResult(interp, list); return TCL_OK; } #endif /* * Some consistency checks on parameter values. * Return a positive integer if any errors detected, 0 if none. */ #if 0 static int check_f0_params(Tcl_Interp *interp, F0_params *par, double sample_freq) #else static int check_f0_params(F0_params *par, double sample_freq) #endif /* 0 */ { int error = 0; double dstep; #if 0 if((par->cand_thresh < 0.01) || (par->cand_thresh > 0.99)) { Tcl_AppendResult(interp, "ERROR: cand_thresh parameter must be between [0.01, 0.99].",NULL); error++; } if((par->wind_dur > .1) || (par->wind_dur < .0001)) { Tcl_AppendResult(interp,"ERROR: wind_dur parameter must be between [0.0001, 0.1].",NULL); error++; } if((par->n_cands > 100) || (par->n_cands < 3)){ Tcl_AppendResult(interp, "ERROR: n_cands parameter must be between [3,100].",NULL); error++; } #endif /* 0 */ if((par->max_f0 <= par->min_f0) || (par->max_f0 >= (sample_freq/2.0)) || (par->min_f0 < (sample_freq/10000.0))){ #if 0 Tcl_AppendResult(interp, "ERROR: min(max)_f0 parameter inconsistent with sampling frequency.",NULL); #else fprintf(stderr, "ERROR: min(max)_f0 parameter inconsistent with sampling frequency.\n"); #endif /* 0 */ error++; } dstep = ((double)((int)(0.5 + (sample_freq * par->frame_step))))/sample_freq; if(dstep != par->frame_step) { #if 0 if(debug_level) Tcl_AppendResult(interp, "Frame step set to exactly match signal sample rate.",NULL); #endif /* 0 */ par->frame_step = (float) dstep; } if((par->frame_step > 0.1) || (par->frame_step < (1.0/sample_freq))){ #if 0 Tcl_AppendResult(interp, "ERROR: frame_step parameter must be between [1/sampling rate, 0.1].",NULL); #else fprintf(stderr, "ERROR: frame_step parameter must be between [1/sampling rate, 0.1].\n"); #endif /* 0 */ error++; } return(error); } static void get_cand(), peak(), do_ffir(); static int lc_lin_fir(), downsamp(); /* ----------------------------------------------------------------------- */ void get_fast_cands(fdata, fdsdata, ind, step, size, dec, start, nlags, engref, maxloc, maxval, cp, peaks, locs, ncand, par) float *fdata, *fdsdata, *engref, *maxval, *peaks; int size, start, nlags, *maxloc, *locs, *ncand, ind, step, dec; Cross *cp; F0_params *par; { int decind, decstart, decnlags, decsize, i, j, *lp; float *corp, xp, yp, lag_wt; register float *pe; lag_wt = par->lag_weight/nlags; decnlags = 1 + (nlags/dec); if((decstart = start/dec) < 1) decstart = 1; decind = (ind * step)/dec; decsize = 1 + (size/dec); corp = cp->correl; crossf(fdsdata + decind, decsize, decstart, decnlags, engref, maxloc, maxval, corp); cp->maxloc = *maxloc; /* location of maximum in correlation */ cp->maxval = *maxval; /* max. correlation value (found at maxloc) */ cp->rms = (float) sqrt(*engref/size); /* rms in reference window */ cp->firstlag = decstart; get_cand(cp,peaks,locs,decnlags,ncand,par->cand_thresh); /* return high peaks in xcorr */ /* Interpolate to estimate peak locations and values at high sample rate. */ for(i = *ncand, lp = locs, pe = peaks; i--; pe++, lp++) { j = *lp - decstart - 1; peak(&corp[j],&xp,&yp); *lp = (*lp * dec) + (int)(0.5+(xp*dec)); /* refined lag */ *pe = yp*(1.0f - (lag_wt* *lp)); /* refined amplitude */ } if(*ncand >= par->n_cands) { /* need to prune candidates? */ register int *loc, *locm, lt; register float smaxval, *pem; register int outer, inner, lim; for(outer=0, lim = par->n_cands-1; outer < lim; outer++) for(inner = *ncand - 1 - outer, pe = peaks + (*ncand) -1, pem = pe-1, loc = locs + (*ncand) - 1, locm = loc-1; inner--; pe--,pem--,loc--,locm--) if((smaxval = *pe) > *pem) { *pe = *pem; *pem = smaxval; lt = *loc; *loc = *locm; *locm = lt; } *ncand = par->n_cands-1; /* leave room for the unvoiced hypothesis */ } crossfi(fdata + (ind * step), size, start, nlags, 7, engref, maxloc, maxval, corp, locs, *ncand); cp->maxloc = *maxloc; /* location of maximum in correlation */ cp->maxval = *maxval; /* max. correlation value (found at maxloc) */ cp->rms = (float) sqrt(*engref/size); /* rms in reference window */ cp->firstlag = start; get_cand(cp,peaks,locs,nlags,ncand,par->cand_thresh); /* return high peaks in xcorr */ if(*ncand >= par->n_cands) { /* need to prune candidates again? */ register int *loc, *locm, lt; register float smaxval, *pe, *pem; register int outer, inner, lim; for(outer=0, lim = par->n_cands-1; outer < lim; outer++) for(inner = *ncand - 1 - outer, pe = peaks + (*ncand) -1, pem = pe-1, loc = locs + (*ncand) - 1, locm = loc-1; inner--; pe--,pem--,loc--,locm--) if((smaxval = *pe) > *pem) { *pe = *pem; *pem = smaxval; lt = *loc; *loc = *locm; *locm = lt; } *ncand = par->n_cands - 1; /* leave room for the unvoiced hypothesis */ } } /* ----------------------------------------------------------------------- */ float *downsample(input,samsin,state_idx,freq,samsout,decimate, first_time, last_time) double freq; float *input; int samsin, *samsout, decimate, state_idx, first_time, last_time; { static float b[2048]; static float *foutput = NULL; float beta = 0.0f; static int ncoeff = 127, ncoefft = 0; int init; if(input && (samsin > 0) && (decimate > 0) && *samsout) { if(decimate == 1) { return(input); } if(first_time){ int nbuff = (samsin/decimate) + (2*ncoeff); ncoeff = ((int)(freq * .005)) | 1; beta = .5f/decimate; #if 0 foutput = (float*)ckrealloc((void *)foutput, sizeof(float) * nbuff); /* spsassert(foutput, "Can't allocate foutput in downsample");*/ #else foutput = (float *) realloc((void *) foutput, sizeof(float) * nbuff); #endif for( ; nbuff > 0 ;) foutput[--nbuff] = 0.0; if( !lc_lin_fir(beta,&ncoeff,b)) { fprintf(stderr,"\nProblems computing interpolation filter\n"); #if 0 ckfree((void *)foutput); #else free((void *) foutput); #endif /* 0 */ return(NULL); } ncoefft = (ncoeff/2) + 1; } /* endif new coefficients need to be computed */ if(first_time) init = 1; else if (last_time) init = 2; else init = 0; if(downsamp(input,foutput,samsin,samsout,state_idx,decimate,ncoefft,b,init)) { return(foutput); } else Fprintf(stderr,"Problems in downsamp() in downsample()\n"); #if 0 /* skip final frame if it is too small */ } else Fprintf(stderr,"Bad parameters passed to downsample()\n"); #else } #endif return(NULL); } /* ----------------------------------------------------------------------- */ /* Get likely candidates for F0 peaks. */ static void get_cand(cross,peak,loc,nlags,ncand,cand_thresh) Cross *cross; float *peak, cand_thresh; int *loc; int *ncand, nlags; { register int i, lastl, *t; register float o, p, q, *r, *s, clip; int start, ncan, maxl; clip = (float) (cand_thresh * cross->maxval); maxl = cross->maxloc; lastl = nlags - 2; start = cross->firstlag; r = cross->correl; o= *r++; /* first point */ q = *r++; /* middle point */ p = *r++; s = peak; t = loc; ncan=0; for(i=1; i < lastl; i++, o=q, q=p, p= *r++){ if((q > clip) && /* is this a high enough value? */ (q >= p) && (q >= o)){ /* NOTE: this finds SHOLDERS and PLATEAUS as well as peaks (is this a good idea?) */ *s++ = q; /* record the peak value */ *t++ = i + start; /* and its location */ ncan++; /* count number of peaks found */ } } /* o = q; q = p; if( (q > clip) && (q >=0)){ *s++ = q; *t++ = i+start; ncan++; } */ *ncand = ncan; } /* ----------------------------------------------------------------------- */ /* buffer-to-buffer downsample operation */ /* This is STRICTLY a decimator! (no upsample) */ static int downsamp(in, out, samples, outsamps, state_idx, decimate, ncoef, fc, init) float *in, *out; int samples, *outsamps, decimate, ncoef, state_idx; float fc[]; int init; { if(in && out) { do_ffir(in, samples, out, outsamps, state_idx, ncoef, fc, 0, decimate, init); return(TRUE); } else printf("Bad signal(s) passed to downsamp()\n"); return(FALSE); } /* ---------------------------------------------------------- */ static void do_ffir(buf,in_samps,bufo,out_samps,idx, ncoef,fc,invert,skip,init) /* fc contains 1/2 the coefficients of a symmetric FIR filter with unity passband gain. This filter is convolved with the signal in buf. The output is placed in buf2. If(invert), the filter magnitude response will be inverted. If(init&1), beginning of signal is in buf; if(init&2), end of signal is in buf. out_samps is set to the number of output points placed in bufo. */ register float *buf, *bufo; float *fc; register int in_samps, ncoef, invert, skip, init, *out_samps; int idx; { register float *dp1, *dp2, *dp3, sum, integral; static float *co=NULL, *mem=NULL; static float state[1000]; static int fsize=0, resid=0; register int i, j, k, l; register float *sp; register float *buf1; buf1 = buf; if(ncoef > fsize) {/*allocate memory for full coeff. array and filter memory */ fsize = 0; i = (ncoef+1)*2; #if 0 if(!((co = (float *)ckrealloc((void *)co, sizeof(float)*i)) && (mem = (float *)ckrealloc((void *)mem, sizeof(float)*i)))) { #else if (!((co = (float *) realloc((void *) co, sizeof(float) * i)) && (mem = (float *) realloc((void *) mem, sizeof(float) * i)))) { #endif /* 0 */ fprintf(stderr,"allocation problems in do_fir()\n"); return; } fsize = ncoef; } /* fill 2nd half with data */ for(i=ncoef, dp1=mem+ncoef-1; i-- > 0; ) *dp1++ = *buf++; if(init & 1) { /* Is the beginning of the signal in buf? */ /* Copy the half-filter and its mirror image into the coefficient array. */ for(i=ncoef-1, dp3=fc+ncoef-1, dp2=co, dp1 = co+((ncoef-1)*2), integral = 0.0; i-- > 0; ) if(!invert) *dp1-- = *dp2++ = *dp3--; else { integral += (sum = *dp3--); *dp1-- = *dp2++ = -sum; } if(!invert) *dp1 = *dp3; /* point of symmetry */ else { integral *= 2; integral += *dp3; *dp1 = integral - *dp3; } for(i=ncoef-1, dp1=mem; i-- > 0; ) *dp1++ = 0; } else for(i=ncoef-1, dp1=mem, sp=state; i-- > 0; ) *dp1++ = *sp++; i = in_samps; resid = 0; k = (ncoef << 1) -1; /* inner-product loop limit */ if(skip <= 1) { /* never used */ /* *out_samps = i; for( ; i-- > 0; ) { for(j=k, dp1=mem, dp2=co, dp3=mem+1, sum = 0.0; j-- > 0; *dp1++ = *dp3++ ) sum += *dp2++ * *dp1; *--dp1 = *buf++; *bufo++ = (sum < 0.0)? sum -0.5 : sum +0.5; } if(init & 2) { for(i=ncoef; i-- > 0; ) { for(j=k, dp1=mem, dp2=co, dp3=mem+1, sum = 0.0; j-- > 0; *dp1++ = *dp3++ ) sum += *dp2++ * *dp1; *--dp1 = 0.0; *bufo++ = (sum < 0)? sum -0.5 : sum +0.5; } *out_samps += ncoef; } return; */ } else { /* skip points (e.g. for downsampling) */ /* the buffer end is padded with (ncoef-1) data points */ for( l=0 ; l < *out_samps; l++ ) { for(j=k-skip, dp1=mem, dp2=co, dp3=mem+skip, sum=0.0; j-- >0; *dp1++ = *dp3++) sum += *dp2++ * *dp1; for(j=skip; j-- >0; *dp1++ = *buf++) /* new data to memory */ sum += *dp2++ * *dp1; *bufo++ = (sum<0.0) ? sum -0.5f : sum +0.5f; } if(init & 2){ resid = in_samps - *out_samps * skip; for(l=resid/skip; l-- >0; ){ for(j=k-skip, dp1=mem, dp2=co, dp3=mem+skip, sum=0.0; j-- >0; *dp1++ = *dp3++) sum += *dp2++ * *dp1; for(j=skip; j-- >0; *dp1++ = 0.0) sum += *dp2++ * *dp1; *bufo++ = (sum<0.0) ? sum -0.5f : sum +0.5f; (*out_samps)++; } } else for(dp3=buf1+idx-ncoef+1, l=ncoef-1, sp=state; l-- >0; ) *sp++ = *dp3++; } } /* ---------------------------------------------------------- */ static int lc_lin_fir(fc,nf,coef) /* create the coefficients for a symmetric FIR lowpass filter using the window technique with a Hanning window. */ register float fc; float *coef; int *nf; { register int i, n; register double twopi, fn, c; if(((*nf % 2) != 1)) *nf = *nf + 1; n = (*nf + 1)/2; /* Compute part of the ideal impulse response (the sin(x)/x kernel). */ twopi = M_PI * 2.0; coef[0] = (float) (2.0 * fc); c = M_PI; fn = twopi * fc; for(i=1;i < n; i++) coef[i] = (float)(sin(i * fn)/(c * i)); /* Now apply a Hanning window to the (infinite) impulse response. */ /* (Probably should use a better window, like Kaiser...) */ fn = twopi/(double)(*nf); for(i=0;i .000001) { *xp = c = (float)((y[0]-y[2])/(4.0*a)); *yp = y[1] - (a*c*c); } else { *xp = 0.0; *yp = y[1]; } } /* A fundamental frequency estimation algorithm using the normalized cross correlation function and dynamic programming. The algorithm implemented here is similar to that presented by B. Secrest and G. Doddington, "An integrated pitch tracking algorithm for speech systems", Proc. ICASSP-83, pp.1352-1355. It is fully described by D. Talkin, "A robust algorithm for ptich tracking (RAPT)", in W. B. Kleijn & K. K. Paliwal (eds.) Speech Coding and Synthesis, (New York: Elsevier, 1995). */ /* For each frame, up to par->n_cands cross correlation peaks are considered as F0 intervals. Each is scored according to its within- frame properties (relative amplitude, relative location), and according to its connectivity with each of the candidates in the previous frame. An unvoiced hypothesis is also generated at each frame and is considered in the light of voicing state change cost, the quality of the cross correlation peak, and frequency continuity. */ /* At each frame, each candidate has associated with it the following items: its peak value its peak value modified by its within-frame properties its location the candidate # in the previous frame yielding the min. err. (this is the optimum path pointer!) its cumulative cost: (local cost + connectivity cost + cumulative cost of its best-previous-frame-match). */ /* Dynamic programming is then used to pick the best F0 trajectory and voicing state given the local and transition costs for the entire utterance. */ /* To avoid the necessity of computing the full crosscorrelation at the input sample rate, the signal is downsampled; a full ccf is computed at the lower frequency; interpolation is used to estimate the location of the peaks at the higher sample rate; and the fine-grained ccf is computed only in the vicinity of these estimated peak locations. */ /* * READ_SIZE: length of input data frame in sec to read * DP_CIRCULAR: determines the initial size of DP circular buffer in sec * DP_HIST: stored frame history in second before checking for common path * DP_CIRCULAR > READ_SIZE, DP_CIRCULAR at least 2 times of DP_HIST * DP_LIMIT: in case no convergence is found, DP frames of DP_LIMIT secs * are kept before output is forced by simply picking the lowest cost * path */ #define READ_SIZE 0.2 #define DP_CIRCULAR 1.5 #define DP_HIST 0.5 #define DP_LIMIT 1.0 /* * stationarity parameters - * STAT_WSIZE: window size in sec used in measuring frame energy/stationarity * STAT_AINT: analysis interval in sec in measuring frame energy/stationarity */ #define STAT_WSIZE 0.030 #define STAT_AINT 0.020 /* * headF points to current frame in the circular buffer, * tailF points to the frame where tracks start * cmpthF points to starting frame of converged path to backtrack */ static Frame *headF = NULL, *tailF = NULL, *cmpthF = NULL; static int *pcands = NULL; /* array for backtracking in convergence check */ static int cir_buff_growth_count = 0; static int size_cir_buffer, /* # of frames in circular DP buffer */ size_frame_hist, /* # of frames required before convergence test */ size_frame_out, /* # of frames before forcing output */ num_active_frames, /* # of frames from tailF to headF */ output_buf_size; /* # of frames allocated to output buffers */ /* * DP parameters */ static float tcost, tfact_a, tfact_s, frame_int, vbias, fdouble, wdur, ln2, freqwt, lagwt; static int step, size, nlags, start, stop, ncomp, *locs = NULL; static short maxpeaks; static int wReuse = 0; /* number of windows seen before resued */ static Windstat *windstat = NULL; static float *f0p = NULL, *vuvp = NULL, *rms_speech = NULL, *acpkp = NULL, *peaks = NULL; static int first_time = 1, pad; /*--------------------------------------------------------------------*/ int get_Nframes(buffsize, pad, step) long buffsize; int pad, step; { if (buffsize < pad) return (0); else return ((buffsize - pad)/step); } /*--------------------------------------------------------------------*/ int init_dp_f0(freq, par, buffsize, sdstep) double freq; F0_params *par; long *buffsize, *sdstep; { int nframes; int i; int stat_wsize, agap, ind, downpatch; #if 0 #else float *fgetmem(const int leng); #endif /* * reassigning some constants */ tcost = par->trans_cost; tfact_a = par->trans_amp; tfact_s = par->trans_spec; vbias = par->voice_bias; fdouble = par->double_cost; frame_int = par->frame_step; step = eround(frame_int * freq); size = eround(par->wind_dur * freq); frame_int = (float)(((float)step)/freq); wdur = (float)(((float)size)/freq); start = eround(freq / par->max_f0); stop = eround(freq / par->min_f0); nlags = stop - start + 1; ncomp = size + stop + 1; /* # of samples required by xcorr comp. per fr. */ maxpeaks = 2 + (nlags/2); /* maximum number of "peaks" findable in ccf */ ln2 = (float)log(2.0); size_frame_hist = (int) (DP_HIST / frame_int); size_frame_out = (int) (DP_LIMIT / frame_int); /* * SET UP THE D.P. WEIGHTING FACTORS: * The intent is to make the effectiveness of the various fudge factors * independent of frame rate or sampling frequency. */ /* Lag-dependent weighting factor to emphasize early peaks (higher freqs)*/ lagwt = par->lag_weight/stop; /* Penalty for a frequency skip in F0 per frame */ freqwt = par->freq_weight/frame_int; i = (int) (READ_SIZE *freq); if(ncomp >= step) nframes = ((i-ncomp)/step ) + 1; else nframes = i / step; /* *buffsize is the number of samples needed to make F0 computation of nframes DP frames possible. The last DP frame is patched with enough points so that F0 computation on it can be carried. F0 computaion on each frame needs enough points to do 1) xcross or cross correlation measure: enough points to do xcross - ncomp 2) stationarity measure: enough to make 30 msec windowing possible - ind 3) downsampling: enough to make filtering possible -- downpatch So there are nframes whole DP frames, padded with pad points to make the last frame F0 computation ok. */ /* last point in data frame needs points of 1/2 downsampler filter length long, 0.005 is the filter length used in downsampler */ downpatch = (((int) (freq * 0.005))+1) / 2; stat_wsize = (int) (STAT_WSIZE * freq); agap = (int) (STAT_AINT * freq); ind = ( agap - stat_wsize ) / 2; i = stat_wsize + ind; pad = downpatch + ((i>ncomp) ? i:ncomp); *buffsize = nframes * step + pad; *sdstep = nframes * step; /* Allocate space for the DP storage circularly linked data structure */ size_cir_buffer = (int) (DP_CIRCULAR / frame_int); /* creating circularly linked data structures */ tailF = alloc_frame(nlags, par->n_cands); headF = tailF; /* link them up */ for(i=1; inext = alloc_frame(nlags, par->n_cands); headF->next->prev = headF; headF = headF->next; } headF->next = tailF; tailF->prev = headF; headF = tailF; /* Allocate sscratch array to use during backtrack convergence test. */ if( ! pcands ) { #if 0 pcands = (int *) ckalloc( par->n_cands * sizeof(int)); /* spsassert(pcands,"can't allocate pathcands");*/ #else pcands = (int *) malloc(par->n_cands * sizeof(int)); #endif /* 0 */ } /* Allocate arrays to return F0 and related signals. */ /* Note: remember to compare *vecsize with size_frame_out, because size_cir_buffer is not constant */ output_buf_size = size_cir_buffer; #if 0 rms_speech = (float*)ckalloc(sizeof(float) * output_buf_size); /* spsassert(rms_speech,"rms_speech ckalloc failed");*/ f0p = (float*)ckalloc(sizeof(float) * output_buf_size); /* spsassert(f0p,"f0p ckalloc failed");*/ vuvp = (float*)ckalloc(sizeof(float)* output_buf_size); /* spsassert(vuvp,"vuvp ckalloc failed");*/ acpkp = (float*)ckalloc(sizeof(float) * output_buf_size); /* spsassert(acpkp,"acpkp ckalloc failed");*/ /* Allocate space for peak location and amplitude scratch arrays. */ peaks = (float*)ckalloc(sizeof(float) * maxpeaks); /* spsassert(peaks,"peaks ckalloc failed");*/ locs = (int*)ckalloc(sizeof(int) * maxpeaks); /* spsassert(locs, "locs ckalloc failed");*/ /* Initialise the retrieval/saving scheme of window statistic measures */ wReuse = agap / step; if (wReuse){ windstat = (Windstat *) ckalloc( wReuse * sizeof(Windstat)); /* spsassert(windstat, "windstat ckalloc failed");*/ #else rms_speech = (float *) fgetmem(output_buf_size); f0p = (float *) fgetmem(output_buf_size); vuvp = (float *) fgetmem(output_buf_size); acpkp = (float *) fgetmem(output_buf_size); /* Allocate space for peak location and amplitude scratch arrays. */ peaks = (float *) fgetmem(maxpeaks); locs = (int *) malloc(sizeof(int) * maxpeaks); /* Initialise the retrieval/saving scheme of window statistic measures */ wReuse = agap / step; if (wReuse) { windstat = (Windstat *) malloc(wReuse * sizeof(Windstat)); #endif /* 0 */ for(i=0; istat; rms_ratio = stat->rms_ratio; /***********************************************************************/ /* MAIN FUNDAMENTAL FREQUENCY ESTIMATION LOOP */ /***********************************************************************/ if(!first_time && nframes > 0) headF = headF->next; for(i = 0; i < nframes; i++) { /* NOTE: This buffer growth provision is probably not necessary. It was put in (with errors) by Derek Lin and apparently never tested. My tests and analysis suggest it is completely superfluous. DT 9/5/96 */ /* Dynamically allocating more space for the circular buffer */ if(headF == tailF->prev){ Frame *frm; if(cir_buff_growth_count > 5){ Fprintf(stderr, "too many requests (%d) for dynamically allocating space.\n There may be a problem in finding converged path.\n",cir_buff_growth_count); return(1); } if(debug_level) Fprintf(stderr, "allocating %d more frames for DP circ. buffer.\n", size_cir_buffer); frm = alloc_frame(nlags, par->n_cands); headF->next = frm; frm->prev = headF; for(k=1; knext = alloc_frame(nlags, par->n_cands); frm->next->prev = frm; frm = frm->next; } frm->next = tailF; tailF->prev = frm; cir_buff_growth_count++; } headF->rms = stat->rms[i]; get_fast_cands(fdata, dsdata, i, step, size, decimate, start, nlags, &engref, &maxloc, &maxval, headF->cp, peaks, locs, &ncand, par); /* Move the peak value and location arrays into the dp structure */ { register float *ftp1, *ftp2; register short *sp1; register int *sp2; for(ftp1 = headF->dp->pvals, ftp2 = peaks, sp1 = headF->dp->locs, sp2 = locs, j=ncand; j--; ) { *ftp1++ = *ftp2++; *sp1++ = *sp2++; } *sp1 = -1; /* distinguish the UNVOICED candidate */ *ftp1 = maxval; headF->dp->mpvals[ncand] = vbias+maxval; /* (high cost if cor. is high)*/ } /* Apply a lag-dependent weight to the peaks to encourage the selection of the first major peak. Translate the modified peak values into costs (high peak ==> low cost). */ for(j=0; j < ncand; j++){ ftemp = 1.0f - ((float)locs[j] * lagwt); headF->dp->mpvals[j] = 1.0f - (peaks[j] * ftemp); } ncand++; /* include the unvoiced candidate */ headF->dp->ncands = ncand; /*********************************************************************/ /* COMPUTE THE DISTANCE MEASURES AND ACCUMULATE THE COSTS. */ /*********************************************************************/ ncandp = headF->prev->dp->ncands; for(k=0; kdp->locs[k]) > 0) { /* current cand. is voiced */ for(j=0; jprev->dp->locs[j]; if (loc1 > 0) { /* prev. was voiced */ ftemp = (float) log(((double) loc2) / loc1); ttemp = (float) fabs(ftemp); ft1 = (float) (fdouble + fabs(ftemp + ln2)); if (ttemp > ft1) ttemp = ft1; ft1 = (float) (fdouble + fabs(ftemp - ln2)); if (ttemp > ft1) ttemp = ft1; ferr = ttemp * freqwt; } else { /* prev. was unvoiced */ ferr = tcost + (tfact_s * sta[i]) + (tfact_a / rms_ratio[i]); } /* Add in cumulative cost associated with previous peak. */ err = ferr + headF->prev->dp->dpvals[j]; if(err < errmin){ /* find min. cost */ errmin = err; minloc = j; } } } else { /* this is the unvoiced candidate */ for(j=0; jprev->dp->locs[j] > 0) { /* previous was voiced */ ferr = tcost + (tfact_s * sta[i]) + (tfact_a * rms_ratio[i]); } else ferr = 0.0; /* Add in cumulative cost associated with previous peak. */ err = ferr + headF->prev->dp->dpvals[j]; if(err < errmin){ /* find min. cost */ errmin = err; minloc = j; } } } /* Now have found the best path from this cand. to prev. frame */ if (first_time && i==0) { /* this is the first frame */ headF->dp->dpvals[k] = headF->dp->mpvals[k]; headF->dp->prept[k] = 0; } else { headF->dp->dpvals[k] = errmin + headF->dp->mpvals[k]; headF->dp->prept[k] = minloc; } } /* END OF THIS DP FRAME */ if (i < nframes - 1) headF = headF->next; if (debug_level >= 2) { Fprintf(stderr,"%d engref:%10.0f max:%7.5f loc:%4d\n", i,engref,maxval,maxloc); } } /* end for (i ...) */ /***************************************************************/ /* DONE WITH FILLING DP STRUCTURES FOR THE SET OF SAMPLED DATA */ /* NOW FIND A CONVERGED DP PATH */ /***************************************************************/ *vecsize = 0; /* # of output frames returned */ num_active_frames += nframes; if( num_active_frames >= size_frame_hist || last_time ){ Frame *frm; int num_paths, best_cand, frmcnt, checkpath_done = 1; float patherrmin; if(debug_level) Fprintf(stderr, "available frames for backtracking: %d\n", num_active_frames); patherrmin = FLT_MAX; best_cand = 0; num_paths = headF->dp->ncands; /* Get the best candidate for the final frame and initialize the paths' backpointers. */ frm = headF; for(k=0; k < num_paths; k++) { if (patherrmin > headF->dp->dpvals[k]){ patherrmin = headF->dp->dpvals[k]; best_cand = k; /* index indicating the best candidate at a path */ } pcands[k] = frm->dp->prept[k]; } if(last_time){ /* Input data was exhausted. force final outputs. */ cmpthF = headF; /* Use the current frame as starting point. */ } else { /* Starting from the most recent frame, trace back each candidate's best path until reaching a common candidate at some past frame. */ frmcnt = 0; while (1) { frm = frm->prev; frmcnt++; checkpath_done = 1; for(k=1; k < num_paths; k++){ /* Check for convergence. */ if(pcands[0] != pcands[k]) checkpath_done = 0; } if( ! checkpath_done) { /* Prepare for checking at prev. frame. */ for(k=0; k < num_paths; k++){ pcands[k] = frm->dp->prept[pcands[k]]; } } else { /* All paths have converged. */ cmpthF = frm; best_cand = pcands[0]; if(debug_level) Fprintf(stderr, "paths went back %d frames before converging\n",frmcnt); break; } if(frm == tailF){ /* Used all available data? */ if( num_active_frames < size_frame_out) { /* Delay some more? */ checkpath_done = 0; /* Yes, don't backtrack at this time. */ cmpthF = NULL; } else { /* No more delay! Force best-guess output. */ checkpath_done = 1; cmpthF = headF; /* Fprintf(stderr, "WARNING: no converging path found after going back %d frames, will use the lowest cost path\n",num_active_frames);*/ } break; } /* end if (frm ...) */ } /* end while (1) */ } /* end if (last_time) ... else */ /*************************************************************/ /* BACKTRACKING FROM cmpthF (best_cand) ALL THE WAY TO tailF */ /*************************************************************/ i = 0; frm = cmpthF; /* Start where convergence was found (or faked). */ while( frm != tailF->prev && checkpath_done){ if( i == output_buf_size ){ /* Need more room for outputs? */ output_buf_size *= 2; if(debug_level) Fprintf(stderr, "reallocating space for output frames: %d\n", output_buf_size); #if 0 rms_speech = (float *) ckrealloc((void *) rms_speech, sizeof(float) * output_buf_size); /* spsassert(rms_speech, "rms_speech realloc failed in dp_f0()");*/ f0p = (float *) ckrealloc((void *) f0p, sizeof(float) * output_buf_size); /* spsassert(f0p, "f0p realloc failed in dp_f0()");*/ vuvp = (float *) ckrealloc((void *) vuvp, sizeof(float) * output_buf_size); /* spsassert(vuvp, "vuvp realloc failed in dp_f0()");*/ acpkp = (float *) ckrealloc((void *) acpkp, sizeof(float) * output_buf_size); /* spsassert(acpkp, "acpkp realloc failed in dp_f0()");*/ #else rms_speech = (float *) realloc((void *) rms_speech, sizeof(float) * output_buf_size); f0p = (float *) realloc((void *) f0p, sizeof(float) * output_buf_size); vuvp = (float *) realloc((void *) vuvp, sizeof(float) * output_buf_size); acpkp = (float *) realloc((void *) acpkp, sizeof(float) * output_buf_size); #endif /* 0 */ } rms_speech[i] = frm->rms; acpkp[i] = frm->dp->pvals[best_cand]; loc1 = frm->dp->locs[best_cand]; vuvp[i] = 1.0; best_cand = frm->dp->prept[best_cand]; ftemp = (float) loc1; if(loc1 > 0) { /* Was f0 actually estimated for this frame? */ if (loc1 > start && loc1 < stop) { /* loc1 must be a local maximum. */ float cormax, cprev, cnext, den; j = loc1 - start; cormax = frm->cp->correl[j]; cprev = frm->cp->correl[j+1]; cnext = frm->cp->correl[j-1]; den = (float) (2.0 * ( cprev + cnext - (2.0 * cormax) )); /* * Only parabolic interpolate if cormax is indeed a local * turning point. Find peak of curve that goes though the 3 points */ if (fabs(den) > 0.000001) ftemp += 2.0f - ((((5.0f*cprev)+(3.0f*cnext)-(8.0f*cormax))/den)); } f0p[i] = (float) (freq/ftemp); } else { /* No valid estimate; just fake some arbitrary F0. */ f0p[i] = 0; vuvp[i] = 0.0; } frm = frm->prev; if (debug_level >= 2) Fprintf(stderr," i:%4d%8.1f%8.1f\n",i,f0p[i],vuvp[i]); /* f0p[i] starts from the most recent one */ /* Need to reverse the order in the calling function */ i++; } /* end while() */ if (checkpath_done){ *vecsize = i; tailF = cmpthF->next; num_active_frames -= *vecsize; } } /* end if() */ if (debug_level) Fprintf(stderr, "writing out %d frames.\n", *vecsize); *f0p_pt = f0p; *vuvp_pt = vuvp; *acpkp_pt = acpkp; *rms_speech_pt = rms_speech; /* *acpkp_pt = acpkp;*/ if(first_time) first_time = 0; return(0); } /*--------------------------------------------------------------------*/ Frame * alloc_frame(nlags, ncands) int nlags, ncands; { Frame *frm; int j; #if 0 frm = (Frame*)ckalloc(sizeof(Frame)); frm->dp = (Dprec *) ckalloc(sizeof(Dprec)); /* spsassert(frm->dp,"frm->dp ckalloc failed in alloc_frame");*/ frm->dp->ncands = 0; frm->cp = (Cross *) ckalloc(sizeof(Cross)); /* spsassert(frm->cp,"frm->cp ckalloc failed in alloc_frame");*/ frm->cp->correl = (float *) ckalloc(sizeof(float) * nlags); /* spsassert(frm->cp->correl, "frm->cp->correl ckalloc failed");*/ /* Allocate space for candidates and working arrays. */ frm->dp->locs = (short*)ckalloc(sizeof(short) * ncands); /* spsassert(frm->dp->locs,"frm->dp->locs ckalloc failed in alloc_frame()");*/ frm->dp->pvals = (float*)ckalloc(sizeof(float) * ncands); /* spsassert(frm->dp->pvals,"frm->dp->pvals ckalloc failed in alloc_frame()");*/ frm->dp->mpvals = (float*)ckalloc(sizeof(float) * ncands); /* spsassert(frm->dp->mpvals,"frm->dp->mpvals ckalloc failed in alloc_frame()");*/ frm->dp->prept = (short*)ckalloc(sizeof(short) * ncands); /* spsassert(frm->dp->prept,"frm->dp->prept ckalloc failed in alloc_frame()");*/ frm->dp->dpvals = (float*)ckalloc(sizeof(float) * ncands); /* spsassert(frm->dp->dpvals,"frm->dp->dpvals ckalloc failed in alloc_frame()");*/ #else frm = (Frame *) malloc(sizeof(Frame)); frm->dp = (Dprec *) malloc(sizeof(Dprec)); frm->dp->ncands = 0; frm->cp = (Cross *) malloc(sizeof(Cross)); frm->cp->correl = (float *) malloc(sizeof(float) * nlags); frm->dp->locs = (short *) malloc(sizeof(short) * ncands); frm->dp->pvals = (float *) malloc(sizeof(float) * ncands); frm->dp->mpvals = (float *) malloc(sizeof(float) * ncands); frm->dp->prept = (short *) malloc(sizeof(short) * ncands); frm->dp->dpvals = (float *) malloc(sizeof(float) * ncands); #endif /* 0 */ /* Initialize the cumulative DP costs to zero */ for(j = ncands-1; j >= 0; j--) frm->dp->dpvals[j] = 0.0; return(frm); } /*--------------------------------------------------------------------*/ /* push window stat to stack, and pop the oldest one */ static int save_windstat(rho, order, err, rms) float *rho; int order; float err; float rms; { int i,j; if(wReuse > 1){ /* push down the stack */ for(j=1; j 0.0) *rms_ratio = (0.001f + rms3)/rms1; else if(rms3 > 0.0) *rms_ratio = 2.0; /* indicate some energy increase */ else *rms_ratio = 1.0; /* no change */ } else { *rms_ratio = 1.0; t = 10.0; } *rmsa = rms3; save_windstat( rho3, order, err3, rms3); return((float)(0.2/t)); } /* -------------------------------------------------------------------- */ /* This is an ad hoc signal stationarity function based on Itakura * distance and relative amplitudes. */ /* This illustrates the window locations when the very first frame is read. It shows an example where each frame step | . | is 10 msec. The frame step size is variable. The window size is always 30 msec. The window centers '*' is always 20 msec apart. The windows cross each other right at the center of the DP frame, or where the '.' is. ---------*--------- current window ---------*--------- previous window | . | . | . | . | . | . | . | . | . | ^ ^ ^ ^ ^ ^ ^ ^ fdata ^ ^ ^ q p --- ind fdata, q, p, ind, are variables used below. */ static Stat *stat = NULL; static float *mem = NULL; static Stat* get_stationarity(fdata, freq, buff_size, nframes, frame_step, first_time) float *fdata; double freq; int buff_size, nframes, frame_step, first_time; { static int nframes_old = 0, memsize; float preemp = 0.4f, stab = 30.0f; float *p, *q, *r, *datend; int ind, i, j, m, size, order, agap, w_type = 3; agap = (int) (STAT_AINT *freq); size = (int) (STAT_WSIZE * freq); ind = (agap - size) / 2; if( nframes_old < nframes || !stat || first_time){ /* move this to init_dp_f0() later */ nframes_old = nframes; #if 0 if(stat){ ckfree((char *) stat->stat); ckfree((char *) stat->rms); ckfree((char *) stat->rms_ratio); ckfree((char *) stat); } if (mem) ckfree((void *)mem); stat = (Stat *) ckalloc(sizeof(Stat)); /* spsassert(stat,"stat ckalloc failed in get_stationarity");*/ stat->stat = (float*)ckalloc(sizeof(float)*nframes); /* spsassert(stat->stat,"stat->stat ckalloc failed in get_stationarity");*/ stat->rms = (float*)ckalloc(sizeof(float)*nframes); /* spsassert(stat->rms,"stat->rms ckalloc failed in get_stationarity");*/ stat->rms_ratio = (float*)ckalloc(sizeof(float)*nframes); /* spsassert(stat->rms_ratio,"stat->ratio ckalloc failed in get_stationarity");*/ memsize = (int) (STAT_WSIZE * freq) + (int) (STAT_AINT * freq); mem = (float *) ckalloc( sizeof(float) * memsize); /* spsassert(mem, "mem ckalloc failed in get_stationarity()");*/ #else if(stat){ free((char *) stat->stat); free((char *) stat->rms); free((char *) stat->rms_ratio); free((char *) stat); } if (mem) free((void *) mem); stat = (Stat *) malloc(sizeof(Stat)); stat->stat = (float *) malloc(sizeof(float) * nframes); stat->rms = (float *) malloc(sizeof(float) * nframes); stat->rms_ratio = (float *) malloc(sizeof(float) * nframes); memsize = (int) (STAT_WSIZE * freq) + (int) (STAT_AINT * freq); mem = (float *) malloc(sizeof(float) * memsize); #endif /* 0 */ for(j=0; j BIGSORD) { Fprintf(stderr, "Optimim order (%d) exceeds that allowable (%d); reduce Fs\n",order, BIGSORD); order = BIGSORD; } /* prepare for the first frame */ for(j=memsize/2, i=0; j= fdata) && (q >= fdata) && ( q + size <= datend) ) stat->stat[j] = get_similarity(order,size, p, q, &(stat->rms[j]), &(stat->rms_ratio[j]),preemp, stab,w_type, 0); else { if(first_time) { if( (p < fdata) && (q >= fdata) && (q+size <=datend) ) stat->stat[j] = get_similarity(order,size, NULL, q, &(stat->rms[j]), &(stat->rms_ratio[j]), preemp,stab,w_type, 1); else{ stat->rms[j] = 0.0; stat->stat[j] = 0.01f * 0.2f; /* a big transition */ stat->rms_ratio[j] = 1.0; /* no amplitude change */ } } else { if( (pstat[j] = get_similarity(order,size, mem, mem + (memsize/2) + ind, &(stat->rms[j]), &(stat->rms_ratio[j]), preemp, stab,w_type, 0); /* prepare for the next frame_step if needed */ if(p + frame_step < fdata ){ for( m=0; m<(memsize-frame_step); m++) mem[m] = mem[m+frame_step]; r = q + size; for( m=0; m=0 && p>=fdata; j--) mem[j] = *p--; return(stat); } #if 0 /* -------------------------------------------------------------------- */ /* Round the argument to the nearest integer. */ /* int eround(flnum) double flnum; { return((flnum >= 0.0) ? (int)(flnum + 0.5) : (int)(flnum - 0.5)); } */ #else /* -------------------------------------------------------------------- */ /* Round the argument to the nearest integer. */ int eround(flnum) double flnum; { return((flnum >= 0.0) ? (int)(flnum + 0.5) : (int)(flnum - 0.5)); } #endif /* 0 */ void free_dp_f0() { int i; Frame *frm, *next; #if 0 ckfree((void *)pcands); pcands = NULL; ckfree((void *)rms_speech); rms_speech = NULL; ckfree((void *)f0p); f0p = NULL; ckfree((void *)vuvp); vuvp = NULL; ckfree((void *)acpkp); acpkp = NULL; ckfree((void *)peaks); peaks = NULL; ckfree((void *)locs); locs = NULL; if (wReuse) { ckfree((void *)windstat); windstat = NULL; } frm = headF; for(i = 0; i < size_cir_buffer; i++) { next = frm->next; ckfree((void *)frm->cp->correl); ckfree((void *)frm->dp->locs); ckfree((void *)frm->dp->pvals); ckfree((void *)frm->dp->mpvals); ckfree((void *)frm->dp->prept); ckfree((void *)frm->dp->dpvals); ckfree((void *)frm->cp); ckfree((void *)frm->dp); ckfree((void *)frm); frm = next; } headF = NULL; tailF = NULL; ckfree((void *)stat->stat); ckfree((void *)stat->rms); ckfree((void *)stat->rms_ratio); ckfree((void *)stat); stat = NULL; ckfree((void *)mem); mem = NULL; #else free((void *) pcands); pcands = NULL; free((void *) rms_speech); rms_speech = NULL; free((void *) f0p); f0p = NULL; free((void *) vuvp); vuvp = NULL; free((void *) acpkp); acpkp = NULL; free((void *) peaks); peaks = NULL; free((void *) locs); locs = NULL; if (wReuse) { free((void *) windstat); windstat = NULL; } frm = headF; for (i = 0; i < size_cir_buffer; i++) { next = frm->next; free((void *) frm->cp->correl); free((void *) frm->dp->locs); free((void *) frm->dp->pvals); free((void *) frm->dp->mpvals); free((void *) frm->dp->prept); free((void *) frm->dp->dpvals); free((void *) frm->cp); free((void *) frm->dp); free((void *) frm); frm = next; } headF = NULL; tailF = NULL; free((void *) stat->stat); free((void *) stat->rms); free((void *) stat->rms_ratio); free((void *) stat); stat = NULL; free((void *) mem); mem = NULL; #endif /* 0 */ } #if 0 int cGet_f0(Sound *sound, Tcl_Interp *interp, float **outlist, int *length) { #else void rapt(float_list *input, int length, double sample_freq, int frame_shift, double minF0, double maxF0, double voice_bias, int otype) { int fnum = 0; #endif float *fdata; int done; long buff_size, actsize; double sf, start_time; F0_params *par, *read_f0_params(); float *f0p, *vuvp, *rms_speech, *acpkp; int i, vecsize; int init_dp_f0(), dp_f0(); static int framestep = -1; long sdstep = 0, total_samps; int ndone = 0; #if 0 Tcl_Obj *list; float *tmp = (float *)ckalloc(sizeof(float) * (5 + sound->length / 80)); int count = 0; int startpos = 0, endpos = -1; #else float *tmp, *unvoiced, *buf; int count = 0; int startpos = 0, endpos = -1; long max; float_list *tmpf, *cur = NULL, *prev = NULL; void usage(int status); double p, fsp, alpha, beta; unsigned long next = 1; double nrandom(unsigned long *next); #endif /* 0 */ #if 0 if (sound->cmdPtr != NULL) { Tcl_DecrRefCount(sound->cmdPtr); sound->cmdPtr = NULL; } par = (F0_params *) ckalloc(sizeof(F0_params)); #else for (i = 0, tmpf = input; tmpf != NULL; i++, tmpf = tmpf->next) { p = (double) nrandom(&next); tmpf->f += (float) (p * 50.0); prev = tmpf; } fnum = (int) (ceil((double) length / (double) frame_shift)); fsp = sample_freq * (10.0 / (double) frame_shift); alpha = (int) (0.00275 * fsp + 0.5); beta = (int) ((9600.0 / minF0 - 168.0) * fsp / 96000.0 + 0.5); if (beta < 0) { beta = 0; } for (i = 0; i < (alpha + beta + 3) * frame_shift; i++) { p = (double) nrandom(&next); cur = (float_list *) malloc(sizeof(float_list)); cur->f = (float) (p * 50.0); length++; prev->next = cur; cur->next = NULL; prev = cur; } par = (F0_params *) malloc(sizeof(F0_params)); buf = (float *) malloc(sizeof(float) * length); tmp = (float *) malloc(sizeof(float) * (5 + length / frame_shift)); unvoiced = (float *) malloc(sizeof(float) * (5 + length / frame_shift)); for (i = 0, tmpf = input; tmpf != NULL; i++, tmpf = tmpf->next) { buf[i] = tmpf->f; } #endif /* 0 */ par->cand_thresh = 0.3f; par->lag_weight = 0.3f; par->freq_weight = 0.02f; par->trans_cost = 0.005f; par->trans_amp = 0.5f; par->trans_spec = 0.5f; par->voice_bias = 0.0f; par->double_cost = 0.35f; #if 0 par->min_f0 = 50; par->max_f0 = 550; par->frame_step = 0.01f; #else par->min_f0 = minF0; par->max_f0 = maxF0; par->frame_step = frame_shift / sample_freq; #endif par->wind_dur = 0.0075f; par->n_cands = 20; par->mean_f0 = 200; /* unused */ par->mean_f0_weight = 0.0f; /* unused */ par->conditioning = 0; /* unused */ #if 1 par->voice_bias = voice_bias; /* overwrite U/V threshold for pitch command */ #endif #if 0 if (startpos < 0) startpos = 0; if (endpos >= (sound->length - 1) || endpos == -1) endpos = sound->length - 1; if (startpos > endpos) return TCL_OK; sf = (double) sound->samprate; if (framestep > 0) /* If a value was specified with -S, use it. */ par->frame_step = (float) (framestep / sf); start_time = 0.0f; if(check_f0_params(interp, par, sf)){ Tcl_AppendResult(interp, "invalid/inconsistent parameters -- exiting.", NULL); return TCL_ERROR; } total_samps = endpos - startpos + 1; if(total_samps < ((par->frame_step * 2.0) + par->wind_dur) * sf) { Tcl_AppendResult(interp, "input range too small for analysis by get_f0.", NULL); return TCL_ERROR; } /* Initialize variables in get_f0.c; allocate data structures; * determine length and overlap of input frames to read. */ if (init_dp_f0(sf, par, &buff_size, &sdstep) || buff_size > INT_MAX || sdstep > INT_MAX) { Tcl_AppendResult(interp, "problem in init_dp_f0().", NULL); return TCL_ERROR; } if (debug_level) Fprintf(stderr, "init_dp_f0 returned buff_size %ld, sdstep %ld.\n",buff_size, sdstep); #else if (startpos < 0) startpos = 0; if (endpos >= (length - 1) || endpos == -1) { endpos = length - 1; } sf = (double) sample_freq; if (framestep > 0) /* If a value was specified with -S, use it. */ par->frame_step = (float) (framestep / sf); start_time = 0.0f; if (check_f0_params(par, sf)) { #endif /* 0 */ #if 0 return "invalid/inconsistent parameters -- exiting."; #else fprintf(stderr, "invalid/inconsistent parameters -- exiting.\n"); usage(1); #endif } total_samps = endpos - startpos + 1; if (total_samps < ((par->frame_step * 2.0) + par->wind_dur) * sf) { #if 0 return "input range too small for analysis by get_f0."; #else fprintf(stderr, "input range too small for analysis by get_f0.\n"); usage(1); #endif } if (init_dp_f0(sf, par, &buff_size, &sdstep) || buff_size > INT_MAX || sdstep > INT_MAX) { #if 0 return "problem in init_dp_f0()."; #else fprintf(stderr, "problem in init_dp_f0().\n"); usage(1); } #endif /* 0 */ if (buff_size > total_samps) buff_size = total_samps; #if 0 actsize = min(buff_size, sound->length); fdata = (float *) ckalloc(sizeof(float) * max(buff_size, sdstep)); list = Tcl_NewListObj(0, NULL); #else max = buff_size > sdstep ? buff_size : sdstep; actsize = buff_size < length ? buff_size : length; fdata = (float *) malloc(sizeof(float) * max); #endif /* 0 */ /* Snack_ProgressCallback(sound->cmdPtr, interp, "Computing pitch", 0.0);*/ ndone = startpos; #if 0 while (TRUE) { done = (actsize < buff_size) || (total_samps == buff_size); Snack_GetSoundData(sound, ndone, fdata, actsize); /*if (sound->debug > 0) Snack_WriteLog("dp_f0...\n");*/ if (dp_f0(fdata, (int) actsize, (int) sdstep, sf, par, &f0p, &vuvp, &rms_speech, &acpkp, &vecsize, done)) { Tcl_AppendResult(interp, "problem in dp_f0().", NULL); return TCL_ERROR; } /*if (sound->debug > 0) Snack_WriteLogInt("done dp_f0",vecsize);*/ for (i = vecsize - 1; i >= 0; i--) { tmp[count] = f0p[i]; count++; } #else while (1) { done = (actsize < buff_size) || (total_samps == buff_size); for (i = 0; i < actsize; i++) { fdata[i] = buf[i + ndone]; } if (dp_f0(fdata, (int) actsize, (int) sdstep, sf, par, &f0p, &vuvp, &rms_speech, &acpkp, &vecsize, done)) { #endif #if 0 return "problem in dp_f0()."; #else break; /* skip final frame if it is too small */ #endif /* 0 */ } for (i = vecsize - 1; i >= 0; i--) { tmp[count] = f0p[i]; unvoiced[count] = vuvp[i]; count++; } if (done) break; ndone += sdstep; #if 0 actsize = min(buff_size, sound->length - ndone); #else actsize = buff_size < (length - ndone) ? buff_size : (length - ndone); #endif /* 0 */ total_samps -= sdstep; if (actsize > total_samps) actsize = total_samps; /* if (1) { int res = Snack_ProgressCallback(sound->cmdPtr, interp, "Computing pitch", (double) ndone / sound->length); if (res != TCL_OK) { return TCL_ERROR; } }*/ } /*Snack_ProgressCallback(sound->cmdPtr, interp, "Computing pitch", 1.0);*/ #if 0 ckfree((void *)fdata); ckfree((void *)par); free_dp_f0(); *outlist = tmp; *length = count; /*Tcl_SetObjResult(interp, list);*/ return TCL_OK; #else for (i = 0; i < fnum; i++) { switch (otype) { case 1: /* f0 */ fwrite(tmp + i, sizeof(float), 1, stdout); break; case 2: /* log(f0) */ if (tmp[i] != 0.0) { tmp[i] = log(tmp[i]); } else { tmp[i] = -1.0E10; } fwrite(tmp + i, sizeof(float), 1, stdout); break; default: /* pitch */ if (tmp[i] != 0.0) { tmp[i] = sample_freq / tmp[i]; } fwrite(tmp + i, sizeof(float), 1, stdout); break; } } free((void *) fdata); free((void *) par); free_dp_f0(); #endif /* 0 */ } SPTK-3.9/bin/pitch/snack/sigproc.c0000755001051300105040000005732512633453603013675 00000000000000/* * This software has been licensed to the Centre of Speech Technology, KTH * by Microsoft Corp. with the terms in the accompanying file BSD.txt, * which is a BSD style license. * * "Copyright (c) 1990-1996 Entropic Research Laboratory, Inc. * All rights reserved" * * Written by: David Talkin * Checked by: * Revised by: Derek Lin, David Talkin * * Brief description: * A collection of pretty generic signal-processing routines. * * */ /* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /**************************************************************** $Id: sigproc.c,v 1.7 2015/12/14 05:45:39 uratec Exp $ ****************************************************************/ #include #include #include #ifndef TRUE # define TRUE 1 # define FALSE 0 #endif #include "jkGetF0.h" #if 0 #include "snack.h" #endif /* 0 */ /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ /* Return a time-weighting window of type type and length n in dout. * Dout is assumed to be at least n elements long. Type is decoded in * the switch statement below. */ int xget_window(dout, n, type) register float *dout; register int n, type; { static float *din = NULL; static int n0 = 0; float preemp = 0.0; if(n > n0) { register float *p; register int i; #if 0 if(din) ckfree((void *)din); din = NULL; if(!(din = (float*)ckalloc(sizeof(float)*n))) { Fprintf(stderr,"Allocation problems in xget_window()\n"); return(FALSE); } #else if (din) free((void *) din); din = NULL; if (!(din = (float *) malloc(sizeof(float) * n))) { Fprintf(stderr, "Allocation problems in xget_window()\n"); return (FALSE); } #endif /* 0 */ for(i=0, p=din; i++ < n; ) *p++ = 1; n0 = n; } return(window(din, dout, n, preemp, type)); } /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ /* Apply a rectangular window (i.e. none). Optionally, preemphasize. */ void xrwindow(din, dout, n, preemp) register float *din; register float *dout, preemp; register int n; { register float *p; /* If preemphasis is to be performed, this assumes that there are n+1 valid samples in the input buffer (din). */ if(preemp != 0.0) { for( p=din+1; n-- > 0; ) *dout++ = (float)((*p++) - (preemp * *din++)); } else { for( ; n-- > 0; ) *dout++ = *din++; } } /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ /* Generate a cos^4 window, if one does not already exist. */ void xcwindow(din, dout, n, preemp) register float *din; register float *dout, preemp; register int n; { register int i; register float *p; static int wsize = 0; static float *wind=NULL; register float *q, co; if(wsize != n) { /* Need to create a new cos**4 window? */ register double arg, half=0.5; #if 0 if(wind) wind = (float*)ckrealloc((void *)wind,n*sizeof(float)); else wind = (float*)ckalloc(n*sizeof(float)); #else if (wind) wind = (float *) realloc((void *) wind, n * sizeof(float)); else wind = (float *) malloc(n * sizeof(float)); #endif /* 0 */ wsize = n; for(i=0, arg=3.1415927*2.0/(wsize), q=wind; i < n; ) { co = (float) (half*(1.0 - cos((half + (double)i++) * arg))); *q++ = co * co * co * co; } } /* If preemphasis is to be performed, this assumes that there are n+1 valid samples in the input buffer (din). */ if(preemp != 0.0) { for(i=n, p=din+1, q=wind; i--; ) *dout++ = (float) (*q++ * ((float)(*p++) - (preemp * *din++))); } else { for(i=n, q=wind; i--; ) *dout++ = *q++ * *din++; } } /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ /* Generate a Hamming window, if one does not already exist. */ void xhwindow(din, dout, n, preemp) register float *din; register float *dout, preemp; register int n; { register int i; register float *p; static int wsize = 0; static float *wind=NULL; register float *q; if(wsize != n) { /* Need to create a new Hamming window? */ register double arg, half=0.5; #if 0 if(wind) wind = (float*)ckrealloc((void *)wind,n*sizeof(float)); else wind = (float*)ckalloc(n*sizeof(float)); #else if (wind) wind = (float *) realloc((void *) wind, n * sizeof(float)); else wind = (float *) malloc(n * sizeof(float)); #endif /* 0 */ wsize = n; for(i=0, arg=3.1415927*2.0/(wsize), q=wind; i < n; ) *q++ = (float) (.54 - .46 * cos((half + (double)i++) * arg)); } /* If preemphasis is to be performed, this assumes that there are n+1 valid samples in the input buffer (din). */ if(preemp != 0.0) { for(i=n, p=din+1, q=wind; i--; ) *dout++ = (float) (*q++ * ((float)(*p++) - (preemp * *din++))); } else { for(i=n, q=wind; i--; ) *dout++ = *q++ * *din++; } } /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ /* Generate a Hanning window, if one does not already exist. */ void xhnwindow(din, dout, n, preemp) register float *din; register float *dout, preemp; register int n; { register int i; register float *p; static int wsize = 0; static float *wind=NULL; register float *q; if(wsize != n) { /* Need to create a new Hanning window? */ register double arg, half=0.5; #if 0 if(wind) wind = (float*)ckrealloc((void *)wind,n*sizeof(float)); else wind = (float*)ckalloc(n*sizeof(float)); #else if (wind) wind = (float *) realloc((void *) wind, n * sizeof(float)); else wind = (float *) malloc(n * sizeof(float)); #endif /* 0 */ wsize = n; for(i=0, arg=3.1415927*2.0/(wsize), q=wind; i < n; ) *q++ = (float) (half - half * cos((half + (double)i++) * arg)); } /* If preemphasis is to be performed, this assumes that there are n+1 valid samples in the input buffer (din). */ if(preemp != 0.0) { for(i=n, p=din+1, q=wind; i--; ) *dout++ = (float) (*q++ * ((float)(*p++) - (preemp * *din++))); } else { for(i=n, q=wind; i--; ) *dout++ = *q++ * *din++; } } /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ /* Apply a window of type type to the short PCM sequence of length n * in din. Return the floating-point result sequence in dout. If preemp * is non-zero, apply preemphasis to tha data as it is windowed. */ int window(din, dout, n, preemp, type) register float *din; register float *dout, preemp; register int n; int type; { switch(type) { case 0: /* rectangular */ xrwindow(din, dout, n, preemp); break; case 1: /* Hamming */ xhwindow(din, dout, n, preemp); break; case 2: /* cos^4 */ xcwindow(din, dout, n, preemp); break; case 3: /* Hanning */ xhnwindow(din, dout, n, preemp); break; default: Fprintf(stderr,"Unknown window type (%d) requested in window()\n",type); return(FALSE); } return(TRUE); } /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ /* Compute the pp+1 autocorrelation lags of the windowsize samples in s. * Return the normalized autocorrelation coefficients in r. * The rms is returned in e. */ void xautoc( windowsize, s, p, r, e ) register int p, windowsize; register float *s, *e; register float *r; { register int i, j; register float *q, *t, sum, sum0; for( i=windowsize, q=s, sum0=0.0; i--;) { sum = *q++; sum0 += sum*sum; } *r = 1.; /* r[0] will always =1. */ if(sum0 == 0.0) { /* No energy: fake low-energy white noise. */ *e = 1.; /* Arbitrarily assign 1 to rms. */ /* Now fake autocorrelation of white noise. */ for ( i=1; i<=p; i++){ r[i] = 0.; } return; } *e = (float) sqrt((double)(sum0/windowsize)); sum0 = (float) (1.0/sum0); for( i=1; i <= p; i++){ for( sum=0.0, j=windowsize-i, q=s, t=s+i; j--; ) sum += (*q++) * (*t++); *(++r) = sum*sum0; } } /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ /* Using Durbin's recursion, convert the autocorrelation sequence in r * to reflection coefficients in k and predictor coefficients in a. * The prediction error energy (gain) is left in *ex. * Note: durbin returns the coefficients in normal sign format. * (i.e. a[0] is assumed to be = +1.) */ void xdurbin ( r, k, a, p, ex) register int p; /* analysis order */ register float *r, *k, *a, *ex; { float bb[BIGSORD]; register int i, j; register float e, s, *b = bb; e = *r; *k = -r[1]/e; *a = *k; e *= (float) (1. - (*k) * (*k)); for ( i=1; i < p; i++){ s = 0; for ( j=0; j= 1. */ float xitakura ( p, b, c, r, gain ) register float *b, *c, *r, *gain; register int p; { register float s; for( s= *c; p--; ) s += *r++ * *b++; return (s/ *gain); } /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ /* Compute the time-weighted RMS of a size segment of data. The data * is weighted by a window of type w_type before RMS computation. w_type * is decoded above in window(). */ float wind_energy(data,size,w_type) register float *data; /* input PCM data */ register int size, /* size of window */ w_type; /* window type */ { static int nwind = 0; static float *dwind = NULL; register float *dp, sum, f; register int i; if(nwind < size) { #if 0 if(dwind) dwind = (float*)ckrealloc((void *)dwind,size*sizeof(float)); else dwind = (float*)ckalloc(size*sizeof(float)); #else if (dwind) dwind = (float *) realloc((void *) dwind, size * sizeof(float)); else dwind = (float *) malloc(size * sizeof(float)); #endif /* 0 */ if(!dwind) { Fprintf(stderr,"Can't allocate scratch memory in wind_energy()\n"); return(0.0); } } if(nwind != size) { xget_window(dwind, size, w_type); nwind = size; } for(i=size, dp = dwind, sum = 0.0; i-- > 0; ) { f = *dp++ * (float)(*data++); sum += f*f; } return((float)sqrt((double)(sum/size))); } /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ /* Generic autocorrelation LPC analysis of the short-integer data * sequence in data. */ int xlpc(lpc_ord,lpc_stabl,wsize,data,lpca,ar,lpck,normerr,rms,preemp,type) int lpc_ord, /* Analysis order */ wsize, /* window size in points */ type; /* window type (decoded in window() above) */ float lpc_stabl, /* Stability factor to prevent numerical problems. */ *lpca, /* if non-NULL, return vvector for predictors */ *ar, /* if non-NULL, return vector for normalized autoc. */ *lpck, /* if non-NULL, return vector for PARCOR's */ *normerr, /* return scaler for normalized error */ *rms, /* return scaler for energy in preemphasized window */ preemp; float *data; /* input data sequence; assumed to be wsize+1 long */ { static float *dwind=NULL; static int nwind=0; float rho[BIGSORD+1], k[BIGSORD], a[BIGSORD+1],*r,*kp,*ap,en,er,wfact=1.0; if((wsize <= 0) || (!data) || (lpc_ord > BIGSORD)) return(FALSE); if(nwind != wsize) { #if 0 if(dwind) dwind = (float*)ckrealloc((void *)dwind,wsize*sizeof(float)); else dwind = (float*)ckalloc(wsize*sizeof(float)); #else if (dwind) dwind = (float *) realloc((void *) dwind, wsize * sizeof(float)); else dwind = (float *) malloc(wsize * sizeof(float)); #endif /* 0 */ if(!dwind) { Fprintf(stderr,"Can't allocate scratch memory in lpc()\n"); return(FALSE); } nwind = wsize; } window(data, dwind, wsize, preemp, type); if(!(r = ar)) r = rho; /* Permit optional return of the various */ if(!(kp = lpck)) kp = k; /* coefficients and intermediate results. */ if(!(ap = lpca)) ap = a; xautoc( wsize, dwind, lpc_ord, r, &en ); if(lpc_stabl > 1.0) { /* add a little to the diagonal for stability */ int i; float ffact; ffact = (float) (1.0/(1.0 + exp((-lpc_stabl/20.0) * log(10.0)))); for(i=1; i <= lpc_ord; i++) rho[i] = ffact * r[i]; *rho = *r; r = rho; if(ar) for(i=0;i<=lpc_ord; i++) ar[i] = r[i]; } xdurbin ( r, kp, &ap[1], lpc_ord, &er); switch(type) { /* rms correction for window */ case 0: wfact = 1.0; /* rectangular */ break; case 1: wfact = .630397f; /* Hamming */ break; case 2: wfact = .443149f; /* (.5 - .5*cos)^4 */ break; case 3: wfact = .612372f; /* Hanning */ break; } *ap = 1.0; if(rms) *rms = en/wfact; if(normerr) *normerr = er; return(TRUE); } /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ /* Return a sequence based on the normalized crosscorrelation of the signal in data. * data is the input speech array size is the number of samples in each correlation start is the first lag to compute (governed by the highest expected F0) nlags is the number of cross correlations to compute (set by lowest F0) engref is the energy computed at lag=0 (i.e. energy in ref. window) maxloc is the lag at which the maximum in the correlation was found maxval is the value of the maximum in the CCF over the requested lag interval correl is the array of nlags cross-correlation coefficients (-1.0 to 1.0) * */ void crossf(data, size, start, nlags, engref, maxloc, maxval, correl) int *maxloc; float *engref, *maxval, *data, *correl; int size, start, nlags; { static float *dbdata=NULL; static int dbsize = 0; register float *dp, *ds, sum, st; register int j; register float *dq, t, *p, engr, *dds, amax; register double engc; int i, iloc, total; int sizei, sizeo, maxsize; /* Compute mean in reference window and subtract this from the entire sequence. This doesn't do too much damage to the data sequenced for the purposes of F0 estimation and removes the need for more principled (and costly) low-cut filtering. */ if((total = size+start+nlags) > dbsize) { #if 0 if(dbdata) ckfree((void *)dbdata); #else if(dbdata) free((void *)dbdata); #endif /* 0 */ dbdata = NULL; dbsize = 0; #if 0 if(!(dbdata = (float*)ckalloc(sizeof(float)*total))) { Fprintf(stderr,"Allocation failure in crossf()\n"); return;/*exit(-1);*/ } #else if(!(dbdata = (float*)malloc(sizeof(float)*total))) { Fprintf(stderr,"Allocation failure in crossf()\n"); return;/*exit(-1);*/ } #endif /* 0 */ dbsize = total; } for(engr=0.0, j=size, p=data; j--; ) engr += *p++; engr /= size; for(j=size+nlags+start, dq = dbdata, p=data; j--; ) *dq++ = *p++ - engr; maxsize = start + nlags; sizei = size + start + nlags + 1; sizeo = nlags + 1; /* Compute energy in reference window. */ for(j=size, dp=dbdata, sum=0.0; j--; ) { st = *dp++; sum += st * st; } *engref = engr = sum; if(engr > 0.0) { /* If there is any signal energy to work with... */ /* Compute energy at the first requested lag. */ for(j=size, dp=dbdata+start, sum=0.0; j--; ) { st = *dp++; sum += st * st; } engc = sum; /* COMPUTE CORRELATIONS AT ALL OTHER REQUESTED LAGS. */ for(i=0, dq=correl, amax=0.0, iloc = -1; i < nlags; i++) { for(j=size, sum=0.0, dp=dbdata, dds = ds = dbdata+i+start; j--; ) sum += *dp++ * *ds++; *dq++ = t = (float) (sum/sqrt((double)(engc*engr))); /* output norm. CC */ engc -= (double)(*dds * *dds); /* adjust norm. energy for next lag */ if((engc += (double)(*ds * *ds)) < 1.0) engc = 1.0; /* (hack: in case of roundoff error) */ if(t > amax) { /* Find abs. max. as we go. */ amax = t; iloc = i+start; } } *maxloc = iloc; *maxval = amax; } else { /* No energy in signal; fake reasonable return vals. */ *maxloc = 0; *maxval = 0.0; for(p=correl,i=nlags; i-- > 0; ) *p++ = 0.0; } } /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ /* Return a sequence based on the normalized crosscorrelation of the signal in data. This is similar to crossf(), but is designed to compute only small patches of the correlation sequence. The length of each patch is determined by nlags; the number of patches by nlocs, and the locations of the patches is specified by the array locs. Regions of the CCF that are not computed are set to 0. * data is the input speech array size is the number of samples in each correlation start0 is the first (virtual) lag to compute (governed by highest F0) nlags0 is the number of lags (virtual+actual) in the correlation sequence nlags is the number of cross correlations to compute at each location engref is the energy computed at lag=0 (i.e. energy in ref. window) maxloc is the lag at which the maximum in the correlation was found maxval is the value of the maximum in the CCF over the requested lag interval correl is the array of nlags cross-correlation coefficients (-1.0 to 1.0) locs is an array of indices pointing to the center of a patches where the cross correlation is to be computed. nlocs is the number of correlation patches to compute. * */ void crossfi(data, size, start0, nlags0, nlags, engref, maxloc, maxval, correl, locs, nlocs) int *maxloc; float *engref, *maxval, *data, *correl; int size, start0, nlags0, nlags, *locs, nlocs; { static float *dbdata=NULL; static int dbsize = 0; register float *dp, *ds, sum, st; register int j; register float *dq, t, *p, engr, *dds, amax; register double engc; int i, iloc, start, total; /* Compute mean in reference window and subtract this from the entire sequence. */ if((total = size+start0+nlags0) > dbsize) { #if 0 if(dbdata) ckfree((void *)dbdata); #else if (dbdata) free((void *) dbdata); #endif /* 0 */ dbdata = NULL; dbsize = 0; #if 0 if(!(dbdata = (float*)ckalloc(sizeof(float)*total))) { Fprintf(stderr,"Allocation failure in crossfi()\n"); return;/*exit(-1);*/ } #else if (!(dbdata = (float *) malloc(sizeof(float) * total))) { Fprintf(stderr, "Allocation failure in crossf()\n"); return; /*exit(-1); */ } #endif /* 0 */ dbsize = total; } for(engr=0.0, j=size, p=data; j--; ) engr += *p++; engr /= size; /* for(j=size+nlags0+start0, t = -2.1, amax = 2.1, dq = dbdata, p=data; j--; ) { if(((smax = *p++ - engr) > t) && (smax < amax)) smax = 0.0; *dq++ = smax; } */ for(j=size+nlags0+start0, dq = dbdata, p=data; j--; ) { *dq++ = *p++ - engr; } /* Zero the correlation output array to avoid confusing the peak picker (since all lags will not be computed). */ for(p=correl,i=nlags0; i-- > 0; ) *p++ = 0.0; /* compute energy in reference window */ for(j=size, dp=dbdata, sum=0.0; j--; ) { st = *dp++; sum += st * st; } *engref = engr = sum; amax=0.0; iloc = -1; if(engr > 0.0) { for( ; nlocs > 0; nlocs--, locs++ ) { start = *locs - (nlags>>1); if(start < start0) start = start0; dq = correl + start - start0; /* compute energy at first requested lag */ for(j=size, dp=dbdata+start, sum=0.0; j--; ) { st = *dp++; sum += st * st; } engc = sum; /* COMPUTE CORRELATIONS AT ALL REQUESTED LAGS */ for(i=0; i < nlags; i++) { for(j=size, sum=0.0, dp=dbdata, dds = ds = dbdata+i+start; j--; ) sum += *dp++ * *ds++; if(engc < 1.0) engc = 1.0; /* in case of roundoff error */ *dq++ = t = (float) (sum/sqrt((double)(10000.0 + (engc*engr)))); engc -= (double)(*dds * *dds); engc += (double)(*ds * *ds); if(t > amax) { amax = t; iloc = i+start; } } } *maxloc = iloc; *maxval = amax; } else { *maxloc = 0; *maxval = 0.0; } } SPTK-3.9/bin/pitch/snack/jkGetF0.h0000755001051300105040000001522612633453603013460 00000000000000/* * This software has been licensed to the Centre of Speech Technology, KTH * by Microsoft Corp. with the terms in the accompanying file BSD.txt, * which is a BSD style license. * * "Copyright (c) 1990-1996 Entropic Research Laboratory, Inc. * All rights reserved" * * Written by: David Talkin * Checked by: * Revised by: * @(#)f0.h 1.4 9/9/96 ERL * Brief description: * */ /* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /* $Id: jkGetF0.h,v 1.7 2015/12/14 05:45:39 uratec Exp $ */ /* f0.h */ /* Some definitions used by the "Pitch Tracker Software". */ typedef struct f0_params { float cand_thresh, /* only correlation peaks above this are considered */ lag_weight, /* degree to which shorter lags are weighted */ freq_weight, /* weighting given to F0 trajectory smoothness */ trans_cost, /* fixed cost for a voicing-state transition */ trans_amp, /* amplitude-change-modulated VUV trans. cost */ trans_spec, /* spectral-change-modulated VUV trans. cost */ voice_bias, /* fixed bias towards the voiced hypothesis */ double_cost, /* cost for octave F0 jumps */ mean_f0, /* talker-specific mean F0 (Hz) */ mean_f0_weight, /* weight to be given to deviations from mean F0 */ min_f0, /* min. F0 to search for (Hz) */ max_f0, /* max. F0 to search for (Hz) */ frame_step, /* inter-frame-interval (sec) */ wind_dur; /* duration of correlation window (sec) */ int n_cands, /* max. # of F0 cands. to consider at each frame */ conditioning; /* Specify optional signal pre-conditioning. */ } F0_params; /* Possible values returned by the function f0(). */ #define F0_OK 0 #define F0_NO_RETURNS 1 #define F0_TOO_FEW_SAMPLES 2 #define F0_NO_INPUT 3 #define F0_NO_PAR 4 #define F0_BAD_PAR 5 #define F0_BAD_INPUT 6 #define F0_INTERNAL_ERR 7 /* Bits to specify optional pre-conditioning of speech signals by f0() */ /* These may be OR'ed together to specify all preprocessing. */ #define F0_PC_NONE 0x00 /* no pre-processing */ #define F0_PC_DC 0x01 /* remove DC */ #define F0_PC_LP2000 0x02 /* 2000 Hz lowpass */ #define F0_PC_HP100 0x04 /* 100 Hz highpass */ #define F0_PC_AR 0x08 /* inf_order-order LPC inverse filter */ #define F0_PC_DIFF 0x010 /* 1st-order difference */ extern F0_params *new_f0_params(); extern int atoi(), eround(), lpc(), window(), get_window(); extern void get_fast_cands(), a_to_aca(), cross(), crossf(), crossfi(), autoc(), durbin(); #define Fprintf (void)fprintf /* f0_structs.h */ #define BIGSORD 100 typedef struct cross_rec { /* for storing the crosscorrelation information */ float rms; /* rms energy in the reference window */ float maxval; /* max in the crosscorr. fun. q15 */ short maxloc; /* lag # at which max occured */ short firstlag; /* the first non-zero lag computed */ float *correl; /* the normalized corsscor. fun. q15 */ } Cross; typedef struct dp_rec { /* for storing the DP information */ short ncands; /* # of candidate pitch intervals in the frame */ short *locs; /* locations of the candidates */ float *pvals; /* peak values of the candidates */ float *mpvals; /* modified peak values of the candidates */ short *prept; /* pointers to best previous cands. */ float *dpvals; /* cumulative error for each candidate */ } Dprec; typedef struct windstat_rec { /* for lpc stat measure in a window */ float rho[BIGSORD+1]; float err; float rms; } Windstat; typedef struct sta_rec { /* for stationarity measure */ float *stat; float *rms; float *rms_ratio; } Stat; typedef struct frame_rec{ Cross *cp; Dprec *dp; float rms; struct frame_rec *next; struct frame_rec *prev; } Frame; extern Frame *alloc_frame(); SPTK-3.9/bin/pitch/swipe/0000755001051300105040000000000012637167712012163 500000000000000SPTK-3.9/bin/pitch/swipe/COPYING0000644001051300105040000001011412637165722013132 00000000000000Copyright (c) 2009-2013 Kyle Gorman Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. /* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ SPTK-3.9/bin/pitch/swipe/swipe.c0000644001051300105040000006565312633452740013407 00000000000000/* Copyright (c) 2009-2013 Kyle Gorman * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * swipe.c: primary functions * Kyle Gorman */ /* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ #define VNUM 1.5 // current version #include #include #include #include #include #include #include #if 0 #include // http://www.fftw.org/ #include // http://www.mega-nerd.com/libsndfile/ #endif #include "vector.h" // comes with release #define NOK 0 #define DERBS .1 #define POLYV .0013028 // 1 / 12 / 64 = 1 / 768 #define DLOG2P .0104167 // 1/96 // feel free to change these defaults #define ST .3 #define DT .001 #define MIN 100. #define MAX 600. #ifndef M_PI #define M_PI 3.14159265358979323846 #endif #ifndef NAN #define NAN sqrt(-1.) #endif #ifndef isnan int isnan(double x) { return(x != x); } #endif #ifndef log2 // a base-2 log function double log2(double x) { return log(x) / log(2.); } #endif #ifndef round // rounds a double to the nearest integer value double round(double x) { return(x >= 0. ? floor(x + .5) : floor(x - .5)); } #endif // converts from hertz to Mel frequency double hz2mel(double hz) { return(1127.01048 * log(1. + hz / 700.)); } // converts from hertz to ERBs double hz2erb(double hz) { return(21.4 * log10(1. + hz / 229.)); } // converts from ERBs to hertz double erb2hz(double erb) { return((pow(10, erb / 21.4) - 1.) * 229.); } // a silly function that treats NaNs as 0. double fixnan(double x) { return(isnan(x) ? 0. : x); } #if 1 typedef double out_complex[2]; typedef struct _float_list { float f; struct _float_list *next; } float_list; int fftr(double *x, double *y, const int m); int fwritef(double *ptr, const size_t size, const int nitems, FILE * fp); #endif // a helper function for loudness() for individual fft slices #if 0 void La(matrix L, vector f, vector fERBs, fftw_plan plan, fftw_complex* fo, int w2, int hi, int i) { int j; fftw_execute(plan); #else void La(matrix L, vector f, vector fERBs, out_complex* fo, int w2, int hi, int i, double* fi) { int j; double* fi_tmp = malloc(sizeof(double) * w2*2); double* fo_tmp = malloc(sizeof(double) * w2*2); for(j=0;j 0.) td += kernel.v[j] * kernel.v[j]; } td = sqrt(td); // now, td is the p=2 norm factor for (j = 0; j < kernel.x; j++) // normalize the kernel kernel.v[j] /= td; for (j = 0; j < L.x; j++) { for (k = 0; k < L.y; k++) Slocal.m[i][j] += kernel.v[k] * L.m[j][k]; // i.e, kernel' * L } freev(kernel); } // Slocal is filled out; time to interpolate k = 0; for (j = 0; j < S.y; j++) { // determine the interpolation params td = t - tp; while (td >= 0.) { k++; tp += dtp; td -= dtp; } // td now equals the time difference for (i = 0; i < psz; i++) { S.m[lo + i][j] += (Slocal.m[i][k] + (td * (Slocal.m[i][k] - Slocal.m[i][k - 1])) / dtp) * mu.v[i]; } t += dt; } freem(Slocal); } // helper function for populating the strength matrix on left boundary void Sfirst(matrix S, vector x, vector pc, vector fERBs, vector d, intvector ws, intvector ps, double nyquist, double nyquist2, double dt, int n) { int i; int w2 = ws.v[n] / 2; matrix L = loudness(x, fERBs, nyquist, ws.v[n], w2); int lo = 0; // the start of Sfirst-specific code int hi = bisectv(d, 2.); int psz = hi - lo; vector mu = makev(psz); vector pci = makev(psz); for (i = 0; i < hi; i++) { pci.v[i] = pc.v[i]; mu.v[i] = 1. - fabs(d.v[i] - 1.); } // end of Sfirst-specific code Sadd(S, L, fERBs, pci, mu, ps, dt, nyquist2, lo, psz, w2); freem(L); freev(mu); freev(pci); } // generic helper function for populating the strength matrix void Snth(matrix S, vector x, vector pc, vector fERBs, vector d, intvector ws, intvector ps, double nyquist, double nyquist2, double dt, int n) { int i; int w2 = ws.v[n] / 2; matrix L = loudness(x, fERBs, nyquist, ws.v[n], w2); int lo = bisectv(d, n); // start of Snth-specific code int hi = bisectv(d, n + 2); int psz = hi - lo; vector mu = makev(psz); vector pci = makev(psz); int ti = 0; for (i = lo; i < hi; i++) { pci.v[ti] = pc.v[i]; mu.v[ti] = 1. - fabs(d.v[i] - (n + 1)); ti++; } // end of Snth-specific code Sadd(S, L, fERBs, pci, mu, ps, dt, nyquist2, lo, psz, w2); freem(L); freev(mu); freev(pci); } // helper function for populating the strength matrix from the right boundary void Slast(matrix S, vector x, vector pc, vector fERBs, vector d, intvector ws, intvector ps, double nyquist, double nyquist2, double dt, int n) { int i; int w2 = ws.v[n] / 2; matrix L = loudness(x, fERBs, nyquist, ws.v[n], w2); int lo = bisectv(d, n); // start of Slast-specific code int hi = d.x; int psz = hi - lo; vector mu = makev(psz); vector pci = makev(psz); int ti = 0; for (i = lo; i < hi; i++) { pci.v[ti] = pc.v[i]; mu.v[ti] = 1. - fabs(d.v[i] - (n + 1)); ti++; } // end of Slast-specific code Sadd(S, L, fERBs, pci, mu, ps, dt, nyquist2, lo, psz, w2); freem(L); freev(mu); freev(pci); } // performs polynomial tuning on the strength matrix to determine the pitch vector pitch(matrix S, vector pc, double st) { int i, j; int maxi = -1; int search = (int) round((log2(pc.v[2]) - log2(pc.v[0])) / POLYV + 1.); double nftc, maxv, log2pc; double tc2 = 1. / pc.v[1]; vector coefs; vector s = makev(3); vector ntc = makev(3); ntc.v[0] = ((1. / pc.v[0]) / tc2 - 1.) * 2. * M_PI; ntc.v[1] = (tc2 / tc2 - 1.) * 2. * M_PI; ntc.v[2] = ((1. / pc.v[2]) / tc2 - 1.) * 2. * M_PI; vector p = makev(S.y); for (j = 0; j < S.y; j++) { maxv = SHRT_MIN; for (i = 0; i < S.x; i++) { if (S.m[i][j] > maxv) { maxv = S.m[i][j]; maxi = i; } } if (maxv > st) { // make sure it's big enough if (maxi == 0 || maxi == S.x - 1) p.v[j] = pc.v[0]; else { // general case tc2 = 1. / pc.v[maxi]; log2pc = log2(pc.v[maxi - 1]); s.v[0] = S.m[maxi - 1][j]; s.v[1] = S.m[maxi][j]; s.v[2] = S.m[maxi + 1][j]; coefs = polyfit(ntc, s, 2); maxv = SHRT_MIN; for (i = 0; i < search; i++) { // check the nftc space nftc = polyval(coefs, ((1. / pow(2, i * POLYV + log2pc)) / tc2 - 1) * 2 * M_PI); if (nftc > maxv) { maxv = nftc; maxi = i; } } // now we've got the pitch numbers we need freev(coefs); p.v[j] = pow(2, log2pc + (maxi * POLYV)); } } else #if 0 p.v[j] = NAN; #else p.v[j] = 0.0; #endif } freev(ntc); freev(s); return(p); } // primary utility function for each pitch extraction #if 0 vector swipe(int fid, double min, double max, double st, double dt) { #else void swipe(float_list *input, int length, double samplerate, int frame_shift, double min, double max, double st, int otype) { #endif int i; double td = 0.; #if 0 SF_INFO info; SNDFILE* source = sf_open_fd(fid, SFM_READ, &info, true); if (source == NULL || info.sections < 1) return(makev(0)); double nyquist = info.samplerate / 2.; double nyquist2 = info.samplerate; double nyquist16 = info.samplerate * 8.; #else double dt = (double) frame_shift / samplerate; double nyquist = samplerate / 2.; double nyquist2 = samplerate; double nyquist16 = samplerate * 8.; #endif if (max > nyquist) { max = nyquist; fprintf(stderr, "Max pitch exceeds Nyquist frequency..."); fprintf(stderr, "max pitch set to %.2f Hz.\n", max); } if (dt > nyquist2) { dt = nyquist2; fprintf(stderr, "Timestep > SR...timestep set to %f.\n", nyquist2); } intvector ws = makeiv(round(log2((nyquist16) / min) - log2((nyquist16) / max)) + 1); for (i = 0; i < ws.x; i++) ws.v[i] = pow(2, round(log2(nyquist16 / min))) / pow(2, i); vector pc = makev(ceil((log2(max) - log2(min)) / DLOG2P)); vector d = makev(pc.x); for (i = pc.x - 1; i >= 0; i--) { td = log2(min) + (i * DLOG2P); pc.v[i] = pow(2, td); d.v[i] = 1. + td - log2(nyquist16 / ws.v[0]); } // td now equals log2(min) #if 0 vector x = makev((int) info.frames); // read in the signal sf_read_double(source, x.v, x.x); sf_close(source); // takes wavf with it, too #else vector x = makev(length); float_list *tmpf; for (i = 0, tmpf = input; tmpf != NULL; i++, tmpf = tmpf->next) x.v[i] = tmpf->f / 32768.0; // normalized by max_short #endif vector fERBs = makev(ceil((hz2erb(nyquist) - hz2erb(pow(2, td) / 4)) / DERBS)); td = hz2erb(min / 4.); for (i = 0; i < fERBs.x; i++) fERBs.v[i] = erb2hz(td + (i * DERBS)); intvector ps = onesiv(floor(fERBs.v[fERBs.x - 1] / pc.v[0] - .75)); sieve(ps); ps.v[0] = PR; // hack to make 1 "act" prime...don't ask #if 0 matrix S = zerom(pc.x, ceil(((double) x.x / nyquist2) / dt)); #else matrix S; if(dt >= nyquist2){ S = zerom(pc.x, ceil(((double) x.x / nyquist2) / dt)); }else{ S = zerom(pc.x, ceil((double) x.x / frame_shift)); } #endif Sfirst(S, x, pc, fERBs, d, ws, ps, nyquist, nyquist2, dt, 0); for (i = 1; i < ws.x - 1; i++) // S is updated inline here Snth(S, x, pc, fERBs, d, ws, ps, nyquist, nyquist2, dt, i); // i is now (ws.x - 1) Slast(S, x, pc, fERBs, d, ws, ps, nyquist, nyquist2, dt, i); freev(fERBs); freeiv(ws); freeiv(ps); freev(d); freev(x); vector p = pitch(S, pc, st); // find pitch using strength matrix freev(pc); freem(S); #if 0 return(p); #else for (i = 0; i < p.x; i++) { switch(otype) { case 1: /* f0 */ fwritef(&p.v[i], sizeof(p.v[i]), 1, stdout); break; case 2: /* log(f0) */ if (p.v[i] != 0.0) p.v[i] = log(p.v[i]); else p.v[i] = -1.0E10; fwritef(&p.v[i], sizeof(p.v[i]), 1, stdout); break; default: /* pitch */ if (p.v[i] != 0.0) p.v[i] = samplerate / p.v[i]; fwritef(&p.v[i], sizeof(p.v[i]), 1, stdout); break; } } freev(p); #endif } #if 0 // a Python version of the call vector pyswipe(char wav[], double min, double max, double st, double dt) { return swipe(fileno(fopen(wav, "r")), min, max, st, dt); } // function for printing the pitch vector returned by swipe() void printp(vector p, int fid, double dt, int mel, int vlo) { int i; double t = 0.; FILE* sink = fdopen(fid, "w"); if (mel) { if (vlo) { for (i = 0; i < p.x; i++) { fprintf(sink, "%4.4f %5.4f\n", t, hz2mel(p.v[i])); t += dt; } } else { // Default case for (i = 0; i < p.x; i++) { if (!isnan(p.v[i])) fprintf(sink, "%4.4f %5.4f\n", t, hz2mel(p.v[i])); t += dt; } } } else { if (vlo) { for (i = 0; i < p.x; i++) { fprintf(sink, "%4.4f %5.4f\n", t, p.v[i]); t += dt; } } else { for (i = 0; i < p.x; i++) { if (!isnan(p.v[i])) fprintf(sink, "%4.4f %5.4f\n", t, p.v[i]); t += dt; } } } } // main method, interfacing with user arguments int main(int argc, char* argv[]) { char output[] = "OUTPUT:\npitch_0\ttime_0\npitch_1\ttime_1\n...\t...\ \npitch_N\ttime_N\n\n"; char header[] = "\nSWIPE' pitch tracker, implemented by Kyle Gorman \ , \nbased on: A. Camacho. 2007. A sawtooth \ waveform inspired pitch estimator\nfor speech and music. Doctoral \ dissertation, U of Florida.\n\n\ More information: \n\n"; char synops[] = "SYNPOSIS:\n\n\ swipe [-i FILE] [-o FILE] [-b LIST] [-r MIN:MAX] [-s TS] [-t DT] [-mnhv]\n\ \nFLAG:\t\tDESCRIPTION:\t\t\t\t\tDEFAULT:\n\n\ -i FILE\t\tinput file\t\t\t\t\t\n\ -o FILE\t\toutput file\t\t\t\t\t\n\ -b LIST\t\tbatch mode [LIST is a file containing\n\ \t\tone \"INPUT OUTPUT\" pair per line]\n\n\ -r MIN:MAX\tpitchrange in Hertz\t\t\t\t100:600\n\ -s TIMESTEP\ttimestep in seconds\t\t\t\t0.001\n\ -t THRESHOLD\tstrength threshold [0 <= x <= 1]\t\t0.300\n\n\ -m\t\tOutput Mel pitch\t\t\t\tno\n\ -n\t\tDon't output voiceless frames\t\t\tno\n\ -h\t\tDisplay this message, then quit\n\ -v\t\tDisplay version number, then quit\n\n"; // all set by #defines double st = ST; double dt = DT; bool vlo = true; bool mel = false; double min = MIN; double max = MAX; int ch; FILE* batch = NULL; // not going to be read that way, // some, but not all, compilers initialize char*s to be "\0" char* wav = "\0"; char* out = "\0"; int needed; while ((ch = getopt(argc, argv, "i:o:r:s:t:b:mnhv")) != -1) { switch(ch) { case 'b': batch = fopen(optarg, "r"); break; case 'i': needed = (int) strlen(optarg); if (needed > FILENAME_MAX) { fprintf(stderr, "Filename too long, aborting.\n"); exit(EXIT_FAILURE); } wav = (char *) malloc(sizeof(char) * needed); strcpy(wav, optarg); break; case 'o': needed = (int) strlen(optarg); if (needed > FILENAME_MAX) { fprintf(stderr, "Filename too long, aborting.\n"); exit(EXIT_FAILURE); } out = (char *) malloc(sizeof(char) * needed); strcpy(out, optarg); break; case 'r': min = atof(strtok(optarg, ":")); max = atof(strtok(NULL, ":")); break; case 't': st = atof(optarg); break; case 's': dt = atof(optarg); break; case 'm': mel = true; break; case 'n': vlo = false; break; case 'h': fprintf(stderr, "%s", header); fprintf(stderr, "%s", synops); fprintf(stderr, "%s", output); exit(EXIT_SUCCESS); case 'v': fprintf(stderr, "This is SWIPE', v. %1.1f.\n", VNUM); exit(EXIT_SUCCESS); case '?': default: fprintf(stderr, "%s", header); fprintf(stderr, "%s", synops); exit(EXIT_FAILURE); argc -= optind; argv += optind; } } // santiny-check the args if (min < 1.) { fprintf(stderr, "Min pitch < 1 Hz, aborting.\n"); exit(EXIT_FAILURE); } if (max - min < 1.) { fprintf(stderr, "Max pitch <= min pitch, aborting.\n"); exit(EXIT_FAILURE); } if (st < 0. || st > 1.) { fprintf(stderr, "Strength must be 0 <= x <= 1, set to %.3f.\n", ST); st = ST; } if (dt < .001) { fprintf(stderr, "Timestep must be >= 0.001, set to %.3f.\n", DT); dt = DT; } if (batch != NULL) { // iterate through batch pairs while (fscanf(batch, "%s %s", wav, out) != EOF) { printf("%s -> %s...", wav, out); FILE* wf = fopen(wav, "r"); if (wf == NULL) { fprintf(stderr, "Reading from \"%s\" failed.\n", wav); exit(EXIT_FAILURE); } vector p = swipe(fileno(wf), min, max, st, dt); fclose(wf); if (p.x == NOK) { fprintf(stderr, "Reading from \"%s\" failed.\n", wav); fclose(batch); exit(EXIT_FAILURE); } else { FILE* output = fopen(out, "w"); if (output == NULL) { fprintf(stderr, "Writing to \"%s\" failed.\n", out); exit(EXIT_FAILURE); } printp(p, fileno(output), dt, mel, vlo); printf("done.\n"); fclose(output); } freev(p); } fclose(batch); } else { vector p; if (*wav == '\0') { p = swipe(fileno(stdin), min, max, st, dt); wav = ""; } else { FILE* input = fopen(wav, "r"); if (input == NULL) { fprintf(stderr, "Reading from \"%s\" failed (try ", wav); fprintf(stderr, "specifying an input file with -i).\n"); exit(EXIT_FAILURE); } p = swipe(fileno(input), min, max, st, dt); } if (p.x == NOK) { if (*wav == '\0') { fprintf(stderr, "Reading from STDIN failed (did "); fprintf(stderr, "you pipe a file to `swipe`?').\n"); } else { fprintf(stderr, "Reading from \"%s\" failed (try ", wav); fprintf(stderr, "specifying an input file with -i).\n"); } exit(EXIT_FAILURE); } else { if (*out == '\0') printp(p, fileno(stdout), dt, mel, vlo); else { FILE* output = fopen(out, "w"); if (output == NULL) { fprintf(stderr, "Writing to \"%s\" failed.\n", out); exit(EXIT_FAILURE); } printp(p, fileno(output), dt, mel, vlo); } } freev(p); } exit(EXIT_SUCCESS); } #endif SPTK-3.9/bin/pitch/swipe/vector.c0000644001051300105040000005050612633452740013551 00000000000000/* Copyright (c) 2009-2013 Kyle Gorman * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * vector.c: vector and matrix data structures with associated methods * Kyle Gorman * Kyle Gorman */ /* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ #include #include #include #include #include #include "vector.h" #ifdef __APPLE__ #include #endif #ifndef NAN #define NAN sqrt(-1.) #endif // create a vector of size xSz vector makev(int xSz) { vector nw_vector; nw_vector.x = xSz; nw_vector.v = malloc(sizeof(double) * xSz); return(nw_vector); } // make a vector of zeros of size xSz vector zerov(int xSz) { vector nw_vector; nw_vector.x = xSz; nw_vector.v = calloc(sizeof(double), xSz); return(nw_vector); } // make a vector of ones of size xSz vector onesv(int xSz) { vector nw_vector = makev(xSz); int i; for (i = 0; i < nw_vector.x; i++) nw_vector.v[i] = 1.; return(nw_vector); } // make a vector of NaNs of size xSz vector nansv(int xSz) { vector nw_vector = makev(xSz); int i; for (i = 0; i < nw_vector.x; i++) nw_vector.v[i] = NAN; return(nw_vector); } // make a deep copy of a vector vector copyv(vector yr_vector) { vector nw_vector = makev(yr_vector.x); memcpy(nw_vector.v, yr_vector.v, sizeof(double) * yr_vector.x); return(nw_vector); } // free the memory associated with the vector void freev(vector yr_vector) { free(yr_vector.v); } // print the vector void printv(vector yr_vector) { int i; for (i = 0; i < yr_vector.x; i++) printf("%f\n", yr_vector.v[i]); } // return the index of the maximum value of the vector int maxv(vector yr_vector) { int index = -1; double val = SHRT_MIN; int i; for (i = 0; i < yr_vector.x; i++) { if (yr_vector.v[i] > val) { val = yr_vector.v[i]; index = i; } } return(index); } // return the index of the minimum value of the vector int minv(vector yr_vector) { int index = -1; double val = SHRT_MAX; int i; for (i = 0; i < yr_vector.x; i++) { if (yr_vector.v[i] < val) { val = yr_vector.v[i]; index = i; } } return(index); } // find the bisection index of the vector for key int bisectv(vector yr_vector, double key) { int md; int lo = 1; int hi = yr_vector.x; while (hi - lo > 1) { md = (hi + lo) >> 1; if (yr_vector.v[md] > key) hi = md; else lo = md; } return(hi); } /* like bisectv(), but the minimum starting value is passed as an argument. * This is good for multiple bisection calls for forming a new vector when * the queries are a non-constant interval; but make sure to use bisectv() * the first time. */ int bilookv(vector yr_vector, double key, int lo) { int md; int hi = yr_vector.x; lo--; while (hi - lo > 1) { md = (hi + lo) >> 1; if (yr_vector.v[md] > key) hi = md; else lo = md; } return(hi); } // intvector versions of the above intvector makeiv(int xSz) { intvector nw_vector; nw_vector.x = xSz; nw_vector.v = malloc(sizeof(int) * xSz); return(nw_vector); } intvector zeroiv(int xSz) { intvector nw_vector; nw_vector.x = xSz; nw_vector.v = calloc(sizeof(int), xSz); return(nw_vector); } intvector onesiv(int xSz) { intvector nw_vector = makeiv(xSz); int i; for (i = 0; i < nw_vector.x; i++) nw_vector.v[i] = 1; return(nw_vector); } intvector copyiv(intvector yr_vector) { intvector nw_vector = makeiv(yr_vector.x); memcpy(nw_vector.v, yr_vector.v, sizeof(int) * nw_vector.x); return(nw_vector); } // convert an intvector into a vector using implicit casts to double vector iv2v(intvector yr_vector) { vector nw_vector = makev(yr_vector.x); int i; for (i = 0; i < yr_vector.x; i++) nw_vector.v[i] = yr_vector.v[i]; return(nw_vector); } void freeiv(intvector yr_vector) { free(yr_vector.v); } void printiv(intvector yr_vector) { int i; for (i = 0; i < yr_vector.x; i++) printf("%d\n", yr_vector.v[i]); } int maxiv(intvector yr_vector) { int index = -1; int val = SHRT_MIN; int i; for (i = 0; i < yr_vector.x; i++) { if (yr_vector.v[i] > val) { val = yr_vector.v[i]; index = i; } } return(index); } int miniv(intvector yr_vector) { int index = -1; int val = SHRT_MAX; int i; for (i = 0; i < yr_vector.x; i++) { if (yr_vector.v[i] < val) { val = yr_vector.v[i]; index = i; } } return(index); } int bisectiv(intvector yr_vector, int key) { int md; int lo = 1; int hi = yr_vector.x; while (hi - lo > 1) { md = (hi + lo) >> 1; if (yr_vector.v[md] > key) hi = md; else lo = md; } return(hi); } int bilookiv(intvector yr_vector, int key, int lo) { int md; int hi = yr_vector.x; lo--; while (hi - lo > 1) { md = (hi + lo) >> 1; if (yr_vector.v[md] > key) hi = md; else lo = md; } return(hi); } // matrix versions of the above matrix makem(int xSz, int ySz) { matrix nw_matrix; nw_matrix.x = xSz; nw_matrix.y = ySz; nw_matrix.m = malloc(sizeof(double*) * xSz); int i; for (i = 0; i < nw_matrix.x; i++) nw_matrix.m[i] = malloc(sizeof(double) * ySz); return(nw_matrix); } matrix zerom(int xSz, int ySz) { matrix nw_matrix; nw_matrix.x = xSz; nw_matrix.y = ySz; nw_matrix.m = malloc(sizeof(double*) * xSz); int i; for (i = 0; i < nw_matrix.x; i++) nw_matrix.m[i] = calloc(sizeof(double), ySz); return(nw_matrix); } matrix onesm(int xSz, int ySz) { matrix nw_matrix = makem(xSz, ySz); int i, j; for (i = 0; i < nw_matrix.x; i++) for (j = 0; j < nw_matrix.y; j++) nw_matrix.m[i][j] = 1.; return(nw_matrix); } matrix nansm(int xSz, int ySz) { matrix nw_matrix = makem(xSz, ySz); int i, j; for (i = 0; i < nw_matrix.x; i++) for (j = 0; j < nw_matrix.y; j++) nw_matrix.m[i][j] = NAN; return(nw_matrix); } matrix copym(matrix yr_matrix) { matrix nw_matrix = makem(yr_matrix.x, yr_matrix.y); int i; for (i = 0; i < yr_matrix.x; i++) // does not assume contiguity memcpy(nw_matrix.m[i], yr_matrix.m[i], sizeof(double) * yr_matrix.y); return(nw_matrix); } void freem(matrix yr_matrix) { int i; for (i = 0; i < yr_matrix.x; i++) free(yr_matrix.m[i]); free(yr_matrix.m); } void printm(matrix yr_matrix) { int i, j; for (i = 0; i < yr_matrix.x; i++) { for (j = 0; j < yr_matrix.y; j++) printf("%f\t", yr_matrix.m[i][j]); printf("\n"); } } // intmatrix versions of the above intmatrix makeim(int xSz, int ySz) { intmatrix nw_matrix; nw_matrix.x = xSz; nw_matrix.y = ySz; #if 0 nw_matrix.m = malloc(sizeof(int) * xSz); #else nw_matrix.m = malloc(sizeof(int*) * xSz); #endif int i; for (i = 0; i < nw_matrix.x; i++) nw_matrix.m[i] = malloc(sizeof(int) * ySz); return(nw_matrix); } intmatrix zeroim(int xSz, int ySz) { intmatrix nw_matrix; nw_matrix.x = xSz; nw_matrix.y = ySz; nw_matrix.m = malloc(sizeof(int) * xSz); int i; for (i = 0; i < nw_matrix.x; i++) nw_matrix.m[i] = calloc(sizeof(int), ySz); return(nw_matrix); } intmatrix onesim(int xSz, int ySz) { int i, j; intmatrix nw_matrix = makeim(xSz, ySz); for (i = 0; i < nw_matrix.x; i++) for (j = 0; j < nw_matrix.y; j++) nw_matrix.m[i][j] = 1; return(nw_matrix); } intmatrix copyim(intmatrix yr_matrix) { intmatrix nw_matrix = makeim(yr_matrix.x, yr_matrix.y); int i; for (i = 0; i < yr_matrix.x; i++) // does not assume contiguity memcpy(nw_matrix.m[i], yr_matrix.m[i], sizeof(int) * yr_matrix.y); return(nw_matrix); } matrix im2m(intmatrix yr_matrix) { matrix nw_matrix = makem(yr_matrix.x, yr_matrix.y); int i, j; for (i = 0; i < yr_matrix.x; i++) for (j = 0; j < yr_matrix.y; j++) nw_matrix.m[i][j] = yr_matrix.m[i][j]; return(nw_matrix); } void freeim(intmatrix yr_matrix) { int i; for (i = 0; i < yr_matrix.x; i++) free(yr_matrix.m[i]); free(yr_matrix.m); } void printim(intmatrix yr_matrix) { int i, j; for (i = 0; i < yr_matrix.x; i++) { for (j = 0; j < yr_matrix.y; j++) printf("%d\t", yr_matrix.m[i][j]); printf("\n"); } } // a naive Sieve of Erasthones for prime numbers int sieve(intvector ones) { int k = 0; int sp = floor(sqrt(ones.x)); int i, j; ones.v[0] = NP; // 1 is not prime, though sometimes I wish it was for (i = 1; i < sp; i++) { if PRIME(ones.v[i]) { for (j = i + i + 1; j < ones.x; j += i + 1) ones.v[j] = NP; k++; } } for (i = sp; i < ones.x; i++) { // now we're only counting if PRIME(ones.v[i]) k++; } return(k); } intvector primes(int n) { int i, j = 0; intvector myOnes = onesiv(n); intvector myPrimes = makeiv(sieve(myOnes)); // size of the # of primes for (i = 0; i < myOnes.x; i++) // could start at 1 if PRIME(myOnes.v[i]) myPrimes.v[j++] = i + 1; freeiv(myOnes); return(myPrimes); } // cubic spline function, based on Numerical Recipes in C, 2nd ed. vector spline(vector x, vector y) { int i, j; double p, qn, sig; vector y2 = makev(x.x); double* u = malloc((unsigned) (x.x - 1) * sizeof(double)); y2.v[0] = -.5; // left boundary u[0] = (3. / (x.v[1] - x.v[0])) * ((y.v[1] - y.v[0]) / (x.v[1] - x.v[0]) - YP1); for (i = 1; i < x.x - 1; i++) { // decomp loop sig = (x.v[i] - x.v[i - 1]) / (x.v[i + 1] - x.v[i - 1]); p = sig * y2.v[i - 1] + 2.; y2.v[i] = (sig - 1.) / p; u[i] = (y.v[i + 1] - y.v[i]) / (x.v[i + 1] - x.v[i]) - (y.v[i] - y.v[i - 1]) / (x.v[i] - x.v[i - 1]); u[i] = (6 * u[i] / (x.v[i + 1] - x.v[i - 1]) - sig * u[i - 1]) / p; } qn = .5; // right boundary y2.v[y2.x - 1] = ((3. / (x.v[x.x - 1] - x.v[x.x - 2])) * (YPN - (y.v[y.x - 1] - y.v[y.x - 2]) / (x.v[x.x - 1] - x.v[x.x - 2])) - qn * u[x.x - 2]) / (qn * y2.v[y2.x - 2] + 1.); for (j = x.x - 2; j >= 0; j--) // backsubstitution loop y2.v[j] = y2.v[j] * y2.v[j + 1] + u[j]; free(u); return(y2); } // query the cubic spline double splinv(vector x, vector y, vector y2, double val, int hi) { int lo = hi - 1; // find hi linearly, or using bisectv() double h = x.v[hi] - x.v[lo]; double a = (x.v[hi] - val) / h; double b = (val - x.v[lo]) / h; return(a * y.v[lo] + b * y.v[hi] + ((a * a * a - a) * y2.v[lo] * (b * b * b - b) * y2.v[hi]) * (h * h) / 6.); } #if 1 /* LU decomposition */ static void LU(int n, double **A) { int i, j, k; double q; for (k = 0; k < n - 1; k++) { for (i = k + 1; i < n; i++) { q = A[i][k] / A[k][k]; for (j = k + 1; j < n; j++) { A[i][j] -= q * A[k][j]; } A[i][k] = q; } } } /* solve linear equation Ax = b via LU decomposition */ static void SOLVE(int n, double **A, double *b) { int i, j; for (i = 0; i < n; i++) { for (j = 0; j < i; j++) { b[i] -= A[i][j] * b[j]; } } for (i = n - 1; i >= 0; i--) { for (j = i + 1; j < n; j++) { b[i] -= A[i][j] * b[j]; } b[i] /= A[i][i]; } } static void dgels(int n, vector Ap, vector bp) { int i; double x1 = 0.0, x2 = 0.0, x3 = 0.0, x4 = 0.0, x1y1 = 0.0, x2y1 = 0.0, y1 = 0.0; matrix a = makem(n, n); for(i = 0; i < n; i++) { x1 += pow(Ap.v[i], 1.0); x2 += pow(Ap.v[i], 2.0); x3 += pow(Ap.v[i], 3.0); x4 += pow(Ap.v[i], 4.0); x1y1 += pow(Ap.v[i], 1.0) * pow(bp.v[i], 1.0); x2y1 += pow(Ap.v[i], 2.0) * pow(bp.v[i], 1.0); y1 += pow(bp.v[i], 1.0); } a.m[0][0] = x4; a.m[0][1] = x3; a.m[0][2] = x2; a.m[1][0] = x3; a.m[1][1] = x2; a.m[1][2] = x1; a.m[2][0] = x2; a.m[2][1] = x1; a.m[2][2] = n; bp.v[0] = x2y1; bp.v[1] = x1y1; bp.v[2] = y1; /* LU decomposition */ LU(n, a.m); /* solve linear equation via LU decomposition */ SOLVE(n, a.m, bp.v); freem(a); } #endif // polynomial fitting with CLAPACK: solves poly(A, m) * X = B vector polyfit(vector A, vector B, int degree) { #if 0 int info; #endif degree++; // I find it intuitive this way... #if 0 double* Ap = malloc(sizeof(double) * degree * A.x); int i, j; for (i = 0; i < degree; i++) for (j = 0; j < A.x; j++) Ap[i * A.x + j] = pow(A.v[j], degree - i - 1); // mimics MATLAB #else int i; #endif vector Bp = makev(degree >= B.x ? degree : B.x); for (i = 0; i < B.x; i++) Bp.v[i] = B.v[i]; #if 0 i = 1; // nrhs, j is info j = A.x + degree; // lwork double* work = malloc(sizeof(double) * j); dgels_("N", &A.x, °ree, &i, Ap, &B.x, Bp.v, °ree, work, &j, &info); free(Ap); free(work); if (info < 0) { fprintf(stderr, "LAPACK routine dgels() returned error: %d\n", info); exit(EXIT_FAILURE); } #else dgels(degree, A, Bp); #endif return(Bp); } // given a vector of coefficients and a value for x, evaluate the polynomial double polyval(vector coefs, double val) { double sum = 0.; int i; for (i = 0; i < coefs.x; i++) sum += coefs.v[i] * pow(val, coefs.x - i - 1); return(sum); } // some test code #ifdef DEBUG int main(void) { int i, j; printf("VECTOR example\n"); vector a = makev(10); for (i = 0; i < a.x; i++) a.v[i] = i * i; vector b = copyv(a); printv(b); freev(a); freev(b); printf("\n"); printf("INTVECTOR example\n"); intvector c = makeiv(10); for (i = 0; i < c.x; i++) c.v[i] = i * i; intvector d = copyiv(c); printiv(d); freeiv(c); freeiv(d); printf("\n"); printf("more INTVECTOR\n"); intvector c1 = zeroiv(10); printiv(c1); freeiv(c1); intvector d1 = onesiv(10); printiv(d1); freeiv(d1); printf("\n"); printf("MATRIX example\n"); matrix e = makem(20, 3); for (i = 0; i < e.x; i++) for (j = 0; j < e.y; j++) e.m[i][j] = i * i + j; matrix f = copym(e); printm(f); freem(e); freem(f); printf("\n"); printf("INTMATRIX example\n"); intmatrix g = makeim(20, 3); for (i = 0; i < g.x; i++) for (j = 0; j < g.y; j++) g.m[i][j] = i * i + j; intmatrix h = copyim(g); printim(h); freeim(g); freeim(h); printf("\n"); printf("SIEVE example (input: 23)\n"); printiv(primes(23)); printf("\n"); printf("BILOOK example\n"); vector fives = makev(300); for (i = 0; i < fives.x; i++) fives.v[i] = (i + 10) * 5.; vector twenties = makev(100); for (i = 0; i < twenties.x; i++) twenties.v[i] = i * 20.; printf("searching for values of vector fives in twenties...\n"); printf("fives (sz:%d): %f < x < %f\n", fives.x, fives.v[minv(fives)], fives.v[maxv(fives)]); printf("twenties (sz:%d): %f < x < %f\n", twenties.x, twenties.v[minv(twenties)], twenties.v[maxv(twenties)]); int hi = bisectv(twenties, fives.v[14]); for (i = 15; i < 30; i++) { hi = bilookv(twenties, fives.v[i], hi - 1); printf("twenties[%d] %f <= fives[%d] %f < twenties[%d] %f\n", hi - 1, twenties.v[hi - 1], i, fives.v[i], hi, twenties.v[hi]); } freev(fives); freev(twenties); printf("\n"); printf("POLY example\n"); vector x = makev(4); vector y = makev(4); x.v[0] = 3.0; x.v[1] = 1.5; x.v[2] = 4.0; x.v[3] = 2.; y.v[0] = 2.5; y.v[1] = 3.1; y.v[2] = 2.1; y.v[3] = 1.0; printv(polyfit(x, y, 4)); printf("\nOctave: -0.683446 5.276186 -10.846127 -0.092885 13.295935\n"); printf("%f\n", polyval(polyfit(x, y, 4), 3)); printf("Octave: 2.5\n\n"); } #endif SPTK-3.9/bin/pitch/swipe/vector.h0000644001051300105040000000751312633452767013567 00000000000000/* Copyright (c) 2009-2013 Kyle Gorman * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * vector.h: header for vector.c * Kyle Gorman */ #ifndef VECTOR_H #define VECTOR_H // vector stuff typedef struct { int x; double *v; } vector; vector makev(int); vector zerov(int); vector onesv(int); vector nansv(int); vector copyv(vector); int maxv(vector); int minv(vector); int bisectv(vector, double); int bilookv(vector, double, int); void freev(vector); void printv(vector); // intvector stuff typedef struct { int x; int *v; } intvector; intvector makeiv(int); intvector zeroiv(int); intvector onesiv(int); intvector copyiv(intvector); vector iv2v(intvector); int maxiv(intvector); int miniv(intvector); int bisectiv(intvector, int); int bilookiv(intvector, int, int); void freeiv(intvector); void printiv(intvector); // matrix stuff typedef struct { int x; int y; double **m; } matrix; matrix makem(int, int); matrix zerom(int, int); matrix onesm(int, int); matrix nansm(int, int); matrix copym(matrix); void freem(matrix); void printm(matrix); // intmatrix stuff typedef struct { int x; int y; int **m; } intmatrix; intmatrix makeim(int, int); intmatrix zeroim(int, int); intmatrix onesim(int, int); intmatrix copyim(intmatrix); matrix im2m(intmatrix); // cast void freeim(intmatrix); void printim(intmatrix); // prime sieve #define NP 0 #define PR 1 #define PRIME(x) (x == 1) int sieve(intvector); intvector primes(int); // cubic spline #define YP1 2. #define YPN 2. vector spline(vector, vector); double splinv(vector, vector, vector, double, int); // polynomial fitting vector polyfit(vector, vector, int); double polyval(vector, double); #endif SPTK-3.9/bin/pitch/Makefile.am0000644001051300105040000000033512442245110012770 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = pitch pitch_SOURCES = pitch.c snack/jkGetF0.c snack/sigproc.c snack/jkGetF0.h \ swipe/swipe.c swipe/vector.c swipe/vector.h pitch_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/pitch/Makefile.in0000644001051300105040000004531212637167417013030 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = pitch$(EXEEXT) subdir = bin/pitch ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am__dirstamp = $(am__leading_dot)dirstamp am_pitch_OBJECTS = pitch.$(OBJEXT) snack/jkGetF0.$(OBJEXT) \ snack/sigproc.$(OBJEXT) swipe/swipe.$(OBJEXT) \ swipe/vector.$(OBJEXT) pitch_OBJECTS = $(am_pitch_OBJECTS) pitch_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(pitch_SOURCES) DIST_SOURCES = $(pitch_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include pitch_SOURCES = pitch.c snack/jkGetF0.c snack/sigproc.c snack/jkGetF0.h \ swipe/swipe.c swipe/vector.c swipe/vector.h pitch_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/pitch/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/pitch/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) snack/$(am__dirstamp): @$(MKDIR_P) snack @: > snack/$(am__dirstamp) snack/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) snack/$(DEPDIR) @: > snack/$(DEPDIR)/$(am__dirstamp) snack/jkGetF0.$(OBJEXT): snack/$(am__dirstamp) \ snack/$(DEPDIR)/$(am__dirstamp) snack/sigproc.$(OBJEXT): snack/$(am__dirstamp) \ snack/$(DEPDIR)/$(am__dirstamp) swipe/$(am__dirstamp): @$(MKDIR_P) swipe @: > swipe/$(am__dirstamp) swipe/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) swipe/$(DEPDIR) @: > swipe/$(DEPDIR)/$(am__dirstamp) swipe/swipe.$(OBJEXT): swipe/$(am__dirstamp) \ swipe/$(DEPDIR)/$(am__dirstamp) swipe/vector.$(OBJEXT): swipe/$(am__dirstamp) \ swipe/$(DEPDIR)/$(am__dirstamp) pitch$(EXEEXT): $(pitch_OBJECTS) $(pitch_DEPENDENCIES) $(EXTRA_pitch_DEPENDENCIES) @rm -f pitch$(EXEEXT) $(AM_V_CCLD)$(LINK) $(pitch_OBJECTS) $(pitch_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) -rm -f snack/*.$(OBJEXT) -rm -f swipe/*.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pitch.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@snack/$(DEPDIR)/jkGetF0.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@snack/$(DEPDIR)/sigproc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@swipe/$(DEPDIR)/swipe.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@swipe/$(DEPDIR)/vector.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -rm -f snack/$(DEPDIR)/$(am__dirstamp) -rm -f snack/$(am__dirstamp) -rm -f swipe/$(DEPDIR)/$(am__dirstamp) -rm -f swipe/$(am__dirstamp) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) snack/$(DEPDIR) swipe/$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) snack/$(DEPDIR) swipe/$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/pitch/pitch.c0000644001051300105040000002570012637156644012235 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * Pitch Extraction * * * * 1998.7 M.Tamura * * 2000.3 T.Tanaka * * 2011.10 A.Tamamori * * 2011.11 T.Sawada * * * * usage: * * pitch [ options ] [ infile ] > stdout * * options: * * -a a : algorithm used for pitch [0] * * estimation * * 0 (RAPT) * * 1 (SWIPE') * * -s s : sampling frequency (Hz) [16] * * -p p : frame shift [80] * * -T T : voiced/unvoiced threshold [0.0] * * (used only for RAPT algorithm) * * -t t : voiced/unvoiced threshold [0.3] * * (used only for SWIPE' algorithm) * * -L L : minimum fundamental frequency [60] * * to search for (Hz) * * -H H : maximum fundamental frequency [240] * * to search for (Hz) * * -o o : output format [0] * * 0 (pitch) * * 1 (f0) * * 2 (log(f0)) * * infile: * * data sequence * * x(0), x(1), ..., x(n-1), ... * * stdout: * * pitch, f0, or log(f0) * * * ************************************************************************/ static char *rcs_id = "$Id: pitch.c,v 1.47 2015/12/14 01:14:21 uratec Exp $"; /* Standard C Libraries */ #include #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define LOW 60.0 #define HIGH 240.0 #define FRAME_SHIFT 80 #define SAMPLE_FREQ 16.0 #define ATYPE 0 #define OTYPE 0 #define STR_LEN 255 #define THRESH_RAPT 0.0 #define THRESH_SWIPE 0.3 #define NOISEMASK 50.0 #define SEED 1 #define RND_MAX 32767 #define FSP 10.0 #define ALPHA 0.00275 #define BETA_1 9600.0 #define BETA_2 168.0 #define BETA_3 96000.0 /* Command Name */ char *cmnd; typedef struct _float_list { float f; struct _float_list *next; } float_list; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - pitch extraction\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -a a : algorithm used for pitch [%d]\n", ATYPE); fprintf(stderr, " estimation\n"); fprintf(stderr, " 0 (RAPT)\n"); fprintf(stderr, " 1 (SWIPE')\n"); fprintf(stderr, " -s s : sampling frequency (kHz) [%.1f]\n", SAMPLE_FREQ); fprintf(stderr, " -p p : frame shift [%d]\n", FRAME_SHIFT); fprintf(stderr, " -T T : voiced/unvoiced threshold [%.1f]\n", THRESH_RAPT); fprintf(stderr, " (used only for RAPT algorithm)\n"); fprintf(stderr, " -t t : voiced/unvoiced threshold [%g]\n", THRESH_SWIPE); fprintf(stderr, " (used only for SWIPE' algorithm)\n"); fprintf(stderr, " -L L : minimum fundamental [%g]\n", LOW); fprintf(stderr, " frequency to search for (Hz)\n"); fprintf(stderr, " -H H : maximum fundamental [%g]\n", HIGH); fprintf(stderr, " frequency to search for (Hz)\n"); fprintf(stderr, " -o o : output format [%d]\n", OTYPE); fprintf(stderr, " 0 (pitch)\n"); fprintf(stderr, " 1 (f0)\n"); fprintf(stderr, " 2 (log(f0))\n"); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " waveform (%s) \n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " pitch, f0 or log(f0) (%s)\n", FORMAT); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char **argv) { int length, frame_shift = FRAME_SHIFT, atype = ATYPE, otype = OTYPE; double *x, thresh_rapt = THRESH_RAPT, thresh_swipe = THRESH_SWIPE, sample_freq = SAMPLE_FREQ, L = LOW, H = HIGH; FILE *fp = stdin; float_list *top, *cur, *prev; void rapt(float_list * flist, int length, double sample_freq, int frame_shift, double min, double max, double threshold, int otype); void swipe(float_list * input, int length, double sample_freq, int frame_shift, double min, double max, double threshold, int otype); if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) if (**++argv == '-') { switch (*(*argv + 1)) { case 'a': atype = atoi(*++argv); --argc; break; case 's': sample_freq = atof(*++argv); --argc; break; case 'p': frame_shift = atoi(*++argv); --argc; break; case 'T': thresh_rapt = atof(*++argv); --argc; break; case 't': thresh_swipe = atof(*++argv); --argc; break; case 'L': L = atof(*++argv); --argc; break; case 'H': H = atof(*++argv); --argc; break; case 'o': otype = atoi(*++argv); --argc; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else { fp = getfp(*argv, "rb"); } sample_freq *= 1000.0; x = dgetmem(1); top = prev = (float_list *) malloc(sizeof(float_list)); length = 0; prev->next = NULL; while (freadf(x, sizeof(*x), 1, fp) == 1) { cur = (float_list *) malloc(sizeof(float_list)); cur->f = (float) x[0]; length++; prev->next = cur; cur->next = NULL; prev = cur; } if (atype == 0) { rapt(top->next, length, sample_freq, frame_shift, L, H, thresh_rapt, otype); } else { swipe(top->next, length, sample_freq, frame_shift, L, H, thresh_swipe, otype); } return (0); } SPTK-3.9/bin/us/0000755001051300105040000000000012637167715010357 500000000000000SPTK-3.9/bin/us/titech/0000755001051300105040000000000012637167715011637 500000000000000SPTK-3.9/bin/us/titech/COPYING0000644001051300105040000000513512442245132012576 00000000000000/* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ Filter coefficients were designed by Prof. Takao Kobayashi. SPTK-3.9/bin/us/titech/lpfcoef.3to50000644001051300105040000000174512442245132013700 000000000000006.27736e-06 -3.80598e-05 -0.000101959 -0.000183375 -0.000231972 -0.000174802 5.435e-05 0.000465877 0.000966219 0.00134126 0.00129987 0.000586991 -0.000858992 -0.00276596 -0.00448732 -0.00512904 -0.00385791 -0.000320216 0.00498247 0.010554 0.0141578 0.0134978 0.00717975 -0.00436758 -0.0184222 -0.0302951 -0.0345716 -0.0270402 -0.00673792 0.0226684 0.0528865 0.0727659 0.0716259 0.0433181 -0.0102537 -0.077504 -0.138378 -0.168556 -0.145829 -0.0569713 0.0969251 0.298486 0.5164 0.711814 0.847245 0.895668 0.847245 0.711814 0.5164 0.298486 0.0969251 -0.0569713 -0.145829 -0.168556 -0.138378 -0.077504 -0.0102537 0.0433181 0.0716259 0.0727659 0.0528865 0.0226684 -0.00673792 -0.0270402 -0.0345716 -0.0302951 -0.0184222 -0.00436758 0.00717975 0.0134978 0.0141578 0.010554 0.00498247 -0.000320216 -0.00385791 -0.00512904 -0.00448732 -0.00276596 -0.000858992 0.000586991 0.00129987 0.00134126 0.000966219 0.000465877 5.435e-05 -0.000174802 -0.000231972 -0.000183375 -0.000101959 -3.80598e-05 6.27736e-06 SPTK-3.9/bin/us/titech/lpfcoef.7to80000644001051300105040000000233112442245132013677 000000000000004.74509e-07 -2.0537e-07 -3.00467e-06 -1.057e-05 -2.61857e-05 -5.31743e-05 -9.34333e-05 -0.000145319 -0.000201214 -0.000245453 -0.000253573 -0.000193975 -3.29385e-05 0.000256655 0.00068344 0.00122432 0.00181288 0.00233354 0.00262554 0.00250053 0.00177489 0.000315284 -0.00190843 -0.00477244 -0.00796325 -0.0109705 -0.0131204 -0.0136562 -0.0118641 -0.00723291 0.000375859 0.0105787 0.022378 0.0341613 0.0438173 0.0489783 0.0473742 0.0372642 0.0178837 -0.0101645 -0.0446557 -0.0816938 -0.115915 -0.140953 -0.150145 -0.137391 -0.0980702 -0.0298812 0.0665319 0.187278 0.32532 0.470994 0.612919 0.739182 0.838658 0.902297 0.924194 0.902297 0.838658 0.739182 0.612919 0.470994 0.32532 0.187278 0.0665319 -0.0298812 -0.0980702 -0.137391 -0.150145 -0.140953 -0.115915 -0.0816938 -0.0446557 -0.0101645 0.0178837 0.0372642 0.0473742 0.0489783 0.0438173 0.0341613 0.022378 0.0105787 0.000375859 -0.00723291 -0.0118641 -0.0136562 -0.0131204 -0.0109705 -0.00796325 -0.00477244 -0.00190843 0.000315284 0.00177489 0.00250053 0.00262554 0.00233354 0.00181288 0.00122432 0.00068344 0.000256655 -3.29385e-05 -0.000193975 -0.000253573 -0.000245453 -0.000201214 -0.000145319 -9.34333e-05 -5.31743e-05 -2.61857e-05 -1.057e-05 -3.00467e-06 -2.0537e-07 4.74509e-07 SPTK-3.9/bin/us/Makefile.am0000644001051300105040000000174612442245131012322 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include -DLIB=\"$(pkgdatadir)\" bin_PROGRAMS = us us_SOURCES = us.c us_LDADD = @top_builddir@/lib/libSPTK.a bin_SCRIPTS = us16 uscd EXTRA_DIST = us16.in uscd.in CLEANFILES = $(bin_PROGRAMS) $(bin_SCRIPTS) dist_pkgdata_DATA = lpfcoef.2to3f \ lpfcoef.2to3s \ lpfcoef.3to4 \ titech/lpfcoef.3to5 \ lpfcoef.4to5 \ lpfcoef.5to7 \ lpfcoef.5to8 \ titech/lpfcoef.7to8 replace_path = sed \ -e 's,[@]bindir[@],$(bindir),g' \ -e 's,[@]pkgdatadir[@],$(pkgdatadir),g' \ -e 's,[@]package_version[@],$(PACKAGE_VERSION),g' \ -e 's,[@]csh[@],$(CSH),' \ -e 's,[@]io_symbol[@],$(IO_SYMBOL),g' \ -e 's,[@]io_format[@],$(IO_FORMAT),g' us16: us16.in $(replace_path) < us16.in > $@ chmod +x $@ uscd: uscd.in $(replace_path) < uscd.in > $@ chmod +x $@ SPTK-3.9/bin/us/lpfcoef.2to3f0000644001051300105040000003233712442245131012563 000000000000002.628953552630264312028884887695e-06 9.068426152225583791732788085938e-06 2.103649734408463700674474239349e-07 -3.999190084869042038917541503906e-06 -7.840589205443393439054489135742e-06 -3.850983375741634517908096313477e-06 5.345121280697640031576156616211e-06 1.182733285531867295503616333008e-05 7.800574167049489915370941162109e-06 -5.533793228096328675746917724609e-06 -1.681887260929215699434280395508e-05 -1.373219856759533286094665527344e-05 4.290828655939549207687377929688e-06 2.243839662696700543165206909180e-05 2.208967998740263283252716064453e-05 -8.207550763472681865096092224121e-07 -2.817234053509309887886047363281e-05 -3.316857328172773122787475585938e-05 -5.813868483528494834899902343750e-06 3.321958138258196413516998291016e-05 4.706143954535946249961853027344e-05 1.663031434873118996620178222656e-05 -3.646282857516780495643615722656e-05 -6.358042446663603186607360839844e-05 -3.266953353886492550373077392578e-05 3.643502350314520299434661865234e-05 8.213036926463246345520019531250e-05 5.485579458763822913169860839844e-05 -3.137280873488634824752807617188e-05 -1.016440655803307890892028808594e-04 -8.389299182454124093055725097656e-05 1.923587842611595988273620605469e-05 1.204703730763867497444152832031e-04 1.200899714604020118713378906250e-04 2.178299382649129256606101989746e-06 -1.363435439998283982276916503906e-04 -1.632067724131047725677490234375e-04 -3.509648740873672068119049072266e-05 1.463547378079965710639953613281e-04 2.122574369423091411590576171875e-04 8.157453703461214900016784667969e-05 -1.469779526814818382263183593750e-04 -2.653530682437121868133544921875e-04 -1.432766002835705876350402832031e-04 1.341780880466103553771972656250e-04 3.195730096194893121719360351562e-04 2.211930986959487199783325195312e-04 -1.035739769577048718929290771484e-04 -3.708394360728561878204345703125e-04 -3.153477155137807130813598632812e-04 5.066043377155438065528869628906e-05 4.139071679674088954925537109375e-04 4.245197051204741001129150390625e-04 2.885616777348332107067108154297e-05 -4.423969076015055179595947265625e-04 -5.459198728203773498535156250000e-04 -1.386932708555832505226135253906e-04 4.489268758334219455718994140625e-04 6.749873864464461803436279296875e-04 2.815434709191322326660156250000e-04 -4.253849619999527931213378906250e-04 -8.051673648878931999206542968750e-04 -4.586010472849011421203613281250e-04 3.632632433436810970306396484375e-04 9.278655052185058593750000000000e-04 6.690642330795526504516601562500e-04 -2.541706198826432228088378906250e-04 -1.032438944093883037567138671875e-03 -9.096751455217599868774414062500e-04 9.039253200171515345573425292969e-05 1.106409938074648380279541015625e-03 1.174269826151430606842041015625e-03 1.344221382169052958488464355469e-04 -1.135777449235320091247558593750e-03 -1.453478354960680007934570312500e-03 -4.245020681992173194885253906250e-04 1.105524599552154541015625000000e-03 1.734496559947729110717773437500e-03 7.812005933374166488647460937500e-04 -1.000316464342176914215087890625e-03 -2.001052256673574447631835937500e-03 -1.202224753797054290771484375000e-03 8.053318597376346588134765625000e-04 2.233576262369751930236816406250e-03 1.680916873738169670104980468750e-03 -5.072446074336767196655273437500e-04 -2.409586450085043907165527343750e-03 -2.205669181421399116516113281250e-03 9.532413241686299443244934082031e-05 2.504316624253988265991210937500e-03 2.759490627795457839965820312500e-03 4.373992560431361198425292968750e-04 -2.491586375981569290161132812500e-03 -3.319777781143784523010253906250e-03 -1.092966413125395774841308593750e-03 2.344914712011814117431640625000e-03 3.858358366414904594421386718750e-03 1.867359853349626064300537109375e-03 -2.038845093920826911926269531250e-03 -4.341810476034879684448242187500e-03 -2.749488921836018562316894531250e-03 1.550438813865184783935546875000e-03 4.732112400233745574951171875000e-03 3.720360808074474334716796875000e-03 -8.608991047367453575134277343750e-04 -4.987606778740882873535156250000e-03 -4.752481821924448013305664062500e-03 -4.275896208127960562705993652344e-05 5.064279306679964065551757812500e-03 5.809570197016000747680664062500e-03 1.166041009128093719482421875000e-03 -4.917326383292675018310546875000e-03 -6.846588104963302612304687500000e-03 -2.505407668650150299072265625000e-03 4.502955824136734008789062500000e-03 7.810153067111968994140625000000e-03 4.046872258186340332031250000000e-03 -3.780365455895662307739257812500e-03 -8.639302104711532592773437500000e-03 -5.764838308095932006835937500000e-03 2.713811583817005157470703125000e-03 9.266601875424385070800781250000e-03 7.621229626238346099853515625000e-03 -1.274681417271494865417480468750e-03 -9.619547985494136810302734375000e-03 -9.564958512783050537109375000000e-03 -5.565412575379014015197753906250e-04 9.622165933251380920410156250000e-03 1.153171807527542114257812500000e-02 2.788511337712407112121582031250e-03 -9.196681901812553405761718750000e-03 -1.344408467411994934082031250000e-02 -5.417570471763610839843750000000e-03 8.265108801424503326416015625000e-03 1.521182153373956680297851562500e-02 8.426696993410587310791015625000e-03 -6.750495173037052154541015625000e-03 -1.673221588134765625000000000000e-02 -1.178493350744247436523437500000e-02 4.577528685331344604492187500000e-03 1.789018139243125915527343750000e-02 1.544736977666616439819335937500e-02 -1.672070939093828201293945312500e-03 -1.855764165520668029785156250000e-02 -1.935569941997528076171875000000e-02 -2.041082130745053291320800781250e-03 1.859146170318126678466796875000e-02 2.343937195837497711181640625000e-02 6.643247790634632110595703125000e-03 -1.782865636050701141357421875000e-02 -2.761732041835784912109375000000e-02 -1.223155856132507324218750000000e-02 1.607655361294746398925781250000e-02 3.180021047592163085937500000000e-02 1.893675699830055236816406250000e-02 -1.309362426400184631347656250000e-02 -3.589316457509994506835937500000e-02 -2.695596218109130859375000000000e-02 8.551942184567451477050781250000e-03 3.979878872632980346679687500000e-02 3.661553561687469482421875000000e-02 -1.961241941899061203002929687500e-03 -4.342047870159149169921875000000e-02 -4.850027710199356079101562500000e-02 -7.495525293052196502685546875000e-03 4.666579514741897583007812500000e-02 6.374762207269668579101562500000e-02 2.135728299617767333984375000000e-02 -4.944976419210433959960937500000e-02 -8.482034504413604736328125000000e-02 -4.299381747841835021972656250000e-02 5.169803649187088012695312500000e-02 1.180127114057540893554687500000e-01 8.156836032867431640625000000000e-02 -5.334960669279098510742187500000e-02 -1.849678605794906616210937500000e-01 -1.738314181566238403320312500000e-01 5.435917526483535766601562500000e-02 4.378223419189453125000000000000e-01 7.981870174407958984375000000000e-01 9.453011751174926757812500000000e-01 7.981870174407958984375000000000e-01 4.378223419189453125000000000000e-01 5.435917526483535766601562500000e-02 -1.738314181566238403320312500000e-01 -1.849678605794906616210937500000e-01 -5.334960669279098510742187500000e-02 8.156836032867431640625000000000e-02 1.180127114057540893554687500000e-01 5.169803649187088012695312500000e-02 -4.299381747841835021972656250000e-02 -8.482034504413604736328125000000e-02 -4.944976419210433959960937500000e-02 2.135728299617767333984375000000e-02 6.374762207269668579101562500000e-02 4.666579514741897583007812500000e-02 -7.495525293052196502685546875000e-03 -4.850027710199356079101562500000e-02 -4.342047870159149169921875000000e-02 -1.961241941899061203002929687500e-03 3.661553561687469482421875000000e-02 3.979878872632980346679687500000e-02 8.551942184567451477050781250000e-03 -2.695596218109130859375000000000e-02 -3.589316457509994506835937500000e-02 -1.309362426400184631347656250000e-02 1.893675699830055236816406250000e-02 3.180021047592163085937500000000e-02 1.607655361294746398925781250000e-02 -1.223155856132507324218750000000e-02 -2.761732041835784912109375000000e-02 -1.782865636050701141357421875000e-02 6.643247790634632110595703125000e-03 2.343937195837497711181640625000e-02 1.859146170318126678466796875000e-02 -2.041082130745053291320800781250e-03 -1.935569941997528076171875000000e-02 -1.855764165520668029785156250000e-02 -1.672070939093828201293945312500e-03 1.544736977666616439819335937500e-02 1.789018139243125915527343750000e-02 4.577528685331344604492187500000e-03 -1.178493350744247436523437500000e-02 -1.673221588134765625000000000000e-02 -6.750495173037052154541015625000e-03 8.426696993410587310791015625000e-03 1.521182153373956680297851562500e-02 8.265108801424503326416015625000e-03 -5.417570471763610839843750000000e-03 -1.344408467411994934082031250000e-02 -9.196681901812553405761718750000e-03 2.788511337712407112121582031250e-03 1.153171807527542114257812500000e-02 9.622165933251380920410156250000e-03 -5.565412575379014015197753906250e-04 -9.564958512783050537109375000000e-03 -9.619547985494136810302734375000e-03 -1.274681417271494865417480468750e-03 7.621229626238346099853515625000e-03 9.266601875424385070800781250000e-03 2.713811583817005157470703125000e-03 -5.764838308095932006835937500000e-03 -8.639302104711532592773437500000e-03 -3.780365455895662307739257812500e-03 4.046872258186340332031250000000e-03 7.810153067111968994140625000000e-03 4.502955824136734008789062500000e-03 -2.505407668650150299072265625000e-03 -6.846588104963302612304687500000e-03 -4.917326383292675018310546875000e-03 1.166041009128093719482421875000e-03 5.809570197016000747680664062500e-03 5.064279306679964065551757812500e-03 -4.275896208127960562705993652344e-05 -4.752481821924448013305664062500e-03 -4.987606778740882873535156250000e-03 -8.608991047367453575134277343750e-04 3.720360808074474334716796875000e-03 4.732112400233745574951171875000e-03 1.550438813865184783935546875000e-03 -2.749488921836018562316894531250e-03 -4.341810476034879684448242187500e-03 -2.038845093920826911926269531250e-03 1.867359853349626064300537109375e-03 3.858358366414904594421386718750e-03 2.344914712011814117431640625000e-03 -1.092966413125395774841308593750e-03 -3.319777781143784523010253906250e-03 -2.491586375981569290161132812500e-03 4.373992560431361198425292968750e-04 2.759490627795457839965820312500e-03 2.504316624253988265991210937500e-03 9.532413241686299443244934082031e-05 -2.205669181421399116516113281250e-03 -2.409586450085043907165527343750e-03 -5.072446074336767196655273437500e-04 1.680916873738169670104980468750e-03 2.233576262369751930236816406250e-03 8.053318597376346588134765625000e-04 -1.202224753797054290771484375000e-03 -2.001052256673574447631835937500e-03 -1.000316464342176914215087890625e-03 7.812005933374166488647460937500e-04 1.734496559947729110717773437500e-03 1.105524599552154541015625000000e-03 -4.245020681992173194885253906250e-04 -1.453478354960680007934570312500e-03 -1.135777449235320091247558593750e-03 1.344221382169052958488464355469e-04 1.174269826151430606842041015625e-03 1.106409938074648380279541015625e-03 9.039253200171515345573425292969e-05 -9.096751455217599868774414062500e-04 -1.032438944093883037567138671875e-03 -2.541706198826432228088378906250e-04 6.690642330795526504516601562500e-04 9.278655052185058593750000000000e-04 3.632632433436810970306396484375e-04 -4.586010472849011421203613281250e-04 -8.051673648878931999206542968750e-04 -4.253849619999527931213378906250e-04 2.815434709191322326660156250000e-04 6.749873864464461803436279296875e-04 4.489268758334219455718994140625e-04 -1.386932708555832505226135253906e-04 -5.459198728203773498535156250000e-04 -4.423969076015055179595947265625e-04 2.885616777348332107067108154297e-05 4.245197051204741001129150390625e-04 4.139071679674088954925537109375e-04 5.066043377155438065528869628906e-05 -3.153477155137807130813598632812e-04 -3.708394360728561878204345703125e-04 -1.035739769577048718929290771484e-04 2.211930986959487199783325195312e-04 3.195730096194893121719360351562e-04 1.341780880466103553771972656250e-04 -1.432766002835705876350402832031e-04 -2.653530682437121868133544921875e-04 -1.469779526814818382263183593750e-04 8.157453703461214900016784667969e-05 2.122574369423091411590576171875e-04 1.463547378079965710639953613281e-04 -3.509648740873672068119049072266e-05 -1.632067724131047725677490234375e-04 -1.363435439998283982276916503906e-04 2.178299382649129256606101989746e-06 1.200899714604020118713378906250e-04 1.204703730763867497444152832031e-04 1.923587842611595988273620605469e-05 -8.389299182454124093055725097656e-05 -1.016440655803307890892028808594e-04 -3.137280873488634824752807617188e-05 5.485579458763822913169860839844e-05 8.213036926463246345520019531250e-05 3.643502350314520299434661865234e-05 -3.266953353886492550373077392578e-05 -6.358042446663603186607360839844e-05 -3.646282857516780495643615722656e-05 1.663031434873118996620178222656e-05 4.706143954535946249961853027344e-05 3.321958138258196413516998291016e-05 -5.813868483528494834899902343750e-06 -3.316857328172773122787475585938e-05 -2.817234053509309887886047363281e-05 -8.207550763472681865096092224121e-07 2.208967998740263283252716064453e-05 2.243839662696700543165206909180e-05 4.290828655939549207687377929688e-06 -1.373219856759533286094665527344e-05 -1.681887260929215699434280395508e-05 -5.533793228096328675746917724609e-06 7.800574167049489915370941162109e-06 1.182733285531867295503616333008e-05 5.345121280697640031576156616211e-06 -3.850983375741634517908096313477e-06 -7.840589205443393439054489135742e-06 -3.999190084869042038917541503906e-06 2.103649734408463700674474239349e-07 9.068426152225583791732788085938e-06 2.628953552630264312028884887695e-06 SPTK-3.9/bin/us/lpfcoef.2to3s0000644001051300105040000000435712442245131012601 00000000000000-3.778110794883104972541332244873e-06 -5.370259168557822704315185546875e-05 -9.664696699474006891250610351562e-05 1.997184699575882405042648315430e-05 3.528786182869225740432739257812e-04 5.353563465178012847900390625000e-04 -5.449890522868372499942779541016e-05 -1.351920422166585922241210937500e-03 -1.880544703453779220581054687500e-03 1.196314406115561723709106445312e-04 3.909112885594367980957031250000e-03 5.147227086126804351806640625000e-03 -2.240541216451674699783325195312e-04 -9.427714161574840545654296875000e-03 -1.195016317069530487060546875000e-02 3.693796461448073387145996093750e-04 2.004249393939971923828125000000e-02 2.475706115365028381347656250000e-02 -5.462514236569404602050781250000e-04 -3.916403651237487792968750000000e-02 -4.774343967437744140625000000000e-02 7.333457469940185546875000000000e-04 7.369096577167510986328125000000e-02 9.046247601509094238281250000000e-02 -9.007404441945254802703857421875e-04 -1.452732086181640625000000000000e-01 -1.894205808639526367187500000000e-01 1.017168746329843997955322265625e-03 4.053546786308288574218750000000e-01 8.221039772033691406250000000000e-01 9.989410638809204101562500000000e-01 8.221039772033691406250000000000e-01 4.053546786308288574218750000000e-01 1.017168746329843997955322265625e-03 -1.894205808639526367187500000000e-01 -1.452732086181640625000000000000e-01 -9.007404441945254802703857421875e-04 9.046247601509094238281250000000e-02 7.369096577167510986328125000000e-02 7.333457469940185546875000000000e-04 -4.774343967437744140625000000000e-02 -3.916403651237487792968750000000e-02 -5.462514236569404602050781250000e-04 2.475706115365028381347656250000e-02 2.004249393939971923828125000000e-02 3.693796461448073387145996093750e-04 -1.195016317069530487060546875000e-02 -9.427714161574840545654296875000e-03 -2.240541216451674699783325195312e-04 5.147227086126804351806640625000e-03 3.909112885594367980957031250000e-03 1.196314406115561723709106445312e-04 -1.880544703453779220581054687500e-03 -1.351920422166585922241210937500e-03 -5.449890522868372499942779541016e-05 5.353563465178012847900390625000e-04 3.528786182869225740432739257812e-04 1.997184699575882405042648315430e-05 -9.664696699474006891250610351562e-05 -5.370259168557822704315185546875e-05 -3.778110794883104972541332244873e-06 SPTK-3.9/bin/us/lpfcoef.3to40000644001051300105040000001770712442245131012423 00000000000000-2.972238917209324426949024200439e-06 -7.236115493469696957617998123169e-07 1.938269178936025127768516540527e-06 5.860980763827683404088020324707e-06 8.770197382546029984951019287109e-06 7.711517355346586555242538452148e-06 8.210419650822586845606565475464e-07 -1.075123691407497972249984741211e-05 -2.204526572313625365495681762695e-05 -2.569314710854087024927139282227e-05 -1.557546056574210524559020996094e-05 8.684399290359579026699066162109e-06 3.893378743669018149375915527344e-05 5.987257463857531547546386718750e-05 5.538436016649939119815826416016e-05 1.783274638000875711441040039062e-05 -4.419104880071245133876800537109e-05 -1.048617341439239680767059326172e-04 -1.298206916544586420059204101562e-04 -9.279524965677410364151000976562e-05 6.855315405118744820356369018555e-06 1.353944680886343121528625488281e-04 2.324952074559405446052551269531e-04 2.362554514547809958457946777344e-04 1.165724897873587906360626220703e-04 -9.919063450070098042488098144531e-05 -3.245114348828792572021484375000e-04 -4.436713934410363435745239257812e-04 -3.655301406979560852050781250000e-04 -7.846108928788453340530395507812e-05 3.228567657060921192169189453125e-04 6.601982749998569488525390625000e-04 7.443025824613869190216064453125e-04 4.708054475486278533935546875000e-04 -1.053991582011803984642028808594e-04 -7.614145870320498943328857421875e-04 -1.182762323878705501556396484375e-03 -1.104252994991838932037353515625e-03 -4.564071714412420988082885742188e-04 5.570264183916151523590087890625e-04 1.504917163401842117309570312500e-03 1.900027855299413204193115234375e-03 1.433680765330791473388671875000e-03 1.668615732342004776000976562500e-04 -1.427921699360013008117675781250e-03 -2.624044194817543029785156250000e-03 -2.755715046077966690063476562500e-03 -1.561162294819951057434082031250e-03 6.132535636425018310546875000000e-04 2.875405829399824142456054687500e-03 4.132371395826339721679687500000e-03 3.595316084101796150207519531250e-03 1.220517558977007865905761718750e-03 -2.143245423212647438049316406250e-03 -5.022946279495954513549804687500e-03 -5.940864793956279754638671875000e-03 -4.136689007282257080078125000000e-03 -5.302520730765536427497863769531e-05 4.691443406045436859130859375000e-03 7.907478138804435729980468750000e-03 7.811684161424636840820312500000e-03 3.952803090214729309082031250000e-03 -2.371253911405801773071289062500e-03 -8.483620360493659973144531250000e-03 -1.142050232738256454467773437500e-02 -9.319010190665721893310546875000e-03 -2.470750361680984497070312500000e-03 6.515170913189649581909179687500e-03 1.364217884838581085205078125000e-02 1.525149680674076080322265625000e-02 9.820926003158092498779296875000e-03 -1.017001224681735038757324218750e-03 -1.283029746264219284057617187500e-02 -2.012842707335948944091796875000e-02 -1.883911527693271636962890625000e-02 -8.435024879872798919677734375000e-03 7.348835933953523635864257812500e-03 2.173076197504997253417968750000e-02 2.770258486270904541015625000000e-02 2.132281847298145294189453125000e-02 3.983942791819572448730468750000e-03 -1.754906214773654937744140625000e-02 -3.363185003399848937988281250000e-02 -3.591497614979743957519531250000e-02 -2.145258896052837371826171875000e-02 5.189910531044006347656250000000e-03 3.307365626096725463867187500000e-02 4.915945231914520263671875000000e-02 4.413674399256706237792968750000e-02 1.730817556381225585937500000000e-02 -2.185525931417942047119140625000e-02 -5.665356665849685668945312500000e-02 -6.985709816217422485351562500000e-02 -5.163010582327842712402343750000e-02 -5.258323159068822860717773437500e-03 5.221031233668327331542968750000e-02 9.543542563915252685546875000000e-02 1.008523330092430114746093750000e-01 5.764876306056976318359375000000e-02 -2.489036880433559417724609375000e-02 -1.172426193952560424804687500000e-01 -1.777330785989761352539062500000e-01 -1.666471213102340698242187500000e-01 -6.155091151595115661621093750000e-02 1.319199651479721069335937500000e-01 3.782747387886047363281250000000e-01 6.207680702209472656250000000000e-01 7.979788184165954589843750000000e-01 8.629027009010314941406250000000e-01 7.979788184165954589843750000000e-01 6.207680702209472656250000000000e-01 3.782747387886047363281250000000e-01 1.319199651479721069335937500000e-01 -6.155091151595115661621093750000e-02 -1.666471213102340698242187500000e-01 -1.777330785989761352539062500000e-01 -1.172426193952560424804687500000e-01 -2.489036880433559417724609375000e-02 5.764876306056976318359375000000e-02 1.008523330092430114746093750000e-01 9.543542563915252685546875000000e-02 5.221031233668327331542968750000e-02 -5.258323159068822860717773437500e-03 -5.163010582327842712402343750000e-02 -6.985709816217422485351562500000e-02 -5.665356665849685668945312500000e-02 -2.185525931417942047119140625000e-02 1.730817556381225585937500000000e-02 4.413674399256706237792968750000e-02 4.915945231914520263671875000000e-02 3.307365626096725463867187500000e-02 5.189910531044006347656250000000e-03 -2.145258896052837371826171875000e-02 -3.591497614979743957519531250000e-02 -3.363185003399848937988281250000e-02 -1.754906214773654937744140625000e-02 3.983942791819572448730468750000e-03 2.132281847298145294189453125000e-02 2.770258486270904541015625000000e-02 2.173076197504997253417968750000e-02 7.348835933953523635864257812500e-03 -8.435024879872798919677734375000e-03 -1.883911527693271636962890625000e-02 -2.012842707335948944091796875000e-02 -1.283029746264219284057617187500e-02 -1.017001224681735038757324218750e-03 9.820926003158092498779296875000e-03 1.525149680674076080322265625000e-02 1.364217884838581085205078125000e-02 6.515170913189649581909179687500e-03 -2.470750361680984497070312500000e-03 -9.319010190665721893310546875000e-03 -1.142050232738256454467773437500e-02 -8.483620360493659973144531250000e-03 -2.371253911405801773071289062500e-03 3.952803090214729309082031250000e-03 7.811684161424636840820312500000e-03 7.907478138804435729980468750000e-03 4.691443406045436859130859375000e-03 -5.302520730765536427497863769531e-05 -4.136689007282257080078125000000e-03 -5.940864793956279754638671875000e-03 -5.022946279495954513549804687500e-03 -2.143245423212647438049316406250e-03 1.220517558977007865905761718750e-03 3.595316084101796150207519531250e-03 4.132371395826339721679687500000e-03 2.875405829399824142456054687500e-03 6.132535636425018310546875000000e-04 -1.561162294819951057434082031250e-03 -2.755715046077966690063476562500e-03 -2.624044194817543029785156250000e-03 -1.427921699360013008117675781250e-03 1.668615732342004776000976562500e-04 1.433680765330791473388671875000e-03 1.900027855299413204193115234375e-03 1.504917163401842117309570312500e-03 5.570264183916151523590087890625e-04 -4.564071714412420988082885742188e-04 -1.104252994991838932037353515625e-03 -1.182762323878705501556396484375e-03 -7.614145870320498943328857421875e-04 -1.053991582011803984642028808594e-04 4.708054475486278533935546875000e-04 7.443025824613869190216064453125e-04 6.601982749998569488525390625000e-04 3.228567657060921192169189453125e-04 -7.846108928788453340530395507812e-05 -3.655301406979560852050781250000e-04 -4.436713934410363435745239257812e-04 -3.245114348828792572021484375000e-04 -9.919063450070098042488098144531e-05 1.165724897873587906360626220703e-04 2.362554514547809958457946777344e-04 2.324952074559405446052551269531e-04 1.353944680886343121528625488281e-04 6.855315405118744820356369018555e-06 -9.279524965677410364151000976562e-05 -1.298206916544586420059204101562e-04 -1.048617341439239680767059326172e-04 -4.419104880071245133876800537109e-05 1.783274638000875711441040039062e-05 5.538436016649939119815826416016e-05 5.987257463857531547546386718750e-05 3.893378743669018149375915527344e-05 8.684399290359579026699066162109e-06 -1.557546056574210524559020996094e-05 -2.569314710854087024927139282227e-05 -2.204526572313625365495681762695e-05 -1.075123691407497972249984741211e-05 8.210419650822586845606565475464e-07 7.711517355346586555242538452148e-06 8.770197382546029984951019287109e-06 5.860980763827683404088020324707e-06 1.938269178936025127768516540527e-06 -7.236115493469696957617998123169e-07 -2.972238917209324426949024200439e-06 SPTK-3.9/bin/us/lpfcoef.4to50000644001051300105040000001066712442245131012423 00000000000000-4.120001449336996302008628845215e-06 -1.800641712179640308022499084473e-06 5.495725872606271877884864807129e-06 2.032093107118271291255950927734e-05 3.827455657301470637321472167969e-05 4.766593337990343570709228515625e-05 3.212507726857438683509826660156e-05 -2.123931335518136620521545410156e-05 -1.100648078136146068572998046875e-04 -2.069531765300780534744262695312e-04 -2.593308163341134786605834960938e-04 -2.049251779681071639060974121094e-04 -2.556953631938085891306400299072e-06 3.314622153993695974349975585938e-04 6.994039285928010940551757812500e-04 9.306167485192418098449707031250e-04 8.339222404174506664276123046875e-04 2.867644652724266052246093750000e-04 -6.690918235108256340026855468750e-04 -1.772087533026933670043945312500e-03 -2.571237739175558090209960937500e-03 -2.562969690188765525817871093750e-03 -1.409525866620242595672607421875e-03 8.355188765563070774078369140625e-04 3.600413911044597625732421875000e-03 5.863172933459281921386718750000e-03 6.451529916375875473022460937500e-03 4.515809938311576843261718750000e-03 1.604181670700199902057647705078e-05 -5.992494523525238037109375000000e-03 -1.146655622869729995727539062500e-02 -1.394765265285968780517578125000e-02 -1.148724462836980819702148437500e-02 -3.624219913035631179809570312500e-03 7.991750724613666534423828125000e-03 1.969446986913681030273437500000e-02 2.676569670438766479492187500000e-02 2.509311586618423461914062500000e-02 1.300987787544727325439453125000e-02 -7.396943867206573486328125000000e-03 -3.017321415245532989501953125000e-02 -4.691192507743835449218750000000e-02 -4.948642477393150329589843750000e-02 -3.332189098000526428222656250000e-02 -4.258807530277408659458160400391e-05 4.167002066969871520996093750000e-02 7.772575318813323974609375000000e-02 9.269261360168457031250000000000e-02 7.527735829353332519531250000000e-02 2.351327054202556610107421875000e-02 -5.224244669079780578613281250000e-02 -1.299380511045455932617187500000e-01 -1.804818511009216308593750000000e-01 -1.755057424306869506835937500000e-01 -9.615927189588546752929687500000e-02 5.973145738244056701660156250000e-02 2.745614051818847656250000000000e-01 5.132584571838378906250000000000e-01 7.307774424552917480468750000000e-01 8.829265236854553222656250000000e-01 9.375580549240112304687500000000e-01 8.829265236854553222656250000000e-01 7.307774424552917480468750000000e-01 5.132584571838378906250000000000e-01 2.745614051818847656250000000000e-01 5.973145738244056701660156250000e-02 -9.615927189588546752929687500000e-02 -1.755057424306869506835937500000e-01 -1.804818511009216308593750000000e-01 -1.299380511045455932617187500000e-01 -5.224244669079780578613281250000e-02 2.351327054202556610107421875000e-02 7.527735829353332519531250000000e-02 9.269261360168457031250000000000e-02 7.772575318813323974609375000000e-02 4.167002066969871520996093750000e-02 -4.258807530277408659458160400391e-05 -3.332189098000526428222656250000e-02 -4.948642477393150329589843750000e-02 -4.691192507743835449218750000000e-02 -3.017321415245532989501953125000e-02 -7.396943867206573486328125000000e-03 1.300987787544727325439453125000e-02 2.509311586618423461914062500000e-02 2.676569670438766479492187500000e-02 1.969446986913681030273437500000e-02 7.991750724613666534423828125000e-03 -3.624219913035631179809570312500e-03 -1.148724462836980819702148437500e-02 -1.394765265285968780517578125000e-02 -1.146655622869729995727539062500e-02 -5.992494523525238037109375000000e-03 1.604181670700199902057647705078e-05 4.515809938311576843261718750000e-03 6.451529916375875473022460937500e-03 5.863172933459281921386718750000e-03 3.600413911044597625732421875000e-03 8.355188765563070774078369140625e-04 -1.409525866620242595672607421875e-03 -2.562969690188765525817871093750e-03 -2.571237739175558090209960937500e-03 -1.772087533026933670043945312500e-03 -6.690918235108256340026855468750e-04 2.867644652724266052246093750000e-04 8.339222404174506664276123046875e-04 9.306167485192418098449707031250e-04 6.994039285928010940551757812500e-04 3.314622153993695974349975585938e-04 -2.556953631938085891306400299072e-06 -2.049251779681071639060974121094e-04 -2.593308163341134786605834960938e-04 -2.069531765300780534744262695312e-04 -1.100648078136146068572998046875e-04 -2.123931335518136620521545410156e-05 3.212507726857438683509826660156e-05 4.766593337990343570709228515625e-05 3.827455657301470637321472167969e-05 2.032093107118271291255950927734e-05 5.495725872606271877884864807129e-06 -1.800641712179640308022499084473e-06 -4.120001449336996302008628845215e-06 SPTK-3.9/bin/us/lpfcoef.5to70000644001051300105040000000514112442245131012415 000000000000001.153559423983097076416015625000e-04 2.795171458274126052856445312500e-04 5.168918869458138942718505859375e-04 7.421943591907620429992675781250e-04 8.035023929551243782043457031250e-04 4.914122400805354118347167968750e-04 -4.040934145450592041015625000000e-04 -1.997824292629957199096679687500e-03 -4.194368142634630203247070312500e-03 -6.589582655578851699829101562500e-03 -8.438861928880214691162109375000e-03 -8.736841380596160888671875000000e-03 -6.434364710003137588500976562500e-03 -7.774449186399579048156738281250e-04 8.294553495943546295166015625000e-03 1.980045437812805175781250000000e-02 3.155207261443138122558593750000e-02 4.029463231563568115234375000000e-02 4.222260415554046630859375000000e-02 3.384944424033164978027343750000e-02 1.310056168586015701293945312500e-02 -1.960278302431106567382812500000e-02 -6.056013703346252441406250000000e-02 -1.025925427675247192382812500000e-01 -1.356229484081268310546875000000e-01 -1.480741649866104125976562500000e-01 -1.289242953062057495117187500000e-01 -7.006952166557312011718750000000e-02 3.148823976516723632812500000000e-02 1.721408069133758544921875000000e-01 3.412819206714630126953125000000e-01 5.222419500350952148437500000000e-01 6.944916248321533203125000000000e-01 8.367717862129211425781250000000e-01 9.305801391601562500000000000000e-01 9.633352160453796386718750000000e-01 9.305801391601562500000000000000e-01 8.367717862129211425781250000000e-01 6.944916248321533203125000000000e-01 5.222419500350952148437500000000e-01 3.412819206714630126953125000000e-01 1.721408069133758544921875000000e-01 3.148823976516723632812500000000e-02 -7.006952166557312011718750000000e-02 -1.289242953062057495117187500000e-01 -1.480741649866104125976562500000e-01 -1.356229484081268310546875000000e-01 -1.025925427675247192382812500000e-01 -6.056013703346252441406250000000e-02 -1.960278302431106567382812500000e-02 1.310056168586015701293945312500e-02 3.384944424033164978027343750000e-02 4.222260415554046630859375000000e-02 4.029463231563568115234375000000e-02 3.155207261443138122558593750000e-02 1.980045437812805175781250000000e-02 8.294553495943546295166015625000e-03 -7.774449186399579048156738281250e-04 -6.434364710003137588500976562500e-03 -8.736841380596160888671875000000e-03 -8.438861928880214691162109375000e-03 -6.589582655578851699829101562500e-03 -4.194368142634630203247070312500e-03 -1.997824292629957199096679687500e-03 -4.040934145450592041015625000000e-04 4.914122400805354118347167968750e-04 8.035023929551243782043457031250e-04 7.421943591907620429992675781250e-04 5.168918869458138942718505859375e-04 2.795171458274126052856445312500e-04 1.153559423983097076416015625000e-04 SPTK-3.9/bin/us/lpfcoef.5to80000644001051300105040000002230712442245131012421 000000000000000.00117108016274869442 0.00304530584253370762 0.00157352560199797153 0.00281705125235021114 0.00276135816238820553 0.00304990378208458424 0.00292662018910050392 0.00268346304073929787 0.00219571590423583984 0.00155065511353313923 0.00077831785893067718 -0.00003840856879833154 -0.00081996555672958493 -0.00147888285573571920 -0.00193916144780814648 -0.00214303494431078434 -0.00206119916401803493 -0.00169736600946635008 -0.00109055254142731428 -0.00031151826260611415 0.00054374185856431723 0.00136485288385301828 0.00204042997211217880 0.00247252709232270718 0.00259083788841962814 0.00236371578648686409 0.00180392269976437092 0.00096965127158910036 -0.00004165244172327220 -0.00110332795884460211 -0.00207484466955065727 -0.00281924917362630367 -0.00322337937541306019 -0.00321427779272198677 -0.00277107977308332920 -0.00192988757044076920 -0.00078165042214095592 0.00053555588237941265 0.00185206020250916481 0.00298907631076872349 0.00378391472622752190 0.00411179848015308380 0.00390277220867574215 0.00315537909045815468 0.00194248952902853489 0.00040504476055502892 -0.00126695376820862293 -0.00285587436519563198 -0.00414133770391345024 -0.00493298145011067390 -0.00510011613368988037 -0.00458896765485405922 -0.00343220541253685951 -0.00175409787334501743 0.00024282130470965058 0.00230620289221405983 0.00416097370907664299 0.00554404594004154205 0.00624657003208994865 0.00614179531112313271 0.00520227756351232529 0.00351558905094861984 0.00127547292504459620 -0.00124416605103760958 -0.00371455796994268894 -0.00579852238297462463 -0.00719873048365116119 -0.00769207673147320747 -0.00716941105201840401 -0.00565622374415397644 -0.00330922496505081654 -0.00040878113941289485 0.00267749000340700150 0.00554323336109519005 0.00778882298618555069 0.00908350758254528046 0.00921041797846555710 0.00809811428189277649 0.00584453530609607697 0.00270187179557979107 -0.00094418309163302183 -0.00462143588811159134 -0.00783625058829784393 -0.01013158727437257767 -0.01115871593356132507 -0.01072365697473287582 -0.00882025249302387238 -0.00564504880458116531 -0.00157029810361564159 0.00288944994099438190 0.00714957155287265778 0.01062488183379173279 0.01281120534986257553 0.01336015015840530396 0.01212602294981479645 0.00920283701270818710 0.00491220643743872643 -0.00022114680905360729 -0.00553945312276482582 -0.01033177506178617477 -0.01392696239054203033 -0.01579038612544536591 -0.01559584494680166245 -0.01328701060265302658 -0.00908455438911914825 -0.00348130264319479465 0.00282599939964711666 0.00901128910481929779 0.01423560455441474915 0.01775002107024192810 0.01901069469749927521 0.01775214821100234985 0.01404112670570611954 0.00827651284635066986 0.00115413521416485310 -0.00642037298530340195 -0.01344086136668920517 -0.01893476955592632294 -0.02209532447159290314 -0.02239789068698883057 -0.01968152448534965515 -0.01418761070817708969 -0.00654279300943017006 0.00230996147729456425 0.01122334320098161697 0.01899398490786552429 0.02452258393168449402 0.02696499787271022797 0.02585929259657859802 0.02120277285575866699 0.01347221899777650833 0.00358101958408951759 -0.00722592044621706009 -0.01752668246626853943 -0.02590445056557655334 -0.03114029765129089355 -0.03238650038838386536 -0.02929557859897613525 -0.02209125272929668427 -0.01156253926455974579 0.00101689645089209080 0.01403734274208545685 0.02575680054724216461 0.03452725335955619812 0.03902168944478034973 0.03842870146036148071 0.03258427232503890991 0.02202567830681800842 0.00795282237231731415 -0.00790174305438995361 -0.02347863838076591492 -0.03665284439921379089 -0.04551598802208900452 -0.04864235222339630127 -0.04530645906925201416 -0.03561563417315483093 -0.02053896337747573853 -0.00182516709901392460 0.01819136925041675568 0.03687004745006561279 0.05159982293844223022 0.06015014275908470154 0.06098999828100204468 0.05353430658578872681 0.03827635571360588074 0.01678924076259136200 -0.00841684918850660324 -0.03416955098509788513 -0.05701020732522010803 -0.07363417744636535645 -0.08133691549301147461 -0.07841178774833679199 -0.06444521248340606689 -0.04046430811285972595 -0.00891104806214570999 0.02656935155391693115 0.06150479242205619812 0.09110824763774871826 0.11086603254079818726 0.11713757365942001343 0.10769540071487426758 0.08213412761688232422 0.04209441319108009338 -0.00873892754316329956 -0.06487550586462020874 -0.11948419362306594849 -0.16504389047622680664 -0.19411154091358184814 -0.20014147460460662842 -0.17824944853782653809 -0.12585303187370300293 -0.04309947416186332703 0.06696426868438720703 0.19851590692996978760 0.34336555004119873047 0.49162212014198303223 0.63254940509796142578 0.75553232431411743164 0.85105592012405395508 0.91159516572952270508 0.93232822418212890625 0.91159516572952270508 0.85105592012405395508 0.75553232431411743164 0.63254940509796142578 0.49162212014198303223 0.34336555004119873047 0.19851590692996978760 0.06696426868438720703 -0.04309947416186332703 -0.12585303187370300293 -0.17824944853782653809 -0.20014147460460662842 -0.19411154091358184814 -0.16504389047622680664 -0.11948419362306594849 -0.06487550586462020874 -0.00873892754316329956 0.04209441319108009338 0.08213412761688232422 0.10769540071487426758 0.11713757365942001343 0.11086603254079818726 0.09110824763774871826 0.06150479242205619812 0.02656935155391693115 -0.00891104806214570999 -0.04046430811285972595 -0.06444521248340606689 -0.07841178774833679199 -0.08133691549301147461 -0.07363417744636535645 -0.05701020732522010803 -0.03416955098509788513 -0.00841684918850660324 0.01678924076259136200 0.03827635571360588074 0.05353430658578872681 0.06098999828100204468 0.06015014275908470154 0.05159982293844223022 0.03687004745006561279 0.01819136925041675568 -0.00182516709901392460 -0.02053896337747573853 -0.03561563417315483093 -0.04530645906925201416 -0.04864235222339630127 -0.04551598802208900452 -0.03665284439921379089 -0.02347863838076591492 -0.00790174305438995361 0.00795282237231731415 0.02202567830681800842 0.03258427232503890991 0.03842870146036148071 0.03902168944478034973 0.03452725335955619812 0.02575680054724216461 0.01403734274208545685 0.00101689645089209080 -0.01156253926455974579 -0.02209125272929668427 -0.02929557859897613525 -0.03238650038838386536 -0.03114029765129089355 -0.02590445056557655334 -0.01752668246626853943 -0.00722592044621706009 0.00358101958408951759 0.01347221899777650833 0.02120277285575866699 0.02585929259657859802 0.02696499787271022797 0.02452258393168449402 0.01899398490786552429 0.01122334320098161697 0.00230996147729456425 -0.00654279300943017006 -0.01418761070817708969 -0.01968152448534965515 -0.02239789068698883057 -0.02209532447159290314 -0.01893476955592632294 -0.01344086136668920517 -0.00642037298530340195 0.00115413521416485310 0.00827651284635066986 0.01404112670570611954 0.01775214821100234985 0.01901069469749927521 0.01775002107024192810 0.01423560455441474915 0.00901128910481929779 0.00282599939964711666 -0.00348130264319479465 -0.00908455438911914825 -0.01328701060265302658 -0.01559584494680166245 -0.01579038612544536591 -0.01392696239054203033 -0.01033177506178617477 -0.00553945312276482582 -0.00022114680905360729 0.00491220643743872643 0.00920283701270818710 0.01212602294981479645 0.01336015015840530396 0.01281120534986257553 0.01062488183379173279 0.00714957155287265778 0.00288944994099438190 -0.00157029810361564159 -0.00564504880458116531 -0.00882025249302387238 -0.01072365697473287582 -0.01115871593356132507 -0.01013158727437257767 -0.00783625058829784393 -0.00462143588811159134 -0.00094418309163302183 0.00270187179557979107 0.00584453530609607697 0.00809811428189277649 0.00921041797846555710 0.00908350758254528046 0.00778882298618555069 0.00554323336109519005 0.00267749000340700150 -0.00040878113941289485 -0.00330922496505081654 -0.00565622374415397644 -0.00716941105201840401 -0.00769207673147320747 -0.00719873048365116119 -0.00579852238297462463 -0.00371455796994268894 -0.00124416605103760958 0.00127547292504459620 0.00351558905094861984 0.00520227756351232529 0.00614179531112313271 0.00624657003208994865 0.00554404594004154205 0.00416097370907664299 0.00230620289221405983 0.00024282130470965058 -0.00175409787334501743 -0.00343220541253685951 -0.00458896765485405922 -0.00510011613368988037 -0.00493298145011067390 -0.00414133770391345024 -0.00285587436519563198 -0.00126695376820862293 0.00040504476055502892 0.00194248952902853489 0.00315537909045815468 0.00390277220867574215 0.00411179848015308380 0.00378391472622752190 0.00298907631076872349 0.00185206020250916481 0.00053555588237941265 -0.00078165042214095592 -0.00192988757044076920 -0.00277107977308332920 -0.00321427779272198677 -0.00322337937541306019 -0.00281924917362630367 -0.00207484466955065727 -0.00110332795884460211 -0.00004165244172327220 0.00096965127158910036 0.00180392269976437092 0.00236371578648686409 0.00259083788841962814 0.00247252709232270718 0.00204042997211217880 0.00136485288385301828 0.00054374185856431723 -0.00031151826260611415 -0.00109055254142731428 -0.00169736600946635008 -0.00206119916401803493 -0.00214303494431078434 -0.00193916144780814648 -0.00147888285573571920 -0.00081996555672958493 -0.00003840856879833154 0.00077831785893067718 0.00155065511353313923 0.00219571590423583984 0.00268346304073929787 0.00292662018910050392 0.00304990378208458424 0.00276135816238820553 0.00281705125235021114 0.00157352560199797153 0.00304530584253370762 0.00117108016274869442 SPTK-3.9/bin/us/Makefile.in0000644001051300105040000005355412637167421012352 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = us$(EXEEXT) subdir = bin/us ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(dist_pkgdata_DATA) \ $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" \ "$(DESTDIR)$(pkgdatadir)" PROGRAMS = $(bin_PROGRAMS) am_us_OBJECTS = us.$(OBJEXT) us_OBJECTS = $(am_us_OBJECTS) us_DEPENDENCIES = @top_builddir@/lib/libSPTK.a am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } SCRIPTS = $(bin_SCRIPTS) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(us_SOURCES) DIST_SOURCES = $(us_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(dist_pkgdata_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include -DLIB=\"$(pkgdatadir)\" us_SOURCES = us.c us_LDADD = @top_builddir@/lib/libSPTK.a bin_SCRIPTS = us16 uscd EXTRA_DIST = us16.in uscd.in CLEANFILES = $(bin_PROGRAMS) $(bin_SCRIPTS) dist_pkgdata_DATA = lpfcoef.2to3f \ lpfcoef.2to3s \ lpfcoef.3to4 \ titech/lpfcoef.3to5 \ lpfcoef.4to5 \ lpfcoef.5to7 \ lpfcoef.5to8 \ titech/lpfcoef.7to8 replace_path = sed \ -e 's,[@]bindir[@],$(bindir),g' \ -e 's,[@]pkgdatadir[@],$(pkgdatadir),g' \ -e 's,[@]package_version[@],$(PACKAGE_VERSION),g' \ -e 's,[@]csh[@],$(CSH),' \ -e 's,[@]io_symbol[@],$(IO_SYMBOL),g' \ -e 's,[@]io_format[@],$(IO_FORMAT),g' all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/us/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/us/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) us$(EXEEXT): $(us_OBJECTS) $(us_DEPENDENCIES) $(EXTRA_us_DEPENDENCIES) @rm -f us$(EXEEXT) $(AM_V_CCLD)$(LINK) $(us_OBJECTS) $(us_LDADD) $(LIBS) install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n' \ -e 'h;s|.*|.|' \ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) { files[d] = files[d] " " $$1; \ if (++n[d] == $(am__install_max)) { \ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ else { print "f", d "/" $$4, $$1 } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/us.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` install-dist_pkgdataDATA: $(dist_pkgdata_DATA) @$(NORMAL_INSTALL) @list='$(dist_pkgdata_DATA)'; test -n "$(pkgdatadir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgdatadir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgdatadir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgdatadir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgdatadir)" || exit $$?; \ done uninstall-dist_pkgdataDATA: @$(NORMAL_UNINSTALL) @list='$(dist_pkgdata_DATA)'; test -n "$(pkgdatadir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pkgdatadir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) $(SCRIPTS) $(DATA) installdirs: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgdatadir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dist_pkgdataDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-binSCRIPTS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS \ uninstall-dist_pkgdataDATA .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-binSCRIPTS install-data \ install-data-am install-dist_pkgdataDATA install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-binPROGRAMS \ uninstall-binSCRIPTS uninstall-dist_pkgdataDATA .PRECIOUS: Makefile us16: us16.in $(replace_path) < us16.in > $@ chmod +x $@ uscd: uscd.in $(replace_path) < uscd.in > $@ chmod +x $@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/us/us.c0000644001051300105040000003102012637156646011067 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * up-sampling * * * * 1998.3 T.Kobayashi * * * * usage: * * us [ options ] infile1 > stdout * * options: * * -s s : conversion type [58] * * 23F up-sampling by 2:3 * * 23S up-sampling by 2:3 * * 34 up-sampling by 3:4 * * 35 up-sampling by 3:5 * * 45 up-sampling by 4:5 * * 57 up-sampling by 5:7 * * 58 up-sampling by 5:8 * * 78 up-sampling by 7:8 * * -c c : filename of low pass filter coef. [Default]* * -u u : up-sampling ratio [N/A] * * -d d : down-sampling ratio [N/A] * * infile: * * data sequence [stdin] * * notice: * * Default LPF coefficients File * * 2:3 -> /usr/local/share/SPTK/lpfcoef.2to3f * * 2:3 -> /usr/local/share/SPTK/lpfcoef.2to3s * * 3:4 -> /usr/local/share/SPTK/lpfcoef.3to4 * * 3:5 -> /usr/local/share/SPTK/lpfcoef.3to5 * * 4:5 -> /usr/local/share/SPTK/lpfcoef.4to5 * * 5:7 -> /usr/local/share/SPTK/lpfcoef.5to7 * * 5:8 -> /usr/local/share/SPTK/lpfcoef.5to8 * * 7:8 -> /usr/local/share/SPTK/lpfcoef.7to8 * * * ************************************************************************/ static char *rcs_id = "$Id: us.c,v 1.31 2015/12/14 01:14:24 uratec Exp $"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Required Functions */ void srcnv(FILE * fp); void firin(double in); double firout(int os); void firinit(void); /* Default Value */ #define RBSIZE 512 #define DSIZE 512 #define SIZE 256 #define STYPE "58" #define mod(x) ((x) & (RBSIZE -1)) #ifndef LIB #define LIB "/usr/local/share/SPTK" #endif #define COEF23F LIB "/lpfcoef.2to3f" #define COEF23S LIB "/lpfcoef.2to3s" #define COEF34 LIB "/lpfcoef.3to4" #define COEF35 LIB "/lpfcoef.3to5" #define COEF45 LIB "/lpfcoef.4to5" #define COEF57 LIB "/lpfcoef.5to7" #define COEF58 LIB "/lpfcoef.5to8" #define COEF78 LIB "/lpfcoef.7to8" /* Command Name */ char *cmnd, *coef = NULL, *type = STYPE; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - up-sampling\n\n", cmnd); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] infile1 > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -s s : conversion type [%s]\n", STYPE); fprintf(stderr, " 23F up-sampling by 2:3\n"); fprintf(stderr, " 23S up-sampling by 2:3\n"); fprintf(stderr, " 34 up-sampling by 3:4\n"); fprintf(stderr, " 35 up-sampling by 3:5\n"); fprintf(stderr, " 45 up-sampling by 4:5\n"); fprintf(stderr, " 57 up-sampling by 5:7\n"); fprintf(stderr, " 58 up-sampling by 5:8\n"); fprintf(stderr, " 78 up-sampling by 7:8\n"); fprintf(stderr, " -c c : filename of low pass filter coefficients [Default]\n"); fprintf(stderr, " -u u : up-sampling ratio [N/A]\n"); fprintf(stderr, " -d d : down-sampling ratio [N/A]\n"); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " data sequence (%s) [stdin]\n", FORMAT); fprintf(stderr, " notice:\n"); fprintf(stderr, " Default LPF coefficients File\n"); fprintf(stderr, " 2:3 -> %s\n", COEF23F); fprintf(stderr, " 2:3 -> %s\n", COEF23S); fprintf(stderr, " 3:4 -> %s\n", COEF34); fprintf(stderr, " 3:5 -> %s\n", COEF35); fprintf(stderr, " 4:5 -> %s\n", COEF45); fprintf(stderr, " 5:7 -> %s\n", COEF57); fprintf(stderr, " 5:8 -> %s\n", COEF58); fprintf(stderr, " 7:8 -> %s\n", COEF78); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } static int start = -1, u_rate = 0, d_rate = 0; int main(int argc, char *argv[]) { FILE *fp; char *s, *infile = NULL, c; int def_d_rate = 1, def_u_rate = 1; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) { if (*(s = *++argv) == '-') { c = *++s; if (*++s == '\0') { s = *++argv; --argc; } switch (c) { case 'c': coef = s; type = NULL; break; case 's': type = s; break; case 'u': u_rate = atoi(s); break; case 'd': d_rate = atoi(s); break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else infile = s; } if (type == NULL) { ; } else if (strcmp(type, "23F") == 0) { coef = COEF23F; def_d_rate = 2; def_u_rate = 3; } else if (strcmp(type, "23S") == 0) { coef = COEF23S; def_d_rate = 2; def_u_rate = 3; } else if (strcmp(type, "34") == 0) { coef = COEF34; def_d_rate = 3; def_u_rate = 4; } else if (strcmp(type, "35") == 0) { coef = COEF35; def_d_rate = 3; def_u_rate = 5; } else if (strcmp(type, "45") == 0) { coef = COEF45; def_d_rate = 4; def_u_rate = 5; } else if (strcmp(type, "57") == 0) { coef = COEF57; def_d_rate = 5; def_u_rate = 7; } else if (strcmp(type, "58") == 0) { coef = COEF58; def_d_rate = 5; def_u_rate = 8; } else if (strcmp(type, "78") == 0) { coef = COEF78; def_d_rate = 7; def_u_rate = 8; } else { fprintf(stderr, "%s : Given dec/int rate %s is not supported!\n", cmnd, type); usage(1); } if (d_rate == 0) d_rate = def_d_rate; if (u_rate == 0) u_rate = def_u_rate; if (coef == NULL) { fprintf(stderr, "%s : LPF-coef file not specified!\n", cmnd); return (1); } if (infile) { fp = getfp(infile, "rb"); } else { fp = stdin; } srcnv(fp); fclose(fp); return (0); } void srcnv(FILE * fp) { int is_cont, i, k, nread, count, nwr, delay; double x[SIZE], y[DSIZE]; firinit(); delay = start; for (count = is_cont = 1; is_cont;) { if ((nread = freadf(x, sizeof(*x), SIZE, fp)) == 0) { is_cont = 0; nread = (d_rate * start) / u_rate; for (k = 0; k < nread; ++k) x[k] = 0; } for (nwr = k = 0; k < nread; ++k) { firin(x[k]); for (i = 0; i < u_rate; ++i) { if (--count == 0) { y[nwr++] = firout(i); count = d_rate; } } } if (delay) { if (nwr > delay) { nwr -= delay; if (fwritef(y + delay, sizeof(*y), nwr, stdout) != nwr) { fprintf(stderr, "%s : File write error!\n", cmnd); exit(1); } delay = 0; } else { delay -= nwr; } } else { if (fwritef(y, sizeof(*y), nwr, stdout) != nwr) { fprintf(stderr, "%s : File write error!\n", cmnd); exit(1); } } } } static double rb[RBSIZE], hdn[RBSIZE + 1]; static int flengdn = -1, indx = 0; void firin(double in) { indx = mod(indx - 1); rb[indx] = in; } double firout(int os) { double out; int k, l; out = 0; for (k = os, l = indx; k <= flengdn; k += u_rate, l = mod(l + 1)) out += rb[l] * hdn[k]; return (out); } void firinit(void) { FILE *fp; fp = getfp(coef, "rt"); flengdn = freada(hdn, RBSIZE + 1, fp); fclose(fp); if (--flengdn < 0) { fprintf(stderr, "%s : Cannot read filter coefficients!\n", cmnd); exit(1); } if (start) { start = flengdn / (2 * d_rate); } } SPTK-3.9/bin/us/us16.in0000755001051300105040000001473512633453604011431 00000000000000#!@csh@ -f # ----------------------------------------------------------------- # # The Speech Signal Processing Toolkit (SPTK) # # developed by SPTK Working Group # # http://sp-tk.sourceforge.net/ # # ----------------------------------------------------------------- # # # # Copyright (c) 1984-2007 Tokyo Institute of Technology # # Interdisciplinary Graduate School of # # Science and Engineering # # # # 1996-2015 Nagoya Institute of Technology # # Department of Computer Science # # # # All rights reserved. # # # # Redistribution and use in source and binary forms, with or # # without modification, are permitted provided that the following # # conditions are met: # # # # - Redistributions of source code must retain the above copyright # # notice, this list of conditions and the following disclaimer. # # - Redistributions in binary form must reproduce the above # # copyright notice, this list of conditions and the following # # disclaimer in the documentation and/or other materials provided # # with the distribution. # # - Neither the name of the SPTK working group nor the names of its # # contributors may be used to endorse or promote products derived # # from this software without specific prior written permission. # # # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND # # CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, # # INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS # # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, # # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED # # TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON # # ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, # # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY # # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # # POSSIBILITY OF SUCH DAMAGE. # # ----------------------------------------------------------------- # ######################################################################### # # # Sampling rate conversion from 10|12 kHz to 16 kHz # # # # 1998 T.Kobayashi # # 2000.7 S.Sako # # # ######################################################################### set path = ( @bindir@ $path ) set libpath = '@pkgdatadir@' set sptkver = '@package_version@' set cvsid = '$Id: us16.in,v 1.16 2015/12/14 05:45:40 uratec Exp $' set cmnd = $0 set cmnd = $cmnd:t set file set itype = '+@io_symbol@@io_symbol@' set otype = '+@io_symbol@@io_symbol@' set iext = 10 set oext = 16 set stdinput = 1 @ n = 1 @ s = 1 @ i = 0 while($i < $#argv) @ i++ switch($argv[$i]) case -s: @ i++ set iext = $argv[$i] breaksw case -h: goto usage breaksw default if( -d $argv[$i]) then set destdir = $argv[$i] else if( -e $argv[$i]) then set file = ( $file $argv[$i] ) set stdinput = -1 else if( ${#file} > 1 ) then echo2 "${cmnd} : Too many input files!" exit 1 endif set outfile = $argv[$i] endif breaksw endsw end goto cnvt cnvt: switch ($iext) case 10: set usops = "-c ${libpath}/lpfcoef.5to8 -u 8 -d 5" breaksw case 12: set usops = "-c ${libpath}/lpfcoef.3to4 -u 4 -d 3" breaksw default goto usage endsw if( $stdinput == 1) then if ($?outfile) then if( -e $outfile) then echo2 "${cmnd} : File $outfile exits!" exit 1 endif x2x $itype |\ us $usops |\ x2x $otype > $outfile else x2x $itype |\ us $usops |\ x2x $otype endif exit 0 endif foreach infile ($file) if ($?destdir) then set outfile = $infile:t set outfile = {$destdir}/{$outfile:r}.$oext endif if ($?outfile) then if ( -e $outfile ) then echo2 "${cmnd} : File $outfile exits!" exit 1 endif x2x $itype $infile |\ us $usops |\ x2x $otype > $outfile else x2x $itype $infile |\ us $usops |\ x2x $otype endif end exit 0 usage: cat2 < 1 ) then echo2 "${cmnd} : Too many input files!" exit 1 endif set outfile = $argv[$i] endif breaksw endsw end goto cnvt cnvt: if(`echo "$iext == 8" | bc -l`) then @ osr = 4 else if(`echo "$iext == 10" | bc -l`) then @ osr = 5 else if(`echo "$iext == 12" | bc -l`) then @ osr = 6 else if(`echo "$iext == 16" | bc -l`) then @ osr = 8 else goto usage endif if(`echo "$oext == 44" | bc -l`) then else if(`echo "$oext == 44.1" | bc -l`) then # set oext = 44 else if(`echo "$oext == 22" | bc -l`) then @ osr *= 2 else if(`echo "$oext == 22.05" | bc -l`) then # set oext = 22 @ osr *= 2 else if(`echo "$oext == 11" | bc -l`) then if (`echo "$iext == 10 || $iext == 8" | bc -l`) then @ osr *= 4 else goto usage endif else if(`echo "$oext == 11.025" | bc -l`) then # set oext = 11 if (`echo "$iext == 10 || $iext == 8" | bc -l`) then @ osr *= 4 else goto usage endif else goto usage endif if( $stdinput == 1) then if ($?outfile) then if( -e $outfile) then echo2 "${cmnd} : File $outfile exits!" exit 1 endif x2x $itype |\ us -c ${libpath}/lpfcoef.2to3f -u 3 -d 2 |\ us -c ${libpath}/lpfcoef.2to3s -u 3 -d 2 |\ us -c ${libpath}/lpfcoef.5to7 -u 7 -d 5 |\ us -c ${libpath}/lpfcoef.5to7 -u 7 -d $osr |\ x2x $otype > $outfile else x2x $itype |\ us -c ${libpath}/lpfcoef.2to3f -u 3 -d 2 |\ us -c ${libpath}/lpfcoef.2to3s -u 3 -d 2 |\ us -c ${libpath}/lpfcoef.5to7 -u 7 -d 5 |\ us -c ${libpath}/lpfcoef.5to7 -u 7 -d $osr |\ x2x $otype endif exit 0 endif foreach infile ($file) if ($?destdir) then set outfile = $infile:t set outfile = {$destdir}/{$outfile:r}.$oext endif if ($?outfile) then if ( -e $outfile ) then echo2 "${cmnd} : File $outfile exits!" exit 1 endif x2x $itype $infile |\ us -c ${libpath}/lpfcoef.2to3f -u 3 -d 2 |\ us -c ${libpath}/lpfcoef.2to3s -u 3 -d 2 |\ us -c ${libpath}/lpfcoef.5to7 -u 7 -d 5 |\ us -c ${libpath}/lpfcoef.5to7 -u 7 -d $osr |\ x2x $otype > $outfile else x2x $itype $infile |\ us -c ${libpath}/lpfcoef.2to3f -u 3 -d 2 |\ us -c ${libpath}/lpfcoef.2to3s -u 3 -d 2 |\ us -c ${libpath}/lpfcoef.5to7 -u 7 -d 5 |\ us -c ${libpath}/lpfcoef.5to7 -u 7 -d $osr |\ x2x $otype endif end exit 0 usage: cat2 < /* for exit(),calloc(),free() */ #include /* for va_list */ #include /* for strcpy(),strlen() */ /* hts_engine libraries */ #include "HTS_hidden.h" #ifdef FESTIVAL #include "EST_walloc.h" #endif /* FESTIVAL */ #define HTS_FILE 0 #define HTS_DATA 1 typedef struct _HTS_Data { unsigned char *data; size_t size; size_t index; } HTS_Data; /* HTS_fopen_from_fn: wrapper for fopen */ HTS_File *HTS_fopen_from_fn(const char *name, const char *opt) { HTS_File *fp = (HTS_File *) HTS_calloc(1, sizeof(HTS_File)); fp->type = HTS_FILE; fp->pointer = (void *) fopen(name, opt); if (fp->pointer == NULL) { HTS_error(0, "HTS_fopen: Cannot open %s.\n", name); HTS_free(fp); return NULL; } return fp; } /* HTS_fopen_from_fp: wrapper for fopen */ HTS_File *HTS_fopen_from_fp(HTS_File * fp, size_t size) { if (fp == NULL || size == 0) return NULL; else if (fp->type == HTS_FILE) { HTS_Data *d; HTS_File *f; d = (HTS_Data *) HTS_calloc(1, sizeof(HTS_Data)); d->data = (unsigned char *) HTS_calloc(size, sizeof(unsigned char)); d->size = size; d->index = 0; if (fread(d->data, sizeof(unsigned char), size, (FILE *) fp->pointer) != size) { free(d->data); free(d); return NULL; } f = (HTS_File *) HTS_calloc(1, sizeof(HTS_File)); f->type = HTS_DATA; f->pointer = (void *) d; return f; } else if (fp->type == HTS_DATA) { HTS_File *f; HTS_Data *tmp1, *tmp2; tmp1 = (HTS_Data *) fp->pointer; if (tmp1->index + size > tmp1->size) return NULL; tmp2 = (HTS_Data *) HTS_calloc(1, sizeof(HTS_Data)); tmp2->data = (unsigned char *) HTS_calloc(size, sizeof(unsigned char)); tmp2->size = size; tmp2->index = 0; memcpy(tmp2->data, &tmp1->data[tmp1->index], size); tmp1->index += size; f = (HTS_File *) HTS_calloc(1, sizeof(HTS_File)); f->type = HTS_DATA; f->pointer = (void *) tmp2; return f; } HTS_error(0, "HTS_fopen_from_fp: Unknown file type.\n"); return NULL; } /* HTS_fopen_from_data: wrapper for fopen */ HTS_File *HTS_fopen_from_data(void *data, size_t size) { HTS_Data *d; HTS_File *f; if (data == NULL || size == 0) return NULL; d = (HTS_Data *) HTS_calloc(1, sizeof(HTS_Data)); d->data = (unsigned char *) HTS_calloc(size, sizeof(unsigned char)); d->size = size; d->index = 0; memcpy(d->data, data, size); f = (HTS_File *) HTS_calloc(1, sizeof(HTS_File)); f->type = HTS_DATA; f->pointer = (void *) d; return f; } /* HTS_fclose: wrapper for fclose */ void HTS_fclose(HTS_File * fp) { if (fp == NULL) { return; } else if (fp->type == HTS_FILE) { if (fp->pointer != NULL) fclose((FILE *) fp->pointer); HTS_free(fp); return; } else if (fp->type == HTS_DATA) { if (fp->pointer != NULL) { HTS_Data *d = (HTS_Data *) fp->pointer; if (d->data != NULL) HTS_free(d->data); HTS_free(d); } HTS_free(fp); return; } HTS_error(0, "HTS_fclose: Unknown file type.\n"); } /* HTS_fgetc: wrapper for fgetc */ int HTS_fgetc(HTS_File * fp) { if (fp == NULL) { return EOF; } else if (fp->type == HTS_FILE) { return fgetc((FILE *) fp->pointer); } else if (fp->type == HTS_DATA) { HTS_Data *d = (HTS_Data *) fp->pointer; if (d->size <= d->index) return EOF; return (int) d->data[d->index++]; } HTS_error(0, "HTS_fgetc: Unknown file type.\n"); return EOF; } /* HTS_feof: wrapper for feof */ int HTS_feof(HTS_File * fp) { if (fp == NULL) { return 1; } else if (fp->type == HTS_FILE) { return feof((FILE *) fp->pointer); } else if (fp->type == HTS_DATA) { HTS_Data *d = (HTS_Data *) fp->pointer; return d->size <= d->index ? 1 : 0; } HTS_error(0, "HTS_feof: Unknown file type.\n"); return 1; } /* HTS_fseek: wrapper for fseek */ int HTS_fseek(HTS_File * fp, long offset, int origin) { if (fp == NULL) { return 1; } else if (fp->type == HTS_FILE) { return fseek((FILE *) fp->pointer, offset, origin); } else if (fp->type == HTS_DATA) { HTS_Data *d = (HTS_Data *) fp->pointer; if (origin == SEEK_SET) { d->index = (size_t) offset; } else if (origin == SEEK_CUR) { d->index += offset; } else if (origin == SEEK_END) { d->index = d->size + offset; } else { return 1; } return 0; } HTS_error(0, "HTS_fseek: Unknown file type.\n"); return 1; } /* HTS_ftell: rapper for ftell */ size_t HTS_ftell(HTS_File * fp) { if (fp == NULL) { return 0; } else if (fp->type == HTS_FILE) { fpos_t pos; fgetpos((FILE *) fp->pointer, &pos); #if defined(_WIN32) || defined(__CYGWIN__) || defined(__APPLE__) || defined(__ANDROID__) return (size_t) pos; #else return (size_t) pos.__pos; #endif /* _WIN32 || __CYGWIN__ || __APPLE__ || __ANDROID__ */ } else if (fp->type == HTS_DATA) { HTS_Data *d = (HTS_Data *) fp->pointer; return d->index; } HTS_error(0, "HTS_ftell: Unknown file type.\n"); return 0; } /* HTS_fread: wrapper for fread */ static size_t HTS_fread(void *buf, size_t size, size_t n, HTS_File * fp) { if (fp == NULL || size == 0 || n == 0) { return 0; } if (fp->type == HTS_FILE) { return fread(buf, size, n, (FILE *) fp->pointer); } else if (fp->type == HTS_DATA) { HTS_Data *d = (HTS_Data *) fp->pointer; size_t i, length = size * n; unsigned char *c = (unsigned char *) buf; for (i = 0; i < length; i++) { if (d->index < d->size) c[i] = d->data[d->index++]; else break; } if (i == 0) return 0; else return i / size; } HTS_error(0, "HTS_fread: Unknown file type.\n"); return 0; } /* HTS_byte_swap: byte swap */ static void HTS_byte_swap(void *p, size_t size, size_t block) { char *q, tmp; size_t i, j; q = (char *) p; for (i = 0; i < block; i++) { for (j = 0; j < (size / 2); j++) { tmp = *(q + j); *(q + j) = *(q + (size - 1 - j)); *(q + (size - 1 - j)) = tmp; } q += size; } } /* HTS_fread_big_endian: fread with byteswap */ size_t HTS_fread_big_endian(void *buf, size_t size, size_t n, HTS_File * fp) { size_t block = HTS_fread(buf, size, n, fp); #ifdef WORDS_LITTLEENDIAN HTS_byte_swap(buf, size, block); #endif /* WORDS_LITTLEENDIAN */ return block; } /* HTS_fread_little_endian: fread with byteswap */ size_t HTS_fread_little_endian(void *buf, size_t size, size_t n, HTS_File * fp) { size_t block = HTS_fread(buf, size, n, fp); #ifdef WORDS_BIGENDIAN HTS_byte_swap(buf, size, block); #endif /* WORDS_BIGENDIAN */ return block; } /* HTS_fwrite_little_endian: fwrite with byteswap */ size_t HTS_fwrite_little_endian(const void *buf, size_t size, size_t n, FILE * fp) { #ifdef WORDS_BIGENDIAN HTS_byte_swap(buf, size, n * size); #endif /* WORDS_BIGENDIAN */ return fwrite(buf, size, n, fp); } /* HTS_get_pattern_token: get pattern token (single/double quote can be used) */ HTS_Boolean HTS_get_pattern_token(HTS_File * fp, char *buff) { char c; size_t i; HTS_Boolean squote = FALSE, dquote = FALSE; if (fp == NULL || HTS_feof(fp)) return FALSE; c = HTS_fgetc(fp); while (c == ' ' || c == '\n') { if (HTS_feof(fp)) return FALSE; c = HTS_fgetc(fp); } if (c == '\'') { /* single quote case */ if (HTS_feof(fp)) return FALSE; c = HTS_fgetc(fp); squote = TRUE; } if (c == '\"') { /*double quote case */ if (HTS_feof(fp)) return FALSE; c = HTS_fgetc(fp); dquote = TRUE; } if (c == ',') { /*special character ',' */ strcpy(buff, ","); return TRUE; } i = 0; while (1) { buff[i++] = c; c = HTS_fgetc(fp); if (squote && c == '\'') break; if (dquote && c == '\"') break; if (!squote && !dquote) { if (c == ' ') break; if (c == '\n') break; if (HTS_feof(fp)) break; } } buff[i] = '\0'; return TRUE; } /* HTS_get_token: get token from file pointer (separators are space, tab, and line break) */ HTS_Boolean HTS_get_token_from_fp(HTS_File * fp, char *buff) { char c; size_t i; if (fp == NULL || HTS_feof(fp)) return FALSE; c = HTS_fgetc(fp); while (c == ' ' || c == '\n' || c == '\t') { if (HTS_feof(fp)) return FALSE; c = HTS_fgetc(fp); if (c == EOF) return FALSE; } for (i = 0; c != ' ' && c != '\n' && c != '\t';) { buff[i++] = c; if (HTS_feof(fp)) break; c = HTS_fgetc(fp); if (c == EOF) break; } buff[i] = '\0'; return TRUE; } /* HTS_get_token_with_separator: get token from file pointer with specified separator */ HTS_Boolean HTS_get_token_from_fp_with_separator(HTS_File * fp, char *buff, char separator) { char c; size_t i; if (fp == NULL || HTS_feof(fp)) return FALSE; c = HTS_fgetc(fp); while (c == separator) { if (HTS_feof(fp)) return FALSE; c = HTS_fgetc(fp); if (c == EOF) return FALSE; } for (i = 0; c != separator;) { buff[i++] = c; if (HTS_feof(fp)) break; c = HTS_fgetc(fp); if (c == EOF) break; } buff[i] = '\0'; return TRUE; } /* HTS_get_token_from_string: get token from string (separators are space, tab, and line break) */ HTS_Boolean HTS_get_token_from_string(const char *string, size_t * index, char *buff) { char c; size_t i; c = string[(*index)]; if (c == '\0') return FALSE; c = string[(*index)++]; if (c == '\0') return FALSE; while (c == ' ' || c == '\n' || c == '\t') { if (c == '\0') return FALSE; c = string[(*index)++]; } for (i = 0; c != ' ' && c != '\n' && c != '\t' && c != '\0'; i++) { buff[i] = c; c = string[(*index)++]; } buff[i] = '\0'; return TRUE; } /* HTS_get_token_from_string_with_separator: get token from string with specified separator */ HTS_Boolean HTS_get_token_from_string_with_separator(const char *str, size_t * index, char *buff, char separator) { char c; size_t len = 0; if (str == NULL) return FALSE; c = str[(*index)]; if (c == '\0') return FALSE; while (c == separator) { if (c == '\0') return FALSE; (*index)++; c = str[(*index)]; } while (c != separator && c != '\0') { buff[len++] = c; (*index)++; c = str[(*index)]; } if (c != '\0') (*index)++; buff[len] = '\0'; if (len > 0) return TRUE; else return FALSE; } /* HTS_calloc: wrapper for calloc */ void *HTS_calloc(const size_t num, const size_t size) { size_t n = num * size; void *mem; if (n == 0) return NULL; #ifdef FESTIVAL mem = (void *) safe_wcalloc(n); #else mem = (void *) malloc(n); #endif /* FESTIVAL */ memset(mem, 0, n); if (mem == NULL) HTS_error(1, "HTS_calloc: Cannot allocate memory.\n"); return mem; } /* HTS_Free: wrapper for free */ void HTS_free(void *ptr) { #ifdef FESTIVAL wfree(ptr); #else free(ptr); #endif /* FESTIVAL */ } /* HTS_strdup: wrapper for strdup */ char *HTS_strdup(const char *string) { #ifdef FESTIVAL return (wstrdup(string)); #else char *buff = (char *) HTS_calloc(strlen(string) + 1, sizeof(char)); strcpy(buff, string); return buff; #endif /* FESTIVAL */ } /* HTS_alloc_matrix: allocate double matrix */ double **HTS_alloc_matrix(size_t x, size_t y) { size_t i; double **p; if (x == 0 || y == 0) return NULL; p = (double **) HTS_calloc(x, sizeof(double *)); for (i = 0; i < x; i++) p[i] = (double *) HTS_calloc(y, sizeof(double)); return p; } /* HTS_free_matrix: free double matrix */ void HTS_free_matrix(double **p, size_t x) { size_t i; for (i = 0; i < x; i++) HTS_free(p[i]); HTS_free(p); } /* HTS_error: output error message */ void HTS_error(int error, const char *message, ...) { va_list arg; fflush(stdout); fflush(stderr); if (error > 0) fprintf(stderr, "\nError: "); else fprintf(stderr, "\nWarning: "); va_start(arg, message); vfprintf(stderr, message, arg); va_end(arg); fflush(stderr); if (error > 0) exit(error); } HTS_MISC_C_END; #endif /* !HTS_MISC_C */ SPTK-3.9/bin/vc/hts_engine_API/HTS_pstream.c0000644001051300105040000005131112637156755015434 00000000000000/* ----------------------------------------------------------------- */ /* The HMM-Based Speech Synthesis Engine "hts_engine API" */ /* developed by HTS Working Group */ /* http://hts-engine.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 2001-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* 2001-2008 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the HTS working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ #ifndef HTS_PSTREAM_C #define HTS_PSTREAM_C #ifdef __cplusplus #define HTS_PSTREAM_C_START extern "C" { #define HTS_PSTREAM_C_END } #else #define HTS_PSTREAM_C_START #define HTS_PSTREAM_C_END #endif /* __CPLUSPLUS */ HTS_PSTREAM_C_START; #include /* for sqrt() */ /* hts_engine libraries */ #include "HTS_hidden.h" /* HTS_finv: calculate 1.0/variance function */ static double HTS_finv(const double x) { if (x >= INFTY2) return 0.0; if (x <= -INFTY2) return 0.0; if (x <= INVINF2 && x >= 0) return INFTY; if (x >= -INVINF2 && x < 0) return -INFTY; return (1.0 / x); } /* HTS_PStream_calc_wuw_and_wum: calcurate W'U^{-1}W and W'U^{-1}M */ static void HTS_PStream_calc_wuw_and_wum(HTS_PStream * pst, size_t m) { size_t t, i, j; int shift; double wu; for (t = 0; t < pst->length; t++) { /* initialize */ pst->sm.wum[t] = 0.0; for (i = 0; i < pst->width; i++) pst->sm.wuw[t][i] = 0.0; /* calc WUW & WUM */ for (i = 0; i < pst->win_size; i++) for (shift = pst->win_l_width[i]; shift <= pst->win_r_width[i]; shift++) if (((int) t + shift >= 0) && ((int) t + shift < pst->length) && (pst->win_coefficient[i][-shift] != 0.0)) { wu = pst->win_coefficient[i][-shift] * pst->sm.ivar[t + shift][i * pst->vector_length + m]; pst->sm.wum[t] += wu * pst->sm.mean[t + shift][i * pst->vector_length + m]; for (j = 0; (j < pst->width) && (t + j < pst->length); j++) if (((int) j <= pst->win_r_width[i] + shift) && (pst->win_coefficient[i][j - shift] != 0.0)) pst->sm.wuw[t][j] += wu * pst->win_coefficient[i][j - shift]; } } } /* HTS_PStream_ldl_factorization: Factorize W'*U^{-1}*W to L*D*L' (L: lower triangular, D: diagonal) */ static void HTS_PStream_ldl_factorization(HTS_PStream * pst) { size_t t, i, j; for (t = 0; t < pst->length; t++) { for (i = 1; (i < pst->width) && (t >= i); i++) pst->sm.wuw[t][0] -= pst->sm.wuw[t - i][i] * pst->sm.wuw[t - i][i] * pst->sm.wuw[t - i][0]; for (i = 1; i < pst->width; i++) { for (j = 1; (i + j < pst->width) && (t >= j); j++) pst->sm.wuw[t][i] -= pst->sm.wuw[t - j][j] * pst->sm.wuw[t - j][i + j] * pst->sm.wuw[t - j][0]; pst->sm.wuw[t][i] /= pst->sm.wuw[t][0]; } } } /* HTS_PStream_forward_substitution: forward subtitution for mlpg */ static void HTS_PStream_forward_substitution(HTS_PStream * pst) { size_t t, i; for (t = 0; t < pst->length; t++) { pst->sm.g[t] = pst->sm.wum[t]; for (i = 1; (i < pst->width) && (t >= i); i++) pst->sm.g[t] -= pst->sm.wuw[t - i][i] * pst->sm.g[t - i]; } } /* HTS_PStream_backward_substitution: backward subtitution for mlpg */ static void HTS_PStream_backward_substitution(HTS_PStream * pst, size_t m) { size_t rev, t, i; for (rev = 0; rev < pst->length; rev++) { t = pst->length - 1 - rev; pst->par[t][m] = pst->sm.g[t] / pst->sm.wuw[t][0]; for (i = 1; (i < pst->width) && (t + i < pst->length); i++) pst->par[t][m] -= pst->sm.wuw[t][i] * pst->par[t + i][m]; } } /* HTS_PStream_calc_gv: subfunction for mlpg using GV */ static void HTS_PStream_calc_gv(HTS_PStream * pst, size_t m, double *mean, double *vari) { size_t t; *mean = 0.0; for (t = 0; t < pst->length; t++) if (pst->gv_switch[t]) *mean += pst->par[t][m]; *mean /= pst->gv_length; *vari = 0.0; for (t = 0; t < pst->length; t++) if (pst->gv_switch[t]) *vari += (pst->par[t][m] - *mean) * (pst->par[t][m] - *mean); *vari /= pst->gv_length; } /* HTS_PStream_conv_gv: subfunction for mlpg using GV */ static void HTS_PStream_conv_gv(HTS_PStream * pst, size_t m) { size_t t; double ratio; double mean; double vari; HTS_PStream_calc_gv(pst, m, &mean, &vari); ratio = sqrt(pst->gv_mean[m] / vari); for (t = 0; t < pst->length; t++) if (pst->gv_switch[t]) pst->par[t][m] = ratio * (pst->par[t][m] - mean) + mean; } /* HTS_PStream_calc_derivative: subfunction for mlpg using GV */ static double HTS_PStream_calc_derivative(HTS_PStream * pst, size_t m) { size_t t, i; double mean; double vari; double dv; double h; double gvobj; double hmmobj; double w = 1.0 / (pst->win_size * pst->length); HTS_PStream_calc_gv(pst, m, &mean, &vari); gvobj = -0.5 * W2 * vari * pst->gv_vari[m] * (vari - 2.0 * pst->gv_mean[m]); dv = -2.0 * pst->gv_vari[m] * (vari - pst->gv_mean[m]) / pst->length; for (t = 0; t < pst->length; t++) { pst->sm.g[t] = pst->sm.wuw[t][0] * pst->par[t][m]; for (i = 1; i < pst->width; i++) { if (t + i < pst->length) pst->sm.g[t] += pst->sm.wuw[t][i] * pst->par[t + i][m]; if (t + 1 > i) pst->sm.g[t] += pst->sm.wuw[t - i][i] * pst->par[t - i][m]; } } for (t = 0, hmmobj = 0.0; t < pst->length; t++) { hmmobj += W1 * w * pst->par[t][m] * (pst->sm.wum[t] - 0.5 * pst->sm.g[t]); h = -W1 * w * pst->sm.wuw[t][1 - 1] - W2 * 2.0 / (pst->length * pst->length) * ((pst->length - 1) * pst->gv_vari[m] * (vari - pst->gv_mean[m]) + 2.0 * pst->gv_vari[m] * (pst->par[t][m] - mean) * (pst->par[t][m] - mean)); if (pst->gv_switch[t]) pst->sm.g[t] = 1.0 / h * (W1 * w * (-pst->sm.g[t] + pst->sm.wum[t]) + W2 * dv * (pst->par[t][m] - mean)); else pst->sm.g[t] = 1.0 / h * (W1 * w * (-pst->sm.g[t] + pst->sm.wum[t])); } return (-(hmmobj + gvobj)); } /* HTS_PStream_gv_parmgen: function for mlpg using GV */ static void HTS_PStream_gv_parmgen(HTS_PStream * pst, size_t m) { size_t t, i; double step = STEPINIT; double prev = 0.0; double obj; if (pst->gv_length == 0) return; HTS_PStream_conv_gv(pst, m); if (GV_MAX_ITERATION > 0) { HTS_PStream_calc_wuw_and_wum(pst, m); for (i = 1; i <= GV_MAX_ITERATION; i++) { obj = HTS_PStream_calc_derivative(pst, m); if (i > 1) { if (obj > prev) step *= STEPDEC; if (obj < prev) step *= STEPINC; } for (t = 0; t < pst->length; t++) { if (pst->gv_switch[t]) pst->par[t][m] += step * pst->sm.g[t]; } prev = obj; } } } /* HTS_PStream_mlpg: generate sequence of speech parameter vector maximizing its output probability for given pdf sequence */ static void HTS_PStream_mlpg(HTS_PStream * pst) { size_t m; if (pst->length == 0) return; for (m = 0; m < pst->vector_length; m++) { HTS_PStream_calc_wuw_and_wum(pst, m); HTS_PStream_ldl_factorization(pst); /* LDL factorization */ HTS_PStream_forward_substitution(pst); /* forward substitution */ HTS_PStream_backward_substitution(pst, m); /* backward substitution */ if (pst->gv_length > 0) HTS_PStream_gv_parmgen(pst, m); } } /* HTS_PStreamSet_initialize: initialize parameter stream set */ void HTS_PStreamSet_initialize(HTS_PStreamSet * pss) { pss->pstream = NULL; pss->nstream = 0; pss->total_frame = 0; } /* HTS_PStreamSet_create: parameter generation using GV weight */ HTS_Boolean HTS_PStreamSet_create(HTS_PStreamSet * pss, HTS_SStreamSet * sss, double *msd_threshold, double *gv_weight) { size_t i, j, k, l, m; int shift; size_t frame, msd_frame, state; HTS_PStream *pst; HTS_Boolean not_bound; if (pss->nstream != 0) { HTS_error(1, "HTS_PstreamSet_create: HTS_PStreamSet should be clear.\n"); return FALSE; } /* initialize */ pss->nstream = HTS_SStreamSet_get_nstream(sss); pss->pstream = (HTS_PStream *) HTS_calloc(pss->nstream, sizeof(HTS_PStream)); pss->total_frame = HTS_SStreamSet_get_total_frame(sss); /* create */ for (i = 0; i < pss->nstream; i++) { pst = &pss->pstream[i]; if (HTS_SStreamSet_is_msd(sss, i) == TRUE) { /* for MSD */ pst->length = 0; for (state = 0; state < HTS_SStreamSet_get_total_state(sss); state++) if (HTS_SStreamSet_get_msd(sss, i, state) > msd_threshold[i]) pst->length += HTS_SStreamSet_get_duration(sss, state); pst->msd_flag = (HTS_Boolean *) HTS_calloc(pss->total_frame, sizeof(HTS_Boolean)); for (state = 0, frame = 0; state < HTS_SStreamSet_get_total_state(sss); state++) { if (HTS_SStreamSet_get_msd(sss, i, state) > msd_threshold[i]) { for (j = 0; j < HTS_SStreamSet_get_duration(sss, state); j++) { pst->msd_flag[frame] = TRUE; frame++; } } else { for (j = 0; j < HTS_SStreamSet_get_duration(sss, state); j++) { pst->msd_flag[frame] = FALSE; frame++; } } } } else { /* for non MSD */ pst->length = pss->total_frame; pst->msd_flag = NULL; } pst->vector_length = HTS_SStreamSet_get_vector_length(sss, i); pst->width = HTS_SStreamSet_get_window_max_width(sss, i) * 2 + 1; /* band width of R */ pst->win_size = HTS_SStreamSet_get_window_size(sss, i); if (pst->length > 0) { pst->sm.mean = HTS_alloc_matrix(pst->length, pst->vector_length * pst->win_size); pst->sm.ivar = HTS_alloc_matrix(pst->length, pst->vector_length * pst->win_size); pst->sm.wum = (double *) HTS_calloc(pst->length, sizeof(double)); pst->sm.wuw = HTS_alloc_matrix(pst->length, pst->width); pst->sm.g = (double *) HTS_calloc(pst->length, sizeof(double)); pst->par = HTS_alloc_matrix(pst->length, pst->vector_length); } /* copy dynamic window */ pst->win_l_width = (int *) HTS_calloc(pst->win_size, sizeof(int)); pst->win_r_width = (int *) HTS_calloc(pst->win_size, sizeof(int)); pst->win_coefficient = (double **) HTS_calloc(pst->win_size, sizeof(double)); for (j = 0; j < pst->win_size; j++) { pst->win_l_width[j] = HTS_SStreamSet_get_window_left_width(sss, i, j); pst->win_r_width[j] = HTS_SStreamSet_get_window_right_width(sss, i, j); if (pst->win_l_width[j] + pst->win_r_width[j] == 0) pst->win_coefficient[j] = (double *) HTS_calloc(-2 * pst->win_l_width[j] + 1, sizeof(double)); else pst->win_coefficient[j] = (double *) HTS_calloc(-2 * pst->win_l_width[j], sizeof(double)); pst->win_coefficient[j] -= pst->win_l_width[j]; for (shift = pst->win_l_width[j]; shift <= pst->win_r_width[j]; shift++) pst->win_coefficient[j][shift] = HTS_SStreamSet_get_window_coefficient(sss, i, j, shift); } /* copy GV */ if (HTS_SStreamSet_use_gv(sss, i)) { pst->gv_mean = (double *) HTS_calloc(pst->vector_length, sizeof(double)); pst->gv_vari = (double *) HTS_calloc(pst->vector_length, sizeof(double)); for (j = 0; j < pst->vector_length; j++) { pst->gv_mean[j] = HTS_SStreamSet_get_gv_mean(sss, i, j) * gv_weight[i]; pst->gv_vari[j] = HTS_SStreamSet_get_gv_vari(sss, i, j); } pst->gv_switch = (HTS_Boolean *) HTS_calloc(pst->length, sizeof(HTS_Boolean)); if (HTS_SStreamSet_is_msd(sss, i) == TRUE) { /* for MSD */ for (state = 0, frame = 0, msd_frame = 0; state < HTS_SStreamSet_get_total_state(sss); state++) for (j = 0; j < HTS_SStreamSet_get_duration(sss, state); j++, frame++) if (pst->msd_flag[frame] == TRUE) pst->gv_switch[msd_frame++] = HTS_SStreamSet_get_gv_switch(sss, i, state); } else { /* for non MSD */ for (state = 0, frame = 0; state < HTS_SStreamSet_get_total_state(sss); state++) for (j = 0; j < HTS_SStreamSet_get_duration(sss, state); j++) pst->gv_switch[frame++] = HTS_SStreamSet_get_gv_switch(sss, i, state); } for (j = 0, pst->gv_length = 0; j < pst->length; j++) if (pst->gv_switch[j]) pst->gv_length++; } else { pst->gv_switch = NULL; pst->gv_length = 0; pst->gv_mean = NULL; pst->gv_vari = NULL; } /* copy pdfs */ if (HTS_SStreamSet_is_msd(sss, i) == TRUE) { /* for MSD */ for (state = 0, frame = 0, msd_frame = 0; state < HTS_SStreamSet_get_total_state(sss); state++) { for (j = 0; j < HTS_SStreamSet_get_duration(sss, state); j++) { if (pst->msd_flag[frame] == TRUE) { /* check current frame is MSD boundary or not */ for (k = 0; k < pst->win_size; k++) { not_bound = TRUE; for (shift = pst->win_l_width[k]; shift <= pst->win_r_width[k]; shift++) if ((int) frame + shift < 0 || (int) pss->total_frame <= (int) frame + shift || pst->msd_flag[frame + shift] != TRUE) { not_bound = FALSE; break; } for (l = 0; l < pst->vector_length; l++) { m = pst->vector_length * k + l; pst->sm.mean[msd_frame][m] = HTS_SStreamSet_get_mean(sss, i, state, m); if (not_bound || k == 0) pst->sm.ivar[msd_frame][m] = HTS_finv(HTS_SStreamSet_get_vari(sss, i, state, m)); else pst->sm.ivar[msd_frame][m] = 0.0; } } msd_frame++; } frame++; } } } else { /* for non MSD */ for (state = 0, frame = 0; state < HTS_SStreamSet_get_total_state(sss); state++) { for (j = 0; j < HTS_SStreamSet_get_duration(sss, state); j++) { for (k = 0; k < pst->win_size; k++) { not_bound = TRUE; for (shift = pst->win_l_width[k]; shift <= pst->win_r_width[k]; shift++) if ((int) frame + shift < 0 || (int) pss->total_frame <= (int) frame + shift) { not_bound = FALSE; break; } for (l = 0; l < pst->vector_length; l++) { m = pst->vector_length * k + l; pst->sm.mean[frame][m] = HTS_SStreamSet_get_mean(sss, i, state, m); if (not_bound || k == 0) pst->sm.ivar[frame][m] = HTS_finv(HTS_SStreamSet_get_vari(sss, i, state, m)); else pst->sm.ivar[frame][m] = 0.0; } } frame++; } } } /* parameter generation */ HTS_PStream_mlpg(pst); } return TRUE; } /* HTS_PStreamSet_get_nstream: get number of stream */ size_t HTS_PStreamSet_get_nstream(HTS_PStreamSet * pss) { return pss->nstream; } /* HTS_PStreamSet_get_vector_length: get feature length */ size_t HTS_PStreamSet_get_vector_length(HTS_PStreamSet * pss, size_t stream_index) { return pss->pstream[stream_index].vector_length; } /* HTS_PStreamSet_get_total_frame: get total number of frame */ size_t HTS_PStreamSet_get_total_frame(HTS_PStreamSet * pss) { return pss->total_frame; } /* HTS_PStreamSet_get_parameter: get parameter */ double HTS_PStreamSet_get_parameter(HTS_PStreamSet * pss, size_t stream_index, size_t frame_index, size_t vector_index) { return pss->pstream[stream_index].par[frame_index][vector_index]; } /* HTS_PStreamSet_get_parameter_vector: get parameter vector*/ double *HTS_PStreamSet_get_parameter_vector(HTS_PStreamSet * pss, size_t stream_index, size_t frame_index) { return pss->pstream[stream_index].par[frame_index]; } /* HTS_PStreamSet_get_msd_flag: get generated MSD flag per frame */ HTS_Boolean HTS_PStreamSet_get_msd_flag(HTS_PStreamSet * pss, size_t stream_index, size_t frame_index) { return pss->pstream[stream_index].msd_flag[frame_index]; } /* HTS_PStreamSet_is_msd: get MSD flag */ HTS_Boolean HTS_PStreamSet_is_msd(HTS_PStreamSet * pss, size_t stream_index) { return pss->pstream[stream_index].msd_flag ? TRUE : FALSE; } /* HTS_PStreamSet_clear: free parameter stream set */ void HTS_PStreamSet_clear(HTS_PStreamSet * pss) { size_t i, j; HTS_PStream *pstream; if (pss->pstream) { for (i = 0; i < pss->nstream; i++) { pstream = &pss->pstream[i]; if (pstream->sm.wum) HTS_free(pstream->sm.wum); if (pstream->sm.g) HTS_free(pstream->sm.g); if (pstream->sm.wuw) HTS_free_matrix(pstream->sm.wuw, pstream->length); if (pstream->sm.ivar) HTS_free_matrix(pstream->sm.ivar, pstream->length); if (pstream->sm.mean) HTS_free_matrix(pstream->sm.mean, pstream->length); if (pstream->par) HTS_free_matrix(pstream->par, pstream->length); if (pstream->msd_flag) HTS_free(pstream->msd_flag); if (pstream->win_coefficient) { for (j = 0; j < pstream->win_size; j++) { pstream->win_coefficient[j] += pstream->win_l_width[j]; HTS_free(pstream->win_coefficient[j]); } } if (pstream->gv_mean) HTS_free(pstream->gv_mean); if (pstream->gv_vari) HTS_free(pstream->gv_vari); if (pstream->win_coefficient) HTS_free(pstream->win_coefficient); if (pstream->win_l_width) HTS_free(pstream->win_l_width); if (pstream->win_r_width) HTS_free(pstream->win_r_width); if (pstream->gv_switch) HTS_free(pstream->gv_switch); } HTS_free(pss->pstream); } HTS_PStreamSet_initialize(pss); } HTS_PSTREAM_C_END; #endif /* !HTS_PSTREAM_C */ SPTK-3.9/bin/vc/hts_engine_API/HTS_sstream.c0000644001051300105040000005417112637157272015441 00000000000000/* ----------------------------------------------------------------- */ /* The HMM-Based Speech Synthesis Engine "hts_engine API" */ /* developed by HTS Working Group */ /* http://hts-engine.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 2001-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* 2001-2008 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the HTS working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ #ifndef HTS_SSTREAM_C #define HTS_SSTREAM_C #ifdef __cplusplus #define HTS_SSTREAM_C_START extern "C" { #define HTS_SSTREAM_C_END } #else #define HTS_SSTREAM_C_START #define HTS_SSTREAM_C_END #endif /* __CPLUSPLUS */ HTS_SSTREAM_C_START; #include #include /* hts_engine libraries */ #include "HTS_hidden.h" #if 0 /* HTS_set_default_duration: set default duration from state duration probability distribution */ static double HTS_set_default_duration(size_t * duration, double *mean, double *vari, size_t size) { size_t i; double temp; size_t sum = 0; for (i = 0; i < size; i++) { temp = mean[i] + 0.5; if (temp < 1.0) duration[i] = 1; else duration[i] = (size_t) temp; sum += duration[i]; } return (double) sum; } /* HTS_set_specified_duration: set duration from state duration probability distribution and specified frame length */ static double HTS_set_specified_duration(size_t * duration, double *mean, double *vari, size_t size, double frame_length) { size_t i; int j; double temp1, temp2; double rho = 0.0; size_t sum = 0; size_t target_length; /* get the target frame length */ if (frame_length + 0.5 < 1.0) target_length = 1; else target_length = (size_t) (frame_length + 0.5); /* check the specified duration */ if (target_length <= size) { if (target_length < size) HTS_error(-1, "HTS_set_specified_duration: Specified frame length is too short.\n"); for (i = 0; i < size; i++) duration[i] = 1; return (double) size; } /* RHO calculation */ temp1 = 0.0; temp2 = 0.0; for (i = 0; i < size; i++) { temp1 += mean[i]; temp2 += vari[i]; } rho = ((double) target_length - temp1) / temp2; /* first estimation */ for (i = 0; i < size; i++) { temp1 = mean[i] + rho * vari[i] + 0.5; if (temp1 < 1.0) duration[i] = 1; else duration[i] = (size_t) temp1; sum += duration[i]; } /* loop estimation */ while (target_length != sum) { /* sarch flexible state and modify its duration */ if (target_length > sum) { j = -1; for (i = 0; i < size; i++) { temp2 = fabs(rho - ((double) duration[i] + 1 - mean[i]) / vari[i]); if (j < 0 || temp1 > temp2) { j = i; temp1 = temp2; } } sum++; duration[j]++; } else { j = -1; for (i = 0; i < size; i++) { if (duration[i] > 1) { temp2 = fabs(rho - ((double) duration[i] - 1 - mean[i]) / vari[i]); if (j < 0 || temp1 > temp2) { j = i; temp1 = temp2; } } } sum--; duration[j]--; } } return (double) target_length; } #endif /* HTS_SStreamSet_initialize: initialize state stream set */ void HTS_SStreamSet_initialize(HTS_SStreamSet * sss) { sss->nstream = 0; sss->nstate = 0; sss->sstream = NULL; sss->duration = NULL; sss->total_state = 0; sss->total_frame = 0; } #if 0 /* HTS_SStreamSet_create: parse label and determine state duration */ HTS_Boolean HTS_SStreamSet_create(HTS_SStreamSet * sss, HTS_ModelSet * ms, HTS_Label * label, HTS_Boolean phoneme_alignment_flag, double speed, double *duration_iw, double **parameter_iw, double **gv_iw) { size_t i, j, k; double temp; int shift; size_t state; HTS_SStream *sst; double *duration_mean, *duration_vari; double frame_length; size_t next_time; size_t next_state; if (HTS_Label_get_size(label) == 0) return FALSE; /* check interpolation weights */ for (i = 0, temp = 0.0; i < HTS_ModelSet_get_nvoices(ms); i++) temp += duration_iw[i]; if (temp == 0.0) { return FALSE; } else if (temp != 1.0) { for (i = 0; i < HTS_ModelSet_get_nvoices(ms); i++) if (duration_iw[i] != 0.0) duration_iw[i] /= temp; } for (i = 0; i < HTS_ModelSet_get_nstream(ms); i++) { for (j = 0, temp = 0.0; j < HTS_ModelSet_get_nvoices(ms); j++) temp += parameter_iw[j][i]; if (temp == 0.0) { return FALSE; } else if (temp != 1.0) { for (j = 0; j < HTS_ModelSet_get_nvoices(ms); j++) if (parameter_iw[j][i] != 0.0) parameter_iw[j][i] /= temp; } if (HTS_ModelSet_use_gv(ms, i)) { for (j = 0, temp = 0.0; j < HTS_ModelSet_get_nvoices(ms); j++) temp += gv_iw[j][i]; if (temp == 0.0) return FALSE; else if (temp != 1.0) for (j = 0; j < HTS_ModelSet_get_nvoices(ms); j++) if (gv_iw[j][i] != 0.0) gv_iw[j][i] /= temp; } } /* initialize state sequence */ sss->nstate = HTS_ModelSet_get_nstate(ms); sss->nstream = HTS_ModelSet_get_nstream(ms); sss->total_frame = 0; sss->total_state = HTS_Label_get_size(label) * sss->nstate; sss->duration = (size_t *) HTS_calloc(sss->total_state, sizeof(size_t)); sss->sstream = (HTS_SStream *) HTS_calloc(sss->nstream, sizeof(HTS_SStream)); for (i = 0; i < sss->nstream; i++) { sst = &sss->sstream[i]; sst->vector_length = HTS_ModelSet_get_vector_length(ms, i); sst->mean = (double **) HTS_calloc(sss->total_state, sizeof(double *)); sst->vari = (double **) HTS_calloc(sss->total_state, sizeof(double *)); if (HTS_ModelSet_is_msd(ms, i)) sst->msd = (double *) HTS_calloc(sss->total_state, sizeof(double)); else sst->msd = NULL; for (j = 0; j < sss->total_state; j++) { sst->mean[j] = (double *) HTS_calloc(sst->vector_length * HTS_ModelSet_get_window_size(ms, i), sizeof(double)); sst->vari[j] = (double *) HTS_calloc(sst->vector_length * HTS_ModelSet_get_window_size(ms, i), sizeof(double)); } if (HTS_ModelSet_use_gv(ms, i)) { sst->gv_switch = (HTS_Boolean *) HTS_calloc(sss->total_state, sizeof(HTS_Boolean)); for (j = 0; j < sss->total_state; j++) sst->gv_switch[j] = TRUE; } else { sst->gv_switch = NULL; } } /* determine state duration */ duration_mean = (double *) HTS_calloc(sss->total_state, sizeof(double)); duration_vari = (double *) HTS_calloc(sss->total_state, sizeof(double)); for (i = 0; i < HTS_Label_get_size(label); i++) HTS_ModelSet_get_duration(ms, HTS_Label_get_string(label, i), duration_iw, &duration_mean[i * sss->nstate], &duration_vari[i * sss->nstate]); if (phoneme_alignment_flag == TRUE) { /* use duration set by user */ next_time = 0; next_state = 0; state = 0; for (i = 0; i < HTS_Label_get_size(label); i++) { temp = HTS_Label_get_end_frame(label, i); if (temp >= 0) { next_time += (size_t) HTS_set_specified_duration(&sss->duration[next_state], &duration_mean[next_state], &duration_vari[next_state], state + sss->nstate - next_state, temp - next_time); next_state = state + sss->nstate; } else if (i + 1 == HTS_Label_get_size(label)) { HTS_error(-1, "HTS_SStreamSet_create: The time of final label is not specified.\n"); HTS_set_default_duration(&sss->duration[next_state], &duration_mean[next_state], &duration_vari[next_state], state + sss->nstate - next_state); } state += sss->nstate; } } else { /* determine frame length */ if (speed != 1.0) { temp = 0.0; for (i = 0; i < sss->total_state; i++) { temp += duration_mean[i]; } frame_length = temp / speed; HTS_set_specified_duration(sss->duration, duration_mean, duration_vari, sss->total_state, frame_length); } else { HTS_set_default_duration(sss->duration, duration_mean, duration_vari, sss->total_state); } } HTS_free(duration_mean); HTS_free(duration_vari); /* get parameter */ for (i = 0, state = 0; i < HTS_Label_get_size(label); i++) { for (j = 2; j <= sss->nstate + 1; j++) { sss->total_frame += sss->duration[state]; for (k = 0; k < sss->nstream; k++) { sst = &sss->sstream[k]; if (sst->msd) HTS_ModelSet_get_parameter(ms, k, j, HTS_Label_get_string(label, i), (const double *const *) parameter_iw, sst->mean[state], sst->vari[state], &sst->msd[state]); else HTS_ModelSet_get_parameter(ms, k, j, HTS_Label_get_string(label, i), (const double *const *) parameter_iw, sst->mean[state], sst->vari[state], NULL); } state++; } } /* copy dynamic window */ for (i = 0; i < sss->nstream; i++) { sst = &sss->sstream[i]; sst->win_size = HTS_ModelSet_get_window_size(ms, i); sst->win_max_width = HTS_ModelSet_get_window_max_width(ms, i); sst->win_l_width = (int *) HTS_calloc(sst->win_size, sizeof(int)); sst->win_r_width = (int *) HTS_calloc(sst->win_size, sizeof(int)); sst->win_coefficient = (double **) HTS_calloc(sst->win_size, sizeof(double)); for (j = 0; j < sst->win_size; j++) { sst->win_l_width[j] = HTS_ModelSet_get_window_left_width(ms, i, j); sst->win_r_width[j] = HTS_ModelSet_get_window_right_width(ms, i, j); if (sst->win_l_width[j] + sst->win_r_width[j] == 0) sst->win_coefficient[j] = (double *) HTS_calloc(-2 * sst->win_l_width[j] + 1, sizeof(double)); else sst->win_coefficient[j] = (double *) HTS_calloc(-2 * sst->win_l_width[j], sizeof(double)); sst->win_coefficient[j] -= sst->win_l_width[j]; for (shift = sst->win_l_width[j]; shift <= sst->win_r_width[j]; shift++) sst->win_coefficient[j][shift] = HTS_ModelSet_get_window_coefficient(ms, i, j, shift); } } /* determine GV */ for (i = 0; i < sss->nstream; i++) { sst = &sss->sstream[i]; if (HTS_ModelSet_use_gv(ms, i)) { sst->gv_mean = (double *) HTS_calloc(sst->vector_length, sizeof(double)); sst->gv_vari = (double *) HTS_calloc(sst->vector_length, sizeof(double)); HTS_ModelSet_get_gv(ms, i, HTS_Label_get_string(label, 0), (const double *const *) gv_iw, sst->gv_mean, sst->gv_vari); } else { sst->gv_mean = NULL; sst->gv_vari = NULL; } } for (i = 0; i < HTS_Label_get_size(label); i++) if (HTS_ModelSet_get_gv_flag(ms, HTS_Label_get_string(label, i)) == FALSE) for (j = 0; j < sss->nstream; j++) if (HTS_ModelSet_use_gv(ms, j) == TRUE) for (k = 0; k < sss->nstate; k++) sss->sstream[j].gv_switch[i * sss->nstate + k] = FALSE; return TRUE; } #endif /* HTS_SStreamSet_get_nstream: get number of stream */ size_t HTS_SStreamSet_get_nstream(HTS_SStreamSet * sss) { return sss->nstream; } /* HTS_SStreamSet_get_vector_length: get vector length */ size_t HTS_SStreamSet_get_vector_length(HTS_SStreamSet * sss, size_t stream_index) { return sss->sstream[stream_index].vector_length; } /* HTS_SStreamSet_is_msd: get MSD flag */ HTS_Boolean HTS_SStreamSet_is_msd(HTS_SStreamSet * sss, size_t stream_index) { return sss->sstream[stream_index].msd ? TRUE : FALSE; } /* HTS_SStreamSet_get_total_state: get total number of state */ size_t HTS_SStreamSet_get_total_state(HTS_SStreamSet * sss) { return sss->total_state; } /* HTS_SStreamSet_get_total_frame: get total number of frame */ size_t HTS_SStreamSet_get_total_frame(HTS_SStreamSet * sss) { return sss->total_frame; } /* HTS_SStreamSet_get_msd: get MSD parameter */ double HTS_SStreamSet_get_msd(HTS_SStreamSet * sss, size_t stream_index, size_t state_index) { return sss->sstream[stream_index].msd[state_index]; } /* HTS_SStreamSet_window_size: get dynamic window size */ size_t HTS_SStreamSet_get_window_size(HTS_SStreamSet * sss, size_t stream_index) { return sss->sstream[stream_index].win_size; } /* HTS_SStreamSet_get_window_left_width: get left width of dynamic window */ int HTS_SStreamSet_get_window_left_width(HTS_SStreamSet * sss, size_t stream_index, size_t window_index) { return sss->sstream[stream_index].win_l_width[window_index]; } /* HTS_SStreamSet_get_winodow_right_width: get right width of dynamic window */ int HTS_SStreamSet_get_window_right_width(HTS_SStreamSet * sss, size_t stream_index, size_t window_index) { return sss->sstream[stream_index].win_r_width[window_index]; } /* HTS_SStreamSet_get_window_coefficient: get coefficient of dynamic window */ double HTS_SStreamSet_get_window_coefficient(HTS_SStreamSet * sss, size_t stream_index, size_t window_index, int coefficient_index) { return sss->sstream[stream_index].win_coefficient[window_index][coefficient_index]; } /* HTS_SStreamSet_get_window_max_width: get max width of dynamic window */ size_t HTS_SStreamSet_get_window_max_width(HTS_SStreamSet * sss, size_t stream_index) { return sss->sstream[stream_index].win_max_width; } /* HTS_SStreamSet_use_gv: get GV flag */ HTS_Boolean HTS_SStreamSet_use_gv(HTS_SStreamSet * sss, size_t stream_index) { return sss->sstream[stream_index].gv_mean ? TRUE : FALSE; } /* HTS_SStreamSet_get_duration: get state duration */ size_t HTS_SStreamSet_get_duration(HTS_SStreamSet * sss, size_t state_index) { return sss->duration[state_index]; } /* HTS_SStreamSet_get_mean: get mean parameter */ double HTS_SStreamSet_get_mean(HTS_SStreamSet * sss, size_t stream_index, size_t state_index, size_t vector_index) { return sss->sstream[stream_index].mean[state_index][vector_index]; } /* HTS_SStreamSet_set_mean: set mean parameter */ void HTS_SStreamSet_set_mean(HTS_SStreamSet * sss, size_t stream_index, size_t state_index, size_t vector_index, double f) { sss->sstream[stream_index].mean[state_index][vector_index] = f; } /* HTS_SStreamSet_get_vari: get variance parameter */ double HTS_SStreamSet_get_vari(HTS_SStreamSet * sss, size_t stream_index, size_t state_index, size_t vector_index) { return sss->sstream[stream_index].vari[state_index][vector_index]; } /* HTS_SStreamSet_set_vari: set variance parameter */ void HTS_SStreamSet_set_vari(HTS_SStreamSet * sss, size_t stream_index, size_t state_index, size_t vector_index, double f) { sss->sstream[stream_index].vari[state_index][vector_index] = f; } /* HTS_SStreamSet_get_gv_mean: get GV mean parameter */ double HTS_SStreamSet_get_gv_mean(HTS_SStreamSet * sss, size_t stream_index, size_t vector_index) { return sss->sstream[stream_index].gv_mean[vector_index]; } /* HTS_SStreamSet_get_gv_mean: get GV variance parameter */ double HTS_SStreamSet_get_gv_vari(HTS_SStreamSet * sss, size_t stream_index, size_t vector_index) { return sss->sstream[stream_index].gv_vari[vector_index]; } /* HTS_SStreamSet_set_gv_switch: set GV switch */ void HTS_SStreamSet_set_gv_switch(HTS_SStreamSet * sss, size_t stream_index, size_t state_index, HTS_Boolean i) { sss->sstream[stream_index].gv_switch[state_index] = i; } /* HTS_SStreamSet_get_gv_switch: get GV switch */ HTS_Boolean HTS_SStreamSet_get_gv_switch(HTS_SStreamSet * sss, size_t stream_index, size_t state_index) { return sss->sstream[stream_index].gv_switch[state_index]; } /* HTS_SStreamSet_clear: free state stream set */ void HTS_SStreamSet_clear(HTS_SStreamSet * sss) { size_t i, j; HTS_SStream *sst; if (sss->sstream) { for (i = 0; i < sss->nstream; i++) { sst = &sss->sstream[i]; for (j = 0; j < sss->total_state; j++) { HTS_free(sst->mean[j]); HTS_free(sst->vari[j]); } if (sst->msd) HTS_free(sst->msd); HTS_free(sst->mean); HTS_free(sst->vari); for (j = 0; j < sst->win_size; j++) { sst->win_coefficient[j] += sst->win_l_width[j]; HTS_free(sst->win_coefficient[j]); } HTS_free(sst->win_coefficient); HTS_free(sst->win_l_width); HTS_free(sst->win_r_width); if (sst->gv_mean) HTS_free(sst->gv_mean); if (sst->gv_vari) HTS_free(sst->gv_vari); if (sst->gv_switch) HTS_free(sst->gv_switch); } HTS_free(sss->sstream); } if (sss->duration) HTS_free(sss->duration); HTS_SStreamSet_initialize(sss); } HTS_SSTREAM_C_END; #endif /* !HTS_SSTREAM_C */ SPTK-3.9/bin/vc/hts_engine_API/HTS_hidden.h0000644001051300105040000005460512637156760015226 00000000000000/* ----------------------------------------------------------------- */ /* The HMM-Based Speech Synthesis Engine "hts_engine API" */ /* developed by HTS Working Group */ /* http://hts-engine.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 2001-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* 2001-2008 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the HTS working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ #ifndef HTS_HIDDEN_H #define HTS_HIDDEN_H #ifdef __cplusplus #define HTS_HIDDEN_H_START extern "C" { #define HTS_HIDDEN_H_END } #else #define HTS_HIDDEN_H_START #define HTS_HIDDEN_H_END #endif /* __CPLUSPLUS */ HTS_HIDDEN_H_START; /* hts_engine libraries */ #include "HTS_engine.h" /* common ---------------------------------------------------------- */ #define HTS_MAXBUFLEN 1024 #if !defined(WORDS_BIGENDIAN) && !defined(WORDS_LITTLEENDIAN) #define WORDS_LITTLEENDIAN #endif /* !WORDS_BIGENDIAN && !WORDS_LITTLEENDIAN */ #if defined(WORDS_BIGENDIAN) && defined(WORDS_LITTLEENDIAN) #undef WORDS_BIGENDIAN #endif /* WORDS_BIGENDIAN && WORDS_LITTLEENDIAN */ #define MAX_F0 20000.0 #define MIN_F0 20.0 #define MAX_LF0 9.9034875525361280454891979401956 /* log(20000.0) */ #define MIN_LF0 2.9957322735539909934352235761425 /* log(20.0) */ #define HALF_TONE 0.05776226504666210911810267678818 /* log(2.0) / 12.0 */ #define DB 0.11512925464970228420089957273422 /* log(10.0) / 20.0 */ /* misc ------------------------------------------------------------ */ typedef struct _HTS_File { unsigned char type; void *pointer; } HTS_File; /* HTS_fopen: wrapper for fopen */ HTS_File *HTS_fopen_from_fn(const char *name, const char *opt); /* HTS_fopen_from_fp: wrapper for fopen */ HTS_File *HTS_fopen_from_fp(HTS_File * fp, size_t size); /* HTS_fopen_from_data: wrapper for fopen */ HTS_File *HTS_fopen_from_data(void *data, size_t size); /* HTS_fclose: wrapper for fclose */ void HTS_fclose(HTS_File * fp); /* HTS_fgetc: wrapper for fgetc */ int HTS_fgetc(HTS_File * fp); /* HTS_feof: wrapper for feof */ int HTS_feof(HTS_File * fp); /* HTS_fseek: wrapper for fseek */ int HTS_fseek(HTS_File * fp, long offset, int origin); /* HTS_ftell: wrapper for ftell */ size_t HTS_ftell(HTS_File * fp); /* HTS_fread_big_endian: fread with byteswap */ size_t HTS_fread_big_endian(void *buf, size_t size, size_t n, HTS_File * fp); /* HTS_fread_little_endian: fread with byteswap */ size_t HTS_fread_little_endian(void *buf, size_t size, size_t n, HTS_File * fp); /* HTS_fwrite_little_endian: fwrite with byteswap */ size_t HTS_fwrite_little_endian(const void *buf, size_t size, size_t n, FILE * fp); /* HTS_get_pattern_token: get pattern token (single/double quote can be used) */ HTS_Boolean HTS_get_pattern_token(HTS_File * fp, char *buff); /* HTS_get_token: get token from file pointer (separators are space,tab,line break) */ HTS_Boolean HTS_get_token_from_fp(HTS_File * fp, char *buff); /* HTS_get_token: get token from file pointer with specified separator */ HTS_Boolean HTS_get_token_from_fp_with_separator(HTS_File * fp, char *buff, char separator); /* HTS_get_token_from_string: get token from string (separator are space,tab,line break) */ HTS_Boolean HTS_get_token_from_string(const char *string, size_t * index, char *buff); /* HTS_get_token_from_string_with_separator: get token from string with specified separator */ HTS_Boolean HTS_get_token_from_string_with_separator(const char *str, size_t * index, char *buff, char separator); /* HTS_calloc: wrapper for calloc */ void *HTS_calloc(const size_t num, const size_t size); /* HTS_strdup: wrapper for strdup */ char *HTS_strdup(const char *string); /* HTS_calloc_matrix: allocate double matrix */ double **HTS_alloc_matrix(size_t x, size_t y); /* HTS_free_matrix: free double matrix */ void HTS_free_matrix(double **p, size_t x); /* HTS_Free: wrapper for free */ void HTS_free(void *p); /* HTS_error: output error message */ void HTS_error(int error, const char *message, ...); /* audio ----------------------------------------------------------- */ /* HTS_Audio_initialize: initialize audio */ void HTS_Audio_initialize(HTS_Audio * audio); /* HTS_Audio_set_parameter: set parameters for audio */ void HTS_Audio_set_parameter(HTS_Audio * audio, size_t sampling_frequency, size_t max_buff_size); /* HTS_Audio_write: send data to audio */ void HTS_Audio_write(HTS_Audio * audio, short data); /* HTS_Audio_flush: flush remain data */ void HTS_Audio_flush(HTS_Audio * audio); /* HTS_Audio_clear: free audio */ void HTS_Audio_clear(HTS_Audio * audio); /* model ----------------------------------------------------------- */ /* HTS_ModelSet_initialize: initialize model set */ void HTS_ModelSet_initialize(HTS_ModelSet * ms); /* HTS_ModelSet_load: load HTS voices */ HTS_Boolean HTS_ModelSet_load(HTS_ModelSet * ms, char **voices, size_t num_voices); /* HTS_ModelSet_get_sampling_frequency: get sampling frequency of HTS voices */ size_t HTS_ModelSet_get_sampling_frequency(HTS_ModelSet * ms); /* HTS_ModelSet_get_fperiod: get frame period of HTS voices */ size_t HTS_ModelSet_get_fperiod(HTS_ModelSet * ms); /* HTS_ModelSet_get_fperiod: get stream option */ const char *HTS_ModelSet_get_option(HTS_ModelSet * ms, size_t stream_index); /* HTS_ModelSet_get_gv_flag: get GV flag */ HTS_Boolean HTS_ModelSet_get_gv_flag(HTS_ModelSet * ms, const char *string); /* HTS_ModelSet_get_nstate: get number of state */ size_t HTS_ModelSet_get_nstate(HTS_ModelSet * ms); /* HTS_Engine_get_fullcontext_label_format: get full-context label format */ const char *HTS_ModelSet_get_fullcontext_label_format(HTS_ModelSet * ms); /* HTS_Engine_get_fullcontext_label_version: get full-context label version */ const char *HTS_ModelSet_get_fullcontext_label_version(HTS_ModelSet * ms); /* HTS_ModelSet_get_nstream: get number of stream */ size_t HTS_ModelSet_get_nstream(HTS_ModelSet * ms); /* HTS_ModelSet_get_nvoices: get number of HTS voices */ size_t HTS_ModelSet_get_nvoices(HTS_ModelSet * ms); /* HTS_ModelSet_get_vector_length: get vector length */ size_t HTS_ModelSet_get_vector_length(HTS_ModelSet * ms, size_t stream_index); /* HTS_ModelSet_is_msd: get MSD flag */ HTS_Boolean HTS_ModelSet_is_msd(HTS_ModelSet * ms, size_t stream_index); /* HTS_ModelSet_get_window_size: get dynamic window size */ size_t HTS_ModelSet_get_window_size(HTS_ModelSet * ms, size_t stream_index); /* HTS_ModelSet_get_window_left_width: get left width of dynamic window */ int HTS_ModelSet_get_window_left_width(HTS_ModelSet * ms, size_t stream_index, size_t window_index); /* HTS_ModelSet_get_window_right_width: get right width of dynamic window */ int HTS_ModelSet_get_window_right_width(HTS_ModelSet * ms, size_t stream_index, size_t window_index); /* HTS_ModelSet_get_window_coefficient: get coefficient of dynamic window */ double HTS_ModelSet_get_window_coefficient(HTS_ModelSet * ms, size_t stream_index, size_t window_index, size_t coefficient_index); /* HTS_ModelSet_get_window_max_width: get max width of dynamic window */ size_t HTS_ModelSet_get_window_max_width(HTS_ModelSet * ms, size_t stream_index); /* HTS_ModelSet_use_gv: get GV flag */ HTS_Boolean HTS_ModelSet_use_gv(HTS_ModelSet * ms, size_t stream_index); /* HTS_ModelSet_get_duration_index: get index of duration tree and PDF */ void HTS_ModelSet_get_duration_index(HTS_ModelSet * ms, size_t voice_index, const char *string, size_t * tree_index, size_t * pdf_index); /* HTS_ModelSet_get_duration: get duration using interpolation weight */ void HTS_ModelSet_get_duration(HTS_ModelSet * ms, const char *string, const double *iw, double *mean, double *vari); /* HTS_ModelSet_get_parameter_index: get index of parameter tree and PDF */ void HTS_ModelSet_get_parameter_index(HTS_ModelSet * ms, size_t voice_index, size_t stream_index, size_t state_index, const char *string, size_t * tree_index, size_t * pdf_index); /* HTS_ModelSet_get_parameter: get parameter using interpolation weight */ void HTS_ModelSet_get_parameter(HTS_ModelSet * ms, size_t stream_index, size_t state_index, const char *string, const double *const *iw, double *mean, double *vari, double *msd); void HTS_ModelSet_get_gv_index(HTS_ModelSet * ms, size_t voice_index, size_t stream_index, const char *string, size_t * tree_index, size_t * pdf_index); /* HTS_ModelSet_get_gv: get GV using interpolation weight */ void HTS_ModelSet_get_gv(HTS_ModelSet * ms, size_t stream_index, const char *string, const double *const *iw, double *mean, double *vari); /* HTS_ModelSet_clear: free model set */ void HTS_ModelSet_clear(HTS_ModelSet * ms); /* label ----------------------------------------------------------- */ /* HTS_Label_initialize: initialize label */ void HTS_Label_initialize(HTS_Label * label); /* HTS_Label_load_from_fn: load label from file name */ void HTS_Label_load_from_fn(HTS_Label * label, size_t sampling_rate, size_t fperiod, const char *fn); /* HTS_Label_load_from_strings: load label list from string list */ void HTS_Label_load_from_strings(HTS_Label * label, size_t sampling_rate, size_t fperiod, char **lines, size_t num_lines); /* HTS_Label_get_size: get number of label string */ size_t HTS_Label_get_size(HTS_Label * label); /* HTS_Label_get_string: get label string */ const char *HTS_Label_get_string(HTS_Label * label, size_t index); /* HTS_Label_get_start_frame: get start frame */ double HTS_Label_get_start_frame(HTS_Label * label, size_t index); /* HTS_Label_get_end_frame: get end frame */ double HTS_Label_get_end_frame(HTS_Label * label, size_t index); /* HTS_Label_clear: free label */ void HTS_Label_clear(HTS_Label * label); /* sstream --------------------------------------------------------- */ /* HTS_SStreamSet_initialize: initialize state stream set */ void HTS_SStreamSet_initialize(HTS_SStreamSet * sss); /* HTS_SStreamSet_create: parse label and determine state duration */ HTS_Boolean HTS_SStreamSet_create(HTS_SStreamSet * sss, HTS_ModelSet * ms, HTS_Label * label, HTS_Boolean phoneme_alignment_flag, double speed, double *duration_iw, double **parameter_iw, double **gv_iw); /* HTS_SStreamSet_get_nstream: get number of stream */ size_t HTS_SStreamSet_get_nstream(HTS_SStreamSet * sss); /* HTS_SStreamSet_get_vector_length: get vector length */ size_t HTS_SStreamSet_get_vector_length(HTS_SStreamSet * sss, size_t stream_index); /* HTS_SStreamSet_is_msd: get MSD flag */ HTS_Boolean HTS_SStreamSet_is_msd(HTS_SStreamSet * sss, size_t stream_index); /* HTS_SStreamSet_get_total_state: get total number of state */ size_t HTS_SStreamSet_get_total_state(HTS_SStreamSet * sss); /* HTS_SStreamSet_get_total_frame: get total number of frame */ size_t HTS_SStreamSet_get_total_frame(HTS_SStreamSet * sss); /* HTS_SStreamSet_get_msd: get msd parameter */ double HTS_SStreamSet_get_msd(HTS_SStreamSet * sss, size_t stream_index, size_t state_index); /* HTS_SStreamSet_window_size: get dynamic window size */ size_t HTS_SStreamSet_get_window_size(HTS_SStreamSet * sss, size_t stream_index); /* HTS_SStreamSet_get_window_left_width: get left width of dynamic window */ int HTS_SStreamSet_get_window_left_width(HTS_SStreamSet * sss, size_t stream_index, size_t window_index); /* HTS_SStreamSet_get_window_right_width: get right width of dynamic window */ int HTS_SStreamSet_get_window_right_width(HTS_SStreamSet * sss, size_t stream_index, size_t window_index); /* HTS_SStreamSet_get_window_coefficient: get coefficient of dynamic window */ double HTS_SStreamSet_get_window_coefficient(HTS_SStreamSet * sss, size_t stream_index, size_t window_index, int coefficient_index); /* HTS_SStreamSet_get_window_max_width: get max width of dynamic window */ size_t HTS_SStreamSet_get_window_max_width(HTS_SStreamSet * sss, size_t stream_index); /* HTS_SStreamSet_use_gv: get GV flag */ HTS_Boolean HTS_SStreamSet_use_gv(HTS_SStreamSet * sss, size_t stream_index); /* HTS_SStreamSet_get_duration: get state duration */ size_t HTS_SStreamSet_get_duration(HTS_SStreamSet * sss, size_t state_index); /* HTS_SStreamSet_get_mean: get mean parameter */ double HTS_SStreamSet_get_mean(HTS_SStreamSet * sss, size_t stream_index, size_t state_index, size_t vector_index); /* HTS_SStreamSet_set_mean: set mean parameter */ void HTS_SStreamSet_set_mean(HTS_SStreamSet * sss, size_t stream_index, size_t state_index, size_t vector_index, double f); /* HTS_SStreamSet_get_vari: get variance parameter */ double HTS_SStreamSet_get_vari(HTS_SStreamSet * sss, size_t stream_index, size_t state_index, size_t vector_index); /* HTS_SStreamSet_set_vari: set variance parameter */ void HTS_SStreamSet_set_vari(HTS_SStreamSet * sss, size_t stream_index, size_t state_index, size_t vector_index, double f); /* HTS_SStreamSet_get_gv_mean: get GV mean parameter */ double HTS_SStreamSet_get_gv_mean(HTS_SStreamSet * sss, size_t stream_index, size_t vector_index); /* HTS_SStreamSet_get_gv_mean: get GV variance parameter */ double HTS_SStreamSet_get_gv_vari(HTS_SStreamSet * sss, size_t stream_index, size_t vector_index); /* HTS_SStreamSet_set_gv_switch: set GV switch */ void HTS_SStreamSet_set_gv_switch(HTS_SStreamSet * sss, size_t stream_index, size_t state_index, HTS_Boolean i); /* HTS_SStreamSet_get_gv_switch: get GV switch */ HTS_Boolean HTS_SStreamSet_get_gv_switch(HTS_SStreamSet * sss, size_t stream_index, size_t state_index); /* HTS_SStreamSet_clear: free state stream set */ void HTS_SStreamSet_clear(HTS_SStreamSet * sss); /* pstream --------------------------------------------------------- */ /* check variance in finv() */ #define INFTY ((double) 1.0e+38) #define INFTY2 ((double) 1.0e+19) #define INVINF ((double) 1.0e-38) #define INVINF2 ((double) 1.0e-19) /* GV */ #define STEPINIT 0.1 #define STEPDEC 0.5 #define STEPINC 1.2 #define W1 1.0 #define W2 1.0 #define GV_MAX_ITERATION 5 /* HTS_PStreamSet_initialize: initialize parameter stream set */ void HTS_PStreamSet_initialize(HTS_PStreamSet * pss); /* HTS_PStreamSet_create: parameter generation using GV weight */ HTS_Boolean HTS_PStreamSet_create(HTS_PStreamSet * pss, HTS_SStreamSet * sss, double *msd_threshold, double *gv_weight); /* HTS_PStreamSet_get_nstream: get number of stream */ size_t HTS_PStreamSet_get_nstream(HTS_PStreamSet * pss); /* HTS_PStreamSet_get_static_length: get features length */ size_t HTS_PStreamSet_get_vector_length(HTS_PStreamSet * pss, size_t stream_index); /* HTS_PStreamSet_get_total_frame: get total number of frame */ size_t HTS_PStreamSet_get_total_frame(HTS_PStreamSet * pss); /* HTS_PStreamSet_get_parameter: get parameter */ double HTS_PStreamSet_get_parameter(HTS_PStreamSet * pss, size_t stream_index, size_t frame_index, size_t vector_index); /* HTS_PStreamSet_get_parameter_vector: get parameter vector */ double *HTS_PStreamSet_get_parameter_vector(HTS_PStreamSet * pss, size_t stream_index, size_t frame_index); /* HTS_PStreamSet_get_msd_flag: get generated MSD flag per frame */ HTS_Boolean HTS_PStreamSet_get_msd_flag(HTS_PStreamSet * pss, size_t stream_index, size_t frame_index); /* HTS_PStreamSet_is_msd: get MSD flag */ HTS_Boolean HTS_PStreamSet_is_msd(HTS_PStreamSet * pss, size_t stream_index); /* HTS_PStreamSet_clear: free parameter stream set */ void HTS_PStreamSet_clear(HTS_PStreamSet * pss); /* gstream --------------------------------------------------------- */ /* HTS_GStreamSet_initialize: initialize generated parameter stream set */ void HTS_GStreamSet_initialize(HTS_GStreamSet * gss); /* HTS_GStreamSet_create: generate speech */ HTS_Boolean HTS_GStreamSet_create(HTS_GStreamSet * gss, HTS_PStreamSet * pss, size_t stage, HTS_Boolean use_log_gain, size_t sampling_rate, size_t fperiod, double alpha, double beta, HTS_Boolean * stop, double volume, HTS_Audio * audio); /* HTS_GStreamSet_get_total_nsamples: get total number of sample */ size_t HTS_GStreamSet_get_total_nsamples(HTS_GStreamSet * gss); /* HTS_GStreamSet_get_total_frame: get total number of frame */ size_t HTS_GStreamSet_get_total_frame(HTS_GStreamSet * gss); /* HTS_GStreamSet_get_static_length: get features length */ size_t HTS_GStreamSet_get_vector_length(HTS_GStreamSet * gss, size_t stream_index); /* HTS_GStreamSet_get_speech: get synthesized speech parameter */ double HTS_GStreamSet_get_speech(HTS_GStreamSet * gss, size_t sample_index); /* HTS_GStreamSet_get_parameter: get generated parameter */ double HTS_GStreamSet_get_parameter(HTS_GStreamSet * gss, size_t stream_index, size_t frame_index, size_t vector_index); /* HTS_GStreamSet_clear: free generated parameter stream set */ void HTS_GStreamSet_clear(HTS_GStreamSet * gss); /* vocoder --------------------------------------------------------- */ #ifndef LZERO #define LZERO (-1.0e+10) /* ~log(0) */ #endif /* !LZERO */ #ifndef ZERO #define ZERO (1.0e-10) /* ~(0) */ #endif /* !ZERO */ #ifndef PI #define PI 3.14159265358979323846 #endif /* !PI */ #ifndef PI2 #define PI2 6.28318530717958647692 #endif /* !PI2 */ #define RANDMAX 32767 #define SEED 1 #define B0 0x00000001 #define B28 0x10000000 #define B31 0x80000000 #define B31_ 0x7fffffff #define Z 0x00000000 #ifdef HTS_EMBEDDED #define GAUSS FALSE #define PADEORDER 4 /* pade order (for MLSA filter) */ #define IRLENG 384 /* length of impulse response */ #else #define GAUSS TRUE #define PADEORDER 5 #define IRLENG 576 #endif /* HTS_EMBEDDED */ #define CHECK_LSP_STABILITY_MIN 0.25 #define CHECK_LSP_STABILITY_NUM 4 /* for MGLSA filter */ #define NORMFLG1 TRUE #define NORMFLG2 FALSE #define MULGFLG1 TRUE #define MULGFLG2 FALSE #define NGAIN FALSE /* HTS_Vocoder: structure for setting of vocoder */ typedef struct _HTS_Vocoder { HTS_Boolean is_first; size_t stage; /* Gamma=-1/stage: if stage=0 then Gamma=0 */ double gamma; /* Gamma */ HTS_Boolean use_log_gain; /* log gain flag (for LSP) */ size_t fprd; /* frame shift */ unsigned long next; /* temporary variable for random generator */ HTS_Boolean gauss; /* flag to use Gaussian noise */ double rate; /* sampling rate */ double pitch_of_curr_point; /* used in excitation generation */ double pitch_counter; /* used in excitation generation */ double pitch_inc_per_point; /* used in excitation generation */ double *excite_ring_buff; /* used in excitation generation */ size_t excite_buff_size; /* used in excitation generation */ size_t excite_buff_index; /* used in excitation generation */ unsigned char sw; /* switch used in random generator */ int x; /* excitation signal */ double *freqt_buff; /* used in freqt */ size_t freqt_size; /* buffer size for freqt */ double *spectrum2en_buff; /* used in spectrum2en */ size_t spectrum2en_size; /* buffer size for spectrum2en */ double r1, r2, s; /* used in random generator */ double *postfilter_buff; /* used in postfiltering */ size_t postfilter_size; /* buffer size for postfiltering */ double *c, *cc, *cinc, *d1; /* used in the MLSA/MGLSA filter */ double *lsp2lpc_buff; /* used in lsp2lpc */ size_t lsp2lpc_size; /* buffer size of lsp2lpc */ double *gc2gc_buff; /* used in gc2gc */ size_t gc2gc_size; /* buffer size for gc2gc */ } HTS_Vocoder; /* HTS_Vocoder_initialize: initialize vocoder */ void HTS_Vocoder_initialize(HTS_Vocoder * v, size_t m, size_t stage, HTS_Boolean use_log_gain, size_t rate, size_t fperiod); /* HTS_Vocoder_synthesize: pulse/noise excitation and MLSA/MGLSA filster based waveform synthesis */ void HTS_Vocoder_synthesize(HTS_Vocoder * v, size_t m, double lf0, double *spectrum, size_t nlpf, double *lpf, double alpha, double beta, double volume, double *rawdata, HTS_Audio * audio); /* HTS_Vocoder_clear: clear vocoder */ void HTS_Vocoder_clear(HTS_Vocoder * v); HTS_HIDDEN_H_END; #endif /* !HTS_HIDDEN_H */ SPTK-3.9/bin/vc/hts_engine_API/HTS_engine.h0000644001051300105040000005263012637156763015237 00000000000000/* ----------------------------------------------------------------- */ /* The HMM-Based Speech Synthesis Engine "hts_engine API" */ /* developed by HTS Working Group */ /* http://hts-engine.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 2001-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* 2001-2008 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the HTS working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ #ifndef HTS_ENGINE_H #define HTS_ENGINE_H #ifdef __cplusplus #define HTS_ENGINE_H_START extern "C" { #define HTS_ENGINE_H_END } #else #define HTS_ENGINE_H_START #define HTS_ENGINE_H_END #endif /* __CPLUSPLUS */ HTS_ENGINE_H_START; #include /* common ---------------------------------------------------------- */ typedef char HTS_Boolean; #ifndef TRUE #define TRUE 1 #endif /* !TRUE */ #ifndef FALSE #define FALSE 0 #endif /* !FALSE */ #ifndef HTS_NODATA #define HTS_NODATA (-1.0e+10) #endif /* HTS_NODATA */ /* copyright ------------------------------------------------------- */ #define HTS_COPYRIGHT "The HMM-Based Speech Synthesis Engine \"hts_engine API\"\nVersion 1.10 (http://hts-engine.sourceforge.net/)\nCopyright (C) 2001-2015 Nagoya Institute of Technology\n 2001-2008 Tokyo Institute of Technology\nAll rights reserved.\n" /* audio ----------------------------------------------------------- */ /* HTS_Audio: audio output wrapper */ typedef struct _HTS_Audio { size_t sampling_frequency; /* sampling frequency */ size_t max_buff_size; /* buffer size for audio output interface */ short *buff; /* current buffer */ size_t buff_size; /* current buffer size */ void *audio_interface; /* audio interface specified in compile step */ } HTS_Audio; /* model ----------------------------------------------------------- */ /* HTS_Window: window coefficients to calculate dynamic features. */ typedef struct _HTS_Window { size_t size; /* # of windows (static + deltas) */ int *l_width; /* left width of windows */ int *r_width; /* right width of windows */ double **coefficient; /* window coefficient */ size_t max_width; /* maximum width of windows */ } HTS_Window; /* HTS_Pattern: list of patterns in a question and a tree. */ typedef struct _HTS_Pattern { char *string; /* pattern string */ struct _HTS_Pattern *next; /* pointer to the next pattern */ } HTS_Pattern; /* HTS_Question: list of questions in a tree. */ typedef struct _HTS_Question { char *string; /* name of this question */ HTS_Pattern *head; /* pointer to the head of pattern list */ struct _HTS_Question *next; /* pointer to the next question */ } HTS_Question; /* HTS_Node: list of tree nodes in a tree. */ typedef struct _HTS_Node { int index; /* index of this node */ size_t pdf; /* index of PDF for this node (leaf node only) */ struct _HTS_Node *yes; /* pointer to its child node (yes) */ struct _HTS_Node *no; /* pointer to its child node (no) */ struct _HTS_Node *next; /* pointer to the next node */ HTS_Question *quest; /* question applied at this node */ } HTS_Node; /* HTS_Tree: list of decision trees in a model. */ typedef struct _HTS_Tree { HTS_Pattern *head; /* pointer to the head of pattern list for this tree */ struct _HTS_Tree *next; /* pointer to next tree */ HTS_Node *root; /* root node of this tree */ size_t state; /* state index of this tree */ } HTS_Tree; /* HTS_Model: set of PDFs, decision trees and questions. */ typedef struct _HTS_Model { size_t vector_length; /* vector length (static features only) */ size_t num_windows; /* # of windows for delta */ HTS_Boolean is_msd; /* flag for MSD */ size_t ntree; /* # of trees */ size_t *npdf; /* # of PDFs at each tree */ float ***pdf; /* PDFs */ HTS_Tree *tree; /* pointer to the list of trees */ HTS_Question *question; /* pointer to the list of questions */ } HTS_Model; /* HTS_ModelSet: set of duration models, HMMs and GV models. */ typedef struct _HTS_ModelSet { char *hts_voice_version; /* version of HTS voice format */ size_t sampling_frequency; /* sampling frequency */ size_t frame_period; /* frame period */ size_t num_voices; /* # of HTS voices */ size_t num_states; /* # of HMM states */ size_t num_streams; /* # of streams */ char *stream_type; /* stream type */ char *fullcontext_format; /* fullcontext label format */ char *fullcontext_version; /* version of fullcontext label */ HTS_Question *gv_off_context; /* GV switch */ char **option; /* options for each stream */ HTS_Model *duration; /* duration PDFs and trees */ HTS_Window *window; /* window coefficients for delta */ HTS_Model **stream; /* parameter PDFs and trees */ HTS_Model **gv; /* GV PDFs and trees */ } HTS_ModelSet; /* label ----------------------------------------------------------- */ /* HTS_LabelString: individual label string with time information */ typedef struct _HTS_LabelString { struct _HTS_LabelString *next; /* pointer to next label string */ char *name; /* label string */ double start; /* start frame specified in the given label */ double end; /* end frame specified in the given label */ } HTS_LabelString; /* HTS_Label: list of label strings */ typedef struct _HTS_Label { HTS_LabelString *head; /* pointer to the head of label string */ size_t size; /* # of label strings */ } HTS_Label; /* sstream --------------------------------------------------------- */ /* HTS_SStream: individual state stream */ typedef struct _HTS_SStream { size_t vector_length; /* vector length (static features only) */ double **mean; /* mean vector sequence */ double **vari; /* variance vector sequence */ double *msd; /* MSD parameter sequence */ size_t win_size; /* # of windows (static + deltas) */ int *win_l_width; /* left width of windows */ int *win_r_width; /* right width of windows */ double **win_coefficient; /* window cofficients */ size_t win_max_width; /* maximum width of windows */ double *gv_mean; /* mean vector of GV */ double *gv_vari; /* variance vector of GV */ HTS_Boolean *gv_switch; /* GV flag sequence */ } HTS_SStream; /* HTS_SStreamSet: set of state stream */ typedef struct _HTS_SStreamSet { HTS_SStream *sstream; /* state streams */ size_t nstream; /* # of streams */ size_t nstate; /* # of states */ size_t *duration; /* duration sequence */ size_t total_state; /* total state */ size_t total_frame; /* total frame */ } HTS_SStreamSet; /* pstream --------------------------------------------------------- */ /* HTS_SMatrices: matrices/vectors used in the speech parameter generation algorithm. */ typedef struct _HTS_SMatrices { double **mean; /* mean vector sequence */ double **ivar; /* inverse diag variance sequence */ double *g; /* vector used in the forward substitution */ double **wuw; /* W' U^-1 W */ double *wum; /* W' U^-1 mu */ } HTS_SMatrices; /* HTS_PStream: individual PDF stream. */ typedef struct _HTS_PStream { size_t vector_length; /* vector length (static features only) */ size_t length; /* stream length */ size_t width; /* width of dynamic window */ double **par; /* output parameter vector */ HTS_SMatrices sm; /* matrices for parameter generation */ size_t win_size; /* # of windows (static + deltas) */ int *win_l_width; /* left width of windows */ int *win_r_width; /* right width of windows */ double **win_coefficient; /* window coefficients */ HTS_Boolean *msd_flag; /* Boolean sequence for MSD */ double *gv_mean; /* mean vector of GV */ double *gv_vari; /* variance vector of GV */ HTS_Boolean *gv_switch; /* GV flag sequence */ size_t gv_length; /* frame length for GV calculation */ } HTS_PStream; /* HTS_PStreamSet: set of PDF streams. */ typedef struct _HTS_PStreamSet { HTS_PStream *pstream; /* PDF streams */ size_t nstream; /* # of PDF streams */ size_t total_frame; /* total frame */ } HTS_PStreamSet; /* gstream --------------------------------------------------------- */ /* HTS_GStream: generated parameter stream. */ typedef struct _HTS_GStream { size_t vector_length; /* vector length (static features only) */ double **par; /* generated parameter */ } HTS_GStream; /* HTS_GStreamSet: set of generated parameter stream. */ typedef struct _HTS_GStreamSet { size_t total_nsample; /* total sample */ size_t total_frame; /* total frame */ size_t nstream; /* # of streams */ HTS_GStream *gstream; /* generated parameter streams */ double *gspeech; /* generated speech */ } HTS_GStreamSet; /* engine ---------------------------------------------------------- */ /* HTS_Condition: synthesis condition */ typedef struct _HTS_Condition { /* global */ size_t sampling_frequency; /* sampling frequency */ size_t fperiod; /* frame period */ size_t audio_buff_size; /* audio buffer size (for audio device) */ HTS_Boolean stop; /* stop flag */ double volume; /* volume */ double *msd_threshold; /* MSD thresholds */ double *gv_weight; /* GV weights */ /* duration */ HTS_Boolean phoneme_alignment_flag; /* flag for using phoneme alignment in label */ double speed; /* speech speed */ /* spectrum */ size_t stage; /* if stage=0 then gamma=0 else gamma=-1/stage */ HTS_Boolean use_log_gain; /* log gain flag (for LSP) */ double alpha; /* all-pass constant */ double beta; /* postfiltering coefficient */ /* log F0 */ double additional_half_tone; /* additional half tone */ /* interpolation weights */ double *duration_iw; /* weights for duration interpolation */ double **parameter_iw; /* weights for parameter interpolation */ double **gv_iw; /* weights for GV interpolation */ } HTS_Condition; /* HTS_Engine: Engine itself. */ typedef struct _HTS_Engine { HTS_Condition condition; /* synthesis condition */ HTS_Audio audio; /* audio output */ HTS_ModelSet ms; /* set of duration models, HMMs and GV models */ HTS_Label label; /* label */ HTS_SStreamSet sss; /* set of state streams */ HTS_PStreamSet pss; /* set of PDF streams */ HTS_GStreamSet gss; /* set of generated parameter streams */ } HTS_Engine; /* engine method --------------------------------------------------- */ /* HTS_Engine_initialize: initialize engine */ void HTS_Engine_initialize(HTS_Engine * engine); /* HTS_Engine_load: load HTS voices */ HTS_Boolean HTS_Engine_load(HTS_Engine * engine, char **voices, size_t num_voices); /* HTS_Engine_set_sampling_frequency: set sampling fraquency */ void HTS_Engine_set_sampling_frequency(HTS_Engine * engine, size_t i); /* HTS_Engine_get_sampling_frequency: get sampling frequency */ size_t HTS_Engine_get_sampling_frequency(HTS_Engine * engine); /* HTS_Engine_set_fperiod: set frame period */ void HTS_Engine_set_fperiod(HTS_Engine * engine, size_t i); /* HTS_Engine_get_fperiod: get frame period */ size_t HTS_Engine_get_fperiod(HTS_Engine * engine); /* HTS_Engine_set_audio_buff_size: set audio buffer size */ void HTS_Engine_set_audio_buff_size(HTS_Engine * engine, size_t i); /* HTS_Engine_get_audio_buff_size: get audio buffer size */ size_t HTS_Engine_get_audio_buff_size(HTS_Engine * engine); /* HTS_Engine_set_stop_flag: set stop flag */ void HTS_Engine_set_stop_flag(HTS_Engine * engine, HTS_Boolean b); /* HTS_Engine_get_stop_flag: get stop flag */ HTS_Boolean HTS_Engine_get_stop_flag(HTS_Engine * engine); /* HTS_Engine_set_volume: set volume in db */ void HTS_Engine_set_volume(HTS_Engine * engine, double f); /* HTS_Engine_get_volume: get volume in db */ double HTS_Engine_get_volume(HTS_Engine * engine); /* HTS_Egnine_set_msd_threshold: set MSD threshold */ void HTS_Engine_set_msd_threshold(HTS_Engine * engine, size_t stream_index, double f); /* HTS_Engine_get_msd_threshold: get MSD threshold */ double HTS_Engine_get_msd_threshold(HTS_Engine * engine, size_t stream_index); /* HTS_Engine_set_gv_weight: set GV weight */ void HTS_Engine_set_gv_weight(HTS_Engine * engine, size_t stream_index, double f); /* HTS_Engine_get_gv_weight: get GV weight */ double HTS_Engine_get_gv_weight(HTS_Engine * engine, size_t stream_index); /* HTS_Engine_set_speed: set speech speed */ void HTS_Engine_set_speed(HTS_Engine * engine, double f); /* HTS_Engine_set_phoneme_alignment_flag: set flag for using phoneme alignment in label */ void HTS_Engine_set_phoneme_alignment_flag(HTS_Engine * engine, HTS_Boolean b); /* HTS_Engine_set_alpha: set alpha */ void HTS_Engine_set_alpha(HTS_Engine * engine, double f); /* HTS_Engine_get_alpha: get alpha */ double HTS_Engine_get_alpha(HTS_Engine * engine); /* HTS_Engine_set_beta: set beta */ void HTS_Engine_set_beta(HTS_Engine * engine, double f); /* HTS_Engine_get_beta: get beta */ double HTS_Engine_get_beta(HTS_Engine * engine); /* HTS_Engine_add_half_tone: add half tone */ void HTS_Engine_add_half_tone(HTS_Engine * engine, double f); /* HTS_Engine_set_duration_interpolation_weight: set interpolation weight for duration */ void HTS_Engine_set_duration_interpolation_weight(HTS_Engine * engine, size_t voice_index, double f); /* HTS_Engine_get_duration_interpolation_weight: get interpolation weight for duration */ double HTS_Engine_get_duration_interpolation_weight(HTS_Engine * engine, size_t voice_index); /* HTS_Engine_set_parameter_interpolation_weight: set interpolation weight for parameter */ void HTS_Engine_set_parameter_interpolation_weight(HTS_Engine * engine, size_t voice_index, size_t stream_index, double f); /* HTS_Engine_get_parameter_interpolation_weight: get interpolation weight for parameter */ double HTS_Engine_get_parameter_interpolation_weight(HTS_Engine * engine, size_t voice_index, size_t stream_index); /* HTS_Engine_set_gv_interpolation_weight: set interpolation weight for GV */ void HTS_Engine_set_gv_interpolation_weight(HTS_Engine * engine, size_t voice_index, size_t stream_index, double f); /* HTS_Engine_get_gv_interpolation_weight: get interpolation weight for GV */ double HTS_Engine_get_gv_interpolation_weight(HTS_Engine * engine, size_t voice_index, size_t stream_index); /* HTS_Engine_get_total_state: get total number of state */ size_t HTS_Engine_get_total_state(HTS_Engine * engine); /* HTS_Engine_set_state_mean: set mean value of state */ void HTS_Engine_set_state_mean(HTS_Engine * engine, size_t stream_index, size_t state_index, size_t vector_index, double f); /* HTS_Engine_get_state_mean: get mean value of state */ double HTS_Engine_get_state_mean(HTS_Engine * engine, size_t stream_index, size_t state_index, size_t vector_index); /* HTS_Engine_get_state_duration: get state duration */ size_t HTS_Engine_get_state_duration(HTS_Engine * engine, size_t state_index); /* HTS_Engine_get_nvoices: get number of voices */ size_t HTS_Engine_get_nvoices(HTS_Engine * engine); /* HTS_Engine_get_nstream: get number of stream */ size_t HTS_Engine_get_nstream(HTS_Engine * engine); /* HTS_Engine_get_nstate: get number of state */ size_t HTS_Engine_get_nstate(HTS_Engine * engine); /* HTS_Engine_get_fullcontext_label_format: get full context label format */ const char *HTS_Engine_get_fullcontext_label_format(HTS_Engine * engine); /* HTS_Engine_get_fullcontext_label_version: get full context label version */ const char *HTS_Engine_get_fullcontext_label_version(HTS_Engine * engine); /* HTS_Engine_get_total_frame: get total number of frame */ size_t HTS_Engine_get_total_frame(HTS_Engine * engine); /* HTS_Engine_get_nsamples: get number of samples */ size_t HTS_Engine_get_nsamples(HTS_Engine * engine); /* HTS_Engine_get_generated_parameter: output generated parameter */ double HTS_Engine_get_generated_parameter(HTS_Engine * engine, size_t stream_index, size_t frame_index, size_t vector_index); /* HTS_Engine_get_generated_speech: output generated speech */ double HTS_Engine_get_generated_speech(HTS_Engine * engine, size_t index); /* HTS_Engine_synthesize_from_fn: synthesize speech from file name */ HTS_Boolean HTS_Engine_synthesize_from_fn(HTS_Engine * engine, const char *fn); /* HTS_Engine_synthesize_from_strings: synthesize speech from string list */ HTS_Boolean HTS_Engine_synthesize_from_strings(HTS_Engine * engine, char **lines, size_t num_lines); /* HTS_Engine_generate_state_sequence_from_fn: generate state sequence from file name (1st synthesis step) */ HTS_Boolean HTS_Engine_generate_state_sequence_from_fn(HTS_Engine * engine, const char *fn); /* HTS_Engine_generate_state_sequence_from_strings: generate state sequence from string list (1st synthesis step) */ HTS_Boolean HTS_Engine_generate_state_sequence_from_strings(HTS_Engine * engine, char **lines, size_t num_lines); /* HTS_Engine_generate_parameter_sequence: generate parameter sequence (2nd synthesis step) */ HTS_Boolean HTS_Engine_generate_parameter_sequence(HTS_Engine * engine); /* HTS_Engine_generate_sample_sequence: generate sample sequence (3rd synthesis step) */ HTS_Boolean HTS_Engine_generate_sample_sequence(HTS_Engine * engine); /* HTS_Engine_save_information: save trace information */ void HTS_Engine_save_information(HTS_Engine * engine, FILE * fp); /* HTS_Engine_save_label: save label with time */ void HTS_Engine_save_label(HTS_Engine * engine, FILE * fp); /* HTS_Engine_save_generated_parameter: save generated parameter */ void HTS_Engine_save_generated_parameter(HTS_Engine * engine, size_t stream_index, FILE * fp); /* HTS_Engine_save_generated_speech: save generated speech */ void HTS_Engine_save_generated_speech(HTS_Engine * engine, FILE * fp); /* HTS_Engine_save_riff: save RIFF format file */ void HTS_Engine_save_riff(HTS_Engine * engine, FILE * fp); /* HTS_Engine_refresh: free memory per one time synthesis */ void HTS_Engine_refresh(HTS_Engine * engine); /* HTS_Engine_clear: free engine */ void HTS_Engine_clear(HTS_Engine * engine); HTS_ENGINE_H_END; #endif /* !HTS_ENGINE_H */ SPTK-3.9/bin/vc/Makefile.am0000644001051300105040000000055412442245121012276 00000000000000AM_CPPFLAGS = -I hts_engine_API \ -I @top_srcdir@/include bin_PROGRAMS = vc vc_SOURCES = vc.c _vc.c \ hts_engine_API/HTS_misc.c \ hts_engine_API/HTS_pstream.c \ hts_engine_API/HTS_sstream.c \ hts_engine_API/HTS_hidden.h \ hts_engine_API/HTS_engine.h vc_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/vc/Makefile.in0000644001051300105040000004524712637167422012334 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = vc$(EXEEXT) subdir = bin/vc ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am__dirstamp = $(am__leading_dot)dirstamp am_vc_OBJECTS = vc.$(OBJEXT) _vc.$(OBJEXT) \ hts_engine_API/HTS_misc.$(OBJEXT) \ hts_engine_API/HTS_pstream.$(OBJEXT) \ hts_engine_API/HTS_sstream.$(OBJEXT) vc_OBJECTS = $(am_vc_OBJECTS) vc_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(vc_SOURCES) DIST_SOURCES = $(vc_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I hts_engine_API \ -I @top_srcdir@/include vc_SOURCES = vc.c _vc.c \ hts_engine_API/HTS_misc.c \ hts_engine_API/HTS_pstream.c \ hts_engine_API/HTS_sstream.c \ hts_engine_API/HTS_hidden.h \ hts_engine_API/HTS_engine.h vc_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/vc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/vc/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) hts_engine_API/$(am__dirstamp): @$(MKDIR_P) hts_engine_API @: > hts_engine_API/$(am__dirstamp) hts_engine_API/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) hts_engine_API/$(DEPDIR) @: > hts_engine_API/$(DEPDIR)/$(am__dirstamp) hts_engine_API/HTS_misc.$(OBJEXT): hts_engine_API/$(am__dirstamp) \ hts_engine_API/$(DEPDIR)/$(am__dirstamp) hts_engine_API/HTS_pstream.$(OBJEXT): hts_engine_API/$(am__dirstamp) \ hts_engine_API/$(DEPDIR)/$(am__dirstamp) hts_engine_API/HTS_sstream.$(OBJEXT): hts_engine_API/$(am__dirstamp) \ hts_engine_API/$(DEPDIR)/$(am__dirstamp) vc$(EXEEXT): $(vc_OBJECTS) $(vc_DEPENDENCIES) $(EXTRA_vc_DEPENDENCIES) @rm -f vc$(EXEEXT) $(AM_V_CCLD)$(LINK) $(vc_OBJECTS) $(vc_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) -rm -f hts_engine_API/*.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_vc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@hts_engine_API/$(DEPDIR)/HTS_misc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@hts_engine_API/$(DEPDIR)/HTS_pstream.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@hts_engine_API/$(DEPDIR)/HTS_sstream.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -rm -f hts_engine_API/$(DEPDIR)/$(am__dirstamp) -rm -f hts_engine_API/$(am__dirstamp) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) hts_engine_API/$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) hts_engine_API/$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/vc/vc.c0000644001051300105040000004657312637156645011053 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /****************************************************************************** * * * GMM-based Voice Conversion * * 2013.12 Akira Tamamori * * * * usage: * * vc [options] gmmfile [infile] > stdout * * options: * * -l l : dimension of source feature vector [25] * * -n n : order of source feature vector [l-1] * * -L L : dimension of target feature vector [l] * * -N N : order of target feature vector [L-1] * * -m m : number of mixture components of GMM [16] * * -d fn : filename of delta coefficients [N/A] * * -d coef [coef...] : delta coefficients [N/A] * * -r n w1 [w2] : order and width of regression [N/A] * * -g fn : filename of GV statistics [N/A] * * -e e : small value added to [0.0] * * diagonal component of covariance * * infile: * * sequence of source static feature vectors * * gmmfile: * * GMM trained from joint features of source and target * * stdout: * * sequence of converted static feature vectors * * notice: * * When using -d option to specify filename of delta coefficients, * * the number of coefficients must be odd. * * * *******************************************************************************/ static char *rcs_id = "$Id: vc.c,v 1.12 2015/12/14 01:14:24 uratec Exp $"; #include #include #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define DEF_L 25 #define DEF_M 16 #define FLOOR 0.0 /* Command Name */ char *cmnd; typedef struct _float_list { float *f; struct _float_list *next; } float_list; double *read_input(FILE * fp, size_t dim, size_t * length) { size_t i, j; double *x = NULL, *input = NULL; float_list *top = NULL, *prev = NULL, *cur = NULL, *next = NULL, *tmp = NULL; input = dgetmem(dim); top = prev = (float_list *) getmem(1, sizeof(float_list)); *length = 0; prev->next = NULL; while (freadf(input, sizeof(*input), dim, fp) == (int) dim) { cur = (float_list *) getmem(1, sizeof(float_list)); cur->f = fgetmem(dim); for (i = 0; i < dim; i++) { cur->f[i] = (float) input[i]; } (*length)++; prev->next = cur; cur->next = NULL; prev = cur; } x = dgetmem(*length * dim); for (i = 0, tmp = top->next; tmp != NULL; i++, tmp = tmp->next) { for (j = 0; j < dim; j++) { x[i * dim + j] = tmp->f[j]; } } for (tmp = top->next; tmp != NULL; tmp = next) { cur = tmp; next = tmp->next; free(cur->f); free(cur); } free(top); free(input); return (x); } void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - GMM-based Voice Conversion\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] gmmfile [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -l l : dimension of source feature vector [%d]\n", DEF_L); fprintf(stderr, " -n n : order of source feature vector [l-1]\n"); fprintf(stderr, " -L L : dimension of target feature vector [l]\n"); fprintf(stderr, " -N N : order of target feature vector [L-1]\n"); fprintf(stderr, " -m m : number of mixture components of GMM [%d]\n", DEF_M); fprintf(stderr, " -d coef [coef...] : delta coefficients to calculate dynamic [N/A]\n"); fprintf(stderr, " feature\n"); fprintf(stderr, " -r n t1 [t2] : order and width of regression coefficients [N/A]\n"); fprintf(stderr, " for dynamic feature\n"); fprintf(stderr, " -g fn : filename of GV statistics [N/A]\n"); fprintf(stderr, " fn must contain mean vector and diagonal\n"); fprintf(stderr, " components of covariance matrix of GV\n"); fprintf(stderr, " -e e : small value added to [%g]\n", FLOOR); fprintf(stderr, " diagonal component of covariance\n"); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " sequence of source static feature vectors (%s) [stdin]\n", FORMAT); fprintf(stderr, " gmmfile:\n"); fprintf(stderr, " GMM trained from joint features of source and target (%s)\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " sequence of converted target static feature vectors (%s)\n", FORMAT); fprintf(stderr, " notice:\n"); fprintf(stderr, " When using -d option to specify filename of delta coefficients, \n"); fprintf(stderr, " the number of coefficients must be odd. \n"); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char **argv) { size_t i, source_vlen = DEF_L, target_vlen = 0, len_total = 0, num_mix = DEF_M, total_frame = 0; char *coef = NULL, **dw_fn = (char **) getmem(argc, sizeof(*(dw_fn))); int j, k, m, dw_num = 1, dw_calccoef = -1, dw_coeflen = 1, win_max_width = 0; double floor = FLOOR; double *source = NULL, *target = NULL, *gv_mean = NULL, *gv_vari = NULL; FILE *fp = stdin, *fgmm = NULL, *fgv = NULL; Boolean full = TR; GMM gmm; DELTAWINDOW window; memset(dw_fn, 0, argc * sizeof(*dw_fn)); if ((cmnd = strrchr(argv[0], '/')) == NULL) { cmnd = argv[0]; } else { cmnd++; } while (--argc) { if (**++argv == '-') { switch (*(*argv + 1)) { case 'l': source_vlen = atoi(*++argv); --argc; break; case 'n': source_vlen = atoi(*++argv) + 1; --argc; break; case 'L': target_vlen = atoi(*++argv); --argc; break; case 'N': target_vlen = atoi(*++argv) + 1; --argc; break; case 'm': num_mix = atoi(*++argv); --argc; break; case 'd': if (dw_calccoef == 1 || dw_calccoef == 2) { fprintf(stderr, "%s : Options '-r' and '-d' should not be defined simultaneously!\n", cmnd); usage(EXIT_FAILURE); } dw_calccoef = 0; if (isfloat(*++argv)) { dw_coeflen = 0; for (k = 0; (k < argc - 1) && isfloat(argv[k]); k++) { dw_coeflen += strlen(argv[k]) + 1; } dw_coeflen += 1; coef = dw_fn[dw_num] = getmem(dw_coeflen, sizeof(*coef)); for (j = 0; j < k; j++) { sprintf(coef, " %s", *argv); coef += strlen(*argv) + 1; if (j < k - 1) { argv++; argc--; } } } else { dw_fn[dw_num] = getmem(strlen(*argv) + 1, sizeof(**dw_fn)); strncpy(dw_fn[dw_num], *argv, strlen(*argv) + 1); } dw_num++; --argc; break; case 'r': if (dw_calccoef == 0 || dw_calccoef == 2) { fprintf(stderr, "%s : Options '-r' and '-d' should not be defined simultaneously!\n", cmnd); usage(EXIT_FAILURE); } dw_calccoef = 1; dw_coeflen = atoi(*++argv); --argc; if ((dw_coeflen != 1) && (dw_coeflen != 2)) { fprintf(stderr, "%s : Number of delta parameter should be 1 or 2!\n", cmnd); usage(EXIT_FAILURE); } if (argc <= 1) { fprintf(stderr, "%s : Window size for delta parameter required!\n", cmnd); usage(EXIT_FAILURE); } dw_fn[dw_num] = getmem(strlen(*++argv) + 1, sizeof(**dw_fn)); strncpy(dw_fn[dw_num], *argv, strlen(*argv) + 1); dw_num++; --argc; if (dw_coeflen == 2) { if (argc <= 1) { fprintf(stderr, "%s : Window size for delta-delta parameter required!\n", cmnd); usage(EXIT_FAILURE); } dw_fn[dw_num] = getmem(strlen(*++argv) + 1, sizeof(**dw_fn)); strncpy(dw_fn[dw_num], *argv, strlen(*argv) + 1); dw_num++; --argc; } break; case 'g': fgv = getfp(*++argv, "rb"); --argc; break; case 'e': floor = atof(*++argv); if (floor < 0.0 || isdigit(**argv) == 0) { fprintf(stderr, "%s : '-e' option must be specified with positive value.\n", cmnd); usage(1); } --argc; break; case 'h': usage(EXIT_SUCCESS); default: fprintf(stderr, "%s: Illegal option %s.\n", cmnd, *argv); usage(EXIT_FAILURE); } } else if (fgmm == NULL) { fgmm = getfp(*argv, "rb"); } else { fp = getfp(*argv, "rb"); } } if (fgmm == NULL) { fprintf(stderr, "%s: GMM file must be specified!\n", cmnd); usage(EXIT_FAILURE); } /* set dimensionarity of joint vector */ if (target_vlen == 0) { target_vlen = source_vlen; } len_total = (source_vlen + target_vlen) * dw_num; /* read sequence of source feature vectors */ source = read_input(fp, source_vlen, &total_frame); fclose(fp); target = dgetmem(target_vlen * total_frame); /* load GMM parameters */ alloc_GMM(&gmm, num_mix, len_total, full); load_GMM(&gmm, fgmm); prepareCovInv_GMM(&gmm); prepareGconst_GMM(&gmm); fclose(fgmm); /* flooring for diagonal component of covariance */ if (floor != 0.0) { for (i = 0; i < num_mix; i++) { for (j = 0; j < (int) len_total; j++) { gmm.gauss[i].cov[j][j] += floor; } } } /* load GV parameters */ if (fgv != NULL) { gv_mean = dgetmem(target_vlen); gv_vari = dgetmem(target_vlen); freadf(gv_mean, sizeof(*gv_mean), target_vlen, fgv); freadf(gv_vari, sizeof(*gv_vari), target_vlen, fgv); fclose(fgv); } /* set window parameters */ window.win_size = dw_num; window.win_l_width = (int *) getmem(window.win_size, sizeof(*(window.win_l_width))); window.win_r_width = (int *) getmem(window.win_size, sizeof(*(window.win_r_width))); window.win_coefficient = (double **) getmem(window.win_size, sizeof(*(window.win_coefficient))); window.win_l_width[0] = 0; window.win_r_width[0] = 0; window.win_coefficient[0] = dgetmem(1); window.win_coefficient[0][0] = 1.0; if (dw_calccoef == 0) { int fsize, dw_leng; FILE *fpc = NULL; for (i = 1; i < window.win_size; i++) { if (dw_fn[i][0] == ' ') { fsize = str2darray(dw_fn[i], &(window.win_coefficient[i])); } else { /* read from file */ fpc = getfp(dw_fn[i], "rb"); /* check the number of coefficients */ fseek(fpc, 0L, SEEK_END); fsize = ftell(fpc) / sizeof(float); fseek(fpc, 0L, SEEK_SET); if (fsize % 2 == 0) { fprintf(stderr, "%s : number of delta coefficients must be odd!\n", cmnd); usage(EXIT_FAILURE); } /* read coefficients */ window.win_coefficient[i] = dgetmem(fsize); freadf(window.win_coefficient[i], sizeof(*(window.win_coefficient[i])), fsize, fpc); } /* set pointer */ dw_leng = fsize / 2; window.win_coefficient[i] += dw_leng; window.win_l_width[i] = -dw_leng; window.win_r_width[i] = dw_leng; } fclose(fpc); } else if (dw_calccoef == 1) { int a0, a1, a2, dw_leng; for (i = 1; i < window.win_size; i++) { dw_leng = atoi(dw_fn[i]); if (dw_leng < 1) { fprintf(stderr, "%s : Width for regression coefficient shuould be more than 1!\n", cmnd); usage(EXIT_FAILURE); } window.win_l_width[i] = -dw_leng; window.win_r_width[i] = dw_leng; window.win_coefficient[i] = dgetmem(dw_leng * 2 + 1); window.win_coefficient[i] += dw_leng; } dw_leng = atoi(dw_fn[1]); for (a1 = 0, j = -dw_leng; j <= dw_leng; a1 += j * j, j++); for (j = -dw_leng; j <= dw_leng; j++) { window.win_coefficient[1][j] = (double) j / (double) a1; } if (window.win_size > 2) { dw_leng = atoi(dw_fn[2]); for (a0 = a1 = a2 = 0, j = -dw_leng; j <= dw_leng; a0++, a1 += j * j, a2 += j * j * j * j, j++); for (j = -dw_leng; j <= dw_leng; j++) { window.win_coefficient[2][j] = 2 * ((double) (a0 * j * j - a1)) / ((double) (a2 * a0 - a1 * a1)); } } } win_max_width = window.win_r_width[0]; /* width of static window is 0 */ for (i = 1; i < window.win_size; i++) { if (win_max_width < window.win_r_width[i]) { win_max_width = window.win_r_width[i]; } if (win_max_width < -window.win_l_width[i]) { win_max_width = -window.win_l_width[i]; } } window.win_max_width = win_max_width; for (m = 0; m < gmm.nmix; m++) { invert(gmm.gauss[m].cov, gmm.gauss[m].inv, source_vlen * window.win_size); if (full) { gmm.gauss[m].gconst = cal_gconstf(gmm.gauss[m].cov, source_vlen * window.win_size); } else { gmm.gauss[m].gconst = cal_gconst(gmm.gauss[m].var, source_vlen * window.win_size); } } /* perform conversion */ vc(&gmm, &window, total_frame, source_vlen, target_vlen, gv_mean, gv_vari, source, target); /* output sequence of converted target static feature vectors */ fwritef(target, sizeof(*target), target_vlen * total_frame, stdout); /* release memory */ free(source); free(target); free(gv_mean); free(gv_vari); free_GMM(&gmm); for (i = 0; i < window.win_size; i++) { if (dw_fn[i]) { free(dw_fn[i]); } free(window.win_coefficient[i] + window.win_l_width[i]); } free(dw_fn); free(window.win_l_width); free(window.win_r_width); free(window.win_coefficient); return (0); } SPTK-3.9/bin/vc/_vc.c0000644001051300105040000003056212637156645011201 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /********************************************************************* * * * $Id: _vc.c,v 1.8 2015/12/14 01:14:24 uratec Exp $ * * * * module for vc command * * * **********************************************************************/ #include #include #include #if defined(WIN32) #include "SPTK.h" #else #include #endif #include "hts_engine_API/HTS_engine.h" #include "hts_engine_API/HTS_hidden.h" /* perform conversion */ int vc(const GMM * gmm, const DELTAWINDOW * window, const size_t total_frame, const size_t source_vlen, const size_t target_vlen, const double *gv_mean, const double *gv_vari, const double *source, double *target) { size_t t, i, j, k, max_num_mix = 0, src_vlen_dyn = source_vlen * window->win_size, tgt_vlen_dyn = target_vlen * window->win_size; int m, l, shift; double max_post_mix = 0.0, logoutp = LZERO, *input = NULL, *src_with_dyn = NULL, *logwgd = NULL, **cov_xx_inv = NULL, ***cov_yx_xx = NULL, *gv_weight = NULL, ***cond_mean = NULL, ***cond_vari = NULL, **cond_post_mix = NULL; GMM gmm_xx; HTS_SStreamSet sss; HTS_PStreamSet pss; /* append dynamic feature */ src_with_dyn = dgetmem(total_frame * src_vlen_dyn); for (t = 0; t < total_frame; t++) { for (i = 0; i < window->win_size; i++) { j = window->win_size * source_vlen * t + source_vlen * i; for (shift = window->win_l_width[i]; shift <= window->win_r_width[i]; shift++) { l = t + shift; if (l < 0) { l = 0; } if (!(l < (int) total_frame)) { l = total_frame - 1; } for (k = 0; k < source_vlen; k++) { src_with_dyn[j + k] += window->win_coefficient[i][shift] * source[source_vlen * l + k]; } } } } /* calculate mean and covariace of conditional distribution given source feature and mixture component */ cond_post_mix = ddgetmem(total_frame, gmm->nmix); cond_mean = (double ***) getmem(gmm->nmix, sizeof(*(cond_mean))); for (m = 0; m < gmm->nmix; m++) { cond_mean[m] = ddgetmem(total_frame, tgt_vlen_dyn); } cond_vari = (double ***) getmem(gmm->nmix, sizeof(*(cond_vari))); for (m = 0; m < gmm->nmix; m++) { cond_vari[m] = ddgetmem(tgt_vlen_dyn, tgt_vlen_dyn); } cov_xx_inv = ddgetmem(src_vlen_dyn, src_vlen_dyn); cov_yx_xx = (double ***) getmem(gmm->nmix, sizeof(*(cov_yx_xx))); for (m = 0; m < gmm->nmix; m++) { cov_yx_xx[m] = ddgetmem(tgt_vlen_dyn, src_vlen_dyn); } for (m = 0; m < gmm->nmix; m++) { invert(gmm->gauss[m].cov, cov_xx_inv, src_vlen_dyn); for (i = 0; i < tgt_vlen_dyn; i++) { for (j = 0; j < src_vlen_dyn; j++) { for (k = 0; k < src_vlen_dyn; k++) { cov_yx_xx[m][i][j] += gmm->gauss[m].cov[src_vlen_dyn + i][k] * cov_xx_inv[k][j]; } } } } logwgd = dgetmem(gmm->nmix); input = dgetmem(src_vlen_dyn); alloc_GMM(&gmm_xx, gmm->nmix, src_vlen_dyn, gmm->full); for (t = 0; t < total_frame; t++) { for (i = 0; i < src_vlen_dyn; i++) { input[i] = src_with_dyn[t * src_vlen_dyn + i]; } for (i = 0; i < (size_t) gmm_xx.nmix; i++) { gmm_xx.weight[i] = gmm->weight[i]; for (j = 0; j < (size_t) gmm_xx.dim; j++) { gmm_xx.gauss[i].mean[j] = gmm->gauss[i].mean[j]; if (gmm_xx.full) { for (k = 0; k < (size_t) gmm_xx.dim; k++) { gmm_xx.gauss[i].cov[j][k] = gmm->gauss[i].cov[j][k]; } } else { gmm_xx.gauss[i].var[j] = gmm->gauss[i].var[j]; } } } for (i = 0; i < (size_t) gmm_xx.nmix; i++) { invert(gmm_xx.gauss[i].cov, gmm_xx.gauss[i].inv, src_vlen_dyn); gmm_xx.gauss[i].gconst = cal_gconstf(gmm_xx.gauss[i].cov, src_vlen_dyn); } for (m = 0, logoutp = LZERO; m < gmm->nmix; m++) { logwgd[m] = log_wgd(&gmm_xx, m, src_vlen_dyn, input); logoutp = log_add(logoutp, logwgd[m]); } for (m = 0; m < gmm->nmix; m++) { /* posterior probability of mixture component given source feature */ cond_post_mix[t][m] = exp(logwgd[m] - logoutp); for (i = 0; i < tgt_vlen_dyn; i++) { for (j = 0; j < src_vlen_dyn; j++) { cond_mean[m][t][i] += cov_yx_xx[m][i][j] * (input[j] - gmm->gauss[m].mean[j]); } cond_mean[m][t][i] += gmm->gauss[m].mean[src_vlen_dyn + i]; } } } for (m = 0; m < gmm->nmix; m++) { for (i = 0; i < tgt_vlen_dyn; i++) { for (j = 0; j < tgt_vlen_dyn; j++) { for (k = 0; k < src_vlen_dyn; k++) { cond_vari[m][i][j] += cov_yx_xx[m][i][k] * gmm->gauss[m].cov[k][src_vlen_dyn + j]; } cond_vari[m][i][j] = gmm->gauss[m].cov[src_vlen_dyn + i][src_vlen_dyn + j] - cond_vari[m][i][j]; } } } /* initialize parameter set of hts_engine */ HTS_PStreamSet_initialize(&pss); sss.nstream = 1; sss.total_state = total_frame; sss.total_frame = total_frame; sss.duration = (size_t *) getmem(total_frame, sizeof(size_t)); for (i = 0; i < total_frame; i++) { sss.duration[i] = 1; } sss.sstream = (HTS_SStream *) getmem(1, sizeof(HTS_SStream)); sss.sstream->vector_length = target_vlen; sss.sstream->mean = (double **) getmem(sss.total_state, sizeof(*(sss.sstream->mean))); sss.sstream->vari = (double **) getmem(sss.total_state, sizeof(*(sss.sstream->vari))); for (i = 0; i < sss.total_state; i++) { sss.sstream->mean[i] = dgetmem(tgt_vlen_dyn); sss.sstream->vari[i] = dgetmem(tgt_vlen_dyn); } sss.sstream->msd = NULL; /* no MSD */ sss.sstream->win_size = window->win_size; sss.sstream->win_l_width = (int *) getmem(window->win_size, sizeof(*(sss.sstream->win_l_width))); sss.sstream->win_r_width = (int *) getmem(window->win_size, sizeof(*(sss.sstream->win_r_width))); sss.sstream->win_coefficient = (double **) getmem(window->win_size, sizeof(*(sss.sstream->win_coefficient))); for (i = 0; i < window->win_size; i++) { sss.sstream->win_l_width[i] = window->win_l_width[i]; sss.sstream->win_r_width[i] = window->win_r_width[i]; if (sss.sstream->win_l_width[i] + sss.sstream->win_r_width[i] == 0) { sss.sstream->win_coefficient[i] = dgetmem(-2 * sss.sstream->win_l_width[i] + 1); } else { sss.sstream->win_coefficient[i] = dgetmem(-2 * sss.sstream->win_l_width[i]); } sss.sstream->win_coefficient[i] -= sss.sstream->win_l_width[i]; for (shift = sss.sstream->win_l_width[i]; shift <= sss.sstream->win_r_width[i]; shift++) { sss.sstream->win_coefficient[i][shift] = window->win_coefficient[i][shift]; } } sss.sstream->win_max_width = window->win_max_width; if ((gv_mean != NULL) && (gv_vari != NULL)) { /* set GV parameters */ sss.sstream->gv_mean = dgetmem(sss.sstream->vector_length); sss.sstream->gv_vari = dgetmem(sss.sstream->vector_length); for (i = 0; i < sss.sstream->vector_length; i++) { sss.sstream->gv_mean[i] = gv_mean[i]; sss.sstream->gv_vari[i] = gv_vari[i]; } } else { sss.sstream->gv_mean = NULL; sss.sstream->gv_vari = NULL; } sss.sstream->gv_switch = (HTS_Boolean *) getmem(total_frame, sizeof(HTS_Boolean)); for (i = 0; i < total_frame; i++) { sss.sstream->gv_switch[i] = TRUE; } gv_weight = dgetmem(tgt_vlen_dyn); for (i = 0; i < tgt_vlen_dyn; i++) { gv_weight[i] = 1.0; } /* initialize pdf sequence */ for (t = 0; t < total_frame; t++) { max_post_mix = cond_post_mix[t][0]; max_num_mix = 0; for (m = 1; m < gmm->nmix; m++) { if (max_post_mix < cond_post_mix[t][m]) { max_post_mix = cond_post_mix[t][m]; max_num_mix = m; } } for (i = 0; i < tgt_vlen_dyn; i++) { sss.sstream->mean[t][i] = cond_mean[max_num_mix][t][i]; sss.sstream->vari[t][i] = cond_vari[max_num_mix][i][i]; } } /* parameter generation by hts_engine API */ HTS_PStreamSet_create(&pss, &sss, NULL, gv_weight); for (t = 0; t < total_frame; t++) { k = t * target_vlen; for (i = 0; i < target_vlen; i++) { target[k + i] = pss.pstream->par[t][i]; } } /* release memory */ free(src_with_dyn); free(input); free(logwgd); free(cov_xx_inv[0]); free(cov_xx_inv); for (m = 0; m < gmm->nmix; m++) { free(cov_yx_xx[m][0]); free(cov_yx_xx[m]); free(cond_mean[m][0]); free(cond_mean[m]); free(cond_vari[m][0]); free(cond_vari[m]); } free(cov_yx_xx); free(cond_mean); free(cond_vari); free(cond_post_mix[0]); free(cond_post_mix); free(gv_weight); free_GMM(&gmm_xx); HTS_PStreamSet_clear(&pss); HTS_SStreamSet_clear(&sss); return (0); } SPTK-3.9/bin/Makefile.am0000644001051300105040000000227712442245016011675 00000000000000SUBDIRS = acep \ acorr \ agcep \ amcep \ average \ b2mc \ bcp \ bcut \ c2acr \ c2ir \ c2ndps \ c2sp \ cat2 \ cdist \ clip \ da \ dct \ decimate \ delay \ delta \ df2 \ dfs \ dmp \ ds \ dtw \ echo2 \ excite \ extract \ fd \ fft \ fft2 \ fftcep \ fftr \ fftr2 \ fig+fdrw \ frame \ freqt \ gc2gc \ gcep \ glsadf \ gmm \ gnorm \ grpdelay \ histogram \ idct \ ifft \ ifftr \ ifft2 \ ignorm \ impulse \ imsvq \ interpolate \ ivq \ lbg \ levdur \ linear_intpl \ lmadf \ lpc \ lpc2c \ lpc2lsp \ lpc2par \ lsp2lpc \ lsp2sp \ lspcheck \ lspdf \ ltcdf \ mc2b \ mcep \ merge \ mfcc \ mgc2mgc \ mgc2sp \ mgclsp2sp \ mgcep \ mglsadf \ minmax \ mlpg \ mlsacheck \ mlsadf \ msvq \ nan \ ndps2c \ norm0 \ nrand \ par2lpc \ pca \ phase \ pitch \ poledf \ psgr \ ramp \ rawtowav \ reverse \ rmse \ root_pol \ sin \ smcep \ snr \ sopr \ spec \ step \ swab \ symmetrize \ train \ transpose \ uels \ ulaw \ us \ vc \ vopr \ vq \ vstat \ vsum \ wavjoin \ wavsplit \ window \ x2x \ xgr \ zcross \ zerodf EXTRA_DIST = pitch/snack/COPYING pitch/swipe/COPYING vc/hts_engine_API/COPYING ds/titech/COPYING us/titech/COPYING SPTK-3.9/bin/Makefile.in0000644001051300105040000004501312637167405011714 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = bin ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = acep \ acorr \ agcep \ amcep \ average \ b2mc \ bcp \ bcut \ c2acr \ c2ir \ c2ndps \ c2sp \ cat2 \ cdist \ clip \ da \ dct \ decimate \ delay \ delta \ df2 \ dfs \ dmp \ ds \ dtw \ echo2 \ excite \ extract \ fd \ fft \ fft2 \ fftcep \ fftr \ fftr2 \ fig+fdrw \ frame \ freqt \ gc2gc \ gcep \ glsadf \ gmm \ gnorm \ grpdelay \ histogram \ idct \ ifft \ ifftr \ ifft2 \ ignorm \ impulse \ imsvq \ interpolate \ ivq \ lbg \ levdur \ linear_intpl \ lmadf \ lpc \ lpc2c \ lpc2lsp \ lpc2par \ lsp2lpc \ lsp2sp \ lspcheck \ lspdf \ ltcdf \ mc2b \ mcep \ merge \ mfcc \ mgc2mgc \ mgc2sp \ mgclsp2sp \ mgcep \ mglsadf \ minmax \ mlpg \ mlsacheck \ mlsadf \ msvq \ nan \ ndps2c \ norm0 \ nrand \ par2lpc \ pca \ phase \ pitch \ poledf \ psgr \ ramp \ rawtowav \ reverse \ rmse \ root_pol \ sin \ smcep \ snr \ sopr \ spec \ step \ swab \ symmetrize \ train \ transpose \ uels \ ulaw \ us \ vc \ vopr \ vq \ vstat \ vsum \ wavjoin \ wavsplit \ window \ x2x \ xgr \ zcross \ zerodf EXTRA_DIST = pitch/snack/COPYING pitch/swipe/COPYING vc/hts_engine_API/COPYING ds/titech/COPYING us/titech/COPYING all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ check-am clean clean-generic cscopelist-am ctags ctags-am \ distclean distclean-generic distclean-tags distdir dvi dvi-am \ html html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am tags tags-am uninstall uninstall-am .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/acep/0000755001051300105040000000000012637167674010644 500000000000000SPTK-3.9/bin/acep/Makefile.am0000644001051300105040000000020312442245014012566 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = acep acep_SOURCES = _acep.c acep.c acep_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/acep/Makefile.in0000644001051300105040000004254312637167405012631 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = acep$(EXEEXT) subdir = bin/acep ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_acep_OBJECTS = _acep.$(OBJEXT) acep.$(OBJEXT) acep_OBJECTS = $(am_acep_OBJECTS) acep_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(acep_SOURCES) DIST_SOURCES = $(acep_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include acep_SOURCES = _acep.c acep.c acep_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/acep/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/acep/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) acep$(EXEEXT): $(acep_OBJECTS) $(acep_DEPENDENCIES) $(EXTRA_acep_DEPENDENCIES) @rm -f acep$(EXEEXT) $(AM_V_CCLD)$(LINK) $(acep_OBJECTS) $(acep_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_acep.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/acep.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/acep/_acep.c0000644001051300105040000001132512637156627011775 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /**************************************************************** $Id: _acep.c,v 1.17 2015/12/14 01:14:09 uratec Exp $ Adaptive Cepstral Analysis double acep(x, c, m, lambda, step, pd); double x : input sequence double *c : cepstrum int m : order of cepstrum double lambda : leakage factor double step : step size int pd : order of Pade approximation double eps : minimum value for epsilon return value : prediction error *****************************************************************/ #include #include #include #if defined(WIN32) #include "SPTK.h" #else #include #endif double acep(double x, double *c, const int m, const double lambda, const double step, const double tau, const int pd, const double eps) { int i; static double *cc = NULL, *e, *ep, *d, gg = 1.0; static int size; double mu, tx; if (cc == NULL) { cc = dgetmem(m + m + m + 3 + (m + 1) * pd * 2); e = cc + m + 1; ep = e + m + 1; d = ep + m + 1; size = m; } if (m > size) { free(cc); cc = dgetmem(m + m + m + 3 + (m + 1) * pd * 2); e = cc + m + 1; ep = e + m + 1; d = ep + m + 1; size = m; } for (i = 1; i <= m; i++) cc[i] = -c[i]; x = lmadf(x, cc, m, pd, d); for (i = m; i >= 1; i--) e[i] = e[i - 1]; e[0] = x; gg = gg * lambda + (1.0 - lambda) * e[0] * e[0]; c[0] = 0.5 * log(gg); gg = (gg < eps) ? eps : gg; mu = step / (double) m / gg; tx = 2 * (1.0 - tau) * x; for (i = 1; i <= m; i++) { ep[i] = tau * ep[i] - tx * e[i]; c[i] -= mu * ep[i]; } return (x); } SPTK-3.9/bin/acep/acep.c0000644001051300105040000002435712637156627011647 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * Adaptive Cepstral Analysis * * * * 1993.8 K.Tokuda * * 1996.1 K.Koishida * * * * usage: * * acep [ options ] [ pefile ] < stdin > stdout * * options: * * -m m : order of cepstrum [25] * * -l l : leakage factor [0.98] * * -t t : momentum constant [0.9] * * -k k : step size [0.1] * * -p p : output period of cepstrum [1] * * -s : output smoothed cepstrum [FALSE] * * -e e : minimum value for epsilon [0] * * -P P : order of Pade approximation [4] * * infile: * * data sequence * * , x(0), x(1), ... * * stdout: * * cepstrum * * , c(0), c(1), ..., c(M), * * output: * * prediction error (if pefile is specified) * * , e(0), e(1), ... * * notice: * * P = 4 or 5 * * require: * * lmadf() * * * ************************************************************************/ static char *rcs_id = "$Id: acep.c,v 1.28 2015/12/14 01:14:09 uratec Exp $"; /* Standard C Libraries */ #include #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define ORDER 25 #define PADEORD 4 #define LAMBDA 0.98 #define STEP 0.1 #define PERIOD 1 #define AVEFLAG FA #define TAU 0.9 #define EPS 0.0 char *BOOL[] = { "FALSE", "TRUE" }; /* Command Name */ char *cmnd; void usage(const int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - adaptive cepstral analysis\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ pefile ] < stdin > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -m m : order of cepstrum [%d]\n", ORDER); fprintf(stderr, " -l l : leakage factor [%g]\n", LAMBDA); fprintf(stderr, " -t t : momentum constant [%g]\n", TAU); fprintf(stderr, " -k k : step size [%g]\n", STEP); fprintf(stderr, " -p p : output period of cepstrum [%d]\n", PERIOD); fprintf(stderr, " -s : output smoothed cepstrum [%s]\n", BOOL[AVEFLAG]); fprintf(stderr, " -e e : minimum value for epsilon [%g]\n", EPS); fprintf(stderr, " -P P : order of Pade approximation [%d]\n", PADEORD); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " stdin:\n"); fprintf(stderr, " data sequence (%s)\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " cepstrum (%s)\n", FORMAT); fprintf(stderr, " pefile:\n"); fprintf(stderr, " prediction error (%s)\n", FORMAT); fprintf(stderr, " notice:\n"); fprintf(stderr, " P = 4 or 5\n"); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char **argv) { int m = ORDER, period = PERIOD, i, j, pd = PADEORD; FILE *fp = stdin, *fpe = NULL; Boolean aveflag = AVEFLAG; double lambda = LAMBDA, step = STEP, tau = TAU, eps = EPS, *c, *e, *ep, *cc, *d, *avec, x, ll, gg, tt, mu, ttx; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) if (**++argv == '-') { switch (*(*argv + 1)) { case 'l': lambda = atof(*++argv); --argc; break; case 't': tau = atof(*++argv); --argc; break; case 'k': step = atof(*++argv); --argc; break; case 'm': m = atoi(*++argv); --argc; break; case 'p': period = atoi(*++argv); --argc; break; case 's': aveflag = 1 - aveflag; break; case 'P': pd = atoi(*++argv); --argc; break; case 'e': eps = atof(*++argv); --argc; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else fpe = getfp(*argv, "wb"); if ((pd < 4) || (pd > 5)) { fprintf(stderr, "%s : Order of Pade approximation should be 4 or 5!\n", cmnd); return (1); } c = dgetmem(5 * (m + 1) + (m + 1) * pd * 2); cc = c + m + 1; e = cc + m + 1; ep = e + m + 1; avec = ep + m + 1; d = avec + m + 1; j = period; ll = 1.0 - lambda; gg = 1.0; step /= (double) m; tt = 2 * (1.0 - tau); while (freadf(&x, sizeof(x), 1, fp) == 1) { for (i = 1; i <= m; i++) cc[i] = -c[i]; x = lmadf(x, cc, m, pd, d); for (i = m; i >= 1; i--) e[i] = e[i - 1]; e[0] = x; gg = gg * lambda + ll * e[0] * e[0]; c[0] = 0.5 * log(gg); gg = (gg < eps) ? eps : gg; mu = step / gg; ttx = tt * e[0]; for (i = 1; i <= m; i++) { ep[i] = tau * ep[i] - ttx * e[i]; c[i] -= mu * ep[i]; } if (aveflag) for (i = 0; i <= m; i++) avec[i] += c[i]; if (fpe != NULL) fwritef(&x, sizeof(x), 1, fpe); if (--j == 0) { j = period; if (aveflag) { for (i = 0; i <= m; i++) avec[i] /= period; fwritef(avec, sizeof(*avec), m + 1, stdout); fillz(avec, sizeof(*avec), m + 1); } else fwritef(c, sizeof(*c), m + 1, stdout); } } return (0); } SPTK-3.9/bin/acorr/0000755001051300105040000000000012637167675011043 500000000000000SPTK-3.9/bin/acorr/Makefile.am0000644001051300105040000000021012442245016012764 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = acorr acorr_SOURCES = _acorr.c acorr.c acorr_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/acorr/Makefile.in0000644001051300105040000004257412637167405013033 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = acorr$(EXEEXT) subdir = bin/acorr ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_acorr_OBJECTS = _acorr.$(OBJEXT) acorr.$(OBJEXT) acorr_OBJECTS = $(am_acorr_OBJECTS) acorr_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(acorr_SOURCES) DIST_SOURCES = $(acorr_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include acorr_SOURCES = _acorr.c acorr.c acorr_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/acorr/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/acorr/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) acorr$(EXEEXT): $(acorr_OBJECTS) $(acorr_DEPENDENCIES) $(EXTRA_acorr_DEPENDENCIES) @rm -f acorr$(EXEEXT) $(AM_V_CCLD)$(LINK) $(acorr_OBJECTS) $(acorr_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_acorr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/acorr.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/acorr/_acorr.c0000644001051300105040000000732312637156627012374 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /*********************************************************** $Id: _acorr.c,v 1.17 2015/12/14 01:14:09 uratec Exp $ obtain autocorrelation sequence void acorr(x,l,r,np) double *x : input sequence int l : flame length double *r : autocorrelation sequence int np : order of sequence ***********************************************************/ #include #if defined(WIN32) #include "SPTK.h" #else #include #endif void acorr(double *x, int l, double *r, const int np) { double d; int k, i; for (k = 0; k <= np; k++) { for (d = 0.0, i = 0; i < l - k; i++) d += x[i] * x[i + k]; r[k] = d; } return; } SPTK-3.9/bin/acorr/acorr.c0000644001051300105040000001450012637156627012230 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * Obtain Autocorrelation Sequence * * * * usage: * * acorr [ options ] [ infile ] > stdout * * options: * * -m m : order of sequence [25] * * -l l : frame length [256] * * infile: * * stdin for default * * input is assumed to be real * * * ************************************************************************/ static char *rcs_id = "$Id: acorr.c,v 1.29 2015/12/14 01:14:10 uratec Exp $"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define LENG 256 #define ORDER 25 /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - obtain autocorrelation sequence\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -m m : order of sequence [%d]\n", ORDER); fprintf(stderr, " -l l : frame length [%d]\n", LENG); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " data sequence (%s) [stdin]\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " autocorrelation sequence (%s)\n", FORMAT); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char **argv) { FILE *fp = stdin; char *s, *infile = NULL, c; double *x, *r; int l = LENG, np = ORDER; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) { if (*(s = *++argv) == '-') { c = *++s; if (*++s == '\0') { s = *++argv; --argc; } switch (c) { case 'm': np = atoi(s); break; case 'l': l = atoi(s); break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, c); usage(1); break; } } else infile = s; } if (infile) fp = getfp(infile, "rb"); x = dgetmem(l + np + 1); r = x + l; while (freadf(x, sizeof(*x), l, fp) == l) { acorr(x, l, r, np); fwritef(r, sizeof(*r), np + 1, stdout); } return (0); } SPTK-3.9/bin/agcep/0000755001051300105040000000000012637167675011014 500000000000000SPTK-3.9/bin/agcep/Makefile.am0000644001051300105040000000021012442245017012736 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = agcep agcep_SOURCES = _agcep.c agcep.c agcep_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/agcep/Makefile.in0000644001051300105040000004257412637167405013004 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = agcep$(EXEEXT) subdir = bin/agcep ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_agcep_OBJECTS = _agcep.$(OBJEXT) agcep.$(OBJEXT) agcep_OBJECTS = $(am_agcep_OBJECTS) agcep_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(agcep_SOURCES) DIST_SOURCES = $(agcep_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include agcep_SOURCES = _agcep.c agcep.c agcep_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/agcep/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/agcep/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) agcep$(EXEEXT): $(agcep_OBJECTS) $(agcep_DEPENDENCIES) $(EXTRA_agcep_DEPENDENCIES) @rm -f agcep$(EXEEXT) $(AM_V_CCLD)$(LINK) $(agcep_OBJECTS) $(agcep_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_agcep.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/agcep.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/agcep/_agcep.c0000644001051300105040000001140312637156627012310 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /**************************************************************** $Id: _agcep.c,v 1.18 2015/12/14 01:14:10 uratec Exp $ Adaptive Generalized Cepstral Analysis double agcep(x, c, m, lambda, step); double x : input sequence double *c : normalized generalized cepstrum int m : order of generalized cepstrum int stage : -1 / gamma double lambda : leakage factor double step : step size double tau : momentum constant double eps : minimum value for epsilon return value : prediction error *****************************************************************/ #include #include #include #if defined(WIN32) #include "SPTK.h" #else #include #endif double agcep(double x, double *c, const int m, const int stage, const double lambda, const double step, const double tau, const double eps) { int i; static double *eg = NULL, *ep, *d, gg = 1.0, ee = 1.0, tx; static int size; double mu, ll; if (eg == NULL) { eg = dgetmem(2 * (m + 1) + m * stage); ep = eg + m + 1; d = ep + m + 1; size = m; } if (m > size) { free(eg); eg = dgetmem(2 * (m + 1) + m * stage); ep = eg + m + 1; d = ep + m + 1; size = m; } ll = 1.0 - lambda; eg[m] = d[stage * m - 1]; x = iglsadf1(x, c, m, stage, d); movem(d + (stage - 1) * m, eg, sizeof(*d), m); gg = lambda * gg + ll * eg[0] * eg[0]; gg = (gg < eps) ? eps : gg; mu = step / (double) m / gg; tx = 2 * (1.0 - tau) * x; for (i = 1; i <= m; i++) { ep[i] = tau * ep[i] - tx * eg[i]; c[i] -= mu * ep[i]; } ee = lambda * ee + ll * x * x; c[0] = sqrt(ee); return (x); } SPTK-3.9/bin/agcep/agcep.c0000644001051300105040000002567112637156630012157 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /****************************************************************************** * * * Adaptive Generalized Cepstral Analysis * * * * 1991.11 K.Tokuda * * 1996.1 K.Koishida * * * * usage: * * agcep [ options ] [ pefile ] < stdin > stdout * * options: * * -m m : order of generalized cepstrum [25] * * -c c : gamma = -1 / (int) c [1] * * -l l : leakage factor [0.98] * * -t t : momentum constant [0.9] * * -k k : step size [0.1] * * -p p : output period of generalized cepstrum [1] * * -s : output smoothed generalized cepstrum [FALSE] * * -n : output normalized generalized cepstrum [FALSE] * * -e e : minimum value for epsilon [0] * * infile: * * data sequence * * , x(0), x(1), ... * * stdout: * * generalized cepstrum * * , c(0), c(1), ..., c(m), * * output: * * prediction error (if pefile is specified) * * , e(0), e(1), ... * * require: * * iglsadf1(), ignorm() * * * ******************************************************************************/ static char *rcs_id = "$Id: agcep.c,v 1.31 2015/12/14 01:14:10 uratec Exp $"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #include #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define ORDER 25 #define STAGE 1 #define LAMBDA 0.98 #define STEP 0.1 #define PERIOD 1 #define AVERAGE FA #define NORM FA #define TAU 0.9 #define EPS 0.0 char *BOOL[] = { "FALSE", "TRUE" }; /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - adaptive generalized cepstral analysis\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ pefile ] < stdin > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -m m : order of generalized cepstrum [%d]\n", ORDER); fprintf(stderr, " -c c : gamma = -1 / (int) c [%d]\n", STAGE); fprintf(stderr, " -l l : leakage factor [%g]\n", LAMBDA); fprintf(stderr, " -t t : momentum constant [%g]\n", TAU); fprintf(stderr, " -k k : step size [%g]\n", STEP); fprintf(stderr, " -p p : output period of generalized cepstrum [%d]\n", PERIOD); fprintf(stderr, " -s : output smoothed generalized cepstrum [%s]\n", BOOL[AVERAGE]); fprintf(stderr, " -n : output normalized generalized cepstrum [%s]\n", BOOL[NORM]); fprintf(stderr, " -e e : minimum value for epsilon [%g]\n", EPS); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " stdin:\n"); fprintf(stderr, " data sequence (%s)\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " generalized cepstrum (%s)\n", FORMAT); fprintf(stderr, " pefile:\n"); fprintf(stderr, " prediction error (%s)\n", FORMAT); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif /* PACKAGE_VERSION */ fprintf(stderr, "\n"); exit(status); } int main(int argc, char **argv) { int m = ORDER, period = PERIOD, stage = STAGE, i, j; FILE *fp = stdin, *fpe = NULL; Boolean ave = AVERAGE, norm = NORM; double lambda = LAMBDA, step = STEP, eps = EPS, *c, *cc, *eg, *ep, *d, *avec, tau = TAU, x, ee, ll, gg, mu, gamma, tt, ttx; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) if (**++argv == '-') { switch (*(*argv + 1)) { case 'l': lambda = atof(*++argv); --argc; break; case 't': tau = atof(*++argv); --argc; break; case 'k': step = atof(*++argv); --argc; break; case 'm': m = atoi(*++argv); --argc; break; case 'c': stage = atoi(*++argv); --argc; break; case 'p': period = atoi(*++argv); --argc; break; case 's': ave = 1 - ave; break; case 'n': norm = 1 - norm; break; case 'e': eps = atof(*++argv); --argc; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else fpe = getfp(*argv, "wb"); if (stage == 0) { fprintf(stderr, "%s : gamma should not equal to 0!\n", cmnd); usage(1); } gamma = -1.0 / (double) stage; c = dgetmem(5 * (m + 1) + m * stage); cc = c + m + 1; eg = cc + m + 1; ep = eg + m + 1; avec = ep + m + 1; d = avec + m + 1; j = period; ll = 1.0 - lambda; gg = 1.0; ee = 1.0; step /= (double) m; tt = 2 * (1.0 - tau); while (freadf(&x, sizeof(x), 1, fp) == 1) { eg[m] = d[stage * m - 1]; x = iglsadf1(x, c, m, stage, d); movem(d + (stage - 1) * m, eg, sizeof(*d), m); gg = lambda * gg + ll * eg[0] * eg[0]; gg = (gg < eps) ? eps : gg; mu = step / gg; ttx = tt * x; for (i = 1; i <= m; i++) { ep[i] = tau * ep[i] - ttx * eg[i]; c[i] -= mu * ep[i]; } ee = lambda * ee + ll * x * x; c[0] = sqrt(ee); if (ave) for (i = 0; i <= m; i++) avec[i] += c[i]; if (fpe != NULL) fwritef(&x, sizeof(x), 1, fpe); if (--j == 0) { j = period; if (ave) { for (i = 0; i <= m; i++) avec[i] /= period; if (!norm) ignorm(avec, cc, m, gamma); fwritef(cc, sizeof(*cc), m + 1, stdout); fillz(avec, sizeof(*avec), m + 1); } else if (!norm) { ignorm(c, cc, m, gamma); fwritef(cc, sizeof(*cc), m + 1, stdout); } else fwritef(c, sizeof(*c), m + 1, stdout); } } return (0); } SPTK-3.9/bin/amcep/0000755001051300105040000000000012637167675011022 500000000000000SPTK-3.9/bin/amcep/Makefile.am0000644001051300105040000000021012442245017012744 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = amcep amcep_SOURCES = _amcep.c amcep.c amcep_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/amcep/Makefile.in0000644001051300105040000004257412637167406013013 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = amcep$(EXEEXT) subdir = bin/amcep ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_amcep_OBJECTS = _amcep.$(OBJEXT) amcep.$(OBJEXT) amcep_OBJECTS = $(am_amcep_OBJECTS) amcep_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(amcep_SOURCES) DIST_SOURCES = $(amcep_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include amcep_SOURCES = _amcep.c amcep.c amcep_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/amcep/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/amcep/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) amcep$(EXEEXT): $(amcep_OBJECTS) $(amcep_DEPENDENCIES) $(EXTRA_amcep_DEPENDENCIES) @rm -f amcep$(EXEEXT) $(AM_V_CCLD)$(LINK) $(amcep_OBJECTS) $(amcep_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_amcep.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/amcep.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/amcep/_amcep.c0000644001051300105040000001210412637156630012315 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /**************************************************************** $Id: _amcep.c,v 1.19 2015/12/14 01:14:10 uratec Exp $ Adaptive Mel Cepstral Analysis double amcep(x, b, m, a, lambda, step, tau, pd, eps); double x : input sequence double *b : MLSA filter coefficients int m : order of cepstrum double a : alpha double lambda : leakage factor double step : step size double tau : momentum constant int pd : order of Pade approximation double eps : minimum value for epsilon return value : prediction error *****************************************************************/ #include #include #include #if defined(WIN32) #include "SPTK.h" #else #include #endif double amcep(double x, double *b, const int m, const double a, const double lambda, const double step, const double tau, const int pd, const double eps) { int i; static double *bb = NULL, *d, *ep, *e, xx, gg = 1.0; static int size; double mu, tx; if (bb == NULL) { bb = dgetmem(3 * (m + 1) + 3 * (pd + 1) + pd * (m + 2)); e = bb + m + 1; ep = e + m + 1; d = ep + m + 1; size = m; } if (m > size) { free(bb); bb = dgetmem(3 * (m + 1) + 3 * (pd + 1) + pd * (m + 2)); e = bb + m + 1; ep = e + m + 1; d = ep + m + 1; size = m; } for (i = 1; i <= m; i++) bb[i] = -b[i]; x = mlsadf(x, bb, m, a, pd, d); phidf(xx, m, a, e); xx = x; gg = gg * lambda + (1.0 - lambda) * x * x; gg = (gg < eps) ? eps : gg; b[0] = 0.5 * log(gg); mu = step / (double) m / gg; tx = 2 * (1.0 - tau) * x; for (i = 1; i <= m; i++) { ep[i] = tau * ep[i] - tx * e[i]; b[i] -= mu * ep[i]; } return (x); } void phidf(const double x, const int m, double a, double *d) { int i; d[0] = a * d[0] + (1.0 - a * a) * x; for (i = 1; i < m; i++) d[i] += a * (d[i + 1] - d[i - 1]); for (i = m; i >= 1; i--) d[i] = d[i - 1]; return; } SPTK-3.9/bin/amcep/amcep.c0000644001051300105040000002470712637156630012172 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * Adaptive Mel Cepstral Analysis * * * * usage: * * amcep [ options ] [ pefile ] < stdin > stdout * * options: * * -m m : order of mel cepstrum [25] * * -a a : all-pass constant [0.35] * * -l l : leakage factor [0.98] * * -t t : momentum constant [0.9] * * -k k : step size [0.1] * * -p p : output period of mel cepstrum [1] * * -s : output smoothed mel cepstrum [FALSE] * * -e e : minimum value for epsilon [0] * * -P P : order of Pade approximation [4] * * infile: * * data sequence * * , x(0), x(1), ... * * stdout: * * mel cepstrum * * , c~(0), c~(1), ..., c~(M), * * output: * * prediction error (if pefile is specified) * * , e(0), e(1), ... * * notice: * * P = 4 or 5 * * require: * * mlsadf() * * * ************************************************************************/ static char *rcs_id = "$Id: amcep.c,v 1.29 2015/12/14 01:14:10 uratec Exp $"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #include #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define ALPHA 0.35 #define ORDER 25 #define LAMBDA 0.98 #define TAU 0.9 #define STEP 0.1 #define PERIOD 1 #define AVEFLAG FA #define PEFLAG FA #define EPS 0.0 #define PADEORDER 4 char *BOOL[] = { "FALSE", "TRUE" }; /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - adaptive mel cepstral analysis\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ pefile ] < stdin > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -m m : order of mel cepstrum [%d]\n", ORDER); fprintf(stderr, " -a a : all-pass constant [%g]\n", ALPHA); fprintf(stderr, " -l l : leakage factor [%g]\n", LAMBDA); fprintf(stderr, " -t t : momentum constant [%g]\n", TAU); fprintf(stderr, " -k k : step size [%g]\n", STEP); fprintf(stderr, " -p p : output period of mel cepstrum [%d]\n", PERIOD); fprintf(stderr, " -s : output smoothed mel cepstrum [%s]\n", BOOL[AVEFLAG]); fprintf(stderr, " -e e : minimum value for epsilon [%g]\n", EPS); fprintf(stderr, " -P P : order of Pade approximation [%d]\n", PADEORDER); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " stdin:\n"); fprintf(stderr, " data sequence (%s)\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " mel-cepstrum (%s)\n", FORMAT); fprintf(stderr, " pefile:\n"); fprintf(stderr, " prediction error (%s)\n", FORMAT); fprintf(stderr, " notice:\n"); fprintf(stderr, " P = 4 or 5\n"); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char **argv) { int m = ORDER, period = PERIOD, pd = PADEORDER, i, j; FILE *fp = stdin, *fpe = NULL; Boolean aveflag = AVEFLAG; double alpha = ALPHA, lambda = LAMBDA, tau = TAU, step = STEP, eps = EPS, *mc, *b, *ep, *e, *bb, *d, *avemc, x, xx, ll, tt, gg, mu, ttx; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) if (**++argv == '-') { switch (*(*argv + 1)) { case 'a': alpha = atof(*++argv); --argc; break; case 'l': lambda = atof(*++argv); --argc; break; case 't': tau = atof(*++argv); --argc; break; case 'k': step = atof(*++argv); --argc; break; case 'm': m = atoi(*++argv); --argc; break; case 'p': period = atoi(*++argv); --argc; break; case 'P': pd = atoi(*++argv); --argc; break; case 's': aveflag = 1 - aveflag; break; case 'e': eps = atof(*++argv); --argc; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else fpe = getfp(*argv, "wb"); if ((pd < 4) || (pd > 5)) { fprintf(stderr, "%s : Order of Pade approximation should be 4 or 5!\n", cmnd); return (1); } mc = dgetmem(6 * (m + 1) + 3 * (pd + 1) + pd * (m + 2)); b = mc + m + 1; bb = b + m + 1; e = bb + m + 1; ep = e + m + 1; avemc = ep + m + 1; d = avemc + m + 1; j = period; ll = 1.0 - lambda; gg = 1.0; tt = 2 * (1.0 - tau); step /= (double) m; xx = 0.0; while (freadf(&x, sizeof(x), 1, fp) == 1) { for (i = 1; i <= m; i++) bb[i] = -b[i]; x = mlsadf(x, bb, m, alpha, pd, d); phidf(xx, m, alpha, e); xx = x; gg = gg * lambda + ll * x * x; gg = (gg < eps) ? eps : gg; b[0] = 0.5 * log(gg); mu = step / gg; ttx = tt * x; for (i = 1; i <= m; i++) { ep[i] = tau * ep[i] - ttx * e[i]; b[i] -= mu * ep[i]; } b2mc(b, mc, m, alpha); if (aveflag) for (i = 0; i <= m; i++) avemc[i] += mc[i]; if (fpe != NULL) fwritef(&x, sizeof(x), 1, fpe); if (--j == 0) { j = period; if (aveflag) { for (i = 0; i <= m; i++) avemc[i] /= period; fwritef(avemc, sizeof(*avemc), m + 1, stdout); fillz(avemc, sizeof(*avemc), m + 1); } else fwritef(mc, sizeof(*mc), m + 1, stdout); } } return (0); } SPTK-3.9/bin/average/0000755001051300105040000000000012637167675011347 500000000000000SPTK-3.9/bin/average/Makefile.am0000644001051300105040000000022212442245020013266 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = average average_SOURCES = _average.c average.c average_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/average/Makefile.in0000644001051300105040000004265612637167406013341 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = average$(EXEEXT) subdir = bin/average ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_average_OBJECTS = _average.$(OBJEXT) average.$(OBJEXT) average_OBJECTS = $(am_average_OBJECTS) average_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(average_SOURCES) DIST_SOURCES = $(average_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include average_SOURCES = _average.c average.c average_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/average/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/average/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) average$(EXEEXT): $(average_OBJECTS) $(average_DEPENDENCIES) $(EXTRA_average_DEPENDENCIES) @rm -f average$(EXEEXT) $(AM_V_CCLD)$(LINK) $(average_OBJECTS) $(average_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_average.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/average.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/average/_average.c0000644001051300105040000000755012637156630013200 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /*************************************************************** $Id: _average.c,v 1.18 2015/12/14 01:14:10 uratec Exp $ Calculation of Average double average(x, n) double *x : data sequence int n : data length return value : average of data ***************************************************************/ #include #if defined(WIN32) #include "SPTK.h" #else #include #endif double average(double *x, const int n) { int i; double sum = 0.0; for (i = 0; i < n; i++) sum += x[i]; return (sum / n); } void vaverage(double *x, const int l, const int num, double *ave) { int i, j; fillz(ave, sizeof(*ave), l); for (i = 0; i < num; i++) for (j = 0; j < l; j++) ave[j] += *x++; for (j = 0; j < l; j++) ave[j] /= (double) num; return; } SPTK-3.9/bin/average/average.c0000644001051300105040000001613412637156630013037 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * Calculation of Average * * * * 1996.1 K.Koishida * * * * usage: * * average [ options ] [ infile ] > stdout * * options: * * -l l : frame length [0] * * -n n : order of sequence [l-1] * * infile: * * data sequence * * , x(0), x(1), ..., x(l-1), * * stdout: * * average * * , (x(0)+x(1)...+x(l-1))/l, * * notice: * * if l>0, calculate average frame by frame * * require: * * average() * * * ************************************************************************/ static char *rcs_id = "$Id: average.c,v 1.28 2015/12/14 01:14:10 uratec Exp $"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define LENG 0 /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - calculation of average \n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -l l : frame length [%d]\n", LENG); fprintf(stderr, " -n n : order of sequence [l-1]\n"); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " data sequence (%s) [stdin]\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " average (%s)\n", FORMAT); fprintf(stderr, " notice:\n"); fprintf(stderr, " if l > 0, calculate average frame by frame\n"); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char **argv) { int l = LENG, num = 0; FILE *fp = stdin; double *x, xx, ave = 0.0; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) if (**++argv == '-') { switch (*(*argv + 1)) { case 'l': l = atoi(*++argv); --argc; break; case 'n': l = atoi(*++argv) + 1; --argc; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else fp = getfp(*argv, "rb"); if (l > 0) { x = dgetmem(l); while (freadf(x, sizeof(*x), l, fp) == l) { ave = average(x, l); fwritef(&ave, sizeof(ave), 1, stdout); } } else { while (freadf(&xx, sizeof(xx), 1, fp) == 1) { ave += xx; num++; } ave /= num; fwritef(&ave, sizeof(ave), 1, stdout); } return (0); } SPTK-3.9/bin/b2mc/0000755001051300105040000000000012637167676010561 500000000000000SPTK-3.9/bin/b2mc/Makefile.am0000644001051300105040000000020312442245015012502 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = b2mc b2mc_SOURCES = _b2mc.c b2mc.c b2mc_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/b2mc/Makefile.in0000644001051300105040000004254312637167406012545 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = b2mc$(EXEEXT) subdir = bin/b2mc ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_b2mc_OBJECTS = _b2mc.$(OBJEXT) b2mc.$(OBJEXT) b2mc_OBJECTS = $(am_b2mc_OBJECTS) b2mc_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(b2mc_SOURCES) DIST_SOURCES = $(b2mc_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include b2mc_SOURCES = _b2mc.c b2mc.c b2mc_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/b2mc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/b2mc/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) b2mc$(EXEEXT): $(b2mc_OBJECTS) $(b2mc_DEPENDENCIES) $(EXTRA_b2mc_DEPENDENCIES) @rm -f b2mc$(EXEEXT) $(AM_V_CCLD)$(LINK) $(b2mc_OBJECTS) $(b2mc_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_b2mc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b2mc.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/b2mc/_b2mc.c0000644001051300105040000000737412637156627011634 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /*************************************************************** $Id: _b2mc.c,v 1.16 2015/12/14 01:14:10 uratec Exp $ Transform MLSA Digital Filter Coefficients to Mel Cepstrum void b2mc(b, mc, m, a) double *b : MLSA digital filter coefficients double *mc : mel cepstral coefficients int m : order of mel cepstrum double a : all-pass constant ***************************************************************/ #include #if defined(WIN32) #include "SPTK.h" #else #include #endif void b2mc(double *b, double *mc, int m, const double a) { double d, o; d = mc[m] = b[m]; for (m--; m >= 0; m--) { o = b[m] + a * d; d = b[m]; mc[m] = o; } return; } SPTK-3.9/bin/b2mc/b2mc.c0000644001051300105040000001540712637156627011471 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * Transform MLSA Digital Filter Coefficients to Mel Cepstrum * * * * 1995.12 K.Koishida * * * * usage: * * b2mc [ options ] [ infile ] > stdout * * options: * * -m m : order of mel cepstrum [25] * * -a a : all-pass constant [0.35] * * infile: * * MLSA filter coefficients * * , b(0), b(1), ..., b(M), * * stdout: * * mel cepstral coefficients * * , c~(0), c~(1), ..., c~(M), * * require: * * b2mc() * * * ************************************************************************/ static char *rcs_id = "$Id: b2mc.c,v 1.25 2015/12/14 01:14:10 uratec Exp $"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define ALPHA 0.35 #define ORDER 25 /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - transform MLSA digital filter coefficients\n", cmnd); fprintf(stderr, " to mel-cepstrum \n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -m m : order of mel cepstrum [%d]\n", ORDER); fprintf(stderr, " -a a : all-pass constant [%g]\n", ALPHA); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " MLSA filter coefficients (%s) [stdin]\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " mel-cepstrum (%s)\n", FORMAT); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char **argv) { int m = ORDER, m1; FILE *fp = stdin; double a = ALPHA, *x; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) if (**++argv == '-') { switch (*(*argv + 1)) { case 'a': a = atof(*++argv); --argc; break; case 'm': m = atoi(*++argv); --argc; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else fp = getfp(*argv, "rb"); m1 = m + 1; x = dgetmem(m1); while (freadf(x, sizeof(*x), m1, fp) == m1) { b2mc(x, x, m, a); fwritef(x, sizeof(*x), m1, stdout); } return (0); } SPTK-3.9/bin/bcp/0000755001051300105040000000000012637167676010502 500000000000000SPTK-3.9/bin/bcp/Makefile.am0000644001051300105040000000016712442245020012430 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = bcp bcp_SOURCES = bcp.c bcp_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/bcp/Makefile.in0000644001051300105040000004236012637167406012463 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = bcp$(EXEEXT) subdir = bin/bcp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_bcp_OBJECTS = bcp.$(OBJEXT) bcp_OBJECTS = $(am_bcp_OBJECTS) bcp_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(bcp_SOURCES) DIST_SOURCES = $(bcp_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include bcp_SOURCES = bcp.c bcp_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/bcp/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/bcp/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) bcp$(EXEEXT): $(bcp_OBJECTS) $(bcp_DEPENDENCIES) $(EXTRA_bcp_DEPENDENCIES) @rm -f bcp$(EXEEXT) $(AM_V_CCLD)$(LINK) $(bcp_OBJECTS) $(bcp_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bcp.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/bcp/bcp.c0000644001051300105040000004002212637156630011314 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * Block Copy * * * * 1988.7 T.Kobayashi * * 1996.5 K.Koishida * * * * usage: * * bcp [options] [infile] > stdout * * options: * * -l l : number of items contained 1 block [512] * * -L L : number of destination block size [N/A] * * -n n : order of items contained 1 block [l-1] * * -N N : order of destination block size [N/A] * * -s s : start number [0] * * -S S : start number in destination block [0] * * -e e : end number [EOF] * * -f f : fill into empty block [0.0] * * +type : data type [f] * * c (char) C (unsigned char) * * s (short) S (unsigned short) * * i (int) I (unsigned int) * * i3 (int, 3byte) I3 (unsigned int, 3byte) * * l (long) L (unsigned long) * * le (long long) LE (unsigned long long) * * f (float) d (double) * * de (long double) a (ascii) * * infile: * * data sequence [stdin] * * stdout: * * copied data sequence * * notice: * * When both (-L and -N) or (-l and -n) are specified, * * latter argument is adopted. * * * ************************************************************************/ static char *rcs_id = "$Id: bcp.c,v 1.31 2015/12/14 01:14:10 uratec Exp $"; /* Standard C Libraries */ #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #include #include #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define START 0 #define END -1 #define DSTART 0 #define ITEM 512 #define DITEM 0 #define FILL 0.0 /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - block copy\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -l l : number of items contained 1 block [%d]\n", ITEM); fprintf(stderr, " -L L : number of destination block size [N/A]\n"); fprintf(stderr, " -n n : order of items contained 1 block [l-1]\n"); fprintf(stderr, " -N N : order of destination block size [N/A]\n"); fprintf(stderr, " -s s : start number [%d]\n", START); fprintf(stderr, " -S S : start number in destination block [%d]\n", DSTART); fprintf(stderr, " -e e : end number [EOF]\n"); fprintf(stderr, " -f f : fill into empty block [%g]\n", FILL); fprintf(stderr, " +type : data type [f]\n"); fprintf(stderr, " c (char, %lubyte) C (unsigned char, %lubyte)\n", (unsigned long) sizeof(char), (unsigned long) sizeof(unsigned char)); fprintf(stderr, " s (short, %lubyte) S (unsigned short, %lubyte)\n", (unsigned long) sizeof(short), (unsigned long) sizeof(unsigned short)); fprintf(stderr, " i3 (int, 3byte) I3 (unsigned int, 3byte)\n"); fprintf(stderr, " i (int, %lubyte) I (unsigned int, %lubyte)\n", (unsigned long) sizeof(int), (unsigned long) sizeof(unsigned int)); fprintf(stderr, " l (long, %lubyte) L (unsigned long, %lubyte)\n", (unsigned long) sizeof(long), (unsigned long) sizeof(unsigned long)); fprintf(stderr, " le (long long, %lubyte) LE (unsigned long long, %lubyte)\n", (unsigned long) sizeof(long long), (unsigned long) sizeof(unsigned long long)); fprintf(stderr, " f (float, %lubyte) d (double, %lubyte)\n", (unsigned long) sizeof(float), (unsigned long) sizeof(double)); fprintf(stderr, " de (long double, %lubyte)\n", (unsigned long) sizeof(long double)); fprintf(stderr, " a (ascii)\n"); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " data sequence [stdin]\n"); fprintf(stderr, " stdout:\n"); fprintf(stderr, " copied data sequence\n"); fprintf(stderr, " notice:\n"); fprintf(stderr, " When both (-L and -N) or (-l and -n) are specified,\n"); fprintf(stderr, " latter argument is adopted.\n"); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int sno = START, eno = END, dsno = DSTART, size = sizeof(float), nitems = ITEM, dnitems = DITEM; long double fl = FILL; char type = 'f'; union typex { char c; short s; int i; int i3; long l; long long le; unsigned char C; unsigned short S; unsigned int I; unsigned int I3; unsigned long L; unsigned long long LE; float f; double d; long double de; } fillx; int main(int argc, char **argv) { FILE *fp = stdin; char *s, c; void bcp(FILE * fp); if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) if (*(s = *++argv) == '-') { c = *++s; switch (c) { case 'n': nitems = atoi(*++argv) + 1; --argc; break; case 'N': dnitems = atoi(*++argv) + 1; --argc; break; case 'b': nitems = atoi(*++argv); --argc; break; case 'l': nitems = atoi(*++argv); --argc; break; case 'B': dnitems = atoi(*++argv); --argc; break; case 'L': dnitems = atoi(*++argv); --argc; break; case 's': sno = atoi(*++argv); --argc; break; case 'S': dsno = atoi(*++argv); --argc; break; case 'e': eno = atoi(*++argv) + 1; --argc; break; case 'f': fl = atof(*++argv); --argc; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else if (*s == '+') { type = *++s; switch (type) { case 'a': size = 0; break; case 'c': size = sizeof(char); break; case 's': size = sizeof(short); break; case 'i': if (*(s + 1) == '3') { size = 3; type = 't'; (*argv)++; } else { size = sizeof(int); } break; case 'l': if (*(s + 1) == 'e') { size = sizeof(long long); type = 'u'; (*argv)++; } else { size = sizeof(long); } break; case 'C': size = sizeof(unsigned char); break; case 'S': size = sizeof(unsigned short); break; case 'I': if (*(s + 1) == '3') { size = 3; type = 'T'; (*argv)++; } else { size = sizeof(unsigned int); } break; case 'L': if (*(s + 1) == 'E') { size = sizeof(unsigned long long); type = 'U'; (*argv)++; } else { size = sizeof(unsigned long); } break; case 'f': size = sizeof(float); break; case 'd': if (*(s + 1) == 'e') { size = sizeof(long double); type = 'v'; (*argv)++; } else { size = sizeof(double); } break; default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else if (size == 0) fp = getfp(*argv, "rt"); else fp = getfp(*argv, "rb"); if (eno < 0) eno = nitems; if (sno < 0 || sno >= nitems || sno > eno || eno > nitems || dsno < 0) return (1); if (dnitems == 0) dnitems = eno - sno + dsno; bcp(fp); return (0); } void bcp(FILE * fp) { char *buf, *lz = NULL, *fz = NULL; int ibytes, obytes, offset, nlz, nfz; void acopy(FILE * fp); void filln(char *ptr, int size, int nitem); switch (type) { case 'c': fillx.c = (char) fl; break; case 's': fillx.s = (short) fl; break; case 'i': fillx.i = (int) fl; break; case 't': fillx.i3 = (int) fl; break; case 'l': fillx.l = (long) fl; break; case 'u': fillx.le = (long long) fl; break; case 'C': fillx.c = (unsigned char) fl; break; case 'S': fillx.s = (unsigned short) fl; break; case 'I': fillx.i = (unsigned int) fl; break; case 'T': fillx.I3 = (unsigned int) fl; break; case 'L': fillx.l = (unsigned long) fl; break; case 'U': fillx.le = (unsigned long long) fl; break; case 'f': fillx.f = (float) fl; break; case 'd': fillx.d = (double) fl; break; case 'v': fillx.de = (long double) fl; break; case 'a': break; } if (size == 0) { acopy(fp); return; } ibytes = size * nitems; offset = size * sno; obytes = size * (eno - sno); nlz = size * dsno; nfz = ((nfz = size * dnitems - nlz - obytes) < 0) ? 0 : nfz; if ((buf = (char *) dgetmem(ibytes + nlz + nfz)) == NULL) return; if (nlz) { lz = buf + ibytes; filln(lz, size, nlz); } if (nfz) { fz = buf + ibytes + nlz; filln(fz, size, nfz); } while (freadx(buf, sizeof(*buf), ibytes, fp) == ibytes) { if (nlz) fwritex(lz, sizeof(*lz), nlz, stdout); fwritex(buf + offset, sizeof(*buf), obytes, stdout); if (nfz) fwritex(fz, sizeof(*fz), nfz, stdout); } } void acopy(FILE * fp) { char s[512]; int n, dn; int getstr(FILE * fp, char *s); for (dn = 0; !feof(fp);) { for (n = 0; n < sno; n++) if (getstr(fp, s) == 0) break; for (; n < eno; n++) { if (getstr(fp, s) == 0) break; if (dn++) putchar(' '); printf("%s", s); if (dn == dnitems) { putchar('\n'); dn = 0; } } for (; n < nitems; n++) if (getstr(fp, s) == 0) break; } } int getstr(FILE * fp, char *s) { int c; while ((c = getc(fp)) == ' ' || c == 't' || c == '\n' || c == ','); if (c == EOF) return (0); for (*s++ = c; (c = getc(fp)) != EOF && c != ' ' && c != '\t' && c != '\n' && c != ',';) *s++ = c; *s = '\0'; return (1); } void filln(char *ptr, int size, int nitem) { int i; char *c; nitem = nitem / size; while (nitem--) { c = &fillx.c; for (i = 1; i <= size; i++) { *ptr++ = *c++; } } } SPTK-3.9/bin/bcut/0000755001051300105040000000000012637167676010673 500000000000000SPTK-3.9/bin/bcut/Makefile.am0000644001051300105040000000017312442245021012617 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = bcut bcut_SOURCES = bcut.c bcut_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/bcut/Makefile.in0000644001051300105040000004240612637167406012655 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = bcut$(EXEEXT) subdir = bin/bcut ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_bcut_OBJECTS = bcut.$(OBJEXT) bcut_OBJECTS = $(am_bcut_OBJECTS) bcut_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(bcut_SOURCES) DIST_SOURCES = $(bcut_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include bcut_SOURCES = bcut.c bcut_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/bcut/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/bcut/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) bcut$(EXEEXT): $(bcut_OBJECTS) $(bcut_DEPENDENCIES) $(EXTRA_bcut_DEPENDENCIES) @rm -f bcut$(EXEEXT) $(AM_V_CCLD)$(LINK) $(bcut_OBJECTS) $(bcut_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bcut.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/bcut/bcut.c0000644001051300105040000002677712637156630011723 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * Binary File Cut * * * * 1990.3 K.Tokuda * * 1996.5 K.Koishida * * * * usage: * * bcut [options] [infile] > stdout * * options: * * -s s : start number [0] * * -e e : end number [EOF] * * -l l : block length [1] * * -n n : block order [l-1] * * +type : data type [f] * * c (char) C (unsigned char) * * s (short) S (unsigned short) * * i (int) I (unsigned int) * * i3 (int, 3byte) I3 (unsigned int, 3byte) * * l (long) L (unsigned long) * * le (long long) LE (unsigned long long) * * f (float) d (double) * * de (long double) * * infile: * * data sequence [stdin] * * stdout: * * cut data sequence * * notice: * * When both -l and -n are specified, * * latter argument is adopted. * * * ************************************************************************/ static char *rcs_id = "$Id: bcut.c,v 1.33 2015/12/14 01:14:11 uratec Exp $"; /* Standard C Libraries */ #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #include #include #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define START 0 #define END -1 #define LENG 1 #define SIGNED_INT3 FA #define UNSIGNED_INT3 FA /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - binary file cut\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -s s : start number [%d]\n", START); fprintf(stderr, " -e e : end number [EOF]\n"); fprintf(stderr, " -l l : block length [%d]\n", LENG); fprintf(stderr, " -n n : block order [l-1]\n"); fprintf(stderr, " +type : data type [f]\n"); fprintf(stderr, " c (char, %lubyte) C (unsigned char, %lubyte)\n", (unsigned long) sizeof(char), (unsigned long) sizeof(unsigned char)); fprintf(stderr, " s (short, %lubyte) S (unsigned short, %lubyte)\n", (unsigned long) sizeof(short), (unsigned long) sizeof(unsigned short)); fprintf(stderr, " i3 (int, 3byte) I3 (unsigned int, 3byte)\n"); fprintf(stderr, " i (int, %lubyte) I (unsigned int, %lubyte)\n", (unsigned long) sizeof(int), (unsigned long) sizeof(unsigned int)); fprintf(stderr, " l (long, %lubyte) L (unsigned long, %lubyte)\n", (unsigned long) sizeof(long), (unsigned long) sizeof(unsigned long)); fprintf(stderr, " le (long long, %lubyte) LE (unsigned long long, %lubyte)\n", (unsigned long) sizeof(long long), (unsigned long) sizeof(unsigned long long)); fprintf(stderr, " f (float, %lubyte) d (double, %lubyte)\n", (unsigned long) sizeof(float), (unsigned long) sizeof(double)); fprintf(stderr, " de (long double, %lubyte)\n", (unsigned long) sizeof(long double)); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " data sequence [stdin]\n"); fprintf(stderr, " stdout:\n"); fprintf(stderr, " cut data sequence\n"); fprintf(stderr, " notice:\n"); fprintf(stderr, " When both -l and -n are specified,\n"); fprintf(stderr, " latter argument is adopted.\n"); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char **argv) { size_t size = sizeof(float); int n = LENG; long long start = START, end = END, ptr; FILE *fp = stdin; char *s, c; Boolean int3flg = SIGNED_INT3, uint3flg = UNSIGNED_INT3; long int y = 0, z = 0; long double x; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) if (*(s = *++argv) == '-') { c = *++s; switch (c) { case 's': start = atol(*++argv); --argc; break; case 'e': end = atol(*++argv); --argc; break; case 'l': n = atol(*++argv); --argc; break; case 'n': n = atol(*++argv) + 1; --argc; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else if (*s == '+') { c = *++s; switch (c) { case 'c': size = sizeof(char); break; case 's': size = sizeof(short); break; case 'i': if (*(s + 1) == '3') { size = 3; int3flg = TR; (*argv)++; } else { size = sizeof(int); } break; case 'l': if (*(s + 1) == 'e') { size = sizeof(long long); (*argv)++; } else { size = sizeof(long); } break; case 'C': size = sizeof(unsigned char); break; case 'S': size = sizeof(unsigned short); break; case 'I': if (*(s + 1) == '3') { size = 3; uint3flg = TR; (*argv)++; } else { size = sizeof(unsigned int); } break; case 'L': if (*(s + 1) == 'E') { size = sizeof(unsigned long long); (*argv)++; } else { size = sizeof(unsigned long); } break; case 'f': size = sizeof(float); break; case 'd': if (*(s + 1) == 'e') { size = sizeof(long double); (*argv)++; } else { size = sizeof(double); } break; default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else fp = getfp(*argv, "rb"); ptr = start * n; while (ptr--) if (freadx(&x, size, 1, fp) != 1) return (0); ptr = (end - start + 1) * n; while (end == -1 || ptr--) { if (freadx(&x, size, 1, fp) != 1) break; if (int3flg == TR || uint3flg == TR) { memcpy(&z, &x, size); y = z & 0x00FFFFFF; if (int3flg == TR && y >> 23 == 1) y = y | 0xFF000000; fwritex(&y, size, 1, stdout); } else fwritex(&x, size, 1, stdout); } return (0); } SPTK-3.9/bin/c2acr/0000755001051300105040000000000012637167676010730 500000000000000SPTK-3.9/bin/c2acr/Makefile.am0000644001051300105040000000021012442245023012646 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = c2acr c2acr_SOURCES = _c2acr.c c2acr.c c2acr_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/c2acr/Makefile.in0000644001051300105040000004257412637167407012721 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = c2acr$(EXEEXT) subdir = bin/c2acr ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_c2acr_OBJECTS = _c2acr.$(OBJEXT) c2acr.$(OBJEXT) c2acr_OBJECTS = $(am_c2acr_OBJECTS) c2acr_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(c2acr_SOURCES) DIST_SOURCES = $(c2acr_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include c2acr_SOURCES = _c2acr.c c2acr.c c2acr_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/c2acr/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/c2acr/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) c2acr$(EXEEXT): $(c2acr_OBJECTS) $(c2acr_DEPENDENCIES) $(EXTRA_c2acr_DEPENDENCIES) @rm -f c2acr$(EXEEXT) $(AM_V_CCLD)$(LINK) $(c2acr_OBJECTS) $(c2acr_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_c2acr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c2acr.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/c2acr/_c2acr.c0000644001051300105040000001032512637156630012132 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /**************************************************************** $Id: _c2acr.c,v 1.17 2015/12/14 01:14:11 uratec Exp $ Transformation Cepstrum to Autocorrelation void c2acr(c, m1, r, m2, flng) double *c : cepstral coefficients int m1 : order of cepstrum double *r : autocorrelation coefficients int m2 : order of autocorrelation int flng : FFT length ****************************************************************/ #include #include #include #if defined(WIN32) #include "SPTK.h" #else #include #endif void c2acr(double *c, const int m1, double *r, const int m2, const int flng) { int i; static double *x = NULL, *y; static int size; if (x == NULL) { x = dgetmem(flng + flng); y = x + flng; size = flng; } if (flng > size) { free(x); x = dgetmem(flng + flng); y = x + flng; size = flng; } movem(c, x, sizeof(*c), m1 + 1); fillz(&x[m1 + 1], sizeof(*x), flng - m1 - 1); fftr(x, y, flng); for (i = 0; i < flng; i++) x[i] = exp(2.0 * x[i]); fftr(x, y, flng); for (i = 0; i <= m2; i++) r[i] = x[i] / flng; return; } SPTK-3.9/bin/c2acr/c2acr.c0000644001051300105040000001610212637156630011772 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * Transform Cepstrum to Autocorrelation * * * * 1986.9 K.Tokuda * * 1996.1 K.Koishida * * * * usage: * * c2acr [ options ] [ infile ] > stdout * * options: * * -m m : order of cepstrum [25] * * -M M : order of autocorrelation [25] * * -l l : FFT length [256] * * infile: * * cepstral coefficients * * , c(0), c(1), ..., c(M), * * stdout: * * autocorrelation coefficeints * * , r(0), r(1), ..., r(N), * * require: * * c2acr() * * * ************************************************************************/ static char *rcs_id = "$Id: c2acr.c,v 1.28 2015/12/14 01:14:11 uratec Exp $"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define ORDERC 25 #define ORDERR 25 #define FLENG 256 /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - transform cepstrum to autocorrelation\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -m m : order of cepstrum [%d]\n", ORDERC); fprintf(stderr, " -M M : order of autocorrelation [%d]\n", ORDERR); fprintf(stderr, " -l l : FFT length [%d]\n", FLENG); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " cepstrum (%s) [stdin]\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " autocorrelation (%s)\n", FORMAT); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char **argv) { int m = ORDERC, n = ORDERR, l = FLENG; FILE *fp = stdin; double *c, *r; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) if (**++argv == '-') { switch (*(*argv + 1)) { case 'm': m = atoi(*++argv); --argc; break; case 'M': n = atoi(*++argv); --argc; break; case 'l': l = atoi(*++argv); --argc; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else fp = getfp(*argv, "rb"); c = dgetmem(m + n + 2); r = c + m + 1; while (freadf(c, sizeof(*c), m + 1, fp) == m + 1) { c2acr(c, m, r, n, l); fwritef(r, sizeof(*r), n + 1, stdout); } return (0); } SPTK-3.9/bin/c2ir/0000755001051300105040000000000012637167676010575 500000000000000SPTK-3.9/bin/c2ir/Makefile.am0000644001051300105040000000020312442245025012517 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = c2ir c2ir_SOURCES = _c2ir.c c2ir.c c2ir_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/c2ir/Makefile.in0000644001051300105040000004254312637167407012562 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = c2ir$(EXEEXT) subdir = bin/c2ir ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_c2ir_OBJECTS = _c2ir.$(OBJEXT) c2ir.$(OBJEXT) c2ir_OBJECTS = $(am_c2ir_OBJECTS) c2ir_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(c2ir_SOURCES) DIST_SOURCES = $(c2ir_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include c2ir_SOURCES = _c2ir.c c2ir.c c2ir_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/c2ir/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/c2ir/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) c2ir$(EXEEXT): $(c2ir_OBJECTS) $(c2ir_DEPENDENCIES) $(EXTRA_c2ir_DEPENDENCIES) @rm -f c2ir$(EXEEXT) $(AM_V_CCLD)$(LINK) $(c2ir_OBJECTS) $(c2ir_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_c2ir.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c2ir.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/c2ir/_c2ir.c0000644001051300105040000001076412637156630011653 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /****************************************************************** $Id: _c2ir.c,v 1.16 2015/12/14 01:14:11 uratec Exp $ cepstrum to impulse response c2ir(c,nc,h,leng) double *c : cepstral sequence int nc : order of cepstrum double *h : impulse response int leng : length of impulse response impulse response to cepstrum ic2ir(h,leng,nc,c) double *h : impulse response int nc : order of cepstrum double *c : cepstral sequence int leng : length of impulse response Naohiro Isshiki, Dec.1995 ********************************************************************/ #include #include void c2ir(double *c, const int nc, double *h, const int leng) { int n, k, upl; double d; h[0] = exp(c[0]); for (n = 1; n < leng; n++) { d = 0; upl = (n >= nc) ? nc - 1 : n; for (k = 1; k <= upl; k++) d += k * c[k] * h[n - k]; h[n] = d / n; } return; } void ic2ir(double *h, const int leng, double *c, const int nc) { int n, k, upl; double d; c[0] = log(h[0]); for (n = 1; n < nc; n++) { d = (n >= leng) ? 0 : n * h[n]; upl = (n > leng) ? n - leng + 1 : 1; for (k = upl; k < n; k++) d -= k * c[k] * h[n - k]; c[n] = d / (n * h[0]); } return; } SPTK-3.9/bin/c2ir/c2ir.c0000644001051300105040000001631112637156630011506 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * Cepstrum to minimum phase Impulse Response * * 1988.8 T.Kobayashi * * 1995.12 N.Isshiki modified * * * * usage: * * c2ir [ options ] [ infile ] > stdout * * options: * * -m m : order of cepstrum [25] * * -M M : order of impulse response [255] * * -l l : length of impulse responce [256] * * -i : input minimum phase sequence [FALSE] * * infile: * * stdin for default * * input is assumed to be float * * * ************************************************************************/ static char *rcs_id = "$Id: c2ir.c,v 1.29 2015/12/14 01:14:11 uratec Exp $"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define LENG 256 #define ORDER 25 /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - cepstrum to minimum phase impulse response\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -m m : order of cepstrum [%d]\n", ORDER); fprintf(stderr, " -M M : order of impulse response [%d]\n", LENG - 1); fprintf(stderr, " -l l : length of impulse response [%d]\n", LENG); fprintf(stderr, " -i : input minimum phase sequence [FALSE]\n"); fprintf(stderr, " -h : print this message\n\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " cepstrum (%s) [stdin]\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " impulse response (%s)\n", FORMAT); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char *argv[]) { FILE *fp; double *buf, *x; char *s, *infile = NULL, c; int nr; int leng = LENG, nc = ORDER + 1, is_i = 0; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) { if (*(s = *++argv) == '-') { c = *++s; if (c != 'i' && *++s == '\0') { s = *++argv; --argc; } switch (c) { case 'i': is_i = 1; break; case 'm': nc = atoi(s) + 1; break; case 'M': leng = atoi(s) + 1; break; case 'l': leng = atoi(s); break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, c); usage(1); } } else infile = s; } if (infile) { fp = getfp(infile, "rb"); } else fp = stdin; nr = leng + nc; buf = dgetmem(nr); nr = (is_i) ? leng : nc; while (freadf(buf, sizeof(*buf), nr, fp) == nr) { if (!is_i) { x = buf + nc; c2ir(buf, nc, x, leng); fwritef(x, sizeof(*x), leng, stdout); } else { x = buf + leng; ic2ir(buf, leng, x, nc); fwritef(x, sizeof(*x), nc, stdout); } } return (0); } SPTK-3.9/bin/c2ndps/0000755001051300105040000000000012637167676011127 500000000000000SPTK-3.9/bin/c2ndps/Makefile.am0000644001051300105040000000021512442245061013054 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = c2ndps c2ndps_SOURCES = _c2ndps.c c2ndps.c c2ndps_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/c2ndps/Makefile.in0000644001051300105040000004262512637167407013115 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = c2ndps$(EXEEXT) subdir = bin/c2ndps ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_c2ndps_OBJECTS = _c2ndps.$(OBJEXT) c2ndps.$(OBJEXT) c2ndps_OBJECTS = $(am_c2ndps_OBJECTS) c2ndps_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(c2ndps_SOURCES) DIST_SOURCES = $(c2ndps_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include c2ndps_SOURCES = _c2ndps.c c2ndps.c c2ndps_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/c2ndps/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/c2ndps/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) c2ndps$(EXEEXT): $(c2ndps_OBJECTS) $(c2ndps_DEPENDENCIES) $(EXTRA_c2ndps_DEPENDENCIES) @rm -f c2ndps$(EXEEXT) $(AM_V_CCLD)$(LINK) $(c2ndps_OBJECTS) $(c2ndps_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_c2ndps.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c2ndps.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/c2ndps/_c2ndps.c0000644001051300105040000000755112637156636012545 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /*************************************************************** $Id: _c2ndps.c,v 1.2 2015/12/14 01:14:11 uratec Exp $ Transform Cepstrum to Negative Derivative of Phase Spectrum (NDPS) void c2ndps(c, m, n, l) double *c : cepstrum int m : order of cepstrum double *n : NDPS double l : FFT length ***************************************************************/ #include #include #include #if defined(WIN32) #include "SPTK.h" #else #include #endif void c2ndps(double *c, const int m, double *n, const int l) { int i; double *tmp; fillz(n, sizeof(*n), l); tmp = dgetmem(l); // generate mc(m) for (i = 1; i < m + 1; i++) { n[i] = c[i] * i / 2.0; n[l - i] = n[i]; } fftr(n, tmp, l); free(tmp); } SPTK-3.9/bin/c2ndps/c2ndps.c0000644001051300105040000002057512637156636012407 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * Transform Cepstrum to Negative Derivative of Phase Spectrum (NDPS) * * * * 1986.9 K.Tokuda * * 2014.1 T.Aritake * * * * usage: * * c2ndps [ options ] [ infile ] > stdout * * options: * * -m M : order of cepstrum [25] * * -l L : FFT length [256] * * (level 2) * * -p : extract only pole part * * -z : extract only zero part * * stdin: * * mixed phase cepstrum (real) * * , c(0), c(1), ..., c(M), * * stdout: * * Negative Derivative of Phase Spectrum (NDPS) (real) * * , n(0), n(1), ..., n(L/2) * * * ************************************************************************/ static char *rcs_id = ""; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #include #include #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define ORDER 25 #define FLENG 256 /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - transform cepstrum to Negative Derivative of Phase Spectrum (NDPS)\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -m M : order of cepstrum [%d]\n", ORDER); fprintf(stderr, " -l L : FFT length [%d]\n", FLENG); fprintf(stderr, " (level 2)\n"); fprintf(stderr, " -p : extract only pole part [FALSE]\n"); fprintf(stderr, " -z : extract only zero part [FALSE]\n"); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " cepstrum (%s) [stdin]\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " Negative Derivative of Phase Spectrum (NDPS)(%s)\n", FORMAT); fprintf(stderr, " notice:\n"); fprintf(stderr, " The output NDPS doesn't have the information of c(0)."); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char **argv) { int m = ORDER, l = FLENG, pz = 0, i; FILE *fp = stdin; double *c, *n; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) if (**++argv == '-') { switch (*(*argv + 1)) { case 'm': case 'l': if (isdigit(**(argv + 1)) == 0) { if ((**(argv + 1)) != '+') { fprintf(stderr, "%s : %s option need positive value !\n", cmnd, *argv); usage(1); } else if (isdigit(*(*(argv + 1) + 1)) == 0) { fprintf(stderr, "%s : %s option need positive value !\n", cmnd, *argv); usage(1); } } if ((*(*argv + 1)) == 'm') m = atoi(*++argv); else if ((*(*argv + 1)) == 'l') l = atoi(*++argv); --argc; break; case 'p': case 'z': if (pz != 0) { fprintf(stderr, "%s : make a choice between -p and -z option !\n", cmnd); usage(1); } else if ((*(*argv + 1)) == 'p') pz = 1; else pz = -1; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else fp = getfp(*argv, "rb"); c = dgetmem(m + 1); n = dgetmem(l); while (freadf(c, sizeof(*c), m + 1, fp) == m + 1) { c2ndps(c, m, n, l); if (pz != 0) { for (i = 0; i < l; i++) { if (pz == 1 && n[i] < 0) n[i] = 0; else if (pz == -1 && n[i] > 0) n[i] = 0; } } fwritef(n, sizeof(*n), (l / 2) + 1, stdout); } free(c); free(n); return (0); } SPTK-3.9/bin/c2sp/0000755001051300105040000000000012637167677010606 500000000000000SPTK-3.9/bin/c2sp/Makefile.am0000644001051300105040000000020312442245027012531 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = c2sp c2sp_SOURCES = _c2sp.c c2sp.c c2sp_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/c2sp/Makefile.in0000644001051300105040000004254312637167407012572 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = c2sp$(EXEEXT) subdir = bin/c2sp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_c2sp_OBJECTS = _c2sp.$(OBJEXT) c2sp.$(OBJEXT) c2sp_OBJECTS = $(am_c2sp_OBJECTS) c2sp_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(c2sp_SOURCES) DIST_SOURCES = $(c2sp_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include c2sp_SOURCES = _c2sp.c c2sp.c c2sp_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/c2sp/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/c2sp/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) c2sp$(EXEEXT): $(c2sp_OBJECTS) $(c2sp_DEPENDENCIES) $(EXTRA_c2sp_DEPENDENCIES) @rm -f c2sp$(EXEEXT) $(AM_V_CCLD)$(LINK) $(c2sp_OBJECTS) $(c2sp_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_c2sp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c2sp.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/c2sp/_c2sp.c0000644001051300105040000000740112637156631011666 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /*************************************************************** $Id: _c2sp.c,v 1.16 2015/12/14 01:14:12 uratec Exp $ Transform cepstrum to spectrum void c2sp(c, m, sp, y, l) double *c : cepstrum int m : order of cepstrum double *x : real part of spectrum double *y : imaginary part of spectrum double l : FFT length ***************************************************************/ #include #if defined(WIN32) #include "SPTK.h" #else #include #endif void c2sp(double *c, const int m, double *x, double *y, const int l) { int m1; m1 = m + 1; movem(c, x, sizeof(*c), m1); fillz(x + m1, sizeof(*x), l - m1); fftr(x, y, l); } SPTK-3.9/bin/c2sp/c2sp.c0000644001051300105040000002251112637156631011526 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * Transform Cepstrum to Spectrum * * * * 1986. 9 K.Tokuda * * 1996. 4 K.Koishida * * * * usage: * * c2sp [ options ] [ infile ] > stdout * * options: * * -m m : order of cepstrum [25] * * -l l : frame length [256] * * -p : output phase [FALSE] * * -o o : output format [0] * * 0 (20 * log|H(z)|) * * 1 (ln|H(z)|) * * 2 (|H(z)|) * * -p option is specified * * 0 (arg|H(z)| / pi [pi rad]) * * 1 (arg|H(z)| [rad]) * * 2 (arg|H(z)| * 180 / pi [deg]) * * infile: * * cepstrum * * , c(0), c(1), ..., c(M), * * stdout: * * spectrum * * , s(0), s(1), ..., s(L/2), * * require: * * c2sp() * * * ************************************************************************/ static char *rcs_id = "$Id: c2sp.c,v 1.26 2015/12/14 01:14:12 uratec Exp $"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #include #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define ORDER 25 #define LENG 256 #define PHASE FA #define OTYPE 0 char *BOOL[] = { "FALSE", "TRUE" }; /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - transform cepstrum to spectrum\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -m m : order of cepstrum [%d]\n", ORDER); fprintf(stderr, " -l l : frame length [%d]\n", LENG); fprintf(stderr, " -p : output phase [%s]\n", BOOL[PHASE]); fprintf(stderr, " -o o : output format [%d]\n", OTYPE); fprintf(stderr, " 0 (20*log|H(z)|)\n"); fprintf(stderr, " 1 (ln|H(z)|)\n"); fprintf(stderr, " 2 (|H(z)|)\n"); fprintf(stderr, " -p option is specified\n"); fprintf(stderr, " 0 (arg|H(z)|/pi [pi rad])\n"); fprintf(stderr, " 1 (arg|H(z)| [rad])\n"); fprintf(stderr, " 2 (arg|H(z)|*180 / pi [deg])\n"); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " cepstrum (%s) [stdin]\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " spectrum (%s)\n", FORMAT); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char **argv) { int leng = LENG, m = ORDER, start = 0, end = 0, otype = OTYPE, i, no; FILE *fp = stdin; char phase = PHASE; double logk, *x, *y, *c; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) if (**++argv == '-') { switch (*(*argv + 1)) { case 'm': m = atoi(*++argv); --argc; break; case 'l': leng = atoi(*++argv); --argc; break; case 'p': phase = 1 - phase; break; case 'o': otype = atoi(*++argv); --argc; break; case 's': start = atoi(*++argv); --argc; break; case 'e': end = atoi(*++argv); --argc; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else fp = getfp(*argv, "rb"); if (end == 0) end = m; x = dgetmem(leng * 2); y = x + leng; c = dgetmem(m + 1); no = leng / 2 + 1; logk = 20.0 / log(10.0); while (freadf(c, sizeof(*c), m + 1, fp) == m + 1) { fillz(c, sizeof(*c), start); for (i = end + 1; i <= m; i++) c[i] = 0.0; c2sp(c, m, x, y, leng); if (phase) switch (otype) { case 1: for (i = no; i--;) x[i] = y[i]; break; case 2: for (i = no; i--;) x[i] = y[i] * 180 / PI; break; default: for (i = no; i--;) x[i] = y[i] / PI; break; } else switch (otype) { case 1: break; case 2: for (i = no; i--;) x[i] = exp(x[i]); break; default: for (i = no; i--;) x[i] *= logk; break; } fwritef(x, sizeof(*x), no, stdout); } return (0); } SPTK-3.9/bin/cat2/0000755001051300105040000000000012637167677010570 500000000000000SPTK-3.9/bin/cat2/Makefile.am0000644001051300105040000000017312442245027012521 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = cat2 cat2_SOURCES = cat2.c cat2_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/cat2/Makefile.in0000644001051300105040000004240612637167407012552 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = cat2$(EXEEXT) subdir = bin/cat2 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_cat2_OBJECTS = cat2.$(OBJEXT) cat2_OBJECTS = $(am_cat2_OBJECTS) cat2_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(cat2_SOURCES) DIST_SOURCES = $(cat2_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include cat2_SOURCES = cat2.c cat2_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/cat2/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/cat2/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) cat2$(EXEEXT): $(cat2_OBJECTS) $(cat2_DEPENDENCIES) $(EXTRA_cat2_DEPENDENCIES) @rm -f cat2$(EXEEXT) $(AM_V_CCLD)$(LINK) $(cat2_OBJECTS) $(cat2_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cat2.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/cat2/cat2.c0000644001051300105040000001401212637156631011467 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * concatenate and display files to the standard error * * * * 2000.6 S.Sako * * * * usage: * * cat2 [ options ] [ infile1 ] [ infile2 ] ... * * options: * * -n : output with line number [FALSE] * * * ************************************************************************/ static char *rcs_id = "$Id: cat2.c,v 1.24 2015/12/14 01:14:12 uratec Exp $"; /* Standard C Libraries **/ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - concatenate and display files to the standard error\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile1 ] [ infile2 ] ...\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -n : output with line number [FALSE]\n"); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " data sequence [stdin]\n"); fprintf(stderr, " notice:\n"); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char **argv) { int linenum = 0; int stdinmode = 0; char buf[512]; FILE *fp; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) { if (**++argv == '-') { switch (*(*argv + 1)) { case 'n': linenum = 1; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else { stdinmode = -1; fp = getfp(*argv, "rt"); while (fgets(buf, 512, fp) != 0) { if (linenum > 0) fprintf(stderr, "%6d ", linenum++); fputs(buf, stderr); } } } if (stdinmode == 0) { while (fgets(buf, 512, stdin) != 0) { if (linenum > 0) fprintf(stderr, "%6d ", linenum++); fputs(buf, stderr); } } return 0; } SPTK-3.9/bin/cdist/0000755001051300105040000000000012637167677011045 500000000000000SPTK-3.9/bin/cdist/Makefile.am0000644001051300105040000000017712442245030012774 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = cdist cdist_SOURCES = cdist.c cdist_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/cdist/Makefile.in0000644001051300105040000004243412637167407013030 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = cdist$(EXEEXT) subdir = bin/cdist ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_cdist_OBJECTS = cdist.$(OBJEXT) cdist_OBJECTS = $(am_cdist_OBJECTS) cdist_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(cdist_SOURCES) DIST_SOURCES = $(cdist_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include cdist_SOURCES = cdist.c cdist_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/cdist/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/cdist/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) cdist$(EXEEXT): $(cdist_OBJECTS) $(cdist_DEPENDENCIES) $(EXTRA_cdist_DEPENDENCIES) @rm -f cdist$(EXEEXT) $(AM_V_CCLD)$(LINK) $(cdist_OBJECTS) $(cdist_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdist.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/cdist/cdist.c0000644001051300105040000001757012637156631012235 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * Calculation of Cepstral Distance * * 1996.7 K.Koishida * * * * usage: * * cdist [ options ] cfile [ infile ] > stdout * * options: * * -m m : order of minimum-phase cepstrum [25] * * -o o : output format [0] * * 0 ([dB]) * * 1 (squared error) * * 2 (root squared error) * * -f : frame length [FALSE] * * cfile: * * infile: * * minimum-phase cepstrum * * , c(0), c(1), ..., c(m), * * stdout: * * cepstral distance * * * ************************************************************************/ static char *rcs_id = "$Id: cdist.c,v 1.26 2015/12/14 01:14:12 uratec Exp $"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #include #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define ORDER 25 #define FRAME FA #define OTYPE 0 char *BOOL[] = { "FALSE", "TRUE" }; /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - calculation of cepstral distance\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] cfile [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -m m : order of minimum-phase cepstrum [%d]\n", ORDER); fprintf(stderr, " -o o : output format [%d]\n", OTYPE); fprintf(stderr, " 0 ([dB])\n"); fprintf(stderr, " 1 (squared error)\n"); fprintf(stderr, " 2 (root squared error)\n"); fprintf(stderr, " -f : output frame by frame [%s]\n", BOOL[FRAME]); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " cfile:\n"); fprintf(stderr, " infile: [stdin]\n"); fprintf(stderr, " minimum-phase cepstrum (%s)\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " cepstral distance (%s)\n", FORMAT); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char **argv) { int m = ORDER, num = 0, otype = OTYPE, i; FILE *fp = stdin, *fp1 = NULL; double *x, *y, sub, sum, z = 0.0; Boolean frame = FRAME; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) if (**++argv == '-') { switch (*(*argv + 1)) { case 'm': m = atoi(*++argv); --argc; break; case 'o': otype = atoi(*++argv); --argc; break; case 'f': frame = 1 - frame; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else if (fp1 == NULL) fp1 = getfp(*argv, "rb"); else fp = getfp(*argv, "rb"); x = dgetmem(m + m + 2); y = x + m + 1; while (freadf(x, sizeof(*x), m + 1, fp) == m + 1 && freadf(y, sizeof(*y), m + 1, fp1) == m + 1) { sum = 0.0; for (i = 1; i <= m; i++) { sub = x[i] - y[i]; sum += sub * sub; } if (otype == 0) { sum = sqrt(2.0 * sum); sum *= LN_TO_LOG; } else if (otype == 2) sum = sqrt(sum); if (!frame) { z += sum; num++; } else fwritef(&sum, sizeof(sum), 1, stdout); } if (!frame) { z = z / (double) num; fwritef(&z, sizeof(z), 1, stdout); } return 0; } SPTK-3.9/bin/clip/0000755001051300105040000000000012637167677010666 500000000000000SPTK-3.9/bin/clip/Makefile.am0000644001051300105040000000020312442245031012604 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = clip clip_SOURCES = _clip.c clip.c clip_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/clip/Makefile.in0000644001051300105040000004254312637167407012652 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = clip$(EXEEXT) subdir = bin/clip ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_clip_OBJECTS = _clip.$(OBJEXT) clip.$(OBJEXT) clip_OBJECTS = $(am_clip_OBJECTS) clip_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(clip_SOURCES) DIST_SOURCES = $(clip_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include clip_SOURCES = _clip.c clip.c clip_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/clip/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/clip/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) clip$(EXEEXT): $(clip_OBJECTS) $(clip_DEPENDENCIES) $(EXTRA_clip_DEPENDENCIES) @rm -f clip$(EXEEXT) $(AM_V_CCLD)$(LINK) $(clip_OBJECTS) $(clip_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_clip.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clip.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/clip/_clip.c0000644001051300105040000001060712637156631012030 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /*************************************************************** * * * $Id: _clip.c,v 1.18 2015/12/14 01:14:12 uratec Exp $ * * * * Data clipping * * 1996.3.14 * * * * synopsis: * * clip(x, l, min, max, y) * * * * double *x : input sequence * * int l : sequence length * * double min : lower bound * * double max : upper bound * * double *y : output area * * * ***************************************************************/ #include #if defined(WIN32) #include "SPTK.h" #else #include #endif void clip(double *x, const int l, const double min, const double max, double *y) { int i; for (i = 0; i < l; i++) y[i] = (x[i] < min) ? min : ((x[i] > max) ? max : x[i]); } SPTK-3.9/bin/clip/clip.c0000644001051300105040000001615012637156631011670 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * data clipping * * * * 1989.8.31 K.Tokuda * * * * usage: * * clip [option] [infile] > stdout * * options: * * -y ymin ymax : lower bound & upper bound [-1.0 1.0] * * -ymin ymin : lower bound (ymax = inf) [N/A] * * -ymax ymax : upper bound (ymin = -inf) [N/A] * * infile: * * data sequence (float) * * stdout: * * clipped data sequence (float) * * require: * * clip() * * * ************************************************************************/ static char *rcs_id = "$Id: clip.c,v 1.24 2015/12/14 01:14:12 uratec Exp $"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Value */ #define FLT_MAX 3.4e+38 #define FLT_MIN -3.4e+38 #define YMIN -1.0 #define YMAX 1.0 /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - data clipping\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ option ] [ infile ] > outfile\n", cmnd); fprintf(stderr, " option:\n"); fprintf(stderr, " -y ymin ymax : lower bound & upper bound [-1.0 1.0]\n"); fprintf(stderr, " -ymin ymin : lower bound (ymax = inf) [N/A]\n"); fprintf(stderr, " -ymax ymax : upper bound (ymin = -inf) [N/A]\n"); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " data sequence (%s) [stdin]\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " clipped data sequence (%s)\n", FORMAT); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char *argv[]) { FILE *fp = stdin; int size; double ymin = YMIN, ymax = YMAX; double *x, *y; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) if (**++argv == '-') { argc--; switch (*(*argv + 1)) { case 'y': if ((*(*argv + 2)) == 'm') { switch (*(*argv + 3)) { case 'i': ymin = atof(*++argv); ymax = FLT_MAX; break; case 'a': ymax = atof(*++argv); ymin = FLT_MIN; break; } } else { ymin = atof(*++argv); argc--; ymax = atof(*++argv); } break; case 'h': default: usage(1); } } else fp = getfp(*argv, "rb"); x = dgetmem(2 * 256); y = x + 256; while ((size = freadf(x, sizeof(*x), 256, fp)) != 0) { clip(x, size, ymin, ymax, y); fwritef(y, sizeof(*y), size, stdout); } return 0; } SPTK-3.9/bin/da/0000755001051300105040000000000012637167677010323 500000000000000SPTK-3.9/bin/da/Makefile.am0000644001051300105040000000121712442245031012247 00000000000000if USEDA AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = dawrite dawrite_SOURCES = da.h dawrite.c winplay.c winplay.h dawrite_LDADD = @top_builddir@/lib/libSPTK.a bin_SCRIPTS = da EXTRA_DIST = da.in CLEANFILES = $(bin_PROGRAMS) $(bin_SCRIPTS) replace_path = sed \ -e 's,[@]bindir[@],$(bindir),g' \ -e 's,[@]pkgdatadir[@],$(pkgdatadir),g' \ -e 's,[@]package_version[@],$(PACKAGE_VERSION),g' \ -e 's,[@]csh[@],$(CSH),' \ -e 's,[@]io_symbol[@],$(IO_SYMBOL),g' \ -e 's,[@]io_format[@],$(IO_FORMAT),g' da: da.in $(replace_path) < da.in > $@ chmod +x $@ endif SPTK-3.9/bin/da/Makefile.in0000644001051300105040000005170512637167410012301 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @USEDA_TRUE@bin_PROGRAMS = dawrite$(EXEEXT) subdir = bin/da ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am__dawrite_SOURCES_DIST = da.h dawrite.c winplay.c winplay.h @USEDA_TRUE@am_dawrite_OBJECTS = dawrite.$(OBJEXT) winplay.$(OBJEXT) dawrite_OBJECTS = $(am_dawrite_OBJECTS) @USEDA_TRUE@dawrite_DEPENDENCIES = @top_builddir@/lib/libSPTK.a am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } SCRIPTS = $(bin_SCRIPTS) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(dawrite_SOURCES) DIST_SOURCES = $(am__dawrite_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @USEDA_TRUE@AM_CPPFLAGS = -I @top_srcdir@/include @USEDA_TRUE@dawrite_SOURCES = da.h dawrite.c winplay.c winplay.h @USEDA_TRUE@dawrite_LDADD = @top_builddir@/lib/libSPTK.a @USEDA_TRUE@bin_SCRIPTS = da @USEDA_TRUE@EXTRA_DIST = da.in @USEDA_TRUE@CLEANFILES = $(bin_PROGRAMS) $(bin_SCRIPTS) @USEDA_TRUE@replace_path = sed \ @USEDA_TRUE@ -e 's,[@]bindir[@],$(bindir),g' \ @USEDA_TRUE@ -e 's,[@]pkgdatadir[@],$(pkgdatadir),g' \ @USEDA_TRUE@ -e 's,[@]package_version[@],$(PACKAGE_VERSION),g' \ @USEDA_TRUE@ -e 's,[@]csh[@],$(CSH),' \ @USEDA_TRUE@ -e 's,[@]io_symbol[@],$(IO_SYMBOL),g' \ @USEDA_TRUE@ -e 's,[@]io_format[@],$(IO_FORMAT),g' all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/da/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/da/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) dawrite$(EXEEXT): $(dawrite_OBJECTS) $(dawrite_DEPENDENCIES) $(EXTRA_dawrite_DEPENDENCIES) @rm -f dawrite$(EXEEXT) $(AM_V_CCLD)$(LINK) $(dawrite_OBJECTS) $(dawrite_LDADD) $(LIBS) install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n' \ -e 'h;s|.*|.|' \ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) { files[d] = files[d] " " $$1; \ if (++n[d] == $(am__install_max)) { \ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ else { print "f", d "/" $$4, $$1 } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dawrite.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/winplay.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) $(SCRIPTS) installdirs: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-binSCRIPTS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-binSCRIPTS install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am uninstall-binPROGRAMS uninstall-binSCRIPTS .PRECIOUS: Makefile @USEDA_TRUE@da: da.in @USEDA_TRUE@ $(replace_path) < da.in > $@ @USEDA_TRUE@ chmod +x $@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/da/da.h0000644001051300105040000001175212637156650010773 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /* $Id: da.h,v 1.19 2015/12/14 01:14:12 uratec Exp $ */ #include #include #ifndef WIN32 #include #endif #if defined(LINUX) || defined(FreeBSD) #include #define AUDIO_DEV "/dev/dsp" #define MIXER_DEV "/dev/mixer" #define MAXAMPGAIN 100 #define AVAILABLE_FREQ "8,11.025,22.05,44.1" #define DEFAULT_FREQ 11 #endif /* LINUX or FreeBSD */ #ifdef SUNOS #define SPARC #include #endif /* SUNOS */ #ifdef SOLARIS #define SPARC #include #endif /* SOLARIS */ #ifdef SPARC #define AUDIO_DEV "/dev/audio" #define AUDIO_CTLDEV "/dev/audioctl" #define MAXAMPGAIN 255 #define AVAILABLE_FREQ "8,11.025,16,22.05,32,44.1,48" #define DEFAULT_FREQ 16 #endif /* SPARC */ #ifdef WIN32 #define AVAILABLE_FREQ "8,11.025,22.05,44.1" #define MAXAMPGAIN 65535 #define DEFAULT_FREQ 16 #endif #define U_LAW 1 #define A_LAW 2 #define LINEAR 3 typedef struct _MENU { int value; unsigned int sample; unsigned int precision; unsigned int encoding; } MENU; static MENU data_type[] = { {0, 0, 0, 0}, {1, 8000, 8, U_LAW}, {2, 8000, 8, A_LAW}, {3, 8000, 16, LINEAR}, {4, 9600, 16, LINEAR}, {5, 11025, 16, LINEAR}, {6, 16000, 16, LINEAR}, {7, 18900, 16, LINEAR}, {8, 22050, 16, LINEAR}, {9, 32000, 16, LINEAR}, {10, 37800, 16, LINEAR}, {11, 44100, 16, LINEAR}, {12, 48000, 16, LINEAR} }; #define _8000_8BIT_ULAW 1 #define _8000_8BIT_ALAW 2 #define _8000_16BIT_LINEAR 3 #define _9600_16BIT_LINEAR 4 #define _11025_16BIT_LINEAR 5 #define _16000_16BIT_LINEAR 6 #define _18900_16BIT_LINEAR 7 #define _22050_16BIT_LINEAR 8 #define _32000_16BIT_LINEAR 9 #define _37800_16BIT_LINEAR 10 #define _44100_16BIT_LINEAR 11 #define _48000_16BIT_LINEAR 12 int ACFD; int ADFD; FILE *adfp; #define SPEAKER (0x01) #define HEADPHONE (0x02) #define LINE_OUT (0x04) #define MUTE (0x08) SPTK-3.9/bin/da/dawrite.c0000644001051300105040000004063012637156631012035 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /***************************************************************************** * * * play 16-bit linear PCM data * * * * 1998.1 T.Kobayashi * * 2000.3 M.Tamura * * * * usage: * * dawrite [ options ] infile1 infile2 ... > stdout * * options: * * -s s : sampling frequency (8,11.025,22.05,44.1kHz) [11] * * -g g : gain (.., -2, -1, 0, 1, 2, ..) [0] * * -a a : amplitude gain (0..100) [N/A] * * -H H : header size in byte [0] * * -v : display filename [FALSE] * * -w : byteswap [FALSE] * * +x : data format [s] * * s (short) f (float) d (double) * * infile: * * data [stdin] * * notice: * * number of infile < 128 * * * *****************************************************************************/ static char *rcs_id = "$Id: dawrite.c,v 1.34 2015/12/14 01:14:12 uratec Exp $"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #ifndef WIN32 #include #include #include "da.h" #else #include "SPTK.h" #include "da.h" #include "winplay.h" #endif /* Default Value */ #define SIZE 256*200 #define MAXFILES 128 #define INITGAIN 0 #define OUTPORT 's' #define GAIN (0+INITGAIN) #define HEADERSIZE 0 #define VERBOSE FA char *BOOL_STR[] = { "FALSE", "TRUE" }; /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - play 16-bit linear PCM data\n\n", cmnd); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] infile1 infile2 ... > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -s s : sampling frequency (%s kHz) [%d]\n", AVAILABLE_FREQ, DEFAULT_FREQ); fprintf(stderr, " -g g : gain (..,-2,-1,0,1,2,..) [%d]\n", GAIN); fprintf(stderr, " -a a : amplitude gain (0..100) [N/A]\n"); #ifdef SPARC fprintf(stderr, " -o o : output port [%c]\n", OUTPORT); fprintf(stderr, " s (speaker) h (headphone)\n"); #endif /* SPARC */ fprintf(stderr, " -H H : header size in byte [%d]\n", HEADERSIZE); fprintf(stderr, " -v : display filename [%s]\n", BOOL_STR[VERBOSE]); fprintf(stderr, " -w : byteswap [FALSE]\n"); fprintf(stderr, " +x : data format [s]\n"); fprintf(stderr, " s (short) f (float) d (double)\n"); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " data [stdin]\n"); fprintf(stderr, " notice:\n"); fprintf(stderr, " number of infile < %d\n", MAXFILES); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif /* PACKAGE_VERSION */ fprintf(stderr, "\n"); exit(status); } static char outport = OUTPORT; static short *y = NULL, *xs; static int gain = GAIN, is_verbose = VERBOSE; static int hdr_size = HEADERSIZE; static size_t data_size = sizeof(short); static int freq = DEFAULT_FREQ * 1000; static float *xf; static double *x, fgain = 1.0; double ampgain = -1.0; int byteswap = 0; size_t abuf_size; #if defined(LINUX) || defined(FreeBSD) int org_vol, org_channels, org_precision, org_freq; #endif /* LINUX or FreeBSD */ #if defined(SOLARIS) || defined(SUNOS) audio_info_t org_data; #endif /* SOLARIS or SUNOS */ int main(int argc, char *argv[]) { FILE *fp; char *s, *infile[MAXFILES], c; int i, nfiles = 0; void direct(FILE *); void sndinit(void); void init_audiodev(int dtype); void reset_audiodev(void); if ((s = getenv("DA_FLOAT")) != NULL) data_size = sizeof(float); if ((s = getenv("DA_DOUBLE")) != NULL) data_size = sizeof(double); if ((s = getenv("DA_SMPLFREQ")) != NULL) freq = (int) (1000 * atof(s)); if ((s = getenv("DA_GAIN")) != NULL) gain = atoi(s) + INITGAIN; if ((s = getenv("DA_AMPGAIN")) != NULL) ampgain = atof(s); if ((s = getenv("DA_PORT")) != NULL) outport = *s; if ((s = getenv("DA_HDRSIZE")) != NULL) hdr_size = atoi(s); if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) if (*(s = *++argv) == '-') { c = *++s; switch (c) { case 's': freq = (int) (1000 * atof(*++argv)); --argc; break; case 'g': gain = atoi(*++argv) + INITGAIN; --argc; break; case 'a': ampgain = atof(*++argv); --argc; break; case 'H': hdr_size = atoi(*++argv); --argc; break; case 'v': is_verbose = 1 - is_verbose; break; case 'w': byteswap = 1; break; case 'o': outport = **++argv; --argc; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else if (*s == '+') { c = *++s; switch (c) { case 's': data_size = sizeof(short); break; case 'f': data_size = sizeof(float); break; case 'd': data_size = sizeof(double); break; default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else { if (nfiles < MAXFILES) infile[nfiles++] = s; else { fprintf(stderr, "%s : Number of files exceed %d!\n", cmnd, MAXFILES); return (1); } } x = dgetmem(SIZE); xf = (float *) x; xs = (short *) x; y = sgetmem(2 * SIZE); sndinit(); i = (gain < 0) ? -gain : gain; while (i--) fgain *= 2.0; if (gain < 0) fgain = 1.0 / fgain; if (nfiles) { for (i = 0; i < nfiles; i++) { fp = getfp(infile[i], "rb"); if (is_verbose) { fprintf(stderr, "%s : %s\n", cmnd, infile[i]); } direct(fp); fclose(fp); } } else direct(stdin); #ifndef WIN32 fclose(adfp); close(ACFD); #endif reset_audiodev(); return 0; } void direct(FILE * fp) { int k, nread; double d; void sndout(int leng); int byteswap_vec(void *vec, int size, int blocks); if (hdr_size) fseek(fp, (long) hdr_size, 0); while ((nread = freadx(x, data_size, SIZE, fp))) { for (k = 0; k < nread; k++) { if (data_size == sizeof(double)) d = x[k]; else if (data_size == sizeof(float)) d = *(xf + k); else d = *(xs + k); y[k] = d * fgain; } if (byteswap > 0) byteswap_vec(y, sizeof(short), nread); sndout(nread); } } void sndinit(void) { int dtype; void init_audiodev(int dtype); void change_output_port(unsigned int port); void change_play_gain(float volume); switch (freq) { case 8000: dtype = _8000_16BIT_LINEAR; break; case 11000: dtype = _11025_16BIT_LINEAR; break; case 11025: dtype = _11025_16BIT_LINEAR; break; case 16000: dtype = _16000_16BIT_LINEAR; break; case 22000: dtype = _22050_16BIT_LINEAR; break; case 22050: dtype = _22050_16BIT_LINEAR; break; case 32000: dtype = _32000_16BIT_LINEAR; break; case 44000: dtype = _44100_16BIT_LINEAR; break; case 44100: dtype = _44100_16BIT_LINEAR; break; case 48000: dtype = _48000_16BIT_LINEAR; break; default: fprintf(stderr, "%s : Unavailable sampling frequency %d!\n", cmnd, freq); exit(1); } init_audiodev(dtype); if (ampgain >= 0.0) { if (ampgain > 100.0) ampgain = 100.0; change_play_gain(ampgain); } #ifdef SPARC int port; if (outport == 's') port = SPEAKER; else if (outport == 'h') port = HEADPHONE; change_output_port(port | LINE_OUT); #endif /* SPARC */ } void sndout(int leng) { #ifdef WIN32 win32_audio_play(y, leng); #else fwritex(y, sizeof(short), leng, adfp); write(ADFD, y, 0); #endif } void init_audiodev(int dtype) { #if defined(LINUX) || defined(FreeBSD) int arg; adfp = getfp(AUDIO_DEV, "wb"); #ifdef LINUX ADFD = adfp->_fileno; #else /* FreeBSD */ ADFD = adfp->_file; #endif ACFD = open(MIXER_DEV, O_RDWR, 0); ioctl(ADFD, SNDCTL_DSP_GETBLKSIZE, &abuf_size); ioctl(ADFD, SNDCTL_DSP_SETFMT, &org_precision); ioctl(ADFD, SNDCTL_DSP_CHANNELS, &org_channels); ioctl(ADFD, SNDCTL_DSP_SPEED, &org_freq); ioctl(ACFD, SOUND_MIXER_READ_PCM, &org_vol); arg = data_type[dtype].precision; ioctl(ADFD, SNDCTL_DSP_SETFMT, &arg); /* arg = data_type[dtype].channel; */ arg = 0; ioctl(ADFD, SNDCTL_DSP_CHANNELS, &arg); arg = data_type[dtype].sample; ioctl(ADFD, SNDCTL_DSP_SPEED, &arg); #endif /* LINUX || FreeBSD */ #ifdef SPARC audio_info_t data; ACFD = open(AUDIO_CTLDEV, O_RDWR, 0); adfp = getfp(AUDIO_DEV, "wb"); ADFD = adfp->_file; AUDIO_INITINFO(&data); ioctl(ACFD, AUDIO_GETINFO, &data); bcopy(&data, &org_data, sizeof(audio_info_t)); data.play.sample_rate = data_type[dtype].sample; data.play.precision = data_type[dtype].precision; data.play.encoding = data_type[dtype].encoding; ioctl(ADFD, AUDIO_SETINFO, &data); #endif /* SPARC */ #ifdef WIN32 if (WIN32AUDIO_NO_ERROR != win32_audio_open(freq, 16)) { fprintf(stderr, "Failed to open win32 audio device\n"); exit(1); } #endif /* WIN32 */ } void change_output_port(unsigned int port) { #ifdef LINUX #endif /* LINUX */ #ifdef SPARC audio_info_t data; AUDIO_INITINFO(&data); ioctl(ACFD, AUDIO_GETINFO, &data); data.play.port = port; ioctl(ACFD, AUDIO_SETINFO, &data); #endif /* SPARC */ #ifdef WIN32 #endif /* WIN32 */ } void change_play_gain(float volume) { int vol, arg; #if defined(LINUX) || defined(FreeBSD) vol = (int) ((MAXAMPGAIN * volume) / 100); arg = vol | (vol << 8); ioctl(ACFD, MIXER_WRITE(SOUND_MIXER_PCM), &arg); #endif /* LINUX */ #ifdef SPARC audio_info_t data; vol = (int) ((MAXAMPGAIN * volume) / 100); AUDIO_INITINFO(&data); ioctl(ACFD, AUDIO_GETINFO, &data); data.play.gain = vol; ioctl(ACFD, AUDIO_SETINFO, &data); #endif /* SPARC */ #ifdef WIN32 vol = (int) ((MAXAMPGAIN * volume) / 100.0); win32_audio_set_volume(vol); #endif /* WIN32 */ } void reset_audiodev(void) { #if defined(LINUX) || defined(FreeBSD) ACFD = open(MIXER_DEV, O_RDWR, 0); ADFD = open(AUDIO_DEV, O_RDWR, 0); ioctl(ADFD, SNDCTL_DSP_SETFMT, &org_precision); ioctl(ADFD, SNDCTL_DSP_CHANNELS, &org_channels); ioctl(ADFD, SNDCTL_DSP_SPEED, &org_freq); ioctl(ACFD, SOUND_MIXER_WRITE_PCM, &org_vol); close(ADFD); close(ACFD); #endif /* LINUX or FreeBSD */ #ifdef SPARC ACFD = open(AUDIO_CTLDEV, O_RDWR, 0); ioctl(ACFD, AUDIO_SETINFO, &org_data); close(ACFD); #endif /* SPARC */ #ifdef WIN32 win32_audio_close(); #endif /* WINDOWS */ } int byteswap_vec(void *vec, int size, int blocks) { char *q; char t; int i, j; q = (char *) vec; for (i = 0; i < blocks; i++) { for (j = 0; j < (size / 2); j++) { t = *(q + j); *(q + j) = *(q + (size - 1 - j)); *(q + (size - 1 - j)) = t; } q += size; } return i; /* number of blocks */ } SPTK-3.9/bin/da/winplay.c0000644001051300105040000001747012637156631012067 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * $Id: winplay.c,v 1.11 2015/12/14 01:14:12 uratec Exp $"; * * * * Simple APIs for playing audio data in windows * * * * 2007.10 Jong-Jin Kim * * * * notice: just for PCM, MONO * * * *************************************************************************/ #ifdef WIN32 #include #include #include "winplay.h" #define WO_MAX_BUCKETS 8 /* number of buckets of the ring-buffer */ #define WO_BUCKET_SIZE 1024 /* bucket size */ HWAVEOUT wOutDev; WAVEFORMATEX wOutFmt; WAVEHDR wOutHdr[WO_MAX_BUCKETS]; short wOutBuf[WO_MAX_BUCKETS * WO_BUCKET_SIZE]; int wi; /* writing index */ int ri; /* reading index */ static DWORD CALLBACK win32_audio_callback(HWAVEOUT hwo, UINT uMsg, DWORD data, DWORD dwParam1, DWORD dwParam2) { if (MM_WOM_DONE == uMsg) { ri = (ri + 1) % WO_MAX_BUCKETS; } return 0; } int win32_audio_open(int sr, int sb) { int i; wOutFmt.wFormatTag = 1; /* PCM */ wOutFmt.nChannels = 1; /* MONO */ wOutFmt.nSamplesPerSec = sr; wOutFmt.nAvgBytesPerSec = sr * (sb / 8); /* 16kHz * 16bits * Mono */ wOutFmt.nBlockAlign = (sb / 8); wOutFmt.wBitsPerSample = sb; wOutFmt.cbSize = 0; /* Does the specified audio format is supported by device? */ if (MMSYSERR_NOERROR != waveOutOpen(NULL, /* NULL for query */ WAVE_MAPPER, /* device identifier */ (LPWAVEFORMATEX) & (wOutFmt), /* requested format */ 0, /* no callback */ 0, /* no instance data */ WAVE_FORMAT_QUERY)) { /* query only */ return (WIN32AUDIO_FAILED); } /* Initialize waveout header & buffer */ for (i = 0; i < WO_MAX_BUCKETS; i++) { wOutHdr[i].lpData = (LPSTR) & (wOutBuf[i * WO_BUCKET_SIZE]); wOutHdr[i].dwBufferLength = WO_BUCKET_SIZE * sizeof(short); wOutHdr[i].dwBytesRecorded = 0L; wOutHdr[i].dwUser = 0; wOutHdr[i].dwFlags = 0L; wOutHdr[i].dwLoops = 1L; wOutHdr[i].lpNext = NULL; wOutHdr[i].reserved = 0L; } /* Open the waveout device */ if (MMSYSERR_NOERROR != waveOutOpen(&(wOutDev), /* [out] waveout device handle */ WAVE_MAPPER, /* provid by OS */ &(wOutFmt), /* audio format to play */ (DWORD) win32_audio_callback, /* callback function pointer */ (DWORD) 0, /* argument of the callback function */ CALLBACK_FUNCTION)) { /* done-message processing method */ return (WIN32AUDIO_FAILED); } wi = 0; ri = 0; return (WIN32AUDIO_NO_ERROR); } int win32_audio_play(short *buffer, int buffer_len) { int i, current_to_play, remained_to_play; short *des, *src; remained_to_play = buffer_len; while (remained_to_play > 0) { while (ri == ((wi + 1) % WO_MAX_BUCKETS)) Sleep(100); /* wait until there are available buckets */ if (WHDR_DONE == (wOutHdr[wi].dwFlags & WHDR_DONE)) waveOutUnprepareHeader(wOutDev, &wOutHdr[wi], sizeof(WAVEHDR)); current_to_play = (remained_to_play > WO_BUCKET_SIZE) ? WO_BUCKET_SIZE : remained_to_play; if (0 < current_to_play) { des = (short *) wOutHdr[wi].lpData; src = (short *) &(buffer[buffer_len - remained_to_play]); for (i = 0; i < current_to_play; i++) des[i] = src[i]; wOutHdr[wi].dwBufferLength = current_to_play * sizeof(short); waveOutPrepareHeader(wOutDev, &wOutHdr[wi], sizeof(WAVEHDR)); waveOutWrite(wOutDev, &wOutHdr[wi], sizeof(WAVEHDR)); remained_to_play -= current_to_play; wi = (wi + 1) % WO_MAX_BUCKETS; } } return (WIN32AUDIO_NO_ERROR); } void win32_audio_set_volume(int vol) { DWORD val; val = ((unsigned short) vol << 16) + (unsigned short) vol; waveOutSetVolume(wOutDev, val); } void win32_audio_close(void) { while (WAVERR_STILLPLAYING == waveOutClose(wOutDev)) Sleep(10); } #endif SPTK-3.9/bin/da/winplay.h0000644001051300105040000001135312637156650012067 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * Simple APIs for playing audio data in windows * * * * 2007.10 Jong-Jin Kim * * * * notice: just for PCM, MONO * * * *************************************************************************/ /* $Id: winplay.h,v 1.9 2015/12/14 01:14:12 uratec Exp $ */ #ifndef __WINPLAY_H__ #define __WINPLAY_H__ #ifdef __cplusplus extern "C" { #endif #define WIN32AUDIO_NO_ERROR 0 #define WIN32AUDIO_FAILED -1 /* open audio device @param sr [in] sampling frequency(Hz) @param sb [in] sampling bits(bits) @return int WIN32AUDIO_FAILED failed to open device WIN32AUDIO_NO_ERROR ok */ int win32_audio_open(int sr, int sb); /* play audio data @param [in] buffer audio data buffer pointer to play @param [in] buffer_len number of audio samples to play @return int WIN32AUDIO_FAILED failed to open device WIN32AUDIO_NO_ERROR ok */ int win32_audio_play(short *buffer, int buffer_len); /* set volume @param [in] vol input volume value (0 ~ 65535) @return none */ void win32_audio_set_volume(int vol); /* close audio device @param none @return none */ void win32_audio_close(void); #ifdef __cplusplus } #endif #endif /* __WINPLAY_H__ */ SPTK-3.9/bin/da/da.in0000755001051300105040000004020512633453603011142 00000000000000#!@csh@ -f # ----------------------------------------------------------------- # # The Speech Signal Processing Toolkit (SPTK) # # developed by SPTK Working Group # # http://sp-tk.sourceforge.net/ # # ----------------------------------------------------------------- # # # # Copyright (c) 1984-2007 Tokyo Institute of Technology # # Interdisciplinary Graduate School of # # Science and Engineering # # # # 1996-2015 Nagoya Institute of Technology # # Department of Computer Science # # # # All rights reserved. # # # # Redistribution and use in source and binary forms, with or # # without modification, are permitted provided that the following # # conditions are met: # # # # - Redistributions of source code must retain the above copyright # # notice, this list of conditions and the following disclaimer. # # - Redistributions in binary form must reproduce the above # # copyright notice, this list of conditions and the following # # disclaimer in the documentation and/or other materials provided # # with the distribution. # # - Neither the name of the SPTK working group nor the names of its # # contributors may be used to endorse or promote products derived # # from this software without specific prior written permission. # # # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND # # CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, # # INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS # # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, # # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED # # TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON # # ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, # # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY # # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # # POSSIBILITY OF SUCH DAMAGE. # # ----------------------------------------------------------------- # ######################################################################### # # # play 16-bit linear PCM # # # # 2000.4 S.Sako # # # ######################################################################### set path = ( @bindir@ $path ) set libpath = '@pkgdatadir@' set sptkver = '@package_version@' set cvsid = '$Id: da.in,v 1.18 2015/12/14 05:45:39 uratec Exp $' set cmnd = $0 set cmnd = $cmnd:t set file set stdinput = 1 set arch = `uname -m` set freq = 10 set ampl = 50 set gain = 0 set ftype = s set port = s set headersize = 0 set verbosemode = 0 set byteswap = -1 set daoption = "" @ i = 0 while ($i < $#argv) @ i++ switch ($argv[$i]) case -s: @ i++ set freq = $argv[$i] breaksw case -o: @ i++ set port = $argv[$i] set daoption = ( $daoption -o $port ) breaksw case -a: @ i++ set ampl = $argv[$i] set daoption = ( $daoption -a $ampl ) breaksw case -g: @ i++ set gain = $argv[$i] set daoption = ( $daoption -a $gain ) breaksw case -H: @ i++ set headersize = $argv[$i] set daoption = ( $daoption -H $headersize ) breaksw case -v: set verbosemode = 1 breaksw case -w: set byteswap = 1 breaksw case +c: set ftype = c breaksw case +s: set ftype = s breaksw case +i3: set ftype = i3 breaksw case +i: set ftype = i breaksw case +l: set ftype = l breaksw case +le: set ftype = le breaksw case +C: set ftype = C breaksw case +S: set ftype = S breaksw case +I3: set ftype = I3 breaksw case +I: set ftype = I breaksw case +L: set ftype = L breaksw case +LE: set ftype = LE breaksw case +f: set ftype = f breaksw case +d: set ftype = d breaksw case +de: set ftype = de breaksw case -h: set exit_status = 0 goto usage default set file = ( $file $argv[$i] ) set stdinput = -1 breaksw endsw end switch ($ftype) case c if( $byteswap > 0 ) then alias fileconvert 'swab +c \!^ | x2x +c@io_symbol@' else alias fileconvert 'x2x +c@io_symbol@ \!^' endif breaksw case s if( $byteswap > 0 ) then alias fileconvert 'swab +s \!^ | x2x +s@io_symbol@' else alias fileconvert 'x2x +s@io_symbol@ \!^' endif breaksw case i3 if( $byteswap > 0 ) then alias fileconvert 'swab +i3 \!^ | x2x +i3@io_symbol@' else alias fileconvert 'x2x +i3@io_symbol@ \!^' endif breaksw case i if( $byteswap > 0 ) then alias fileconvert 'swab +i \!^ | x2x +i@io_symbol@' else alias fileconvert 'x2x +i@io_symbol@ \!^' endif breaksw case l if( $byteswap > 0 ) then alias fileconvert 'swab +l \!^ | x2x +l@io_symbol@' else alias fileconvert 'x2x +l@io_symbol@ \!^' endif breaksw case le if( $byteswap > 0 ) then alias fileconvert 'swab +le \!^ | x2x +le@io_symbol@' else alias fileconvert 'x2x +le@io_symbol@ \!^' endif breaksw case C if( $byteswap > 0 ) then alias fileconvert 'swab +C \!^ | x2x +C@io_symbol@' else alias fileconvert 'x2x +C@io_symbol@ \!^' endif breaksw case S if( $byteswap > 0 ) then alias fileconvert 'swab +S \!^ | x2x +S@io_symbol@' else alias fileconvert 'x2x +S@io_symbol@ \!^' endif breaksw case I3 if( $byteswap > 0 ) then alias fileconvert 'swab +I3 \!^ | x2x +I3@io_symbol@' else alias fileconvert 'x2x +I3@io_symbol@ \!^' endif breaksw case I if( $byteswap > 0 ) then alias fileconvert 'swab +I \!^ | x2x +I@io_symbol@' else alias fileconvert 'x2x +I@io_symbol@ \!^' endif breaksw case L if( $byteswap > 0 ) then alias fileconvert 'swab +L \!^ | x2x +L@io_symbol@' else alias fileconvert 'x2x +L@io_symbol@ \!^' endif breaksw case LE if( $byteswap > 0 ) then alias fileconvert 'swab +LE \!^ | x2x +LE@io_symbol@' else alias fileconvert 'x2x +LE@io_symbol@ \!^' endif breaksw case @io_symbol@ if ( $byteswap > 0 ) then alias fileconvert 'swab +@io_symbol@ \!^' else alias fileconvert 'cat \!^' endif breaksw case d if( $byteswap > 0 ) then alias fileconvert 'swab +d \!^ | x2x +d@io_symbol@' else alias fileconvert 'x2x +d@io_symbol@ \!^' endif breaksw case de if( $byteswap > 0 ) then alias fileconvert 'swab +de \!^ | x2x +de@io_symbol@' else alias fileconvert 'x2x +de@io_symbol@ \!^' endif breaksw endsw switch ($arch) case sun4*: goto cnvt48 breaksw case i?86: case x86_64: goto cnvt44 breaksw endsw exit 0 usage: cat2 < 0 ) then fileconvert $infile |\ us -c ${libpath}/lpfcoef.2to3f -u3 -d2 |\ us -c ${libpath}/lpfcoef.2to3s -u3 -d2 |\ us -c ${libpath}/lpfcoef.5to7 -u7 -d5 |\ us -c ${libpath}/lpfcoef.5to7 -u7 -d$osr |\ dawrite $daoption[*] +@io_symbol@ -s 22.05 else fileconvert $infile |\ dawrite $daoption[*] +@io_symbol@ -s $freq endif if( $stdinput == 1 ) then exit 0 endif end exit 0 SPTK-3.9/bin/dct/0000755001051300105040000000000012637167677010511 500000000000000SPTK-3.9/bin/dct/Makefile.am0000644001051300105040000000017512442245032012440 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = dct dct_SOURCES = dct.c _dct.c dct_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/dct/Makefile.in0000644001051300105040000004251112637167410012462 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = dct$(EXEEXT) subdir = bin/dct ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_dct_OBJECTS = dct.$(OBJEXT) _dct.$(OBJEXT) dct_OBJECTS = $(am_dct_OBJECTS) dct_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(dct_SOURCES) DIST_SOURCES = $(dct_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include dct_SOURCES = dct.c _dct.c dct_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/dct/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/dct/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) dct$(EXEEXT): $(dct_OBJECTS) $(dct_DEPENDENCIES) $(EXTRA_dct_DEPENDENCIES) @rm -f dct$(EXEEXT) $(AM_V_CCLD)$(LINK) $(dct_OBJECTS) $(dct_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_dct.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dct.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/dct/dct.c0000644001051300105040000001637412637156631011346 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * DCT : Discrete Cosine Transform * * * * * * usage: * * dct [ options ] [ infile ] > stdout * * options: * * -l l : DCT size [256] * * -I : use complex number [FALSE] * * -d : without using fft algorithm [FALSE] * * infile: * * stdin for default * * input is assumed to be double * * * ************************************************************************/ static char *rcs_id = "$Id: dct.c,v 1.24 2015/12/14 01:14:12 uratec Exp $"; /* Standard C Libraries */ #include #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #if defined(WIN32) #include "SPTK.h" #else #include #endif static int size = 256, out = ' '; /* Default Values */ #define SIZE 256 #define DFTMODE FA #define COMPMODE FA char *BOOL[] = { "FALSE", "TRUE" }; /* Command Name */ char *cmnd; #include int usage(void) { fprintf(stderr, "\n"); fprintf(stderr, " %s -dct: Discrete Cosine Transform\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -l l : DCT size [%d]\n", SIZE); fprintf(stderr, " -I : use comlex number [FALSE]\n"); fprintf(stderr, " -d : without using fft algorithm (use dft) [%s]\n", BOOL[DFTMODE]); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " data sequence (%s) [stdin]\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " DCT sequence (%s)\n", FORMAT); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(1); } int main(int argc, char *argv[]) { FILE *fp; char *s, *infile = NULL, c; FILE *getfp(); Boolean dftmode = DFTMODE; Boolean compmode = COMPMODE; double *x, *y, *pReal2, *pImag2, *dgetmem(); int size2; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) { if (*(s = *++argv) == '-') { c = *++s; if ((c == 'l') && (*++s == '\0')) { s = *++argv; --argc; } switch (c) { case 'l': size = atoi(s); break; case 'I': out = c; compmode = 1 - compmode; break; case 'd': dftmode = 1 - dftmode; break; case 'h': default: usage(); } } else infile = s; } if (infile) fp = getfp(infile, "rb"); else fp = stdin; x = dgetmem(size2 = size + size); pReal2 = dgetmem(size2 = size + size); y = x + size; pImag2 = pReal2 + size; while (!feof(fp)) { fillz(x, size2, sizeof(double)); fillz(y, size, sizeof(double)); if (freadf(x, sizeof(*x), size, fp) == 0) break; if (out == 'I') { if (freadf(y, sizeof(*y), size, fp) == 0) break; } dct(x, pReal2, size, size, dftmode, compmode); fwritef(pReal2, sizeof(*pReal2), size, stdout); if (out == 'I') fwritef(pImag2, sizeof(*pReal2), size, stdout); } if (infile) fclose(fp); return (0); } SPTK-3.9/bin/dct/_dct.c0000644001051300105040000002241612637156631011477 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ #include #include #include #include #if defined(WIN32) #include "SPTK.h" #else #include #endif /* workspace */ static int dct_table_size = 0; static double *dct_workspace = NULL; static double *pLocalReal = NULL; static double *pLocalImag = NULL; static double *pWeightReal = NULL; static double *pWeightImag = NULL; static int dct_table_size_fft = 0; static double *dct_workspace2 = NULL; static double *pLocalReal2 = NULL; static double *pLocalImag2 = NULL; static double *pWeightReal2 = NULL; static double *pWeightImag2 = NULL; int dft(double *pReal, double *pImag, const int nDFTLength) { int k, n; double *pTempReal, *pTempImag, TempReal, TempImag; pTempReal = dgetmem(nDFTLength); pTempImag = dgetmem(nDFTLength); memcpy(pTempReal, pReal, sizeof(double) * nDFTLength); memcpy(pTempImag, pImag, sizeof(double) * nDFTLength); for (k = 0; k < nDFTLength; k++) { TempReal = 0; TempImag = 0; for (n = 0; n < nDFTLength; n++) { TempReal += pTempReal[n] * cos(2.0 * PI * n * k / (double) nDFTLength) + pTempImag[n] * sin(2.0 * PI * n * k / (double) nDFTLength); TempImag += -pTempReal[n] * sin(2.0 * PI * n * k / (double) nDFTLength) + pTempImag[n] * cos(2.0 * PI * n * k / (double) nDFTLength); } pReal[k] = TempReal; pImag[k] = TempImag; } free(pTempReal); free(pTempImag); return (0); } int dct_create_table_fft(const int nSize) { register int k; if (nSize == dct_table_size_fft) { /* no needs to resize workspace. */ return (0); } else { /* release resources to resize workspace. */ if (dct_workspace2 != NULL) { free(dct_workspace2); dct_workspace2 = NULL; } pLocalReal2 = NULL; pLocalImag2 = NULL; pWeightReal2 = NULL; pWeightImag2 = NULL; } /* getting resources. */ if (nSize <= 0) { dct_table_size_fft = 0; return (0); } else { dct_table_size_fft = nSize; dct_workspace2 = dgetmem(dct_table_size_fft * 6); pWeightReal2 = dct_workspace2; pWeightImag2 = dct_workspace2 + dct_table_size_fft; pLocalReal2 = dct_workspace2 + (2 * dct_table_size_fft); pLocalImag2 = dct_workspace2 + (4 * dct_table_size_fft); for (k = 0; k < dct_table_size_fft; k++) { pWeightReal2[k] = cos(k * PI / (2.0 * dct_table_size_fft)) / sqrt(2.0 * dct_table_size_fft); pWeightImag2[k] = -sin(k * PI / (2.0 * dct_table_size_fft)) / sqrt(2.0 * dct_table_size_fft); } pWeightReal2[0] /= sqrt(2.0); pWeightImag2[0] /= sqrt(2.0); } return (0); } int dct_create_table(const int nSize) { register int k; if (nSize == dct_table_size) { /* no needs to resize workspace. */ return (0); } else { /* release resources to resize workspace. */ if (dct_workspace != NULL) { free(dct_workspace); dct_workspace = NULL; } pLocalReal = NULL; pLocalImag = NULL; pWeightReal = NULL; pWeightImag = NULL; } /* getting resources. */ if (nSize <= 0) { dct_table_size = 0; return (0); } else { dct_table_size = nSize; dct_workspace = dgetmem(dct_table_size * 6); pWeightReal = dct_workspace; pWeightImag = dct_workspace + dct_table_size; pLocalReal = dct_workspace + (2 * dct_table_size); pLocalImag = dct_workspace + (4 * dct_table_size); for (k = 0; k < dct_table_size; k++) { pWeightReal[k] = cos(k * PI / (2.0 * dct_table_size)) / sqrt(2.0 * dct_table_size); pWeightImag[k] = -sin(k * PI / (2.0 * dct_table_size)) / sqrt(2.0 * dct_table_size); } pWeightReal[0] /= sqrt(2.0); pWeightImag[0] /= sqrt(2.0); } return (0); } int dct_based_on_fft(double *pReal, double *pImag, const double *pInReal, const double *pInImag) { register int n, k; for (n = 0; n < dct_table_size_fft; n++) { pLocalReal2[n] = pInReal[n]; pLocalImag2[n] = pInImag[n]; pLocalReal2[dct_table_size_fft + n] = pInReal[dct_table_size_fft - 1 - n]; pLocalImag2[dct_table_size_fft + n] = pInImag[dct_table_size_fft - 1 - n]; } fft(pLocalReal2, pLocalImag2, dct_table_size_fft * 2); /* double input */ for (k = 0; k < dct_table_size_fft; k++) { pReal[k] = pLocalReal2[k] * pWeightReal2[k] - pLocalImag2[k] * pWeightImag2[k]; pImag[k] = pLocalReal2[k] * pWeightImag2[k] + pLocalImag2[k] * pWeightReal2[k]; } return (0); } int dct_based_on_dft(double *pReal, double *pImag, const double *pInReal, const double *pInImag) { register int n, k; for (n = 0; n < dct_table_size; n++) { pLocalReal[n] = pInReal[n]; pLocalImag[n] = pInImag[n]; pLocalReal[dct_table_size + n] = pInReal[dct_table_size - 1 - n]; pLocalImag[dct_table_size + n] = pInImag[dct_table_size - 1 - n]; } dft(pLocalReal, pLocalImag, dct_table_size * 2); for (k = 0; k < dct_table_size; k++) { pReal[k] = pLocalReal[k] * pWeightReal[k] - pLocalImag[k] * pWeightImag[k]; pImag[k] = pLocalReal[k] * pWeightImag[k] + pLocalImag[k] * pWeightReal[k]; } return (0); } void dct(double *in, double *out, const int size, const int m, const Boolean dftmode, const Boolean compmode) { int k, i, j, iter; double *pReal, *pImag; double *x, *y; double *x2, *y2; x = dgetmem(2 * size); y = x + size; pReal = dgetmem(2 * size); pImag = pReal + size; x2 = dgetmem(2 * size); y2 = x2 + size; for (k = 0; k < size; k++) { x[k] = in[k]; y[k] = in[k + size]; x2[k] = x[k]; y2[k] = y[k]; } iter = 0; i = size; while ((i /= 2) != 0) { iter++; } j = 1; for (i = 1; i <= iter; i++) { j *= 2; } if (size != j || dftmode) { dct_create_table(size); dct_based_on_dft(pReal, pImag, x2, y2); } else { dct_create_table_fft(size); dct_based_on_fft(pReal, pImag, x2, y2); } for (k = 0; k < m; k++) { out[k] = pReal[k]; if (compmode == TR) { out[k + size] = pImag[k]; } } free(x); free(x2); free(pReal); } SPTK-3.9/bin/decimate/0000755001051300105040000000000012637167700011475 500000000000000SPTK-3.9/bin/decimate/Makefile.am0000644001051300105040000000021312442245033013433 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = decimate decimate_SOURCES = decimate.c decimate_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/decimate/Makefile.in0000644001051300105040000004253612637167410013472 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = decimate$(EXEEXT) subdir = bin/decimate ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_decimate_OBJECTS = decimate.$(OBJEXT) decimate_OBJECTS = $(am_decimate_OBJECTS) decimate_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(decimate_SOURCES) DIST_SOURCES = $(decimate_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include decimate_SOURCES = decimate.c decimate_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/decimate/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/decimate/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) decimate$(EXEEXT): $(decimate_OBJECTS) $(decimate_DEPENDENCIES) $(EXTRA_decimate_DEPENDENCIES) @rm -f decimate$(EXEEXT) $(AM_V_CCLD)$(LINK) $(decimate_OBJECTS) $(decimate_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/decimate.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/decimate/decimate.c0000644001051300105040000001573412637156632013350 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * Decimation * * * * 1996.4 K.Koishida * * * * usage: * * decimate [options] [infile] > stdout * * options: * * -l l : length of vector [1] * * -p p : decimation period [10] * * -s s : start sample [0] * * infile: * * data sequence * * , x(0), x(1), ... * * stdout: * * decimated data * * , x(s), x(s+p), x(s+2p), ..., * * * ************************************************************************/ static char *rcs_id = "$Id: decimate.c,v 1.28 2015/12/14 01:14:12 uratec Exp $"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define PERIOD 10 #define START 0 #define LENG 1 /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - decimation \n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -l l : length of vector [%d]\n", LENG); fprintf(stderr, " -p p : decimation period [%d]\n", PERIOD); fprintf(stderr, " -s s : start sample [%d]\n", START); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " data sequence (%s) [stdin]\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " decimated data sequence (%s)\n", FORMAT); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char **argv) { int period = PERIOD, start = START, fleng = LENG, i; FILE *fp = stdin; double *x; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) if (**++argv == '-') { switch (*(*argv + 1)) { case 'p': period = atoi(*++argv); --argc; break; case 's': start = atoi(*++argv); --argc; break; case 'l': fleng = atoi(*++argv); --argc; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else fp = getfp(*argv, "rb"); x = dgetmem(fleng); for (i = 0; i < start; i++) if (freadf(x, sizeof(*x), fleng, fp) != fleng) return (1); i = period; while (freadf(x, sizeof(*x), fleng, fp) == fleng) { if (i == period) fwritef(x, sizeof(*x), fleng, stdout); i--; if (i == 0) i = period; } return 0; } SPTK-3.9/bin/delay/0000755001051300105040000000000012637167700011020 500000000000000SPTK-3.9/bin/delay/Makefile.am0000644001051300105040000000017712442245033012767 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = delay delay_SOURCES = delay.c delay_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/delay/Makefile.in0000644001051300105040000004243412637167410013012 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = delay$(EXEEXT) subdir = bin/delay ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_delay_OBJECTS = delay.$(OBJEXT) delay_OBJECTS = $(am_delay_OBJECTS) delay_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(delay_SOURCES) DIST_SOURCES = $(delay_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include delay_SOURCES = delay.c delay_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/delay/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/delay/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) delay$(EXEEXT): $(delay_OBJECTS) $(delay_DEPENDENCIES) $(EXTRA_delay_DEPENDENCIES) @rm -f delay$(EXEEXT) $(AM_V_CCLD)$(LINK) $(delay_OBJECTS) $(delay_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/delay.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/delay/delay.c0000644001051300105040000001603012637156632012204 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * Delay Sequence * * * * 1996.4 K.Koishida * * * * usage: * * delay [ options ] [ infile ] > stdout * * options: * * -s s : start sample [0] * * -f : keep file length [FALSE] * * infile: * * data sequence * * , x(0), x(1), ... * * stdout: * * delayed data * * , 0, 0, ..., 0, x(1), x(2), ..., * * ------------ * * s sample * * * ************************************************************************/ static char *rcs_id = "$Id: delay.c,v 1.29 2015/12/14 01:14:12 uratec Exp $"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define START 0 #define KEEP FA char *BOOL[] = { "FALSE", "TRUE" }; /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - delay sequence\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -s s : start sample [%d]\n", START); fprintf(stderr, " -f : keep file length [%s]\n", BOOL[KEEP]); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " data sequence (%s) [stdin]\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " delayed data sequence (%s)\n", FORMAT); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char **argv) { int start = START, leng = 16384, i; FILE *fp = stdin; double *x; Boolean keep = KEEP; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) if (**++argv == '-') { switch (*(*argv + 1)) { case 's': start = atoi(*++argv); --argc; break; case 'f': keep = 1 - keep; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else fp = getfp(*argv, "rb"); if (start > leng) { fprintf(stderr, "%s : Start point %d should be %d or less!\n", cmnd, start, leng); exit(1); } x = dgetmem(leng); while ((i = freadf(x + start, sizeof(*x), leng - start, fp)) == leng - start) { fwritef(x, sizeof(*x), leng - start, stdout); movem(x + leng - start, x, sizeof(*x), start); } if (keep) fwritef(x, sizeof(*x), i, stdout); else fwritef(x, sizeof(*x), i + start, stdout); exit(0); } SPTK-3.9/bin/delta/0000755001051300105040000000000012637167700011013 500000000000000SPTK-3.9/bin/delta/Makefile.am0000644001051300105040000000020012442245034012746 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = delta delta_SOURCES = delta.c delta_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/delta/Makefile.in0000644001051300105040000004243412637167410013005 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = delta$(EXEEXT) subdir = bin/delta ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_delta_OBJECTS = delta.$(OBJEXT) delta_OBJECTS = $(am_delta_OBJECTS) delta_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(delta_SOURCES) DIST_SOURCES = $(delta_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include delta_SOURCES = delta.c delta_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/delta/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/delta/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) delta$(EXEEXT): $(delta_OBJECTS) $(delta_DEPENDENCIES) $(EXTRA_delta_DEPENDENCIES) @rm -f delta$(EXEEXT) $(AM_V_CCLD)$(LINK) $(delta_OBJECTS) $(delta_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/delta.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/delta/delta.c0000644001051300105040000006634312637156632012206 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /********************************************************************************************* * * * Delta Calculation * * * * 2008.6 H.Zen * * 2013.10 Akira Tamamori * * usage: * * delta [ options ] [ infile ] > stdout * * options: * * -m M : order of vector [24] * * -l L : length of vector [m+1] * * -d fn : filename of delta coefficients [N/A] * * -d coef [coef...] : delta coefficients [N/A] * * -r n w1 [w2] : order and width of regression coefficients [N/A] * * -R n Wf1 Wb1 [Wf2 Wb2] : order and width of regression coefficients [N/A] * * -M magic : magic number [N/A] * * -n N : order of regression polynomial [N/A] * * -e e : small value added to diagonal component [0.0] * * for calculating regression coefficients * * infile: * * static feature sequence * * x_1(1), ..., x_1(L), x_2(1), ..., x_2(L), x_3(1), ... * * stdout: * * static and dynamic feature sequence * * x_1(1), ..., x_1(L), \Delta x_1(1), ..., \Delta x_1(L), ... * * * **********************************************************************************************/ static char *rcs_id = "$Id: delta.c,v 1.24 2015/12/14 01:14:12 uratec Exp $"; /* Standard C Libraries */ #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #include #include #include #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define LENG 25 #define T -1 #define MAGIC_FLAG FA #define POLYNOMIAL_ORDER -1 #define POLY_FLAG FA #define FLOOR 0.0 char *BOOL[] = { "FALSE", "TRUE" }; /* Command Name */ char *cmnd; /* magic number */ Boolean magic_flag = MAGIC_FLAG; double magic; /* polynomial order */ Boolean poly_flag = POLY_FLAG; /* Other Definitions */ #ifdef DOUBLE typedef double real; #else typedef float real; #endif typedef struct _float_list { float *f; struct _float_list *next; } float_list; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - delta calculation\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -m M : order of vector [%d]\n", LENG - 1); fprintf(stderr, " -l L : length of vector [m+1]\n"); fprintf(stderr, " -t T : number of input vectors [EOF]\n"); fprintf(stderr, " -d coef [coef...] : delta coefficients [N/A]\n"); fprintf(stderr, " -r n t1 [t2] : order and width of regression [N/A]\n"); fprintf(stderr, " coefficients\n"); fprintf(stderr, " -R n Wf1 Wb1 [Wf2 Wb2] ... : order and width of regression [N/A]\n"); fprintf(stderr, " coefficients\n"); fprintf(stderr, " Combining -M option, magic\n"); fprintf(stderr, " number is skipped during\n"); fprintf(stderr, " the delta calculation.\n"); fprintf(stderr, " Order n can be greater than 2.\n"); fprintf(stderr, " -M magic : magic number [N/A]\n"); fprintf(stderr, " valid only when -R option is\n"); fprintf(stderr, " specified.\n"); fprintf(stderr, " -n N : order of regression polynomial [N/A]\n"); fprintf(stderr, " Order must be less than or\n"); fprintf(stderr, " equal to the max of (Wfn + Wbn).\n"); fprintf(stderr, " -e e : small value added to [%g]\n", FLOOR); fprintf(stderr, " diagonal component for \n"); fprintf(stderr, " calculating regression coefficients \n"); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " static feature vectors [stdin]\n"); fprintf(stderr, " stdout:\n"); fprintf(stderr, " static and dynamic feature vectors\n"); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } /* calculate regression polynomial coefficients */ void get_coef(double *input, double *output, int dw_num, int *position, int non_magic_frame, int total, int length, int *win_size_forward, int *win_size_backward, int poly_order, double floor) { int i, j, k, l, t, d, ind = 0, index = 0, width = 0, input_val = 0, num_points = 0, num_order = 0, max_points = 0, max_degrees = 0, factorial = 1; double *poly_coef = NULL, *b = NULL, **p = NULL, *tmpvec = NULL, **inverse = NULL, **AA = NULL, **A = NULL; Boolean boundary_begin = FA, boundary_end = FA; max_points = win_size_forward[0] + win_size_backward[0] + 1; for (d = 1; d < dw_num - 1; d++) { if (max_points < win_size_forward[d] + win_size_backward[d] + 1) { max_points = win_size_forward[d] + win_size_backward[d] + 1; } } /* memory allocation */ max_degrees = max_points - 1; AA = ddgetmem(max_degrees + 1, max_degrees + 1); A = ddgetmem(max_points, max_degrees + 1); inverse = ddgetmem(max_degrees + 1, max_degrees + 1); poly_coef = dgetmem(max_degrees + 1); b = dgetmem(max_points); p = ddgetmem(total, max_points + 1); tmpvec = dgetmem(max_degrees + 1); for (d = 0; d < dw_num - 1; d++) { if (magic_flag == TR) { /* fill magic number in output stream */ for (t = 0; t < non_magic_frame; t++) { for (l = 0; l < length; l++) { if (d == 0) { output[dw_num * length * t + l] = magic; output[dw_num * length * t + length + l] = magic; } else { output[dw_num * length * t + (d + 1) * length + l] = magic; } } } } /* decide number of points and order of regression polynomial from window size */ num_points = win_size_forward[d] + win_size_backward[d] + 1; if (poly_flag == FA) { /* order is not specified */ num_order = num_points - 1; } else { num_order = poly_order; } /* calculate regression coefficients for each frame */ for (t = 0; t < total; t++) { boundary_begin = boundary_end = FA; for (i = -win_size_backward[d]; i <= win_size_forward[d]; i++) { index = t + i; if (index < 0) { boundary_begin = TR; width = i; } else if (index >= total) { boundary_end = TR; width = i; } else { width = position[index] - position[t]; } p[t][i + win_size_backward[d]] = width; } for (i = 0; i < num_points; i++) { for (j = 0; j < num_order + 1; j++) { A[i][j] = pow(p[t][i], j); } } for (i = 0; i < num_order + 1; i++) { for (j = 0; j < num_order + 1; j++) { AA[i][j] = 0.0; for (k = 0; k < num_points; k++) { AA[i][j] += A[k][i] * A[k][j]; } } } if (floor != 0.0) { for (i = 0; i < num_order + 1; i++) { AA[i][i] += floor; } } invert(AA, inverse, num_order + 1); /* for each dimension of feature vector */ for (l = 0; l < length; l++) { for (i = -win_size_backward[d]; i <= win_size_forward[d]; i++) { index = t + i; if (index < 0) { input_val = input[length * position[0] + l]; } else if (index >= total) { input_val = input[length * position[total - 1] + l]; } else { input_val = input[length * position[index] + l]; } b[i + win_size_backward[d]] = input_val; } fillz(tmpvec, sizeof(*tmpvec), num_order + 1); for (i = 0; i < num_order + 1; i++) { for (j = 0; j < num_points; j++) { tmpvec[i] += A[j][i] * b[j]; } } fillz(poly_coef, sizeof(*poly_coef), num_order + 1); for (i = 0; i < num_order + 1; i++) { for (j = 0; j < num_order + 1; j++) { poly_coef[i] += inverse[i][j] * tmpvec[j]; } } if (d == 0) { /* output static */ ind = dw_num * length * position[t] + l; output[ind] = input[length * position[t] + l]; /* output delta */ ind += length; if (boundary_begin == TR && win_size_backward[d] == 1) { output[ind] = (input[length * position[t + 1] + l] - input[length * position[t] + l]) / (position[t + 1] - position[t]); } else if (boundary_end == TR && win_size_forward[d] == 1) { output[ind] = (input[length * position[t] + l] - input[length * position[t - 1] + l]) / (position[t] - position[t - 1]); } else { output[ind] = poly_coef[1]; } } else { /* output delta-delta or higher order (greater than 2) dynamic feature */ ind = dw_num * length * position[t] + (d + 1) * length + l; if (boundary_begin == TR && win_size_backward[d] == 1) { output[ind] = 0.0; } else if (boundary_end == TR && win_size_forward[d] == 1) { output[ind] = 0.0; } else { /* calculate factorial */ for (i = 1, factorial = 1; i <= d + 1; i++) { factorial *= i; } output[ind] = (double) factorial *poly_coef[d + 1]; } } } } } } int main(int argc, char *argv[]) { FILE *fp = stdin, *fpc = NULL; char *coef = NULL; double floor = FLOOR, *x = NULL, *dx = NULL, **dw_coef = NULL; int i, j, l, d, t, tj, fsize, leng = LENG, total = T, win_buf = 0, poly_order = POLYNOMIAL_ORDER; int dw_num = 1, **dw_width = NULL, dw_calccoef = -1, dw_coeflen = 1, dw_leng = 1; char **dw_fn = (char **) getmem(argc, sizeof(char *)); int non_magic_num, win_size_forward[2] = { 1, 1 }, win_size_backward[2] = { 1, 1}; float_list *top = NULL, *cur = NULL, *prev = NULL, *tmpf = NULL; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) { if (**++argv == '-') { switch (*(*argv + 1)) { case 'd': if (dw_calccoef == 1 || dw_calccoef == 2) { fprintf(stderr, "%s : Options '-r' and '-d' should not be defined simultaneously!\n", cmnd); return (1); } dw_calccoef = 0; if (isfloat(*++argv)) { dw_coeflen = 0; for (i = 0; (i < argc - 1) && isfloat(argv[i]); i++) { dw_coeflen += strlen(argv[i]) + 1; } dw_coeflen += 1; coef = dw_fn[dw_num] = getmem(dw_coeflen, sizeof(char)); for (j = 0; j < i; j++) { sprintf(coef, " %s", *argv); coef += strlen(*argv) + 1; if (j < i - 1) { argv++; argc--; } } } else { dw_fn[dw_num] = *argv; } dw_num++; --argc; break; case 'r': if (dw_calccoef == 0 || dw_calccoef == 2) { fprintf(stderr, "%s : Options '-r' and '-d' should not be defined simultaneously!\n", cmnd); return (1); } dw_calccoef = 1; dw_coeflen = atoi(*++argv); --argc; if ((dw_coeflen != 1) && (dw_coeflen != 2)) { fprintf(stderr, "%s : Number of delta parameter should be 1 or 2!\n", cmnd); return (1); } if (argc <= 1) { fprintf(stderr, "%s : Window size for delta parameter required!\n", cmnd); return (1); } dw_fn[dw_num] = *++argv; dw_num++; --argc; if (dw_coeflen == 2) { if (argc <= 1) { fprintf(stderr, "%s : Window size for delta-delta parameter required!\n", cmnd); return (1); } dw_fn[dw_num] = *++argv; dw_num++; --argc; } break; case 'm': leng = atoi(*++argv) + 1; --argc; break; case 'l': leng = atoi(*++argv); --argc; break; case 'R': if (dw_calccoef == 0 || dw_calccoef == 1) { fprintf(stderr, "%s : Options '-r', '-d' and '-R' should not be defined simultaneously!\n", cmnd); return (1); } dw_calccoef = 2; dw_num = atoi(*++argv) + 1; --argc; if (argc <= 1) { fprintf(stderr, "%s : Window size for delta-delta parameter required!\n", cmnd); return (1); } for (d = 0; d < dw_num - 1; d++) { if (*(argv + 1) != NULL) { if (sscanf(*++argv, "%d", &win_buf) < 1) { fprintf(stderr, "%s : Failure of reading window coefficient!\n", cmnd); return (1); } else { win_size_forward[d] = win_buf; --argc; } } else { fprintf(stderr, "%s : Window coefficient is lacked!\n", cmnd); return (1); } if (*(argv + 1) != NULL) { if (sscanf(*++argv, "%d", &win_buf) < 1) { fprintf(stderr, "%s : Failure of reading window coefficient!\n", cmnd); return (1); } else { win_size_backward[d] = win_buf; --argc; } } else { fprintf(stderr, "%s : Window coefficient is lacked!\n", cmnd); return (1); } } break; case 'M': if (*(argv + 1) != NULL) { if (sscanf(*++argv, "%lf", &magic) < 1) { fprintf(stderr, "%s : Failure of raeding magic number!\n", cmnd); return (1); } else { magic_flag = TR; --argc; } } else { fprintf(stderr, "%s : Magic number is lacked!\n", cmnd); return (1); } break; case 'n': if (*(argv + 1) != NULL) { if (sscanf(*++argv, "%d", &poly_order) < 1) { fprintf(stderr, "%s : Failure of reading regression polynomial order!\n", cmnd); return (1); } else { poly_flag = TR; --argc; } } else { fprintf(stderr, "%s : Order of regression polynomial is lacked!\n", cmnd); return (1); } break; case 'e': floor = atof(*++argv); if (floor < 0.0 || isdigit(**argv) == 0) { fprintf(stderr, "%s : 'e' option must be specified with positive value.\n", cmnd); usage(1); } --argc; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else fp = getfp(*argv, "rb"); } /* check order of regression polynomial */ if (dw_calccoef == 2) { if (poly_flag == TR) { for (d = 0; d < dw_num - 1; d++) { if (poly_order > win_size_forward[d] + win_size_backward[d]) { fprintf(stderr, "%s : Order of regression polynomial is too large!\n", cmnd); usage(1); } else if (poly_order <= 0) { fprintf(stderr, "%s : Order of regression polynomial must be larger than 0!\n", cmnd); usage(1); } } } } /* parse window files */ /* memory allocation */ if ((dw_width = (int **) getmem(dw_num, sizeof(int *))) == NULL) { fprintf(stderr, "%s : Cannot allocate memory!\n", cmnd); exit(1); } for (i = 0; i < dw_num; i++) if ((dw_width[i] = (int *) getmem(2, sizeof(int))) == NULL) { fprintf(stderr, "%s : Cannot allocate memory!\n", cmnd); exit(1); } if ((dw_coef = (double **) getmem(dw_num, sizeof(double *))) == NULL) { fprintf(stderr, "%s : Cannot allocate memory!\n", cmnd); exit(1); } /* window for static parameter */ dw_width[0][0] = dw_width[0][1] = 0; dw_coef[0] = dgetmem(1); dw_coef[0][0] = 1; /* set delta coefficients */ if (dw_calccoef == 0) { for (i = 1; i < dw_num; i++) { if (dw_fn[i][0] == ' ') { fsize = str2darray(dw_fn[i], &(dw_coef[i])); } else { /* read from file */ fpc = getfp(dw_fn[i], "rb"); /* check the number of coefficients */ fseek(fpc, 0L, 2); fsize = ftell(fpc) / sizeof(real); fseek(fpc, 0L, 0); /* read coefficients */ dw_coef[i] = dgetmem(fsize); freadf(dw_coef[i], sizeof(**(dw_coef)), fsize, fpc); } /* set pointer */ dw_leng = fsize / 2; dw_coef[i] += dw_leng; dw_width[i][0] = -dw_leng; dw_width[i][1] = dw_leng; if (fsize % 2 == 0) dw_width[i][1]--; } } else if (dw_calccoef == 1) { int a0, a1, a2; for (i = 1; i < dw_num; i++) { dw_leng = atoi(dw_fn[i]); if (dw_leng < 1) { fprintf(stderr, "%s : Width for regression coefficient shuould be more than 1!\n", cmnd); exit(1); } dw_width[i][0] = -dw_leng; dw_width[i][1] = dw_leng; dw_coef[i] = dgetmem(dw_leng * 2 + 1); dw_coef[i] += dw_leng; } dw_leng = atoi(dw_fn[1]); for (a1 = 0, j = -dw_leng; j <= dw_leng; a1 += j * j, j++); for (j = -dw_leng; j <= dw_leng; j++) dw_coef[1][j] = (double) j / (double) a1; if (dw_num > 2) { dw_leng = atoi(dw_fn[2]); for (a0 = a1 = a2 = 0, j = -dw_leng; j <= dw_leng; a0++, a1 += j * j, a2 += j * j * j * j, j++); for (j = -dw_leng; j <= dw_leng; j++) dw_coef[2][j] = 2 * ((double) (a0 * j * j - a1)) / ((double) (a2 * a0 - a1 * a1)); } } /* -- Count number of input vectors and read -- */ x = dgetmem(leng); top = prev = (float_list *) getmem(1, sizeof(float_list)); top->f = fgetmem(leng); total = 0; prev->next = NULL; while (freadf(x, sizeof(*x), leng, fp) == leng) { cur = (float_list *) getmem(1, sizeof(float_list)); cur->f = fgetmem(leng); for (i = 0; i < leng; i++) { cur->f[i] = (float) x[i]; } total++; prev->next = cur; cur->next = NULL; prev = cur; } free(x); x = dgetmem(leng * total); dx = dgetmem(dw_num * leng * total); fillz(dx, sizeof(*x), dw_num * leng * total); for (i = 0, tmpf = top->next; tmpf != NULL; i++, tmpf = tmpf->next) { for (j = 0; j < leng; j++) { x[i * leng + j] = tmpf->f[j]; } } if (dw_calccoef == 0 || dw_calccoef == 1) { /* calculate delta and delta-delta */ for (t = 0; t < total; t++) { for (d = 0; d < dw_num; d++) { for (j = dw_width[d][0]; j <= dw_width[d][1]; j++) { tj = t + j; if (tj < 0) tj = 0; if (!(tj < total)) tj = total - 1; for (l = 0; l < leng; l++) dx[dw_num * leng * t + leng * d + l] += dw_coef[d][j] * x[leng * tj + l]; } } } /* output static, delta, delta-delta */ fwritef(dx, sizeof(*dx), dw_num * total * leng, stdout); } else if (dw_calccoef == 2) { int *position = (int *) getmem(total, sizeof(int)); /* skip magic number */ if (magic_flag == TR) { for (t = 0, non_magic_num = 0; t < total; t++) { for (l = 0; l < leng; l++) { if (x[leng * t + l] == magic) { break; } } if (l == leng) { /* remember position of non-magic number */ position[non_magic_num] = t; non_magic_num++; } } } else { for (t = 0; t < total; t++) { position[t] = t; } non_magic_num = total; } /* calculate delta and delta-delta */ get_coef(x, dx, dw_num, position, total, non_magic_num, leng, win_size_forward, win_size_backward, poly_order, floor); /* output static, delta and delta-delta */ fwritef(dx, sizeof(*dx), dw_num * total * leng, stdout); } return (0); } SPTK-3.9/bin/df2/0000755001051300105040000000000012637167700010375 500000000000000SPTK-3.9/bin/df2/Makefile.am0000644001051300105040000000017612442245034012344 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = df2 df2_SOURCES = _df2.c df2.c df2_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/df2/Makefile.in0000644001051300105040000004251212637167410012364 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = df2$(EXEEXT) subdir = bin/df2 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_df2_OBJECTS = _df2.$(OBJEXT) df2.$(OBJEXT) df2_OBJECTS = $(am_df2_OBJECTS) df2_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(df2_SOURCES) DIST_SOURCES = $(df2_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include df2_SOURCES = _df2.c df2.c df2_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/df2/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/df2/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) df2$(EXEEXT): $(df2_OBJECTS) $(df2_DEPENDENCIES) $(EXTRA_df2_DEPENDENCIES) @rm -f df2$(EXEEXT) $(AM_V_CCLD)$(LINK) $(df2_OBJECTS) $(df2_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_df2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/df2.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/df2/_df2.c0000644001051300105040000001106312637156632011276 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /****************************************************** $Id: _df2.c,v 1.17 2015/12/14 01:14:12 uratec Exp $ 2nd order standard form digital filter double df2(x,sf,f0p,wbp,f0z,wbz,fp,fz,buf,bufp) double x : filter input double sf : sampling frequency double f0p : center frequency of pole double wbp : band width of pole double f0z : center frequency of zero double wbz : band witdth of zero int fp : if pole is exist then fp = 1 int fz : if zero is exist then fz = 1 double buf[] : buffer ( which require 3 ) int *bufp : work pointer return : filter output Dec.1995 Naohiro Isshiki *******************************************************/ #include #include #if defined(WIN32) #include "SPTK.h" #else #include #endif double df2(const double x, const double sf, const double f0p, const double wbp, const double f0z, const double wbz, const int fp, const int fz, double *buf, int *bufp) { double a[3], b[3]; double p, e; p = 4 * atan(1.0) / sf; e = exp(-p * wbz); a[0] = 1.0; if (fz) { a[1] = -2 * e * cos(2 * p * f0z); a[2] = e * e; } else { a[1] = 0; a[2] = 0; } e = exp(-p * wbp); b[0] = 1.0; if (fp) { b[1] = -2 * e * cos(2 * p * f0p); b[2] = e * e; } else { b[1] = 0; b[2] = 0; } return (dfs(x, b, 2, a, 2, buf, bufp)); } SPTK-3.9/bin/df2/df2.c0000644001051300105040000001745412637156632011151 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * 2nd Order Standard Form Digital Filter * * * * 1985.8 K.Tokuda * * 1995.12 N.Isshiki modified * * * * usage: * * df2 [ options ] [ infile ] > stdout * * options: * * -s s : sampling frequency(kHz) [10.0] * * -p f b : center frequency f(Hz) * * and band width b(Hz) of pole [N/A] * * -z f b : center frequency f(Hz) * * and band width b(Hz) of zero [N/A] * * note: * * -p and -z option can be specified repeatedly. * * * ************************************************************************/ static char *rcs_id = "$Id: df2.c,v 1.28 2015/12/14 01:14:12 uratec Exp $"; /* Standard C Libraries */ #include #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define SAMPLEF 10.0 #define SIZE 2048 /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - 2nd order standard form digital filter\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile ] > stdout \n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -s s : sampling frequency (kHz) [%.1f]\n", SAMPLEF); fprintf(stderr, " -p f b : center frequency f(Hz)\n"); fprintf(stderr, " and band width b(Hz) of pole [N/A]\n"); fprintf(stderr, " -z f b : center frequency f(Hz)\n"); fprintf(stderr, " and band width b(Hz) of zero [N/A]\n"); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " filter input (%s) [stdin]\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " filter output (%s)\n", FORMAT); fprintf(stderr, " note:\n"); fprintf(stderr, " -p and -z option can be specified repeatedly.\n"); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char *argv[]) { FILE *fpp = stdin; int bufp[SIZE], fp = 0, fz = 0, i, n, fp1, fz1; double x; double sf = SAMPLEF, af0[SIZE], bf0[SIZE], ab[SIZE], bb[SIZE]; double buf[SIZE][3]; double af01, bf01, ab1, bb1; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) if (**++argv == '-') { argc--; switch (*(*argv + 1)) { case 'f': sf = atof(*++argv); break; case 's': sf = atof(*++argv); break; case 'z': af0[fz] = atof(*++argv); argc--; ab[fz] = atof(*++argv); fz++; break; case 'p': bf0[fp] = atof(*++argv); argc--; bb[fp] = atof(*++argv); fp++; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else fpp = getfp(*argv, "rb"); sf *= 1000; /* kHz -> Hz */ n = (fp > fz) ? fp : fz; for (i = 0; i < n; i++) { fillz(buf[i], sizeof(**buf), 3); bufp[i] = 0; } for (;;) { if (freadf(&x, sizeof(x), 1, fpp) != 1) break; for (i = 0; i < n; i++) { bf01 = (i >= fp) ? 0 : bf0[i]; bb1 = (i >= fp) ? 0 : bb[i]; af01 = (i >= fz) ? 0 : af0[i]; ab1 = (i >= fz) ? 0 : ab[i]; fp1 = (i >= fp) ? 0 : 1; fz1 = (i >= fz) ? 0 : 1; x = df2(x, sf, bf01, bb1, af01, ab1, fp1, fz1, buf[i], &bufp[i]); } fwritef(&x, sizeof(x), 1, stdout); } return 0; } SPTK-3.9/bin/dfs/0000755001051300105040000000000012637167700010476 500000000000000SPTK-3.9/bin/dfs/Makefile.am0000644001051300105040000000017612442245035012446 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = dfs dfs_SOURCES = _dfs.c dfs.c dfs_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/dfs/Makefile.in0000644001051300105040000004251212637167411012466 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = dfs$(EXEEXT) subdir = bin/dfs ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_dfs_OBJECTS = _dfs.$(OBJEXT) dfs.$(OBJEXT) dfs_OBJECTS = $(am_dfs_OBJECTS) dfs_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(dfs_SOURCES) DIST_SOURCES = $(dfs_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include dfs_SOURCES = _dfs.c dfs.c dfs_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/dfs/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/dfs/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) dfs$(EXEEXT): $(dfs_OBJECTS) $(dfs_DEPENDENCIES) $(EXTRA_dfs_DEPENDENCIES) @rm -f dfs$(EXEEXT) $(AM_V_CCLD)$(LINK) $(dfs_OBJECTS) $(dfs_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_dfs.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dfs.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/dfs/_dfs.c0000644001051300105040000001105412637156632011500 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ $Id: _dfs.c,v 1.17 2015/12/14 01:14:12 uratec Exp $ Standard Form Digital Filter latice digital filter double dfs(x, a, m, b, n, buf, bufp) double x : filter input double a[0] : gain double a[1],...,a[m] : AR coefficints int m : order of AR part double b[0],...,b[n] : MA coefficents int n : order of MA part double buf[] : buffer int *bufp : pointer for buffer return : filter output 1987.11 K.Tokuda 1995.12 N.Isshiki ************************************************************************/ #include #if defined(WIN32) #include "SPTK.h" #else #include #endif double dfs(double x, double *a, int m, double *b, int n, double *buf, int *bufp) { double y = 0.0; int i, p; int max; n++; m++; (m < n) ? (max = n) : (max = m); x = x * a[0]; for (i = 1; i < m; i++) { if ((p = *bufp + i) >= max) p -= max; x -= buf[p] * a[i]; } buf[*bufp] = x; for (i = 0; i < n; i++) { if ((p = *bufp + i) >= max) p -= max; y += buf[p] * b[i]; } if (--*bufp < 0) *bufp += max; return (y); } SPTK-3.9/bin/dfs/dfs.c0000644001051300105040000002202512637156632011341 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************** * * * Digital Filter in Standard Form * * * * 1989.6 K.Tokuda * * 1995.12 N.Isshiiki modified * * usage: * * dfs [ options ] [ infile ] > stdout * * options: * * -a k a1 a2 ... aM : denominator coefficients [N/A] * * -b b0 b1 b2 ... bM : numerator coefficients [N/A] * * -p pfile : denominator coefficients file [NULL] * * -z zfile : numerator coefficients file [NULL] * * infile: * * input (float) * * stdout: * * output (float) * * * **************************************************************************/ static char *rcs_id = "$Id: dfs.c,v 1.29 2015/12/14 01:14:12 uratec Exp $"; /* Standard C Libraries */ #include #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Command Name */ char *cmnd; typedef struct _float_list { float *f; struct _float_list *next; } float_list; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - digital filter in standard form\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile ] > stdout \n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -a K a1...aM : denominator coefficients [N/A]\n"); fprintf(stderr, " -b b0 b1...bN : numerator coefficients [N/A]\n"); fprintf(stderr, " -p pfile : denominator coefficients file [NULL]\n"); fprintf(stderr, " -z zfile : numerator coefficients file [NULL]\n"); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " filter input (%s) [stdin]\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " filter output (%s)\n", FORMAT); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } double *read_coeff(int *argc, char ***argv, int *num) { int i; float_list *top, *cur, *prev, *tmpf, *tmpff; double *coeff = NULL; top = prev = (float_list *) malloc(sizeof(float_list)); top->f = fgetmem(1); while ((*argc - 1) && !isalpha(*(*(*argv + 1) + 1))) { cur = (float_list *) malloc(sizeof(float_list)); cur->f = fgetmem(1); cur->f[0] = atof(*++(*argv)); prev->next = cur; cur->next = NULL; prev = cur; (*argc)--; (*num)++; } coeff = dgetmem(*num + 1); for (i = 0, tmpf = top->next; tmpf != NULL; i++, tmpf = tmpff) { coeff[i] = tmpf->f[0]; tmpff = tmpf->next; free(tmpf->f); free(tmpf); } free(top); return (coeff); } double *read_coeff_file(FILE * fp, int *num) { int i; float_list *top, *cur, *prev, *tmpf, *tmpff; double *dat, *coeff = NULL; top = prev = (float_list *) malloc(sizeof(float_list)); top->f = fgetmem(1); dat = dgetmem(1); while (freadf(dat, sizeof(*dat), 1, fp) == 1) { cur = (float_list *) malloc(sizeof(float_list)); cur->f = fgetmem(1); cur->f[0] = dat[0]; prev->next = cur; cur->next = NULL; prev = cur; (*num)++; } coeff = dgetmem(*num + 1); for (i = 0, tmpf = top->next; tmpf != NULL; i++, tmpf = tmpff) { coeff[i] = tmpf->f[0]; tmpff = tmpf->next; free(tmpf->f); free(tmpf); } free(top); free(dat); return (coeff); } int main(int argc, char *argv[]) { double x, *a = NULL, *b = NULL, *d = NULL; int bufp = 0, max = 0, na = -1, nb = -1; char *file_z = "", *file_p = ""; FILE *fp_z = NULL, *fp_p = NULL; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) if (**++argv == '-') switch (*(*argv + 1)) { case 'a': a = read_coeff(&argc, &argv, &na); break; case 'b': b = read_coeff(&argc, &argv, &nb); break; case 'z': argc--; file_z = *++argv; break; case 'p': argc--; file_p = *++argv; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } else { fprintf(stderr, "%s : Invalid option!\n", cmnd); usage(1); } if (*file_z != '\0') { fp_z = getfp(file_z, "rb"); b = read_coeff_file(fp_z, &nb); } if (*file_p != '\0') { fp_p = getfp(file_p, "rb"); a = read_coeff_file(fp_p, &na); } if (na == -1) { a = dgetmem(1); na = 0; a[0] = 1.0; } if (nb == -1) { b = dgetmem(1); nb = 0; b[0] = 1.0; } max = (nb > na) ? (nb + 1) : (na + 1); d = dgetmem(max); while (freadf(&x, sizeof(x), 1, stdin) == 1) { x = dfs(x, a, na, b, nb, d, &bufp); fwritef(&x, sizeof(x), 1, stdout); } return 0; } SPTK-3.9/bin/dmp/0000755001051300105040000000000012637167700010502 500000000000000SPTK-3.9/bin/dmp/Makefile.am0000644001051300105040000000016712442245036012453 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = dmp dmp_SOURCES = dmp.c dmp_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/dmp/Makefile.in0000644001051300105040000004236012637167411012473 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = dmp$(EXEEXT) subdir = bin/dmp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_dmp_OBJECTS = dmp.$(OBJEXT) dmp_OBJECTS = $(am_dmp_OBJECTS) dmp_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(dmp_SOURCES) DIST_SOURCES = $(dmp_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include dmp_SOURCES = dmp.c dmp_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/dmp/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/dmp/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) dmp$(EXEEXT): $(dmp_OBJECTS) $(dmp_DEPENDENCIES) $(EXTRA_dmp_DEPENDENCIES) @rm -f dmp$(EXEEXT) $(AM_V_CCLD)$(LINK) $(dmp_OBJECTS) $(dmp_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmp.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/dmp/dmp.c0000644001051300105040000003516712637156632011364 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * Binary File Dump * * * * 1996.5 K.Koishida * * * * usage: * * dmp [options] [infile] > stdout * * options: * * -n n : block order (0,...,n) [EOD] * * -l l : block length (1,...,l) [EOD] * * +type : data type [f] * * c (char) C (unsigned char) * * s (short) S (unsigned short) * * i (int) I (unsigned int) * * i3 (int, 3byte) I3 (unsigned int, 3byte) * * l (long) L (unsigned long) * * le (long long) LE (unsigned long long) * * f (float) d (double) * * de (long double) * * %form : print format(printf style) [N/A] * * * ************************************************************************/ static char *rcs_id = "$Id: dmp.c,v 1.31 2015/12/14 05:34:34 uratec Exp $"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #include #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define SIZE 128 /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - binary file dump\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -n n : block order (0,...,n) [EOD]\n"); fprintf(stderr, " -l l : block length (1,...,l) [EOD]\n"); fprintf(stderr, " +type : data type [f]\n"); fprintf(stderr, " c (char, %lubyte) C (unsigned char, %lubyte)\n", (unsigned long) sizeof(char), (unsigned long) sizeof(unsigned char)); fprintf(stderr, " s (short, %lubyte) S (unsigned short, %lubyte)\n", (unsigned long) sizeof(short), (unsigned long) sizeof(unsigned short)); fprintf(stderr, " i3 (int, 3byte) I3 (unsigned int, 3byte)\n"); fprintf(stderr, " i (int, %lubyte) I (unsigned int, %lubyte)\n", (unsigned long) sizeof(int), (unsigned long) sizeof(unsigned int)); fprintf(stderr, " l (long, %lubyte) L (unsigned long, %lubyte)\n", (unsigned long) sizeof(long), (unsigned long) sizeof(unsigned long)); fprintf(stderr, " le (long long, %lubyte) LE (unsigned long long, %lubyte)\n", (unsigned long) sizeof(long long), (unsigned long) sizeof(unsigned long long)); fprintf(stderr, " f (float, %lubyte) d (double, %lubyte)\n", (unsigned long) sizeof(float), (unsigned long) sizeof(double)); fprintf(stderr, " de (long double, %lubyte)\n", (unsigned long) sizeof(long double)); fprintf(stderr, " %%form : print format(printf style) [N/A]\n"); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " data sequence [stdin]\n"); fprintf(stderr, " stdout:\n"); fprintf(stderr, " dumped sequence\n"); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char **argv) { int n = -1, i = 0, eflag = 0, lflag = 0, y; size_t size = sizeof(float); FILE *fp = stdin; char *s, c, cc = 'f'; char format[SIZE], form[SIZE]; int ff = 0; union u { char c; short s; int i; int i3; long l; long long le; unsigned char C; unsigned short S; unsigned int I; unsigned int I3; unsigned long L; unsigned long long LE; float f; double d; long double de; } x; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) if (*(s = *++argv) == '-') { c = *++s; switch (c) { case 'n': n = atoi(*++argv) + 1; --argc; break; case 'l': n = atoi(*++argv) - 1; lflag = 1; --argc; break; case 'e': eflag = 1 - eflag; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else if (*s == '+') { if (*(s + 2) == '%') { strcpy(format, s + 2); ff = 1; } c = *++s; switch (c) { case 'c': cc = 'c'; size = sizeof(char); break; case 's': cc = 's'; size = sizeof(short); break; case 'i': if (*(s + 1) == '3') { size = 3; cc = 't'; (*argv)++; } else { size = sizeof(int); cc = 'i'; } break; case 'l': if (*(s + 1) == 'e') { size = sizeof(long long); cc = 'u'; (*argv)++; } else { size = sizeof(long); cc = 'l'; } break; case 'C': size = sizeof(unsigned char); cc = 'C'; break; case 'S': size = sizeof(unsigned short); cc = 'S'; break; case 'I': if (*(s + 1) == '3') { size = 3; cc = 'T'; (*argv)++; } else { size = sizeof(unsigned int); cc = 'I'; } break; case 'L': if (*(s + 1) == 'E') { size = sizeof(unsigned long long); cc = 'U'; (*argv)++; } else { size = sizeof(unsigned long); cc = 'L'; } break; case 'f': size = sizeof(float); cc = 'f'; break; case 'd': if (*(s + 1) == 'e') { size = sizeof(long double); cc = 'v'; (*argv)++; } else { size = sizeof(double); cc = 'd'; } break; default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else if (*s == '%') { strcpy(format, s); ff = 1; } else fp = getfp(*argv, "rb"); for (i = 0;; i++) { if ((n >= 0) && (i >= n + lflag)) i = 0; if (freadx(&x.f, size, 1, fp) != 1) break; if (eflag) printf("%d\t0\n", i + lflag); switch (cc) { case 'c': strcpy(form, "%d\t%d\n"); if (ff) { strcpy(form, "%d\t"); strcat(form, format); strcat(form, "\n"); } printf(form, i + lflag, x.c); break; case 's': strcpy(form, "%d\t%d\n"); if (ff) { strcpy(form, "%d\t"); strcat(form, format); strcat(form, "\n"); } printf(form, i + lflag, x.s); break; case 't': strcpy(form, "%d\t%d\n"); if (ff) { strcpy(form, "%d\t"); strcat(form, format); strcat(form, "\n"); } y = x.i3 & 0x00FFFFFF; if (y >> 23 == 1) y = y | 0xFF000000; printf(form, i + lflag, y); break; case 'i': strcpy(form, "%d\t%d\n"); if (ff) { strcpy(form, "%d\t"); strcat(form, format); strcat(form, "\n"); } printf(form, i + lflag, x.i); break; case 'l': strcpy(form, "%d\t%d\n"); if (ff) { strcpy(form, "%d\t"); strcat(form, format); strcat(form, "\n"); } printf(form, i + lflag, x.l); break; case 'u': strcpy(form, "%d\t%lld\n"); if (ff) { strcpy(form, "%d\t"); strcat(form, format); strcat(form, "\n"); } printf(form, i + lflag, x.le); break; case 'C': strcpy(form, "%d\t%u\n"); if (ff) { strcpy(form, "%d\t"); strcat(form, format); strcat(form, "\n"); } printf(form, i + lflag, x.C); break; case 'S': strcpy(form, "%d\t%u\n"); if (ff) { strcpy(form, "%d\t"); strcat(form, format); strcat(form, "\n"); } printf(form, i + lflag, x.S); break; case 'I': strcpy(form, "%d\t%u\n"); if (ff) { strcpy(form, "%d\t"); strcat(form, format); strcat(form, "\n"); } printf(form, i + lflag, x.I); break; case 'T': strcpy(form, "%d\t%u\n"); if (ff) { strcpy(form, "%d\t"); strcat(form, format); strcat(form, "\n"); } y = x.I3 & 0x00FFFFFF; printf(form, i + lflag, y); break; case 'L': strcpy(form, "%d\t%u\n"); if (ff) { strcpy(form, "%d\t"); strcat(form, format); strcat(form, "\n"); } printf(form, i + lflag, x.L); break; case 'U': strcpy(form, "%d\t%llu\n"); if (ff) { strcpy(form, "%d\t"); strcat(form, format); strcat(form, "\n"); } printf(form, i + lflag, x.LE); break; case 'f': strcpy(form, "%d\t%g\n"); if (ff) { strcpy(form, "%d\t"); strcat(form, format); strcat(form, "\n"); } printf(form, i + lflag, x.f); break; case 'd': strcpy(form, "%d\t%g\n"); if (ff) { strcpy(form, "%d\t"); strcat(form, format); strcat(form, "\n"); } printf(form, i + lflag, x.d); break; case 'v': strcpy(form, "%d\t%Lg\n"); if (ff) { strcpy(form, "%d\t"); strcat(form, format); strcat(form, "\n"); } printf(form, i + lflag, x.de); break; } if (eflag) printf("%d\t0\n", i + lflag); } return 0; } SPTK-3.9/bin/dtw/0000755001051300105040000000000012637167701010521 500000000000000SPTK-3.9/bin/dtw/Makefile.am0000644001051300105040000000016612442245040012463 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = dtw dtw_SOURCES = dtw.c dtw_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/dtw/Makefile.in0000644001051300105040000004235712637167411012517 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = dtw$(EXEEXT) subdir = bin/dtw ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_dtw_OBJECTS = dtw.$(OBJEXT) dtw_OBJECTS = $(am_dtw_OBJECTS) dtw_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(dtw_SOURCES) DIST_SOURCES = $(dtw_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include dtw_SOURCES = dtw.c dtw_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/dtw/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/dtw/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) dtw$(EXEEXT): $(dtw_OBJECTS) $(dtw_DEPENDENCIES) $(EXTRA_dtw_DEPENDENCIES) @rm -f dtw$(EXEEXT) $(AM_V_CCLD)$(LINK) $(dtw_OBJECTS) $(dtw_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dtw.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/dtw/dtw.c0000644001051300105040000015400012637156632011404 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /******************************************************************************* * * * Dynamic Time Warping * * * * 2011.12 Akira Tamamori * * usage: * * dtw [ options ] reffile [ infile ] > stdout * * options: * * -m M : order of vector [24] * * -l L : dimension of vector [m+1] * * -t T : number of test vectors [N/A] * * -r R : number of reference vectors [N/A] * * -n N : type of norm used for calculation [2] * * of local distance * * 1 : L1-norm * * 2 : L2-norm * * -p P : local path constraint [5] * * -s sfile : output score of dynamic time warping [FALSE] * * -v out_vfile : output concatenated test/reference [FALSE] * * data sequence along the Vitebi path * * -V in_vfile : concatenate test and reference vectors [FALSE] * * in accordance with the Vitebi path * * information written in in_vfile * * infile: * * test vector sequence * * x_1(1), ..., x_1(L), x_2(1), ..., x_2(L), ... * * reffile: * * reference vector sequence * * y_1(1), ..., y_1(L), y_2(1), ..., y_2(L), ... * * stdout: * * concatenated test/reference vector sequence * * along the Vitebi path * * x_1(1), ..., x_1(L), y_1(1), ..., y_1(L), ... * * * *******************************************************************************/ static char *rcs_id = "$Id: dtw.c,v 1.13 2015/12/14 01:14:13 uratec Exp $"; /* Standard C Libraries */ #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #include #include #include #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define LENG 24 /* Command Name */ char *cmnd; #define PATH_NG FA #define PATH_OK TR typedef struct _Dtw_Cell { double local; /* local cost */ double global; /* global cost */ int backptr[2]; /* back pointer for Viterbi path */ Boolean is_region; int allow_path; } Dtw_Cell; typedef struct _Data { double *input; int total; /* total number of vectors */ int dim; /* dimension of input vector */ int *viterbi; /* Viterbi path */ } Data; typedef struct _Dtw_Table { Dtw_Cell **cell; Data data[2]; /* two comparative data */ int vit_leng; /* length of Viterbi path */ int path; /* type of local constraint */ int norm; /* type of norm for local cost */ double *weight; /* weight on the local path */ } Dtw_Table; typedef struct _Float_List { float *f; struct _Float_List *next; } Float_List; static int round_up(double dat) { return (int) (dat + 0.5); } double *read_input(FILE * fp, int dim, int *length) { int i, j; double *x = NULL, *input; Float_List *top, *prev, *cur, *next, *tmp; input = dgetmem(dim); top = prev = (Float_List *) malloc(sizeof(Float_List)); *length = 0; prev->next = NULL; while (freadf(input, sizeof(*input), dim, fp) == dim) { cur = (Float_List *) malloc(sizeof(Float_List)); cur->f = (float *) malloc(sizeof(float) * dim); for (i = 0; i < dim; i++) { cur->f[i] = (float) input[i]; } (*length)++; prev->next = cur; cur->next = NULL; prev = cur; } x = dgetmem(*length * dim); for (i = 0, tmp = top->next; tmp != NULL; i++, tmp = tmp->next) { for (j = 0; j < dim; j++) { x[i * dim + j] = tmp->f[j]; } } for (tmp = top->next; tmp != NULL; tmp = next) { cur = tmp; next = tmp->next; free(cur->f); cur->f = NULL; free(cur); cur = NULL; } free(top); free(input); top = NULL; input = NULL; return (x); } Dtw_Cell **malloc_Dtw_Cell(int size1, int size2) { Dtw_Cell **tmpcell, *tmpcell2; int i, j; void usage(int status); tmpcell = (Dtw_Cell **) malloc(sizeof(Dtw_Cell *) * size1); if (tmpcell == NULL) { fprintf(stderr, "ERROR: Can't allocate memory !\n"); usage(EXIT_FAILURE); } tmpcell2 = (Dtw_Cell *) malloc(sizeof(Dtw_Cell) * size1 * size2); if (tmpcell2 == NULL) { fprintf(stderr, "ERROR: Can't allocate memory !\n"); usage(EXIT_FAILURE); } for (i = 0, j = 0; i < size1; i++, j += size2) { tmpcell[i] = tmpcell2 + j; } return (tmpcell); } void init_dtw(Dtw_Table * table, int leng, double *input1, double *input2, int total1, int total2, int path, int norm) { int i, size[2] = { total1, total2 }; void usage(int status); if (path == 3 || path == 4) { if (total2 > total1) { fprintf(stderr, "Can't perform DTW !\n" "The number of the reference vectors (= %d) must be less than " "the number of the test vectors (= %d). \n", total2, total1); usage(EXIT_FAILURE); } } else if (path == 5 || path == 6 || path == 7) { if (total1 / 2 >= total2) { fprintf(stderr, "Can't perform DTW !\n" "The number of the test vectors (= %d) must be less than " "the twice of the reference vectors (= 2 * %d = %d). \n", total1, total2, 2 * total2); usage(EXIT_FAILURE); } else if (total2 / 2 >= total1) { fprintf(stderr, "Can't perform DTW !\n" "The number of the reference vectors (= %d) must be less than " "the twice of the test vectors (= 2 * %d = %d). \n", total2, total1, 2 * total1); usage(EXIT_FAILURE); } } table->cell = (Dtw_Cell **) malloc_Dtw_Cell(size[0], size[1]); table->data[0].input = input1; table->data[1].input = input2; for (i = 0; i < 2; i++) { table->data[i].total = size[i]; table->data[i].dim = leng; table->data[i].viterbi = (int *) malloc(sizeof(int) * (size[0] + size[1])); if (table->data[i].viterbi == NULL) { fprintf(stderr, "ERROR: Can't allocate memory at init_dtw() !\n"); usage(EXIT_FAILURE); } } table->path = path; if (norm != 1 && norm != 2) { fprintf(stderr, "%s : type of norm must be 1 or 2!\n", cmnd); usage(EXIT_FAILURE); } table->norm = norm; if (path < 1 || path > 7) { fprintf(stderr, "%s : local path constraint must be between 1 and 7!\n", cmnd); usage(EXIT_FAILURE); } switch (path) { case 1: table->weight = dgetmem(2); table->weight[0] = 1.0; table->weight[1] = 1.0; break; case 2: table->weight = dgetmem(3); table->weight[0] = 1.0; table->weight[1] = 2.0; table->weight[2] = 1.0; break; case 3: table->weight = dgetmem(2); table->weight[0] = 1.0; table->weight[1] = 2.0; break; case 4: table->weight = dgetmem(3); table->weight[0] = 1.0; table->weight[1] = 2.0; table->weight[2] = 3.0; break; case 5: table->weight = dgetmem(5); table->weight[0] = 2.0; table->weight[1] = 1.0; table->weight[2] = 2.0; table->weight[3] = 2.0; table->weight[4] = 1.0; break; case 6: table->weight = dgetmem(3); table->weight[0] = 3.0; table->weight[1] = 2.0; table->weight[2] = 3.0; break; case 7: table->weight = dgetmem(6); table->weight[0] = 1.0; table->weight[1] = 1.0; table->weight[2] = 1.0; table->weight[3] = 1.0; table->weight[4] = 1.0; table->weight[5] = 1.0; break; default: break; } } void check_enabled_region_type_1(Dtw_Table * table) { int i, j, tx = table->data[0].total, ty = table->data[1].total; for (j = 0; j < ty; j++) { for (i = 0; i < tx; i++) { table->cell[i][j].is_region = PATH_OK; } } } void check_enabled_region_type_2(Dtw_Table * table) { int i, j, tx = table->data[0].total, ty = table->data[1].total; for (j = 0; j < ty; j++) { for (i = 0; i < tx; i++) { table->cell[i][j].is_region = PATH_OK; } } } void check_enabled_region_type_3(Dtw_Table * table) { int i, j, tx = table->data[0].total, ty = table->data[1].total, range = tx - ty; Dtw_Cell **cell = table->cell; cell[0][0].is_region = PATH_OK; for (j = 1; j < ty; j++) { cell[0][j].is_region = PATH_NG; } for (i = 1; i < tx; i++) { cell[i][0].is_region = PATH_NG; } for (i = 1; i <= range; i++) { cell[i][0].is_region = PATH_OK; } for (j = 1; j < ty; j++) { for (i = 1; i < j; i++) { cell[i][j].is_region = PATH_NG; } for (i = j; i <= range + j; i++) { cell[i][j].is_region = PATH_OK; } for (; i < tx; i++) { cell[i][j].is_region = PATH_NG; } } for (j = 1; j < ty; j++) { for (i = 1; i < tx; i++) { if (cell[i][j].is_region == PATH_OK) { if (cell[i - 1][j].is_region == PATH_OK && cell[i - 1][j - 1].is_region == PATH_OK) { cell[i][j].allow_path = 1; } else if (cell[i - 1][j].is_region == PATH_OK) { cell[i][j].allow_path = 2; } else if (cell[i - 1][j - 1].is_region == PATH_OK) { cell[i][j].allow_path = 3; } } } } } void check_enabled_region_type_4(Dtw_Table * table) { int i, j, tx = table->data[0].total, ty = table->data[1].total; Dtw_Cell **cell = table->cell; cell[0][0].is_region = PATH_OK; for (j = 1; j < ty; j++) { cell[0][j].is_region = PATH_NG; } for (i = 1; i < tx - ty / 2; i++) { cell[i][0].is_region = PATH_OK; } for (; i < tx; i++) { cell[i][0].is_region = PATH_NG; } for (i = 1; i < tx - ty / 2 + 1; i++) { cell[i][1].is_region = PATH_OK; } for (; i < tx; i++) { cell[i][1].is_region = PATH_NG; } for (j = 2; j < ty; j++) { for (i = 0; i < round_up((double) j / 2); i++) { cell[i][j].is_region = PATH_NG; } for (; i < tx - ty / 2 + round_up((double) j / 2); i++) { cell[i][j].is_region = PATH_OK; } for (; i < tx; i++) { cell[i][j].is_region = PATH_NG; } } cell[tx - 1][ty - 1].is_region = PATH_OK; for (j = 2; j < ty; j++) { for (i = 2; i < tx; i++) { if (cell[i][j].is_region == PATH_OK) { if (cell[i - 1][j].is_region == PATH_OK && cell[i - 1][j - 1].is_region == PATH_OK && cell[i - 1][j - 2].is_region == PATH_OK) { cell[i][j].allow_path = 1; } else if (cell[i - 1][j].is_region == PATH_OK && cell[i - 1][j - 1].is_region == PATH_OK) { cell[i][j].allow_path = 2; } else if (cell[i - 1][j - 1].is_region == PATH_OK && cell[i - 1][j - 2].is_region == PATH_OK) { cell[i][j].allow_path = 3; } else if (cell[i - 1][j - 1].is_region == PATH_OK) { cell[i][j].allow_path = 4; } else if (cell[i - 1][j - 2].is_region == PATH_OK) { cell[i][j].allow_path = 5; } } } } } void check_enabled_region_type_5(Dtw_Table * table) { int i, j, tx = table->data[0].total, ty = table->data[1].total; Dtw_Cell **cell = table->cell; cell[0][0].is_region = PATH_OK; for (j = 1; j < ty; j++) { for (i = 1; i < tx; i++) { cell[i][j].is_region = PATH_OK; } } for (i = 1; i < tx; i++) { cell[i][0].is_region = PATH_NG; } for (j = 1; j < ty; j++) { cell[0][j].is_region = PATH_NG; } for (j = 1; j < ty - 2; j++) { for (i = 2 * j + 1; i < tx; i++) { cell[i][j].is_region = PATH_NG; } } for (i = 1; i < tx - 2; i++) { for (j = 2 * i + 1; j < ty; j++) { cell[i][j].is_region = PATH_NG; } } /* Backward pruning */ for (j = ty - 1; j > 0; j--) { for (i = 2 * (j - ty) + tx; i > 0; i--) { cell[i][j].is_region = PATH_NG; } } for (i = tx - 1; i > 0; i--) { for (j = 2 * (i - tx) + ty; j > 0; j--) { cell[i][j].is_region = PATH_NG; } } for (j = 2; j < ty - 1; j++) { for (i = 2; i < tx - 1; i++) { if (cell[i][j].is_region == PATH_OK) { if (cell[i - 2][j - 1].is_region == PATH_OK && cell[i - 1][j - 1].is_region == PATH_OK && cell[i - 1][j - 2].is_region == PATH_OK) { cell[i][j].allow_path = 1; } else if (cell[i - 2][j - 1].is_region == PATH_OK && cell[i - 1][j - 1].is_region == PATH_OK) { cell[i][j].allow_path = 2; } else if (cell[i - 1][j - 1].is_region == PATH_OK && cell[i - 1][j - 2].is_region == PATH_OK) { cell[i][j].allow_path = 3; } else if (cell[i - 2][j - 1].is_region == PATH_OK) { cell[i][j].allow_path = 4; } else if (cell[i - 1][j - 1].is_region == PATH_OK) { cell[i][j].allow_path = 5; } else if (cell[i - 1][j - 2].is_region == PATH_OK) { cell[i][j].allow_path = 6; } } } } } void check_enabled_region_type_6(Dtw_Table * table) { int i, j, tx = table->data[0].total, ty = table->data[1].total; Dtw_Cell **cell = table->cell; cell[0][0].is_region = PATH_OK; for (j = 1; j < ty; j++) { for (i = 1; i < tx; i++) { cell[i][j].is_region = PATH_OK; } } for (i = 1; i < tx; i++) { cell[i][0].is_region = PATH_NG; } for (j = 1; j < ty; j++) { cell[0][j].is_region = PATH_NG; } for (j = 1; j < ty - 2; j++) { for (i = 2 * j + 1; i < tx; i++) { cell[i][j].is_region = PATH_NG; } } for (i = 1; i < tx - 2; i++) { for (j = 2 * i + 1; j < ty; j++) { cell[i][j].is_region = PATH_NG; } } /* Backward pruning */ for (j = ty - 1; j > 0; j--) { for (i = tx - 1 + 2 * (j - ty) + 1; i > 0; i--) { cell[i][j].is_region = PATH_NG; } } for (i = tx - 1; i > 0; i--) { for (j = ty - 1 + 2 * (i - tx) + 1; j > 0; j--) { cell[i][j].is_region = PATH_NG; } } for (j = 2; j < ty; j++) { for (i = 2; i < tx; i++) { if (cell[i][j].is_region == PATH_OK) { if (cell[i - 2][j - 1].is_region == PATH_OK && cell[i - 1][j - 1].is_region == PATH_OK && cell[i - 1][j - 2].is_region == PATH_OK) { cell[i][j].allow_path = 1; } else if (cell[i - 2][j - 1].is_region == PATH_OK && cell[i - 1][j - 1].is_region == PATH_OK) { cell[i][j].allow_path = 2; } else if (cell[i - 1][j - 1].is_region == PATH_OK && cell[i - 1][j - 2].is_region == PATH_OK) { cell[i][j].allow_path = 3; } else if (cell[i - 2][j - 1].is_region == PATH_OK) { cell[i][j].allow_path = 4; } else if (cell[i - 1][j - 1].is_region == PATH_OK) { cell[i][j].allow_path = 5; } else if (cell[i - 1][j - 2].is_region == PATH_OK) { cell[i][j].allow_path = 6; } } } } } void check_enabled_region_type_7(Dtw_Table * table) { int i, j, tx = table->data[0].total, ty = table->data[1].total; Dtw_Cell **cell = table->cell; cell[0][0].is_region = PATH_OK; for (j = 1; j < ty; j++) { for (i = 1; i < tx; i++) { cell[i][j].is_region = PATH_OK; } } for (i = 1; i < tx; i++) { cell[i][0].is_region = PATH_NG; } for (j = 1; j < ty; j++) { cell[0][j].is_region = PATH_NG; } for (j = 1; j < ty - 2; j++) { for (i = 2 * j + 1; i < tx; i++) { cell[i][j].is_region = PATH_NG; } } for (i = 1; i < tx - 2; i++) { for (j = 2 * i + 1; j < ty; j++) { cell[i][j].is_region = PATH_NG; } } /* Backward pruning */ for (j = ty - 1; j > 0; j--) { for (i = tx - 1 + 2 * (j - ty) + 1; i > 0; i--) { cell[i][j].is_region = PATH_NG; } } for (i = tx - 1; i > 0; i--) { for (j = ty - 1 + 2 * (i - tx) + 1; j > 0; j--) { cell[i][j].is_region = PATH_NG; } } for (j = 2; j < ty; j++) { for (i = 2; i < tx; i++) { if (cell[i][j].is_region == PATH_OK) { if (cell[i - 2][j - 1].is_region == PATH_OK && cell[i - 2][j - 2].is_region == PATH_OK && cell[i - 1][j - 1].is_region == PATH_OK && cell[i - 1][j - 2].is_region == PATH_OK) { cell[i][j].allow_path = 1; } else if (cell[i - 2][j - 2].is_region == PATH_OK && cell[i - 1][j - 1].is_region == PATH_OK && cell[i - 1][j - 2].is_region == PATH_OK) { cell[i][j].allow_path = 2; } else if (cell[i - 2][j - 1].is_region == PATH_OK && cell[i - 2][j - 2].is_region == PATH_OK && cell[i - 1][j - 1].is_region == PATH_OK) { cell[i][j].allow_path = 3; } else if (cell[i - 1][j - 1].is_region == PATH_OK && cell[i - 1][j - 2].is_region == PATH_OK) { cell[i][j].allow_path = 4; } else if (cell[i - 2][j - 2].is_region == PATH_OK && cell[i - 1][j - 1].is_region == PATH_OK) { cell[i][j].allow_path = 5; } else if (cell[i - 2][j - 1].is_region == PATH_OK && cell[i - 1][j - 1].is_region == PATH_OK) { cell[i][j].allow_path = 6; } else if (cell[i - 2][j - 1].is_region == PATH_OK) { cell[i][j].allow_path = 7; } else if (cell[i - 1][j - 1].is_region == PATH_OK) { cell[i][j].allow_path = 8; } else if (cell[i - 1][j - 2].is_region == PATH_OK) { cell[i][j].allow_path = 9; } } } } } void calc_global_cost_type_1(Dtw_Table * table) { int i, j, tx = table->data[0].total, ty = table->data[1].total; double local, path1, path2; Dtw_Cell **cell = table->cell; double *weight = table->weight; for (i = 1; i < tx; i++) { cell[i][0].global = cell[i - 1][0].global +weight[0] * cell[i][0].local; cell[i][0].backptr[0] = i - 1; cell[i][0].backptr[1] = 0; } for (j = 1; j < ty; j++) { cell[0][j].global = cell[0][j - 1].global +weight[1] * cell[0][j].local; cell[0][j].backptr[0] = 0; cell[0][j].backptr[1] = j - 1; } for (i = 1; i < tx; i++) { for (j = 1; j < ty; j++) { local = cell[i][j].local; path1 = cell[i - 1][j].global +weight[0] * local; path2 = cell[i][j - 1].global +weight[1] * local; if (path1 < path2) { cell[i][j].global = path1; cell[i][j].backptr[0] = i - 1; cell[i][j].backptr[1] = j; } else { cell[i][j].global = path2; cell[i][j].backptr[0] = i; cell[i][j].backptr[1] = j - 1; } } } cell[tx - 1][ty - 1].global /=(tx + ty); } void calc_global_cost_type_2(Dtw_Table * table) { int i, j, tx = table->data[0].total, ty = table->data[1].total; double local, min, path1, path2, path3; Dtw_Cell **cell = table->cell; double *weight = table->weight; for (i = 1; i < tx; i++) { if (cell[i][0].is_region == PATH_OK) { cell[i][0].global = cell[i - 1][0].global +weight[0] * cell[i][0].local; cell[i][0].backptr[0] = i - 1; cell[i][0].backptr[1] = 0; } } for (j = 1; j < ty; j++) { cell[0][j].global = cell[0][j - 1].global +weight[2] * cell[0][j].local; cell[0][j].backptr[0] = 0; cell[0][j].backptr[1] = j - 1; } for (j = 1; j < ty; j++) { for (i = 1; i < tx; i++) { local = cell[i][j].local; path1 = cell[i - 1][j].global +weight[0] * local; path2 = cell[i - 1][j - 1].global +weight[1] * local; path3 = cell[i][j - 1].global +weight[2] * local; cell[i][j].backptr[0] = i - 1; cell[i][j].backptr[1] = j; min = path1; if (min >= path2) { min = path2; cell[i][j].backptr[0] = i - 1; cell[i][j].backptr[1] = j - 1; } if (min >= path3) { min = path3; cell[i][j].backptr[0] = i; cell[i][j].backptr[1] = j - 1; } cell[i][j].global = min; } } cell[tx - 1][ty - 1].global /=(tx + ty); } void calc_global_cost_type_3(Dtw_Table * table) { int i, j, tx = table->data[0].total, ty = table->data[1].total; double local, min = 0.0, path1, path2; Dtw_Cell **cell = table->cell; double *weight = table->weight; for (i = 1; i < tx; i++) { if (cell[i][0].is_region == PATH_OK) { cell[i][0].global = cell[i - 1][0].global +weight[0] * cell[i][0].local; cell[i][0].backptr[0] = i - 1; cell[i][0].backptr[1] = 0; } } for (j = 1; j < ty; j++) { for (i = 1; i < tx; i++) { local = cell[i][j].local; if (cell[i][j].is_region == PATH_OK) { path1 = cell[i - 1][j].global +weight[0] * local; path2 = cell[i - 1][j - 1].global +weight[1] * local; switch (cell[i][j].allow_path) { case 1: min = path1; cell[i][j].backptr[0] = i - 1; cell[i][j].backptr[1] = j; if (min >= path2) { min = path2; cell[i][j].backptr[0] = i - 1; cell[i][j].backptr[1] = j - 1; } cell[i][j].global = min; break; case 2: cell[i][j].global = path1; cell[i][j].backptr[0] = i - 1; cell[i][j].backptr[1] = j; break; case 3: cell[i][j].global = path2; cell[i][j].backptr[0] = i - 1; cell[i][j].backptr[1] = j - 1; default: break; } } } } cell[tx - 1][ty - 1].global /=(tx + ty); } void calc_global_cost_type_4(Dtw_Table * table) { int i, j, tx = table->data[0].total, ty = table->data[1].total; double local = 0.0, min = 0.0, path1, path2, path3; Dtw_Cell **cell = table->cell; double *weight = table->weight; for (i = 1; i < tx; i++) { if (cell[i][0].is_region == PATH_OK) { cell[i][0].global = cell[i - 1][0].global +weight[0] * cell[i][0].local; cell[i][0].backptr[0] = i - 1; cell[i][0].backptr[1] = 0; } } cell[1][1].global = cell[0][0].global +weight[1] * cell[1][1].local; cell[1][1].backptr[0] = 0; cell[1][1].backptr[1] = 0; for (i = 1; i < tx; i++) { if (cell[i][1].is_region == PATH_OK) { min = cell[i - 1][1].global +weight[0] * local; cell[i][1].backptr[0] = i - 1; cell[i][1].backptr[1] = 1; if (min >= cell[i - 1][0].global +weight[1] * local) { min = cell[i - 1][0].global +weight[1] * local; cell[i][1].backptr[0] = i - 1; cell[i][1].backptr[1] = 0; } cell[i][1].global = min; } } cell[1][2].global = cell[0][0].global +weight[2] * cell[1][2].local; cell[1][2].backptr[0] = 0; cell[1][2].backptr[1] = 0; for (j = 2; j < ty; j++) { for (i = 2; i < tx; i++) { local = cell[i][j].local; if (cell[i][j].is_region == PATH_OK) { path1 = cell[i - 1][j].global +weight[0] * local; path2 = cell[i - 1][j - 1].global +weight[1] * local; path3 = cell[i - 1][j - 2].global +weight[2] * local; switch (cell[i][j].allow_path) { case 1: min = path1; cell[i][j].backptr[0] = i - 1; cell[i][j].backptr[1] = j; if (min >= path2) { min = path2; cell[i][j].backptr[0] = i - 1; cell[i][j].backptr[1] = j - 1; } if (min >= path3) { min = path3; cell[i][j].backptr[0] = i - 1; cell[i][j].backptr[1] = j - 2; } cell[i][j].global = min; break; case 2: min = path1; cell[i][j].backptr[0] = i - 1; cell[i][j].backptr[1] = j; if (min >= path2) { min = path2; cell[i][j].backptr[0] = i - 1; cell[i][j].backptr[1] = j - 1; } cell[i][j].global = min; break; case 3: min = path2; cell[i][j].backptr[0] = i - 1; cell[i][j].backptr[1] = j - 1; if (min >= path3) { min = path3; cell[i][j].backptr[0] = i - 1; cell[i][j].backptr[1] = j - 2; } cell[i][j].global = min; break; case 4: cell[i][j].global = path2; cell[i][j].backptr[0] = i - 1; cell[i][j].backptr[1] = j - 1; break; case 5: cell[i][j].global = path3; cell[i][j].backptr[0] = i - 1; cell[i][j].backptr[1] = j - 2; break; default: break; } } } } cell[tx - 1][ty - 1].global /=(tx + ty); } void calc_global_cost_type_5(Dtw_Table * table) { int i, j, tx = table->data[0].total, ty = table->data[1].total; double min = 0.0, path1, path2, path3; Dtw_Cell **cell = table->cell; double *weight = table->weight; cell[2][1].global = cell[0][0].global +weight[0] * cell[1][1].local + weight[1] * cell[2][1].local; cell[2][1].backptr[0] = 0; cell[2][1].backptr[1] = 0; cell[1][1].global = cell[0][0].global +weight[2] * cell[1][1].local; cell[1][1].backptr[0] = 0; cell[1][1].backptr[1] = 0; cell[1][2].global = cell[0][0].global +weight[3] * cell[1][1].local + weight[4] * cell[1][2].local; cell[1][2].backptr[0] = 0; cell[1][2].backptr[1] = 0; for (j = 2; j < ty - 1; j++) { for (i = 2; i < tx - 1; i++) { if (cell[i][j].is_region == PATH_OK) { path1 = cell[i - 2][j - 1].global + weight[0] * cell[i - 1][j].local + weight[1] * cell[i][j].local; path2 = cell[i - 1][j - 1].global +weight[2] * cell[i][j].local; path3 = cell[i - 1][j - 2].global + weight[3] * cell[i][j - 1].local + weight[4] * cell[i][j].local; switch (cell[i][j].allow_path) { case 1: min = path1; cell[i][j].backptr[0] = i - 2; cell[i][j].backptr[1] = j - 1; if (min > path2) { min = path2; cell[i][j].backptr[0] = i - 1; cell[i][j].backptr[1] = j - 1; } if (min > path3) { min = path3; cell[i][j].backptr[0] = i - 1; cell[i][j].backptr[1] = j - 2; } cell[i][j].global = min; break; case 2: min = path1; cell[i][j].backptr[0] = i - 2; cell[i][j].backptr[1] = j - 1; if (min > path2) { min = path2; cell[i][j].backptr[0] = i - 1; cell[i][j].backptr[1] = j - 1; } cell[i][j].global = min; break; case 3: min = path2; cell[i][j].backptr[0] = i - 1; cell[i][j].backptr[1] = j - 1; if (min > path3) { min = path3; cell[i][j].backptr[0] = i - 1; cell[i][j].backptr[1] = j - 2; } cell[i][j].global = min; break; case 4: cell[i][j].global = path1; cell[i][j].backptr[0] = i - 2; cell[i][j].backptr[1] = j - 1; break; case 5: cell[i][j].global = path2; cell[i][j].backptr[0] = i - 1; cell[i][j].backptr[1] = j - 1; break; case 6: cell[i][j].global = path3; cell[i][j].backptr[0] = i - 1; cell[i][j].backptr[1] = j - 2; break; default: break; } } } } cell[tx - 1][ty - 1].backptr[0] = tx - 2; cell[tx - 1][ty - 1].backptr[1] = ty - 2; cell[tx - 1][ty - 1].global = cell[tx - 2][ty - 2].global /(tx + ty); } void calc_global_cost_type_6(Dtw_Table * table) { int i, j, tx = table->data[0].total, ty = table->data[1].total; double local = 0.0, min = 0.0, path1, path2, path3; Dtw_Cell **cell = table->cell; double *weight = table->weight; cell[2][1].global = cell[0][0].global +weight[0] * cell[2][1].local; cell[2][1].backptr[0] = 0; cell[2][1].backptr[1] = 0; cell[1][1].global = cell[0][0].global +weight[1] * cell[1][1].local; cell[1][1].backptr[0] = 0; cell[1][1].backptr[1] = 0; cell[1][2].global = cell[0][0].global +weight[2] * cell[1][2].local; cell[1][2].backptr[0] = 0; cell[1][2].backptr[1] = 0; for (j = 2; j < ty; j++) { for (i = 2; i < tx; i++) { local = cell[i][j].local; if (cell[i][j].is_region == PATH_OK) { path1 = cell[i - 2][j - 1].global +weight[0] * local; path2 = cell[i - 1][j - 1].global +weight[1] * local; path3 = cell[i - 1][j - 2].global +weight[2] * local; switch (cell[i][j].allow_path) { case 1: min = path1; cell[i][j].backptr[0] = i - 2; cell[i][j].backptr[1] = j - 1; if (min >= path2) { min = path2; cell[i][j].backptr[0] = i - 1; cell[i][j].backptr[1] = j - 1; } if (min >= path3) { min = path3; cell[i][j].backptr[0] = i - 1; cell[i][j].backptr[1] = j - 2; } cell[i][j].global = min; break; case 2: min = path1; cell[i][j].backptr[0] = i - 2; cell[i][j].backptr[1] = j - 1; if (min >= path2) { min = path2; cell[i][j].backptr[0] = i - 1; cell[i][j].backptr[1] = j - 1; } cell[i][j].global = min; break; case 3: min = path2; cell[i][j].backptr[0] = i - 1; cell[i][j].backptr[1] = j - 1; if (min >= path3) { min = path3; cell[i][j].backptr[0] = i - 1; cell[i][j].backptr[1] = j - 2; } cell[i][j].global = min; break; case 4: cell[i][j].global = path1; cell[i][j].backptr[0] = i - 2; cell[i][j].backptr[1] = j - 1; break; case 5: cell[i][j].global = path2; cell[i][j].backptr[0] = i - 1; cell[i][j].backptr[1] = j - 1; break; case 6: cell[i][j].global = path3; cell[i][j].backptr[0] = i - 1; cell[i][j].backptr[1] = j - 2; break; default: break; } } } } cell[tx - 1][ty - 1].global /=(tx + ty); } void calc_global_cost_type_7(Dtw_Table * table) { int i, j, tx = table->data[0].total, ty = table->data[1].total; double local = 0.0, min = 0.0, path1, path2, path3, path4; Dtw_Cell **cell = table->cell; double *weight = table->weight; cell[1][1].global = cell[0][0].global +weight[4] * cell[1][1].local; cell[1][1].backptr[0] = 0; cell[1][1].backptr[1] = 0; cell[1][2].global = cell[0][0].global +weight[5] * cell[1][2].local; cell[1][2].backptr[0] = 0; cell[1][2].backptr[1] = 0; cell[2][1].global = cell[0][0].global +weight[0] * cell[1][1].local + weight[1] * cell[2][1].local; cell[2][1].backptr[0] = 0; cell[2][1].backptr[1] = 0; for (j = 2; j < ty - 1; j++) { for (i = 2; i < tx - 1; i++) { local = cell[i][j].local; if (cell[i][j].is_region == PATH_OK) { path1 = cell[i - 2][j - 1].global + weight[0] * cell[i - 1][j].local + weight[1] * local; path2 = cell[i - 2][j - 2].global + weight[2] * cell[i - 1][j].local + weight[3] * local; path3 = cell[i - 1][j - 1].global +weight[4] * local; path4 = cell[i - 1][j - 2].global +weight[5] * local; switch (cell[i][j].allow_path) { case 1: min = path1; cell[i][j].backptr[0] = i - 2; cell[i][j].backptr[1] = j - 1; if (min >= path2) { min = path2; cell[i][j].backptr[0] = i - 2; cell[i][j].backptr[1] = j - 2; } if (min >= path3) { min = path3; cell[i][j].backptr[0] = i - 1; cell[i][j].backptr[1] = j - 1; } if (min >= path4) { min = path4; cell[i][j].backptr[0] = i - 1; cell[i][j].backptr[1] = j - 2; } cell[i][j].global = min; break; case 2: min = path2; cell[i][j].backptr[0] = i - 2; cell[i][j].backptr[1] = j - 2; if (min >= path3) { min = path3; cell[i][j].backptr[0] = i - 1; cell[i][j].backptr[1] = j - 1; } if (min >= path4) { min = path4; cell[i][j].backptr[0] = i - 1; cell[i][j].backptr[1] = j - 2; } cell[i][j].global = min; break; case 3: min = path1; cell[i][j].backptr[0] = i - 2; cell[i][j].backptr[1] = j - 1; if (min >= path2) { min = path2; cell[i][j].backptr[0] = i - 2; cell[i][j].backptr[1] = j - 2; } if (min >= path3) { min = path3; cell[i][j].backptr[0] = i - 1; cell[i][j].backptr[1] = j - 1; } cell[i][j].global = min; break; case 4: min = path3; cell[i][j].backptr[0] = i - 1; cell[i][j].backptr[1] = j - 1; if (min >= path4) { min = path4; cell[i][j].backptr[0] = i - 1; cell[i][j].backptr[1] = j - 2; } cell[i][j].global = min; break; case 5: min = path2; cell[i][j].backptr[0] = i - 2; cell[i][j].backptr[1] = j - 2; if (min >= path4) { min = path4; cell[i][j].backptr[0] = i - 1; cell[i][j].backptr[1] = j - 2; } cell[i][j].global = min; break; case 6: min = path1; cell[i][j].backptr[0] = i - 2; cell[i][j].backptr[1] = j - 1; if (min >= path3) { min = path3; cell[i][j].backptr[0] = i - 1; cell[i][j].backptr[1] = j - 1; } cell[i][j].global = min; break; case 7: cell[i][j].global = path1; cell[i][j].backptr[0] = i - 2; cell[i][j].backptr[1] = j - 1; break; case 8: cell[i][j].global = path3; cell[i][j].backptr[0] = i - 1; cell[i][j].backptr[1] = j - 1; break; case 9: cell[i][j].global = path4; cell[i][j].backptr[0] = i - 1; cell[i][j].backptr[1] = j - 2; break; default: break; } } } } cell[tx - 1][ty - 1].backptr[0] = tx - 2; cell[tx - 1][ty - 1].backptr[1] = ty - 2; cell[tx - 1][ty - 1].global = cell[tx - 2][ty - 2].global /tx; } /* Check and mark region where global cost can be calculated */ void check_enabled_region(Dtw_Table * table) { switch (table->path) { case 1: /* horizontal and vertical */ check_enabled_region_type_1(table); break; case 2: /* horizontal, oblique and vertical */ check_enabled_region_type_2(table); break; case 3: /* horizontal and oblique */ check_enabled_region_type_3(table); break; case 4: /* horizontal, oblique1, oblique2 */ check_enabled_region_type_4(table); break; case 5: /* default */ check_enabled_region_type_5(table); break; case 6: check_enabled_region_type_6(table); break; case 7: check_enabled_region_type_7(table); break; default: break; } } /* Calculate local cost */ void calc_local_cost(Dtw_Table * table) { int i, j, d, tdd = table->data[0].dim; double sum; Dtw_Cell **cell = table->cell; Data *data = table->data; int norm = table->norm; switch (norm) { case 1: for (i = 0; i < data[0].total; i++) { for (j = 0; j < data[1].total; j++) { if (cell[i][j].is_region == PATH_OK) { for (d = 0, sum = 0.0; d < tdd; d++) { sum += fabs(data[0].input[i * tdd + d] - data[1].input[j * tdd + d]); } cell[i][j].local = sum; } } } break; case 2: for (i = 0; i < data[0].total; i++) { for (j = 0; j < data[1].total; j++) { if (cell[i][j].is_region == PATH_OK) { for (d = 0, sum = 0.0; d < tdd; d++) { sum += pow((data[0].input[i * tdd + d] - data[1].input[j * tdd + d]), 2); } cell[i][j].local = sqrt(sum); } } } break; default: break; } } /* Calculate global cost recursively */ void calc_global_cost(Dtw_Table * table) { table->cell[0][0].global = table->cell[0][0].local; table->cell[0][0].backptr[0] = -1; table->cell[0][0].backptr[1] = -1; switch (table->path) { case 1: calc_global_cost_type_1(table); break; case 2: calc_global_cost_type_2(table); break; case 3: calc_global_cost_type_3(table); break; case 4: calc_global_cost_type_4(table); break; case 5: calc_global_cost_type_5(table); break; case 6: calc_global_cost_type_6(table); break; case 7: calc_global_cost_type_7(table); break; default: break; } } /* Obtain Viterbi path */ void get_viterbi_path(Dtw_Table * table) { int k, l, tx = table->data[0].total, ty = table->data[1].total, *back_x, *back_y, *phi_x, *phi_y; Dtw_Cell **cell = table->cell; Data *data = table->data; int path = table->path; back_x = (int *) malloc(sizeof(int) * (tx + ty)); back_y = (int *) malloc(sizeof(int) * (tx + ty)); phi_x = (int *) malloc(sizeof(int) * (tx + ty)); phi_y = (int *) malloc(sizeof(int) * (tx + ty)); back_x[0] = phi_x[0] = tx - 1; back_y[0] = phi_y[0] = ty - 1; k = l = 1; while (back_x[l - 1] != 0 && back_y[l - 1] != 0) { back_x[l] = cell[back_x[l - 1]][back_y[l - 1]].backptr[0]; back_y[l] = cell[back_x[l - 1]][back_y[l - 1]].backptr[1]; switch (path) { case 5: if (back_x[l - 1] - back_x[l] == 2 && back_y[l - 1] - back_y[l] == 1) { phi_x[k] = back_x[l - 1] - 1; phi_y[k] = back_y[l - 1]; phi_x[k + 1] = back_x[l]; phi_y[k + 1] = back_y[l]; k += 2; } else if (back_x[l - 1] - back_x[l] == 1 && back_y[l - 1] - back_y[l] == 1) { phi_x[k] = back_x[l]; phi_y[k] = back_y[l]; k++; } else if (back_x[l - 1] - back_x[l] == 1 && back_y[l - 1] - back_y[l] == 2) { phi_x[k] = back_x[l - 1]; phi_y[k] = back_y[l - 1] - 1; phi_x[k + 1] = back_x[l]; phi_y[k + 1] = back_y[l]; k += 2; } break; case 7: if (back_x[l - 1] - back_x[l] == 2 && back_y[l - 1] - back_y[l] == 1) { phi_x[k] = back_x[l - 1] - 1; phi_y[k] = back_y[l - 1]; phi_x[k + 1] = back_x[l]; phi_y[k + 1] = back_y[l]; k += 2; } else if (back_x[l - 1] - back_x[l] == 2 && back_y[l - 1] - back_y[l] == 2) { phi_x[k] = back_x[l - 1] - 1; phi_y[k] = back_y[l - 1]; phi_x[k + 1] = back_x[l]; phi_y[k + 1] = back_y[l]; k += 2; } else if (back_x[l - 1] - back_x[l] == 1 && back_y[l - 1] - back_y[l] == 1) { phi_x[k] = back_x[l]; phi_y[k] = back_y[l]; k++; } else if (back_x[l - 1] - back_x[l] == 1 && back_y[l - 1] - back_y[l] == 2) { phi_x[k] = back_x[l]; phi_y[k] = back_y[l]; k++; } break; default: phi_x[k] = back_x[l]; phi_y[k] = back_y[l]; k++; break; } l++; } table->vit_leng = k; for (k = 0; k < table->vit_leng; k++) { data[0].viterbi[k] = phi_x[table->vit_leng - k - 1]; data[1].viterbi[k] = phi_y[table->vit_leng - k - 1]; } free(back_x); free(back_y); free(phi_x); free(phi_y); } /* Concatenate two input vectors along Viterbi path */ double *concatenate(Dtw_Table * table) { double *concat; int i, j, size = table->vit_leng, dim = table->data[0].dim + table->data[1].dim; Data *data = table->data; concat = dgetmem(size * dim); for (i = 0; i < size; i++) { for (j = 0; j < data[0].dim; j++) { concat[dim * i + j] = data[0].input[data[0].viterbi[i] * data[0].dim + j]; } for (j = 0; j < data[1].dim; j++) { concat[dim * i + data[0].dim + j] = data[1].input[data[1].viterbi[i] * data[1].dim + j]; } } return (concat); } /* Perform dynamic time warping */ void dtw(Dtw_Table * table, double **output) { /* Check and mark region where global cost can be calculated */ check_enabled_region(table); /* Calculate local cost */ calc_local_cost(table); /* Calculate global cost recursively */ calc_global_cost(table); /* Obtain Viterbi path */ get_viterbi_path(table); /* Concatenate two input vectors along Viterbi path */ *output = concatenate(table); } void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - Dynamic Time Warping\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] reffile [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -m M : order of vector [%d]\n", LENG); fprintf(stderr, " -l L : dimension of vector [m+1]\n"); fprintf(stderr, " -t T : number of test vectors [N/A]\n"); fprintf(stderr, " -r R : number of reference vectors [N/A]\n"); fprintf(stderr, " -n N : type of norm used for calculation [2]\n"); fprintf(stderr, " of local cost\n"); fprintf(stderr, " N = 1 : L1-norm\n"); fprintf(stderr, " N = 2 : L2-norm\n"); fprintf(stderr, " -p P : local path constraint [5]\n"); fprintf(stderr, " -s sfile : output score of dynamic time warping [FALSE]\n"); fprintf(stderr, " to sfile \n"); fprintf(stderr, " -v out_vfile : output frame number sequence [FALSE]\n"); fprintf(stderr, " along the Viterbi path\n"); fprintf(stderr, " -V in_vfile : concatenate test and reference [FALSE]\n"); fprintf(stderr, " vectors in accordance with the\n"); fprintf(stderr, " Viterbi path information written in\n"); fprintf(stderr, " in_vfile\n"); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " test vector sequence (%s) [stdin]\n", FORMAT); fprintf(stderr, " reffile:\n"); fprintf(stderr, " reference vector sequence (%s) \n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " concatenated test and reference vectors\n"); fprintf(stderr, " along the Viterbi path (%s)\n", FORMAT); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char *argv[]) { char *infile2 = NULL, *scorefile = NULL, *viterbifile = NULL, *viterbifile2 = NULL; int i, dim = LENG, num_test, num_ref, length_test = 0, length_ref = 0, total, *viterbi = NULL; double *x = NULL, *y = NULL, *z = NULL; int norm_type = 2; int path_type = 5; FILE *fp = stdin, *fp2 = NULL, *fp_score = NULL, *fp_viterbi = NULL, *fp_viterbi2 = NULL; Boolean outscore = FA, outviterbi = FA, joint = FA; Dtw_Table table; if ((cmnd = strrchr(argv[0], '/')) == NULL) { cmnd = argv[0]; } else { cmnd++; } while (--argc) { if (**++argv == '-') { switch (*(*argv + 1)) { case 'm': dim = atoi(*++argv) + 1; --argc; break; case 'l': dim = atoi(*++argv); --argc; break; case 't': length_test = atoi(*++argv); --argc; break; case 'r': length_ref = atoi(*++argv); --argc; break; case 'n': norm_type = atoi(*++argv); --argc; break; case 'p': path_type = atoi(*++argv); --argc; break; case 's': scorefile = *++argv; fp_score = getfp(scorefile, "wb"); outscore = TR; --argc; break; case 'v': viterbifile = *++argv; fp_viterbi = getfp(viterbifile, "wb"); outviterbi = TR; --argc; break; case 'V': viterbifile2 = *++argv; fp_viterbi2 = getfp(viterbifile2, "rb"); joint = TR; --argc; break; case 'h': usage(EXIT_SUCCESS); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(EXIT_FAILURE); } } else if (infile2 == NULL) { infile2 = *argv; fp2 = getfp(infile2, "rb"); } else { fp = getfp(*argv, "rb"); } } if (infile2 == NULL) { fprintf(stderr, "%s : The reference file name must be specified !\n", cmnd); usage(EXIT_FAILURE); } if (outscore == TR && fp_score == NULL) { fprintf(stderr, "%s : output file name must be specified !\n", cmnd); usage(EXIT_FAILURE); } if (outviterbi == TR && fp_viterbi == NULL) { fprintf(stderr, "%s : output file name must be specified !\n", cmnd); usage(EXIT_FAILURE); } x = read_input(fp, dim, &num_test); /* test vectors */ y = read_input(fp2, dim, &num_ref); /* reference vectors */ if (joint == TR) { fseek(fp_viterbi2, 0, SEEK_END); total = (int) ((double) ftell(fp_viterbi2) / (double) sizeof(total)); rewind(fp_viterbi2); viterbi = (int *) getmem(total, sizeof(*viterbi)); freadx(viterbi, total, sizeof(*viterbi), fp_viterbi2); fclose(fp_viterbi2); /* make joint vector sequence along Viterbi path */ for (i = 0; i < total / 2; i++) { fwritef(x + dim * viterbi[2 * i], sizeof(*x), dim, stdout); fwritef(y + dim * viterbi[2 * i + 1], sizeof(*y), dim, stdout); } free(viterbi); } else { if (length_test != 0) { /* if -t option is specified */ num_test = length_test; } if (length_ref != 0) { /* if -r option is specified */ num_ref = length_ref; } /* Initialize */ init_dtw(&table, dim, x, y, num_test, num_ref, path_type, norm_type); /* Perform dynamic time warping */ dtw(&table, &z); /* output */ fwritef(z, sizeof(*z), table.vit_leng * 2 * dim, stdout); if (outscore == TR) { fwritef(&table.cell[num_test - 1][num_ref - 1].global, sizeof(double), 1, fp_score); } if (outviterbi == TR) { for (i = 0; i < table.vit_leng; i++) { fwrite(table.data[0].viterbi + i, sizeof(int), 1, fp_viterbi); fwrite(table.data[1].viterbi + i, sizeof(int), 1, fp_viterbi); } } } return (EXIT_SUCCESS); } SPTK-3.9/bin/echo2/0000755001051300105040000000000012637167701010723 500000000000000SPTK-3.9/bin/echo2/Makefile.am0000644001051300105040000000017712442245040012667 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = echo2 echo2_SOURCES = echo2.c echo2_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/echo2/Makefile.in0000644001051300105040000004243412637167411012715 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = echo2$(EXEEXT) subdir = bin/echo2 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_echo2_OBJECTS = echo2.$(OBJEXT) echo2_OBJECTS = $(am_echo2_OBJECTS) echo2_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(echo2_SOURCES) DIST_SOURCES = $(echo2_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include echo2_SOURCES = echo2.c echo2_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/echo2/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/echo2/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) echo2$(EXEEXT): $(echo2_OBJECTS) $(echo2_DEPENDENCIES) $(EXTRA_echo2_DEPENDENCIES) @rm -f echo2$(EXEEXT) $(AM_V_CCLD)$(LINK) $(echo2_OBJECTS) $(echo2_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/echo2.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/echo2/echo2.c0000644001051300105040000001312512637156632012012 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * echo arguments to the standard error * * * * 2000.5 T.Yoshimura * * * * usage: * * echo2 [ options ] * * options: * * -n : no output newline [TRUE] * * * ************************************************************************/ static char *rcs_id = "$Id: echo2.c,v 1.24 2015/12/14 01:14:13 uratec Exp $"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define NEWLINE TR char *BOOL[] = { "FALSE", "TRUE" }; /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - echo arguments to the standard error\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ]\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -n : no output newline [%s]\n", BOOL[NEWLINE]); fprintf(stderr, " -h : print this message\n"); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char **argv) { int newline = NEWLINE; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) { if (**++argv == '-') { switch (*(*argv + 1)) { case 'n': newline = 1 - newline; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else { fputs(*argv, stderr); if (argc > 1) putc(' ', stderr); } } if (newline) putc('\n', stderr); return 0; } SPTK-3.9/bin/excite/0000755001051300105040000000000012637167701011204 500000000000000SPTK-3.9/bin/excite/Makefile.am0000644001051300105040000000020312442245041013137 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = excite excite_SOURCES = excite.c excite_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/excite/Makefile.in0000644001051300105040000004246212637167411013177 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = excite$(EXEEXT) subdir = bin/excite ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_excite_OBJECTS = excite.$(OBJEXT) excite_OBJECTS = $(am_excite_OBJECTS) excite_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(excite_SOURCES) DIST_SOURCES = $(excite_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include excite_SOURCES = excite.c excite_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/excite/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/excite/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) excite$(EXEEXT): $(excite_OBJECTS) $(excite_DEPENDENCIES) $(EXTRA_excite_DEPENDENCIES) @rm -f excite$(EXEEXT) $(AM_V_CCLD)$(LINK) $(excite_OBJECTS) $(excite_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/excite.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/excite/excite.c0000644001051300105040000002025612637156632012557 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * Generate excitation * * * * 1986.6 K.Tokuda * * 1996.4 K.Koishida * * * * usage: * * excite [ options ] [ infile ] > stdout * * options: * * -p p : frame period [100] * * -i i : interpolation period [1] * * -n : gauss/M-sequence flag for unoiced [FALSE] * * default is M-sequence * * -s s : seed for nrand [1] * * infile: * * pitch data * * stdout: * * excitation * * require: * * mseq() * * * ************************************************************************/ static char *rcs_id = "$Id: excite.c,v 1.26 2015/12/14 01:14:13 uratec Exp $"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #include #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define FPERIOD 100 #define IPERIOD 1 #define SEED 1 #define GAUSS FA char *BOOL[] = { "FALSE", "TRUE" }; /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - generate excitation\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -p p : frame period [%d]\n", FPERIOD); fprintf(stderr, " -i i : interpolation period [%d]\n", IPERIOD); fprintf(stderr, " -n : gauss/M-sequence for unvoiced [%s]\n", BOOL[GAUSS]); fprintf(stderr, " default is M-sequence\n"); fprintf(stderr, " -s s : seed for nrand [%d]\n", SEED); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " pitch period (%s) [stdin]\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " excitation (%s)\n", FORMAT); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char **argv) { int fprd = FPERIOD, iprd = IPERIOD, i, j, seed = SEED; unsigned long next = SEED; FILE *fp = stdin; double x, p1, p2, inc, pc; Boolean gauss = GAUSS; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) if (**++argv == '-') { switch (*(*argv + 1)) { case 'p': fprd = atoi(*++argv); --argc; break; case 'i': iprd = atoi(*++argv); --argc; break; case 'n': gauss = TR; break; case 's': seed = atoi(*++argv); --argc; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else fp = getfp(*argv, "rb"); if (gauss & (seed != 1)) next = srnd((unsigned int) seed); if (freadf(&p1, sizeof(p1), 1, fp) != 1) return (1); pc = p1; for (;;) { if (freadf(&p2, sizeof(p2), 1, fp) != 1) return (0); if ((p1 != 0.0) && (p2 != 0.0)) inc = (p2 - p1) * (double) iprd / (double) fprd; else { inc = 0.0; pc = p2; p1 = 0.0; } for (j = fprd, i = (iprd + 1) / 2; j--;) { if (p1 == 0.0) { if (gauss) x = (double) nrandom(&next); else x = mseq(); } else { if ((pc += 1.0) >= p1) { x = sqrt(p1); pc = pc - p1; } else x = 0.0; } fwritef(&x, sizeof(x), 1, stdout); if (!--i) { p1 += inc; i = iprd; } } p1 = p2; } return 0; } SPTK-3.9/bin/extract/0000755001051300105040000000000012637167702011376 500000000000000SPTK-3.9/bin/extract/Makefile.am0000644001051300105040000000020712442245041013334 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = extract extract_SOURCES = extract.c extract_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/extract/Makefile.in0000644001051300105040000004251012637167411013362 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = extract$(EXEEXT) subdir = bin/extract ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_extract_OBJECTS = extract.$(OBJEXT) extract_OBJECTS = $(am_extract_OBJECTS) extract_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(extract_SOURCES) DIST_SOURCES = $(extract_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include extract_SOURCES = extract.c extract_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/extract/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/extract/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) extract$(EXEEXT): $(extract_OBJECTS) $(extract_DEPENDENCIES) $(EXTRA_extract_DEPENDENCIES) @rm -f extract$(EXEEXT) $(AM_V_CCLD)$(LINK) $(extract_OBJECTS) $(extract_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/extract.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/extract/extract.c0000644001051300105040000001554512637156633013147 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * Extract Vector * * * * 1996.3 K.Koishida * * * * usage: * * extract [ options ] [ indexfile ] [ infile ] > stdout * * options: * * -l l : order of vector [10] * * -i i : codebook index [0] * * infile: * * index file (int) * * , index(0), index(1), ..., * * data sequence * * , x(0), x(1), ..., * * stdout: * * vectors which belong to index c * * , x'(0), x'(1), ..., * * * ************************************************************************/ static char *rcs_id = "$Id: extract.c,v 1.27 2015/12/14 05:34:34 uratec Exp $"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define LENG 10 #define INDEX 0 /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - extract vector \n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] ifile [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -l l : order of vector [%d]\n", LENG); fprintf(stderr, " -i i : codebook index [%d]\n", INDEX); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " data sequence (%s) [stdin]\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " extracted vector (%s)\n", FORMAT); fprintf(stderr, " ifile:\n"); fprintf(stderr, " indexfile (int)\n"); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char **argv) { int l = LENG, index = INDEX, i; FILE *fp = stdin, *fpi = NULL; double *x; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) if (**++argv == '-') { switch (*(*argv + 1)) { case 'l': l = atoi(*++argv); --argc; break; case 'i': index = atoi(*++argv); --argc; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else if (fpi == NULL) fpi = getfp(*argv, "rb"); else fp = getfp(*argv, "rb"); x = dgetmem(l); while (freadf(x, sizeof(*x), l, fp) == l && freadx(&i, sizeof(i), 1, fpi) == 1) if (i == index) fwritef(x, sizeof(*x), l, stdout); return 0; } SPTK-3.9/bin/fd/0000755001051300105040000000000012637167702010315 500000000000000SPTK-3.9/bin/fd/Makefile.am0000644001051300105040000000016312442245042012255 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = fd fd_SOURCES = fd.c fd_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/fd/Makefile.in0000644001051300105040000004233212637167411012303 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = fd$(EXEEXT) subdir = bin/fd ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_fd_OBJECTS = fd.$(OBJEXT) fd_OBJECTS = $(am_fd_OBJECTS) fd_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(fd_SOURCES) DIST_SOURCES = $(fd_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include fd_SOURCES = fd.c fd_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/fd/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/fd/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) fd$(EXEEXT): $(fd_OBJECTS) $(fd_DEPENDENCIES) $(EXTRA_fd_DEPENDENCIES) @rm -f fd$(EXEEXT) $(AM_V_CCLD)$(LINK) $(fd_OBJECTS) $(fd_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fd.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/fd/fd.c0000644001051300105040000003536012637156633011002 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * File dump * * * * 1988 T.Kobayashi * * 1996.5 K.Koishida * * * * usage: * * fd [options] [infile] > stdout * * options: * * -a a : address [0] * * -n n : initial value for numbering [0] * * -m m : modulo for numbering [EOF] * * -ent : number of data in each line [0] * * +type : data type [c] * * c (char) C (unsigned char) * * s (short) S (unsigned short) * * i (int) I (unsigned int) * * i3 (int, 3byte) I3 (unsigned int, 3byte) * * l (long) L (unsigned long) * * le (long long) LE (unsigned long long) * * f (float) d (double) * * de (long double) * * %form : print format(printf style) [N/A] * * * ************************************************************************/ static char *rcs_id = "$Id: fd.c,v 1.32 2015/12/14 01:14:13 uratec Exp $"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #include #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define START 0 #define MODULO 0x7fffffff #define ENTRY 0 #define SIZE 128 /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - file dump\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -a a : address [%d]\n", START); fprintf(stderr, " -n n : initial value for numbering [%d]\n", START); fprintf(stderr, " -m m : modulo for numbering [EOF]\n"); fprintf(stderr, " -ent : number of data in each line [%d]\n", ENTRY); fprintf(stderr, " +type : data type [c]\n"); fprintf(stderr, " c (char, %lubyte) C (unsigned char, %lubyte)\n", (unsigned long) sizeof(char), (unsigned long) sizeof(unsigned char)); fprintf(stderr, " s (short, %lubyte) S (unsigned short, %lubyte)\n", (unsigned long) sizeof(short), (unsigned long) sizeof(unsigned short)); fprintf(stderr, " i3 (int, 3byte) I3 (unsigned int, 3byte)\n"); fprintf(stderr, " i (int, %lubyte) I (unsigned int, %lubyte)\n", (unsigned long) sizeof(int), (unsigned long) sizeof(unsigned int)); fprintf(stderr, " l (long, %lubyte) L (unsigned long, %lubyte)\n", (unsigned long) sizeof(long), (unsigned long) sizeof(unsigned long)); fprintf(stderr, " le (long long, %lubyte) LE (unsigned long long, %lubyte)\n", (unsigned long) sizeof(long long), (unsigned long) sizeof(unsigned long long)); fprintf(stderr, " f (float, %lubyte) d (double, %lubyte)\n", (unsigned long) sizeof(float), (unsigned long) sizeof(double)); fprintf(stderr, " de (long double, %lubyte)\n", (unsigned long) sizeof(long double)); fprintf(stderr, " %%form : print format(printf style) [N/A]\n"); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " data sequence [stdin]\n"); fprintf(stderr, " stdout:\n"); fprintf(stderr, " dumped data sequence\n"); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } long start = START, mod = MODULO; int is_int = 0, entry = ENTRY, is_char = 1, ff = 0; size_t size = sizeof(char); char adrsfmt = 'd', format[SIZE], form[SIZE], type = 'c'; int main(int argc, char **argv) { FILE *fp = stdin; char *s, c; void fdump(FILE * fp); if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) if (*(s = *++argv) == '-') { if (((c = *++s) > '0') && (c <= '9')) c = 'c'; switch (c) { case 'a': case 'n': adrsfmt = c; start = atol(*++argv); --argc; break; case 'm': mod = atol(*++argv); --argc; break; case 'c': entry = atoi(s); break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else if (*s == '+') { if (*(s + 2) == '%') { strcpy(format, s + 2); ff = 1; } c = type = *++s; switch (c) { case 'b': is_char = 0; break; case 'c': size = sizeof(char); break; case 's': size = sizeof(short); break; case 'i': if (*(s + 1) == '3') { size = 3; type = 't'; (*argv)++; } else { size = sizeof(int); } break; case 'l': if (*(s + 1) == 'e') { size = sizeof(long long); type = 'u'; (*argv)++; } else { size = sizeof(long); } break; case 'C': size = sizeof(unsigned char); break; case 'S': size = sizeof(unsigned short); break; case 'I': if (*(s + 1) == '3') { size = 3; type = 'T'; (*argv)++; } else { size = sizeof(unsigned int); } break; case 'L': if (*(s + 1) == 'E') { size = sizeof(unsigned long long); type = 'U'; (*argv)++; } else { size = sizeof(unsigned long); } break; case 'f': size = sizeof(float); break; case 'd': if (*(s + 1) == 'e') { size = sizeof(long double); type = 'v'; (*argv)++; } else { size = sizeof(double); } break; default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else if (*s == '%') { strcpy(format, s); ff = 1; } else fp = getfp(*argv, "rb"); fdump(fp); return 0; } void fdump(FILE * fp) { char s[18]; long adrs, i, n; union { unsigned char b; short w; int i; int i3; long l; long long le; unsigned char C; unsigned short S; unsigned int I3; unsigned int I; unsigned long L; unsigned long long LE; float f; double d; long double de; } u; int y; if (ff) strcat(format, " "); if (entry == 0) { if (size == 8) entry = 2; else if (size > 1) entry = 5; else if (is_char) entry = 16; else entry = 10; } freadx(&u, size, 1, fp); while (!feof(fp)) for (n = adrs = start; (n < mod) && !feof(fp); adrs += entry * size) { if (adrsfmt == 'a') printf("%06lx ", adrs); else if (adrsfmt == 'n') printf("%7ld ", n); for (i = 0; (i < entry) && !feof(fp) && (n < mod); i++, n++) { switch (type) { case 'c': if (isprint(u.b)) { s[i] = u.b; } else { s[i] = '.'; } if (is_char) printf("%02x ", u.b); else printf("%5d", u.b); break; case 's': printf("%7d", u.w); break; case 't': y = u.i3 & 0x00FFFFFF; if (y >> 23 == 1) y = y | 0xFF000000; if (ff) printf(format, y); else printf("%9d", y); break; case 'i': if (ff) printf(format, u.i); else printf("%12d", u.i); break; case 'l': if (ff) printf(format, u.l); else printf("%12ld", u.l); break; case 'u': if (ff) printf(format, u.le); else printf("%17lld", u.le); break; case 'C': if (ff) printf(format, u.C); else printf("%5u", u.C); case 'S': if (ff) printf(format, u.S); else printf("%7u", u.S); break; case 'T': y = u.I3 & 0x00FFFFFF; if (ff) printf(format, y); else printf("%9u", y); break; case 'I': if (ff) printf(format, u.I); else printf("%12u", u.I); break; case 'L': if (ff) printf(format, u.L); else printf("%12lu", u.L); break; case 'U': if (ff) printf(format, u.LE); else printf("%17llu", u.LE); break; case 'f': if (ff) printf(format, u.f); else printf("%14.6e", u.f); break; case 'd': if (ff) printf(format, u.d); else printf("%24.15e", u.d); break; case 'v': if (ff) printf(format, u.de); else printf("%24.15Le", u.de); break; default: break; } freadx(&u, size, 1, fp); } if (size == 1 && is_char) { s[i] = '\0'; while (i++ < entry) printf(" "); printf("|%s|\n", s); } else printf("\n"); } } SPTK-3.9/bin/fft/0000755001051300105040000000000012637167702010503 500000000000000SPTK-3.9/bin/fft/Makefile.am0000644001051300105040000000017612442245043012450 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = fft fft_SOURCES = _fft.c fft.c fft_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/fft/Makefile.in0000644001051300105040000004251212637167411012471 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = fft$(EXEEXT) subdir = bin/fft ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_fft_OBJECTS = _fft.$(OBJEXT) fft.$(OBJEXT) fft_OBJECTS = $(am_fft_OBJECTS) fft_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(fft_SOURCES) DIST_SOURCES = $(fft_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include fft_SOURCES = _fft.c fft.c fft_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/fft/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/fft/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) fft$(EXEEXT): $(fft_OBJECTS) $(fft_DEPENDENCIES) $(EXTRA_fft_DEPENDENCIES) @rm -f fft$(EXEEXT) $(AM_V_CCLD)$(LINK) $(fft_OBJECTS) $(fft_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_fft.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fft.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/fft/_fft.c0000644001051300105040000001417712637156633011520 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /******************************************************** $Id: _fft.c,v 1.18 2015/12/14 01:14:13 uratec Exp $ NAME: fft - fast fourier transform SYNOPSIS: int fft(x, y, m); double x[]; real part double y[]; imaginary part int m; data size return : success = 0 fault = -1 Naohiro Isshiki Dec.1995 modified ********************************************************/ #include #include #include #if defined(WIN32) #include "SPTK.h" #else #include #endif double *_sintbl = 0; int maxfftsize = 0; static int checkm(const int m) { int k; for (k = 4; k <= m; k <<= 1) { if (k == m) return (0); } fprintf(stderr, "fft : m must be a integer of power of 2!\n"); return (-1); } int fft(double *x, double *y, const int m) { int j, lmx, li; double *xp, *yp; double *sinp, *cosp; int lf, lix, tblsize; int mv2, mm1; double t1, t2; double arg; int checkm(const int); /************** * RADIX-2 FFT * **************/ if (checkm(m)) return (-1); /*********************** * SIN table generation * ***********************/ if ((_sintbl == 0) || (maxfftsize < m)) { tblsize = m - m / 4 + 1; arg = PI / m * 2; if (_sintbl != 0) free(_sintbl); _sintbl = sinp = dgetmem(tblsize); *sinp++ = 0; for (j = 1; j < tblsize; j++) *sinp++ = sin(arg * (double) j); _sintbl[m / 2] = 0; maxfftsize = m; } lf = maxfftsize / m; lmx = m; for (;;) { lix = lmx; lmx /= 2; if (lmx <= 1) break; sinp = _sintbl; cosp = _sintbl + maxfftsize / 4; for (j = 0; j < lmx; j++) { xp = &x[j]; yp = &y[j]; for (li = lix; li <= m; li += lix) { t1 = *(xp) - *(xp + lmx); t2 = *(yp) - *(yp + lmx); *(xp) += *(xp + lmx); *(yp) += *(yp + lmx); *(xp + lmx) = *cosp * t1 + *sinp * t2; *(yp + lmx) = *cosp * t2 - *sinp * t1; xp += lix; yp += lix; } sinp += lf; cosp += lf; } lf += lf; } xp = x; yp = y; for (li = m / 2; li--; xp += 2, yp += 2) { t1 = *(xp) - *(xp + 1); t2 = *(yp) - *(yp + 1); *(xp) += *(xp + 1); *(yp) += *(yp + 1); *(xp + 1) = t1; *(yp + 1) = t2; } /*************** * bit reversal * ***************/ j = 0; xp = x; yp = y; mv2 = m / 2; mm1 = m - 1; for (lmx = 0; lmx < mm1; lmx++) { if ((li = lmx - j) < 0) { t1 = *(xp); t2 = *(yp); *(xp) = *(xp + li); *(yp) = *(yp + li); *(xp + li) = t1; *(yp + li) = t2; } li = mv2; while (li <= j) { j -= li; li /= 2; } j += li; xp = x + j; yp = y + j; } return (0); } SPTK-3.9/bin/fft/fft.c0000644001051300105040000001751212637156633011355 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * FFT for Complex Sequence * * * * 1995.12 N.Isshiki modified * * usage: * * fft [ options ] [ infile ] > stdout * * options: * * -l l : FFT size power of 2 [256] * * -m m : order of sequence [l-1] * * -A : amplitude [FALSE] * * -R : real part [FALSE] * * -I : imaginary part [FALSE] * * -P : power [FALSE] * * infile: * * stdin for default * * input is assumed to be double * * * ************************************************************************/ static char *rcs_id = "$Id: fft.c,v 1.30 2015/12/14 01:14:13 uratec Exp $"; /* Standard C Libraries */ #include #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define SIZE 256 /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - FFT for complex sequence\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -l l : FFT size power of 2 [%d]\n", SIZE); fprintf(stderr, " -m m : order of sequence [l-1]\n"); fprintf(stderr, " -A : amplitude [FALSE]\n"); fprintf(stderr, " -R : real part [FALSE]\n"); fprintf(stderr, " -I : imaginary part [FALSE]\n"); fprintf(stderr, " -P : power [FALSE]\n"); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " data sequence (%s) [stdin]\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " FFT sequence (%s)\n", FORMAT); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char *argv[]) { FILE *fp; char *s, *infile = NULL, c; int size = SIZE, size2, k, nd = -1, out = ' '; double *x, *y; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) { if (*(s = *++argv) == '-') { c = *++s; switch (c) { case 'l': size = atoi(*++argv); argc--; break; case 'm': nd = atoi(*++argv) + 1; argc--; break; case 'i': case 'p': case 'r': c -= ('a' - 'A'); case 'A': case 'I': case 'P': case 'R': out = c; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, c); usage(1); } } else infile = s; } if (nd == -1) nd = size; if (nd > size) { fprintf(stderr, "%s : Order of sequence %d should be less than the FFT size %d!\n", cmnd, nd, size); return (1); } fp = stdin; if (infile) { fp = getfp(infile, "rb"); } x = dgetmem(size2 = size + size); y = x + size; while (!feof(fp)) { fillz(x, size2, sizeof(double)); if (freadf(x, sizeof(*x), nd, fp) == 0) break; if (freadf(y, sizeof(*y), nd, fp) == 0) break; fft(x, y, size); if (out == 'P') for (k = 0; k < size; k++) x[k] = x[k] * x[k] + y[k] * y[k]; else if (out == 'A') for (k = 0; k < size; k++) x[k] = sqrt(x[k] * x[k] + y[k] * y[k]); if (out != 'I') fwritef(x, sizeof(*x), size, stdout); if (out == ' ' || out == 'I') fwritef(y, sizeof(*y), size, stdout); } if (infile) { fclose(fp); } return (0); } SPTK-3.9/bin/fft2/0000755001051300105040000000000012637167702010565 500000000000000SPTK-3.9/bin/fft2/Makefile.am0000644001051300105040000000020312442245043012521 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = fft2 fft2_SOURCES = _fft2.c fft2.c fft2_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/fft2/Makefile.in0000644001051300105040000004254312637167411012557 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = fft2$(EXEEXT) subdir = bin/fft2 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_fft2_OBJECTS = _fft2.$(OBJEXT) fft2.$(OBJEXT) fft2_OBJECTS = $(am_fft2_OBJECTS) fft2_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(fft2_SOURCES) DIST_SOURCES = $(fft2_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include fft2_SOURCES = _fft2.c fft2.c fft2_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/fft2/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/fft2/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) fft2$(EXEEXT): $(fft2_OBJECTS) $(fft2_DEPENDENCIES) $(EXTRA_fft2_DEPENDENCIES) @rm -f fft2$(EXEEXT) $(AM_V_CCLD)$(LINK) $(fft2_OBJECTS) $(fft2_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_fft2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fft2.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/fft2/_fft2.c0000644001051300105040000001201312637156633011647 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /******************************************************** $Id: _fft2.c,v 1.18 2015/12/14 01:14:13 uratec Exp $ * fft2 : two dimensional fast Fourier transform * * for complex sequence * * * * int fft2( x, y, n ) * * * * double x[0]...x[n*n-1]; * * input : data sequence * * output : real part of DFT * * double y[0]...y[n*n-1]; * * input : working area * * output : imaginary part of DFT * * int n; size of DFT * * * * T. Kobayashi May, 1989. * ********************************************************/ #include #include #include #if defined(WIN32) #include "SPTK.h" #else #include #endif int fft2(double x[], double y[], const int n) { double *xq, *yq; static double *xb = NULL, *yb; double *xp, *yp; int i, j; static int size_f; if (xb == NULL) { size_f = 2 * n; xb = dgetmem(size_f); yb = xb + n; } if (2 * n > size_f) { free(xb); size_f = 2 * n; xb = dgetmem(size_f); yb = xb + n; } for (i = 0; i < n; i++) { xp = xb; xq = x + i; yp = yb; yq = y + i; for (j = n; --j >= 0; xq += n, yq += n) { *xp++ = *xq; *yp++ = *yq; } if (fft(xb, yb, n) < 0) return (-1); xp = xb; xq = x + i; yp = yb; yq = y + i; for (j = n; --j >= 0; xq += n, yq += n) { *xq = *xp++; *yq = *yp++; } } for (i = n, xp = x, yp = y; --i >= 0; xp += n, yp += n) { if (fft(xp, yp, n) < 0) return (-1); } return 0; } SPTK-3.9/bin/fft2/fft2.c0000644001051300105040000002602612637156633011521 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * 2D-FFT for Complex Sequence * * * * 1989 T.Kobayashi * * 1996.2 N.Miyazaki * * * * usage: * * fft2 [ infile ] [ options ] > stdout * * options: * * -l l : FFT size power of 2 [64] * * -m m1 m2 : region of support [m1=64,m2=m1] * * -t : transposed output [FALSE] * * -c : compensated boundary [FALSE] * * -q : first quadrant output [FALSE] * * -A : amplitude [FALSE] * * -R : real part [FALSE] * * -I : imaginary part [FALSE] * * -P : power [FALSE] * * infile: * * stdin for default * * input is assumed to be double * * * ************************************************************************/ static char *rcs_id = "$Id: fft2.c,v 1.27 2015/12/14 01:14:14 uratec Exp $"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #include #if defined(WIN32) #include "SPTK.h" #else #include #endif static char *cmnd; int size = 64, outopt = 0, n1 = 0, n2 = 0, out = ' '; int usage(void) { fprintf(stderr, "\n"); fprintf(stderr, " %s - 2D-FFT for complex sequence\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -l l : FFT size power of 2 [64]\n"); fprintf(stderr, " -m m1 m2 : region of support [m1=64, m2=m1]\n"); fprintf(stderr, " -t : transposed output [FALSE]\n"); fprintf(stderr, " -c : compensated boundary [FALSE]\n"); fprintf(stderr, " -q : first quadrant output [FALSE]\n"); fprintf(stderr, " -A : amplitude [FALSE]\n"); fprintf(stderr, " -R : real part [FALSE]\n"); fprintf(stderr, " -I : imaginary part [FALSE]\n"); fprintf(stderr, " -P : power [FALSE]\n"); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " data sequence (%s) [stdin]\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " 2D FFT sequence (%s)\n", FORMAT); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(1); } int main(int argc, char *argv[]) { FILE *fp; char *s, *infile = NULL, c; double *x, *y; double *xp, *yp; void trans(double *p); int size2; int i, k; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) { if (*(s = *++argv) == '-') { c = *++s; if ((c == 'l' || c == 'm') && (*++s == '\0')) { s = *++argv; --argc; } switch (c) { case 'l': size = atoi(s); break; case 'm': n1 = atoi(s); if (argc == 1) { n2 = n1; } else { s = *++argv; argc--; if ((*s >= '0') && (*s <= '9')) { n2 = atoi(s); } else { n2 = n1; s = *--argv; argc++; } } break; case 't': case 'c': case 'q': if ((c == 't') || (*++s == 't')) outopt = 1; if ((c == 'c') || (*s == 'c')) outopt = 2; if (c == 'q') outopt = -1; break; case 'a': case 'i': case 'p': case 'r': c -= ('a' - 'A'); case 'A': case 'P': case 'I': case 'R': out = c; break; case 'h': default: usage(); } } else infile = s; } if (n1 > size) { fprintf(stderr, "%s : Region size %d should be less than the FFT size %d!\n", cmnd, n1, size); return (1); } if (n2 > size) { fprintf(stderr, "%s : Region size %d should be less than the FFT size %d!\n", cmnd, n2, size); return (1); } if (infile) fp = getfp(infile, "rb"); else fp = stdin; size2 = size * size; x = dgetmem(2 * size2); y = x + size2; while (!feof(fp)) { if (n1) { for (xp = x, k = n2; --k >= 0; xp += size) { if (freadf(xp, sizeof(*x), n1, fp) != n1) return (-1); if (n1 < size) fillz(xp + n1, sizeof(*x), size - n1); } for (yp = y, k = n2; --k >= 0; yp += size) { if (freadf(yp, sizeof(*y), n1, fp) != n1) return (-1); if (n1 < size) fillz(yp + n1, sizeof(*x), size - n1); } } else { if ((k = freadf(x, sizeof(*x), 2 * size2, fp)) == 0) break; n2 = n1 = sqrt((double) k / 2); if (k != n1 * n1 * 2) { fprintf(stderr, "%s : Region of support is not square!\n", cmnd); return (-1); } if (n1 < size) { fillz(yp = y + size * n1, sizeof(*x), size * (size - n1)); yp -= (size - n1); xp = x + k; for (k = n1; --k >= 0; yp -= (size - n1)) { fillz(yp, sizeof(*x), size - n1); for (i = n1; --i >= 0;) *--yp = *--xp; } fillz(yp = x + size * n1, sizeof(*x), size * (size - n1)); yp -= (size - n1); for (k = n1; --k >= 0; yp -= (size - n1)) { fillz(yp, sizeof(*x), size - n1); for (i = n1; --i >= 0;) *--yp = *--xp; } } } fft2(x, y, size); if (out == 'P') for (k = 0; k < size2; k++) x[k] = x[k] * x[k] + y[k] * y[k]; else if (out == 'A') for (k = 0; k < size2; k++) x[k] = sqrt(x[k] * x[k] + y[k] * y[k]); if (out != 'I') { if (outopt) trans(x); else fwritef(x, sizeof(*x), size2, stdout); } if ((out == ' ') || (out == 'I')) { if (outopt) trans(y); else fwritef(y, sizeof(*y), size2, stdout); } } free(x); return 0; } void trans(double *p) { int k, sizeh, nout; double *q; sizeh = size / 2; nout = (outopt == 1) ? sizeh : sizeh + 1; if (outopt > 0) for (q = p + sizeh * size, k = sizeh; --k >= 0; q += size) { fwritef(q + sizeh, sizeof(*p), sizeh, stdout); fwritef(q, sizeof(*p), nout, stdout); } for (q = p, k = nout; --k >= 0; q += size) { if (outopt > 0) fwritef(q + sizeh, sizeof(*p), sizeh, stdout); fwritef(q, sizeof(*p), nout, stdout); } } SPTK-3.9/bin/fftcep/0000755001051300105040000000000012637167702011173 500000000000000SPTK-3.9/bin/fftcep/Makefile.am0000644001051300105040000000021512442245044013133 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = fftcep fftcep_SOURCES = _fftcep.c fftcep.c fftcep_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/fftcep/Makefile.in0000644001051300105040000004262512637167412013167 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = fftcep$(EXEEXT) subdir = bin/fftcep ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_fftcep_OBJECTS = _fftcep.$(OBJEXT) fftcep.$(OBJEXT) fftcep_OBJECTS = $(am_fftcep_OBJECTS) fftcep_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(fftcep_SOURCES) DIST_SOURCES = $(fftcep_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include fftcep_SOURCES = _fftcep.c fftcep.c fftcep_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/fftcep/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/fftcep/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) fftcep$(EXEEXT): $(fftcep_OBJECTS) $(fftcep_DEPENDENCIES) $(EXTRA_fftcep_DEPENDENCIES) @rm -f fftcep$(EXEEXT) $(AM_V_CCLD)$(LINK) $(fftcep_OBJECTS) $(fftcep_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_fftcep.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fftcep.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/fftcep/_fftcep.c0000644001051300105040000001116012637156633012665 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /**************************************************************** $Id: _fftcep.c,v 1.18 2015/12/16 07:05:06 shikano Exp $ FFT Cepstral Analysis void fftcep(sp, flng, c, m, itr, ac); double *sp : log power spectrum int flng : frame length double *c : cepstral coefficients int m : order of cepstrum int itr : number of iteration double ac : accelation factor ******************************************************************/ #include #include #if defined(WIN32) #include "SPTK.h" #else #include #endif void fftcep(double *sp, const int flng, double *c, const int m, int itr, double ac) { double temp; static double *x = NULL, *y; static double size; int k; if (x == NULL) { x = dgetmem(flng + flng); y = x + flng; } if (flng > size) { free(x); x = dgetmem(flng + flng); y = x + flng; size = flng; } movem(sp, x, sizeof(*sp), flng); fftr(x, y, flng); for (k = 0; k < flng; k++) x[k] /= flng; for (k = 0; k <= m; k++) { c[k] = x[k]; x[k] = 0; } ac += 1.0; while (--itr > 0) { for (k = 1; k <= m; k++) x[flng - k] = x[k]; fftr(x, y, flng); for (k = 0; k < flng; k++) if (x[k] < 0.0) x[k] = 0.0; else x[k] /= flng; fftr(x, y, flng); for (k = 0; k <= m; k++) { temp = x[k] * ac; c[k] += temp; x[k] -= temp; } } c[0] *= 0.5; if (m == flng / 2) c[m] *= 0.5; } SPTK-3.9/bin/fftcep/fftcep.c0000644001051300105040000002012712637156633012531 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * FFT Cepstral Analysis * * * * 1985.11 K.Tokuda * * 1996.3 K.Koishida * * * * usage: * * fftcep [ options ] [ infile ] > stdout * * options: * * -m m : order of cepstrum [25] * * -l l : frame length [256] * * -j j : number of iteration [0] * * -k k : acceleration factor [0] * * -e e : epsilon [0] * * infile: * * data sequence * * , x(0), x(1), ..., x(l-1), * * stdout: * * cepstral coefficients * * , c(0), c(1), ..., c(m), * * require: * * fftcep() * * notice: * * When -j & -k options are specified, * * improved cepstral analysis is performed. * * * ************************************************************************/ static char *rcs_id = "$Id: fftcep.c,v 1.31 2015/12/14 01:14:14 uratec Exp $"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #include #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define ORDER 25 #define FLNG 256 #define MAXITR 0 #define ACCELERATION 0.0 #define EPS 0.0 /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - FFT cepstral analysis\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -m m : order of cepstrum [%d]\n", ORDER); fprintf(stderr, " -l l : frame length [%d]\n", FLNG); fprintf(stderr, " -j j : number of iteration [%d]\n", MAXITR); fprintf(stderr, " -k k : acceleration factor [%g]\n", ACCELERATION); fprintf(stderr, " -e e : epsilon [%g]\n", EPS); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " windowed sequence (%s) [stdin]\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " cepstrum (%s)\n", FORMAT); fprintf(stderr, " notice:\n"); fprintf(stderr, " When -j & -k options are specified,\n"); fprintf(stderr, " improved cepstral analysis is performed.\n"); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char **argv) { int m = ORDER, l = FLNG, itr = MAXITR, i; double ac = ACCELERATION, eps = EPS, *x, *y, *c; FILE *fp = stdin; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) if (**++argv == '-') { switch (*(*argv + 1)) { case 'm': m = atoi(*++argv); --argc; break; case 'l': l = atoi(*++argv); --argc; break; case 'j': itr = atoi(*++argv); --argc; break; case 'k': ac = atof(*++argv); --argc; break; case 'e': eps = atof(*++argv); --argc; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else fp = getfp(*argv, "rb"); x = dgetmem(l + l + m + 1); y = x + l; c = y + l; while (freadf(x, sizeof(*x), l, fp) == l) { fftr(x, y, l); for (i = 0; i < l; i++) x[i] = log(x[i] * x[i] + y[i] * y[i] + eps); fftcep(x, l, c, m, itr, ac); fwritef(c, sizeof(*c), m + 1, stdout); } return 0; } SPTK-3.9/bin/fftr/0000755001051300105040000000000012637167702010665 500000000000000SPTK-3.9/bin/fftr/Makefile.am0000644001051300105040000000020312442245044012622 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = fftr fftr_SOURCES = _fftr.c fftr.c fftr_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/fftr/Makefile.in0000644001051300105040000004254312637167412012660 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = fftr$(EXEEXT) subdir = bin/fftr ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_fftr_OBJECTS = _fftr.$(OBJEXT) fftr.$(OBJEXT) fftr_OBJECTS = $(am_fftr_OBJECTS) fftr_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(fftr_SOURCES) DIST_SOURCES = $(fftr_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include fftr_SOURCES = _fftr.c fftr.c fftr_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/fftr/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/fftr/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) fftr$(EXEEXT): $(fftr_OBJECTS) $(fftr_DEPENDENCIES) $(EXTRA_fftr_DEPENDENCIES) @rm -f fftr$(EXEEXT) $(AM_V_CCLD)$(LINK) $(fftr_OBJECTS) $(fftr_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_fftr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fftr.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/fftr/_fftr.c0000644001051300105040000001236612637156633012062 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /******************************************************** $Id: _fftr.c,v 1.18 2015/12/14 01:14:14 uratec Exp $ NAME: fftr - Fast Fourier Transform for Double sequence SYNOPSIS: int fftr(x, y, m) double x[]; real part of data double y[]; working area int m; number of data(radix 2) Naohiro Isshiki Dec.1995 modified ********************************************************/ #include #include #include #if defined(WIN32) #include "SPTK.h" #else #include #endif extern double *_sintbl; extern int maxfftsize; int fftr(double *x, double *y, const int m) { int i, j; double *xp, *yp, *xq; double *yq; int mv2, n, tblsize; double xt, yt, *sinp, *cosp; double arg; mv2 = m / 2; /* separate even and odd */ xq = xp = x; yp = y; for (i = mv2; --i >= 0;) { *xp++ = *xq++; *yp++ = *xq++; } if (fft(x, y, mv2) == -1) /* m / 2 point fft */ return (-1); /*********************** * SIN table generation * ***********************/ if ((_sintbl == 0) || (maxfftsize < m)) { tblsize = m - m / 4 + 1; arg = PI / m * 2; if (_sintbl != 0) free(_sintbl); _sintbl = sinp = dgetmem(tblsize); *sinp++ = 0; for (j = 1; j < tblsize; j++) *sinp++ = sin(arg * (double) j); _sintbl[m / 2] = 0; maxfftsize = m; } n = maxfftsize / m; sinp = _sintbl; cosp = _sintbl + maxfftsize / 4; xp = x; yp = y; xq = xp + m; yq = yp + m; *(xp + mv2) = *xp - *yp; *xp = *xp + *yp; *(yp + mv2) = *yp = 0; for (i = mv2, j = mv2 - 2; --i; j -= 2) { ++xp; ++yp; sinp += n; cosp += n; yt = *yp + *(yp + j); xt = *xp - *(xp + j); *(--xq) = (*xp + *(xp + j) + *cosp * yt - *sinp * xt) * 0.5; *(--yq) = (*(yp + j) - *yp + *sinp * yt + *cosp * xt) * 0.5; } xp = x + 1; yp = y + 1; xq = x + m; yq = y + m; for (i = mv2; --i;) { *xp++ = *(--xq); *yp++ = -(*(--yq)); } return (0); } SPTK-3.9/bin/fftr/fftr.c0000644001051300105040000002027512637156633011721 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * FFT for Real Sequence * * * * 1987 T.Kobayashi * * 1995.12 N.Isshiki modified * * * * usage: * * fftr [ options ] [ infile ] > stdout * * options: * * -l l : FFT size power of 2 [256] * * -m m : order of sequence [l-1] * * -A : amplitude [FALSE] * * -R : real part [FALSE] * * -I : imaginary part [FALSE] * * -P : power [FALSE] * * -H : output half size [FALSE] * * infile: * * stdin for default * * input is assumed to be float * * * ************************************************************************/ static char *rcs_id = "$Id: fftr.c,v 1.30 2015/12/14 01:14:14 uratec Exp $"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #include #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define SIZE 256 /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - FFT for real sequence\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -l l : FFT size power of 2 [%d]\n", SIZE); fprintf(stderr, " -m m : order of sequence [l-1]\n"); fprintf(stderr, " -A : amplitude [FALSE]\n"); fprintf(stderr, " -R : real part [FALSE]\n"); fprintf(stderr, " -I : imaginary part [FALSE]\n"); fprintf(stderr, " -P : power [FALSE]\n"); fprintf(stderr, " -H : output half size [FALSE]\n"); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " data sequence (%s) [stdin]\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " FFT sequence (%s)\n", FORMAT); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char *argv[]) { FILE *fp; char *s, *infile = NULL, c; int size = SIZE, nout = 0, k, nd = -1, out = ' '; double *x, *y; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) { if (*(s = *++argv) == '-') { c = *++s; if ((c == 'l' || c == 'm') && (*++s == '\0')) { s = *++argv; --argc; } switch (c) { case 'l': size = atoi(s); break; case 'm': nd = atoi(s) + 1; break; case 'H': nout = 1; break; case 'i': case 'p': case 'r': c -= ('a' - 'A'); case 'A': case 'I': case 'P': case 'R': out = c; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, c); usage(1); } } else infile = s; } if (nd == -1) nd = size; if (nd > size) { fprintf(stderr, "%s : Order of sequence %d should be less than the FFT size %d!\n", cmnd, nd, size); return (1); } nout = (nout) ? size / 2 + 1 : size; fp = stdin; if (infile) { fp = getfp(infile, "rb"); } x = dgetmem(size + size); y = x + size; while (!feof(fp)) { fillz(x, size, sizeof(*x)); if (freadf(x, sizeof(*x), nd, fp) == 0) break; fftr(x, y, size); if (out == 'P') for (k = 0; k < size; k++) x[k] = x[k] * x[k] + y[k] * y[k]; else if (out == 'A') for (k = 0; k < size; k++) x[k] = sqrt(x[k] * x[k] + y[k] * y[k]); if (out != 'I') fwritef(x, sizeof(*x), nout, stdout); if (out == ' ' || out == 'I') fwritef(y, sizeof(*y), nout, stdout); } if (infile) { fclose(fp); } return (0); } SPTK-3.9/bin/fftr2/0000755001051300105040000000000012637167702010747 500000000000000SPTK-3.9/bin/fftr2/Makefile.am0000644001051300105040000000021012442245046012704 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = fftr2 fftr2_SOURCES = _fftr2.c fftr2.c fftr2_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/fftr2/Makefile.in0000644001051300105040000004257412637167412012746 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = fftr2$(EXEEXT) subdir = bin/fftr2 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_fftr2_OBJECTS = _fftr2.$(OBJEXT) fftr2.$(OBJEXT) fftr2_OBJECTS = $(am_fftr2_OBJECTS) fftr2_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(fftr2_SOURCES) DIST_SOURCES = $(fftr2_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include fftr2_SOURCES = _fftr2.c fftr2.c fftr2_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/fftr2/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/fftr2/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) fftr2$(EXEEXT): $(fftr2_OBJECTS) $(fftr2_DEPENDENCIES) $(EXTRA_fftr2_DEPENDENCIES) @rm -f fftr2$(EXEEXT) $(AM_V_CCLD)$(LINK) $(fftr2_OBJECTS) $(fftr2_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_fftr2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fftr2.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/fftr2/_fftr2.c0000644001051300105040000001170012637156633012215 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /******************************************************** * $Id: _fftr2.c,v 1.18 2015/12/14 01:14:14 uratec Exp $* * fftr2 : two dimensional fast Fourier transform * * for real sequence * * * * int fftr2( x, y, n ) * * * * real x[0]...x[n*n-1]; * * input : data sequence * * output : real part of DFT * * real y[0]...y[n*n-1]; * * input : working area * * output : imaginary part of DFT * * int n; size of DFT * * * * T. Kobayashi May, 1989. * ********************************************************/ #include #include #if defined(WIN32) #include "SPTK.h" #else #include #endif int fftr2(double x[], double y[], const int n) { double *xq, *yq; static double *xb = NULL, *yb; double *xp, *yp; int i, j; static int size_f; if (xb == NULL) { size_f = 2 * n; xb = dgetmem(size_f); yb = xb + n; } if (2 * n > size_f) { free(xb); size_f = 2 * n; xb = dgetmem(size_f); yb = xb + n; } for (i = 0; i < n; i++) { xp = xb; xq = x + i; for (j = n; --j >= 0; xq += n) { *xp++ = *xq; } if (fftr(xb, yb, n) < 0) return (-1); xp = xb; xq = x + i; yp = yb; yq = y + i; for (j = n; --j >= 0; xq += n, yq += n) { *xq = *xp++; *yq = *yp++; } } for (i = n, xp = x, yp = y; --i >= 0; xp += n, yp += n) { if (fft(xp, yp, n) < 0) return (-1); } return (0); } SPTK-3.9/bin/fftr2/fftr2.c0000644001051300105040000002515312637156634012066 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * 2D-FFT for Real Sequence * * * * 1989 T.Kobayashi * * 1996.2 N.Miyazaki modified * * * * usage: * * fftr2 [ infile ] [ options ] > stdout * * options: * * -l l : FFT size. power of 2 [64] * * -m m1 m2 : region of support [m1=64,m2=m1] * * -t : transposed output [FALSE] * * -c : compensated boundary [FALSE] * * -q : first quadrant output [FALSE] * * -A : amplitude [FALSE] * * -R : real part [FALSE] * * -I : imaginary part [FALSE] * * -P : power [FALSE] * * infile: * * stdin for default * * input is assumed to be double * ************************************************************************/ static char *rcs_id = "$Id: fftr2.c,v 1.28 2015/12/14 01:14:14 uratec Exp $"; /* Standard C Libraries */ #include #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Command Name */ static char *cmnd; static int size = 64, outopt = 0, n1 = 0, n2 = 0, out = ' '; int usage(void) { fprintf(stderr, "\n"); fprintf(stderr, " %s - 2D-FFT for real sequence\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -l l : FFT size power of 2 [64]\n"); fprintf(stderr, " -m m1 m2 : region of support [m1=64, m2=m1]\n"); fprintf(stderr, " -t : transposed output [FALSE]\n"); fprintf(stderr, " -c : compensated boundary [FALSE]\n"); fprintf(stderr, " -q : first quadrant output [FALSE]\n"); fprintf(stderr, " -A : amplitude [FALSE]\n"); fprintf(stderr, " -R : real part [FALSE]\n"); fprintf(stderr, " -I : imaginary part [FALSE]\n"); fprintf(stderr, " -P : power [FALSE]\n"); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " data sequence (%s) [stdin]\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " FFT sequence (%s)\n", FORMAT); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(1); } int main(int argc, char *argv[]) { FILE *fp; char *s, *infile = NULL, c; double *x, *y; double *xp, *yp; void trans(double *p); int size2; int i, k; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) { if (*(s = *++argv) == '-') { c = *++s; if ((c == 'l' || c == 'm') && *++s == '\0') { s = *++argv; --argc; } switch (c) { case 'l': size = atoi(s); break; case 'm': n1 = atoi(s); if (argc == 1) { n2 = n1; } else { s = *++argv; argc--; if (*s >= '0' && *s <= '9') { n2 = atoi(s); } else { n2 = n1; s = *--argv; argc++; } } break; case 't': case 'c': case 'q': if (c == 't' || *++s == 't') outopt = 1; if (c == 'c' || *s == 'c') outopt = 2; if (c == 'q') outopt = -1; break; case 'a': case 'p': case 'r': case 'i': c -= ('a' - 'A'); case 'A': case 'P': case 'R': case 'I': out = c; break; case 'h': usage(); default: usage(); } } else infile = s; } if (n1 > size) { fprintf(stderr, "%s : Region size %d should be less than the FFT size %d!\n", cmnd, n1, size); return (1); } if (n2 > size) { fprintf(stderr, "%s : Region size %d should be less than the FFT size %d!\n", cmnd, n2, size); return (1); } if (infile) fp = getfp(infile, "rb"); else fp = stdin; size2 = size * size; x = dgetmem(2 * size2); y = x + size2; size2 = size * size; x = dgetmem(2 * size2); y = x + size2; while (!feof(fp)) { if (n1) { for (xp = x, k = n2; --k >= 0; xp += size) { if (freadf(xp, sizeof(*x), n1, fp) != n1) return (-1); if (n1 < size) fillz(xp + n1, sizeof(*xp), size - n1); } } else { if ((k = freadf(x, sizeof(*x), size2, fp)) == 0) break; n2 = n1 = sqrt((double) k); if (k != n1 * n1) { fprintf(stderr, "%s : Region of support is not square!\n", cmnd); return (-1); } if (n1 < size) { fillz(yp = x + size * n1, sizeof(*yp), size * (size - n1)); yp -= (size - n1); xp = x + k; for (k = n1; --k >= 0; yp -= (size - n1)) { fillz(yp, sizeof(*yp), size - n1); for (i = n1; --i >= 0;) *--yp = *--xp; } } } fftr2(x, y, size); if (out == 'P') { for (k = 0; k < size2; k++) x[k] = x[k] * x[k] + y[k] * y[k]; } else if (out == 'A') { for (k = 0; k < size2; k++) x[k] = sqrt(x[k] * x[k] + y[k] * y[k]); if (out != 'I') { if (outopt) trans(x); else fwritef(x, sizeof(*x), size2, stdout); } } if (out == ' ' || out == 'I') { if (outopt) trans(y); else fwritef(y, sizeof(*y), size2, stdout); } } free(x); return (0); } void trans(double *p) { int k, sizeh, nout; double *q; sizeh = size / 2; nout = (outopt == 1) ? sizeh : sizeh + 1; if (outopt > 0) { for (q = p + sizeh * size, k = sizeh; --k >= 0; q += size) { fwritef(q + sizeh, sizeof(*p), sizeh, stdout); fwritef(q, sizeof(*p), nout, stdout); } for (q = p, k = nout; --k >= 0; q += size) { if (outopt > 0) fwritef(q + sizeh, sizeof(*p), sizeh, stdout); fwritef(q, sizeof(*p), nout, stdout); } } return; } SPTK-3.9/bin/fig+fdrw/0000755001051300105040000000000012637167703011430 500000000000000SPTK-3.9/bin/fig+fdrw/Makefile.am0000644001051300105040000000037512442245046013400 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = fig fdrw fig_SOURCES = fig.c fig.h fig0.c fig1.c plot.c plot.h plsub.c fdrw_SOURCES = fdrw.c plot.c plot.h plsub.c fig_LDADD = @top_builddir@/lib/libSPTK.a fdrw_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/fig+fdrw/Makefile.in0000644001051300105040000004417012637167412013420 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = fig$(EXEEXT) fdrw$(EXEEXT) subdir = bin/fig+fdrw ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_fdrw_OBJECTS = fdrw.$(OBJEXT) plot.$(OBJEXT) plsub.$(OBJEXT) fdrw_OBJECTS = $(am_fdrw_OBJECTS) fdrw_DEPENDENCIES = @top_builddir@/lib/libSPTK.a am_fig_OBJECTS = fig.$(OBJEXT) fig0.$(OBJEXT) fig1.$(OBJEXT) \ plot.$(OBJEXT) plsub.$(OBJEXT) fig_OBJECTS = $(am_fig_OBJECTS) fig_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(fdrw_SOURCES) $(fig_SOURCES) DIST_SOURCES = $(fdrw_SOURCES) $(fig_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include fig_SOURCES = fig.c fig.h fig0.c fig1.c plot.c plot.h plsub.c fdrw_SOURCES = fdrw.c plot.c plot.h plsub.c fig_LDADD = @top_builddir@/lib/libSPTK.a fdrw_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/fig+fdrw/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/fig+fdrw/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) fdrw$(EXEEXT): $(fdrw_OBJECTS) $(fdrw_DEPENDENCIES) $(EXTRA_fdrw_DEPENDENCIES) @rm -f fdrw$(EXEEXT) $(AM_V_CCLD)$(LINK) $(fdrw_OBJECTS) $(fdrw_LDADD) $(LIBS) fig$(EXEEXT): $(fig_OBJECTS) $(fig_DEPENDENCIES) $(EXTRA_fig_DEPENDENCIES) @rm -f fig$(EXEEXT) $(AM_V_CCLD)$(LINK) $(fig_OBJECTS) $(fig_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fdrw.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fig.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fig0.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fig1.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plot.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plsub.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/fig+fdrw/fdrw.c0000644001051300105040000003256012637156634012465 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * Draw a Graph * * * * 1991.1 T.Kobayshi * * 1996.5 K.Koishida * * * * usage: * * fdrw [options] [infile] > stdout * * options: * * -F F : factor [1] * * -R R : rotation angle [0] * * -W W : width of figure [1] * * -H H : height of figure [1] * * -o xo yo : origin in mm [20 25] * * -g g : draw grid [1] * * -m m : line type [0] * * -l l : line pitch [0] * * -p p : pen number [1] * * -j j : join number [1] * * -n n : number of sample [0] * * -t t : coordinate type [0] * * -y y1 y2 : scaling factor [-1 1] * * -z z : offset for duplication [0] * * -b : bar graph mode [FALSE] * * * ************************************************************************/ static char *rcs_id = "$Id: fdrw.c,v 1.31 2015/12/14 01:14:14 uratec Exp $"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #if defined(WIN32) #include "SPTK.h" #else #include #endif #include "plot.h" /* Required Functions */ int drw(FILE * fp); /* Default Values */ #define BAR FA #define FCT 1.0 #define TH 0.0 #define XO 20.0 #define YO 25.0 #define GTYPE 1 #define LTYPE 0 #define LPT 0.0 #define PENNO 1 #define JOINNO 1 #define NSMPLS 0 #define DZ 0.0 #define WF 1.0 #define HF 1.0 #define XSIZE 100.0 #define YSIZE 100.0 #define CTYPE 0 #define YMIN -1.0 #define YMAX 1.0 #define BUF_LNG 5000 #define H 2.5 #define SC 1.5 char *BOOL[] = { "FALSE", "TRUE" }; /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - draw a graph\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -F F : factor [%g]\n", FCT); fprintf(stderr, " -R R : rotation angle [%g]\n", TH); fprintf(stderr, " -W W : width of figure [1]\n"); fprintf(stderr, " -H H : height of figure [1]\n"); fprintf(stderr, " -o xo yo : origin in mm [%g %g]\n", XO, YO); fprintf(stderr, " -g g : draw grid [%d]\n", GTYPE); fprintf(stderr, " -m m : line type [%d]\n", LTYPE); fprintf(stderr, " -l l : line pitch [%g]\n", LPT); fprintf(stderr, " -p p : pen number [%d]\n", PENNO); fprintf(stderr, " -j j : join number [%d]\n", JOINNO); fprintf(stderr, " -n n : number of sample [%d]\n", NSMPLS); fprintf(stderr, " -t t : coordinate type [%d]\n", CTYPE); fprintf(stderr, " -y y1 y2 : scaling factor [%g %g]\n", YMIN, YMAX); fprintf(stderr, " -z z : offset for duplication [%g]\n", DZ); fprintf(stderr, " -b : bar graph mode [%s]\n", BOOL[BAR]); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " data sequence (%s)\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " plotter command\n"); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } double fct = FCT, th = TH, lpt = LPT, dz = DZ, scale = 0, xo = XO, yo = YO, xl = XSIZE, yl = YSIZE, ymin = YMIN, ymax = YMAX, wf = WF, hf = HF; long nsmpls = NSMPLS; int is_hold = BAR, is_y = 0; int ltype = LTYPE, gtype = GTYPE, penno = PENNO, joinno = JOINNO, ctype = CTYPE; int lmod[] = { 0, 2, 6, 3, 4 }; double lpit[] = { 10, 1.6, 10, 3, 5 }; int main(int argc, char *argv[]) { FILE *fp = stdin; char *s; int c; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) { if (*(s = *++argv) == '-') { c = *++s; if (c != 'b' && *++s == '\0') { s = *++argv; --argc; } switch (c) { case 'b': is_hold = 1; break; case 'F': fct = atof(s); break; case 'R': th = atof(s); break; case 'o': xo = atof(s); yo = atof(*++argv); --argc; break; case 'g': gtype = atoi(s); break; case 'm': ltype = atoi(s) - 1; break; case 'l': lpt = atof(s); break; case 'p': penno = atoi(s); break; case 'j': joinno = atoi(s); break; case 'n': nsmpls = atoi(s); break; case 'z': dz = atof(s); break; case 'W': wf = atof(s); xl = atof(s) * XSIZE; break; case 'H': hf = atof(s); yl = atof(s) * YSIZE; break; case 't': ctype = (atoi(s) < 0) ? -1 : 1; break; case 'y': is_y = 1; ymin = atof(s); ymax = atof(*++argv); --argc; break; case 'h': usage(0); default: usage(1); break; } } else fp = getfp(*argv, "rb"); } plots(0x81); mode(lmod[ltype], (lpt == 0) ? lpit[ltype] : lpt); plot(xo, yo, -3); rotate(th); pen(1); join(0); xl *= fct; yl *= fct; if (gtype) { if (ctype) { plot(-ctype * yl, 0.0, 2); plot(-ctype * yl, ctype * xl, 2); plot(0.0, ctype * xl, 2); plot(0.0, 0.0, 2); } else { plot(xl, 0.0, 2); plot(xl, yl, 2); plot(0.0, yl, 2); plot(0.0, 0.0, 2); } } pen(penno); join(joinno); while (!feof(fp)) { drw(fp); if (dz != 0.0) { if (ctype) plot(-ctype * dz, 0.0, -3); else plot(0.0, dz, -3); } } plote(); return (0); } int drw(FILE * fp) { int k, nitems; char buf[64]; int n, n2; double dx = 0.0, h; double *p; double *x, *y; if ((x = calloc(BUF_LNG * 4, sizeof(*x))) == NULL) return (1); y = x + BUF_LNG * 2; if (nsmpls) dx = xl / (is_hold ? nsmpls : nsmpls - 1); for (n = 0; n == 0 || (n < nsmpls && !feof(fp));) { if (nsmpls) nitems = (nsmpls - n > BUF_LNG) ? BUF_LNG : nsmpls - n; else nitems = BUF_LNG; if ((nitems = freadf(y, sizeof(*y), nitems, fp)) == 0) break; if (nsmpls == 0) { nsmpls = nitems; dx = xl / (is_hold ? nitems : nitems - 1); } if (scale == 0) { if (!is_y) for (ymin = ymax = y[0], k = 1; k < nitems; ++k) { if (y[k] < ymin) ymin = y[k]; else if (y[k] > ymax) ymax = y[k]; } if (ymax == ymin) { ymax += 1; ymin -= 1; } scale = yl / (ymax - ymin); if (gtype) { h = H * ((xl > XSIZE) ? XSIZE : xl) / XSIZE; sprintf(buf, "0 -x- %ld %g -y- %g", nsmpls - 1, ymin, ymax); h *= fct; if (ctype == 0) symbol(0.0, -h - 2, buf, h, h, 0.0); else if (ctype > 0) symbol(h + 2, 0.0, buf, h, h, 90.0); else symbol(0.0, h + 2, buf, h, h, 0.0); } if (ctype) { if (ctype > 0) bound(-yl, 0.0, 0.0, xl); else bound(0.0, -xl, yl, 0.0); plot(ctype * scale * ymin, 0.0, -3); } else { bound(0.0, 0.0, xl, yl); plot(0.0, -scale * ymin, -3); } if (gtype && ymin < 0 && ymax > 0) { plot(0.0, 0.0, 3); if (gtype > 1) { if (ctype) plot(0.0, ctype * xl, 2); else plot(xl, 0.0, 2); } else { if (ctype) plot(0.0, ctype * SC * fct, 2); else plot(SC * fct, 0.0, 2); } } } for (k = 0; k < nitems; ++k) { x[k] = n++ * dx; y[k] *= scale; } if (is_hold) { for (k = nitems, p = y + nitems * 2; --k >= 0;) { *--p = y[k]; *--p = y[k]; } p = x + nitems * 2; *--p = n * dx; for (k = nitems; --k > 0;) { *--p = x[k]; *--p = x[k]; } n2 = 2 * nitems; } else n2 = nitems; if (ctype) { for (k = 0; k < n2; ++k) { x[k] *= ctype; y[k] *= -ctype; } if (n != nitems) plot(y[0], x[0], 2); line(1, y, x, n2); } else { if (n != nitems) plot(x[0], y[0], 2); line(1, x, y, n2); } } rstbnd(wf, hf, fct); return (0); } SPTK-3.9/bin/fig+fdrw/plot.c0000644001051300105040000001440412637156634012476 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /**************************************************************** * XY-Plotter Library * * * * 1985 T. Kobayashi * * 2010.9 A. Tamamori * * * * Calling sequence : * * plopen(mode); * * _plsend(buf, nbytes); * * _plnorm(x); * * plots(mode); * * plote(); * * plot(x, y, z); * * plotr(ip, x, y); * * plota(ip, x, y); * * origin(x, y); * * mode(ltype, lscale); * * chlnmod(_lnmode); * * * ****************************************************************/ #include #include #include #if defined(WIN32) #include #define sleep(x) Sleep(x) #else #include #endif #include "plot.h" struct co_ord _org = { 0.0, 0.0 }; void plots(int mode) { if ((mode & 0x80) == 0) { asciimode(); /* ASCII mode */ ifclear(); /* Interface CLEAR */ sleep(1); /* delay */ home(); /* HOME */ } term(TRM); _org.xo = _org.yo = 0.0; } void plote(void) { return; } int _plnorm(double x) { return ((int) (10.0 * x + 0.5)); } int _cordx(double x) { return (_plnorm(x + _org.xo)); } int _cordy(double y) { return (_plnorm(y + _org.yo)); } static short _ltype = 0, _lscale = 10; void plot(double x, double y, int z) { int ip; if (abs(z) == 2) ip = 0; else if (abs(z) == 3) ip = 1; else { if (z == 999) plote(); return; } plota(ip, x, y); if (z < 0) { _org.xo += x; _org.yo += y; } } int plotr(int ip, double x, double y) { if (ip == 1) rmove(_plnorm(x), _plnorm(y)); else if (ip == 0 || ip == 2) { if (ip == 2) _chlnmod(1); rdraw(_plnorm(x), _plnorm(y)); if (ip == 2) _chlnmod(0); } else return (1); return (0); } int plota(int ip, double x, double y) { if (ip == 1) move(_cordx(x), _cordy(y)); else if (ip == 0 || ip == 2) { if (ip == 2) _chlnmod(1); draw(_cordx(x), _cordy(y)); if (ip == 2) _chlnmod(0); } else return (1); return (0); } void mode(int ltype, double lscale) { _ltype = ltype; _lscale = _plnorm(lscale); } void _chlnmod(int lmode) { if (lmode) { line_type(_ltype); line_scale(_lscale); } else line_type(0); } void origin(double x, double y) { _org.xo = x; _org.yo = y; plot(0., 0., 3); } void org(double x, double y) { _org.xo = x; _org.yo = y; } SPTK-3.9/bin/fig+fdrw/plot.h0000644001051300105040000002025112637156651012477 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /**************************************************************** * $Id: plot.h,v 1.19 2015/12/14 01:14:14 uratec Exp $ * * HEADER for XY-PLOTTER library * * * * Following commands are valid for the xy plotter FP5301 * * * * Oct. 1, 1985 * ****************************************************************/ #include /* commands for FP5301 */ #define TRM 0 /* terminator */ #define _speed(l, n) printf("!%d %d%c", l, n, TRM) /* speed */ #define _speed_all(l) printf("!%d%c", l, TRM) /* speed */ #define ERRMASK 0x8022 /* error mask */ #define _font(n) printf("$%d%c", n, TRM) /* font */ #define _hatch(m,p,t) printf("%%%d %d %d\n", m, p, t) /* hatching */ #define _factor(p,q,r) printf("&%d %d %d\n", p, q, r) /* factor */ #define ELLIPS 0x8029 /* ellips */ #define _rotate(x,y,t) printf("/%d %d %d\n", x, y, t) /* rotate */ #define clear() putchar(':') /* clear */ #define ifclear() putchar(';') /* interface clear */ #define term(t) printf("=%c%c", t, t) /* term */ #define CLIP 0x803e /* clipping */ #define RDOFF 0x803f /* read offset */ #define ARESET 0x8041 /* alpha reset */ #define line_scale(l) printf("B%d\n", l) /* line scale */ #define draw(x, y) printf("D%d %d\n%c", x, y, TRM) /* draw */ #define _draw() putchar('D') /* draw command */ #define rdraw(x, y) printf("E%d %d\n%c", x, y, TRM) /* relative draw */ #define home(); putchar('H') /* home */ #define aitalic(p) printf("I%d\n", p) /* alpha italic */ #define newpen(p) printf("J%d\n", p) /* new pen */ #define join_type(p) printf("K%d\n", p) /* join type */ #define KANA 0x804b /* kana */ #define line_type(p) printf("L%d\n", p) /* line type */ #define move(x, y) printf("M%d %d\n", x, y) /* move */ #define _mark(m) printf("N%d\n", m) /* mark */ #define rmove(x, y) printf("O%d %d\n", x, y) /* relative move */ #define print(p) printf("P%s%c", p, TRM) /* print */ #define aspace(l) printf("Q%d\n", l) /* alpha space */ #define arotate(t) printf("R%d\n", t) /* alpha rotate */ #define ascale(a) printf("S%d\n", a) /* alpha scale */ #define PROMPT 0x8054 /* prompt light */ #define _circle(x,y,q,r,s,t) printf("W%d %d %d %d %d %d%c",x,y,q,r,s,t,TRM) /* circle */ #define _axis(p,q,r,s,t) printf("X%d %d %d %d %d%c", p,q,r,s,t,TRM) /* axis */ #define _curve(a) printf("Y%d\n", a) /* curve */ #define wup_left(x, y) printf("Z%d %d\n", x, y) /* write upper right */ #define wlo_right(x, y) printf("\\%d %d\n", x, y) /* write lower left */ #define _rcircle(q,r,s,t) printf("]%d %d %d %d%c",q,r,s,t,TRM) /* relative circle */ #define _offset(x, y) printf("^%d %d\n", x, y) /* offset */ #define RCURVE 0x805f /* relative curve */ #define asciimode() printf("%c%c", 0x80, 0) /* binary terminator */ #define terminate() putchar(TRM) /* terminator */ #define sndcord(x, y) printf("%d %d\n", x, y) /* send (x, y) */ /* interfacing */ struct co_ord { double xo; double yo; }; #define sign(x) (x & 0xffff8000) #define DEG_RAD (3.141592653589793 / 180.0) #define SCALE 4096 /* Required Functions */ void rotate(double th); void factor(double fx, double fy); int offset(double x, double y); void bound(double xl, double yl, double xh, double yh); void rstbnd(double w, double h, double fct); int hatch(int ip, double *ax, double *ay, int n, double d, double t); int pen(int pen); int join(int join); int font(int n); int speed(int isp, int ip); int mark(int mrk, double ax[], double ay[], int n, double f, int m); int symbol(double x, double y, char *text, double h, double s, double th); int number(double x, double y, double fval, double h, double s, double th, int m, int n); int italic(double th); int line(int ip, double *ax, double *ay, int n); int circle(double x, double y, double rs, double re, double ths, double the); int pntstyl(int ip); void plots(int mode); void plote(); int _plnorm(double x); int _cordx(double x); int _cordy(double y); void plot(double x, double y, int z); int plotr(int ip, double x, double y); int plota(int ip, double x, double y); void mode(int ltype, double lscale); void _chlnmod(int lmode); void origin(double x, double y); void org(double x, double y); void graph(FILE * fp); void draw_fig0(double x[], double y[], int n, double w, double h, double fct); int flush(double x[], double y[], int n, double w, double h, double fct); void polyg(double x[], double y[], int n, double w, double h, double fct); int is_in(double x, double y); void swap(double *x, double *y); char *gettxt_fig(char *s); char *script(char *s, int i); char *getarg(char *s, char *arg); char *gettyp(char *s, char *t); char *getname(char *s, char *t); int greek(char *p); double sleng(char *p, double h, double w); void _symbol(double x, double y, char *p, double h, double w, double t); double ysadj(void); double rx(double x, double y, double t); double ry(double x, double y, double t); double argapf(double x, double a); SPTK-3.9/bin/fig+fdrw/plsub.c0000644001051300105040000002034212637156634012643 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /**************************************************************** * XY PLOTTER library * * * * 1985 T. Kobayashi * * * * Calling sequence : * * factor(fx, fy); * * rotate(th); * * offset(x, y); * * bound(xl, yl, xh, yh); * * hatch(ip, x, y, n, d, t); * * pen(ip); * * speed(isp); * * mark(mrk, ax, ay, n, f[, m]); * * symbol(x, y, text, h, s, th) * * number(x, y, fval, h, s, th, m, n); * * italic(th) * * font(n) * * line(ip, x, y, n); * * circle(x, y, rs, re, ths, the) * * rcircle(rs, re, ths, the); * * * ****************************************************************/ #include #include #include #include "plot.h" extern struct co_ord _org; void rotate(double th) { _rotate(_plnorm(_org.xo), _plnorm(_org.yo), _plnorm(th)); } void factor(double fx, double fy) { _factor((int) (fx * SCALE + 0.5), (int) (fy * SCALE + 0.5), SCALE); } int offset(double x, double y) { _offset(_plnorm(x), _plnorm(y)); return (0); } void bound(double xl, double yl, double xh, double yh) { wlo_right(_cordx(xl), _cordy(yl)); wup_left(_cordx(xh), _cordy(yh)); } void rstbnd(double w, double h, double F) { wlo_right(0, 0); wup_left((int) ((4000 * w + _org.xo * 10.0) * F), (int) ((2850 * h + _org.yo * 10.0) * F)); } int hatch(int ip, double *ax, double *ay, int n, double d, double t) { if (n < 3) return (1); ip += 20; _hatch(ip, _plnorm(d), _plnorm(t)); while (--n >= 0) sndcord(_cordx(*ax++), _cordy(*ay++)); terminate(); return (0); } int pen(int pen) { if (pen < 1 || pen > 10) return (1); newpen(pen); return (0); } int join(int join) { if (join < 0 || join > 2) return (1); join_type(join); return (0); } int font(int n) { if (n < 0 || n > 19) return (1); _font(n); return (0); } int speed(int isp, int ip) { if (isp < 0 || isp > 10 || ip < 0 || ip > 10) return (1); if (ip) _speed_all(isp); else _speed(isp, ip); return (0); } int mark(int mrk, double ax[], double ay[], int n, double f, int m) { int i; if (mrk < 0 || mrk > 15) return (1); m = (n < 0) ? m : 1; if ((n = abs(n)) < 1 || m < 0) return (1); ascale(_plnorm(f * 1.75)); arotate(0); for (i = 0; i < n; i += m) { plot(ax[i], ay[i], 3); _mark(mrk); } return (0); } int symbol(double x, double y, char *text, double h, double s, double th) { plot(x, y, 3); ascale(_plnorm(h)); aspace(_plnorm(s)); arotate(_plnorm(th)); print(text); return (0); } int number(double x, double y, double fval, double h, double s, double th, int m, int n) { char buf[32], format[8]; if (abs(m) > 10) return (1); if (n <= 0) { while (++n < 0) fval /= 10.0; sprintf(format, "%%%dd%s", m, (n) ? ".\r" : "\r"); sprintf(buf, format, (long) fval); } else { sprintf(format, "%%%d.%df\r", m, n); sprintf(buf, format, fval); } return (symbol(x, y, buf, h, s, th)); } int italic(double th) { int theta = 256 * tan(th * DEG_RAD); if (theta > 4000) return (1); aitalic(theta); return (0); } int line(int ip, double *ax, double *ay, int n) { struct { short x; short y; } b, o, pb; int dx, dy; if (n < 2) return (1); if (ip) _chlnmod(1); plot(*ax++, *ay++, 3); o.x = dx = _cordx(*ax++); o.y = dy = _cordy(*ay++); pb = o; _draw(); while (--n > 1) { dx = (b.x = _cordx(*ax++)) - pb.x; dy = (b.y = _cordy(*ay++)) - pb.y; if (dx || dy) { if (dx == 0 && o.x == 0 && sign(dy) == sign(o.y)) pb.y = b.y; else if (dy == 0 && o.y == 0 && sign(dx) == sign(o.x)) pb.x = b.x; else { sndcord(pb.x, pb.y); pb.x = b.x; pb.y = b.y; } o.x = dx; o.y = dy; } } sndcord(pb.x, pb.y); terminate(); if (ip) _chlnmod(0); return (0); } int circle(double x, double y, double rs, double re, double ths, double the) { int r1, r2; r1 = _plnorm(rs); r2 = _plnorm(re); if (r1 == 0 && r2 == 0) return (1); _circle(_cordx(x), _cordy(y), r1, r2, _plnorm(ths), _plnorm(the)); return (0); } int pntstyl(int ip) { ip += 20; aspace(ip); /* valid for only LBP */ return (0); } SPTK-3.9/bin/fig+fdrw/fig.c0000644001051300105040000002323012637156634012262 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * Plot a Graph * * * * 1990.9 T.Kobayashi * * 1996.5 K.Koishida * * * * usage: * * fig [options] [infile] > stdout * * options: * * -F F : factor [1] * * -R R : rotation angle [0] * * -W W : width of figure [1] * * -H H : height of figure [1] * * -o xo yo : origin in mm [20 20] * * -g g : draw grid [2] * * -p p : pen number [1] * * -j j : join number [0] * * -s s : font size [1] * * -f f : first opened file [NULL] * * -t : transpose x and y axes [FALSE] * * * ************************************************************************/ static char *rcs_id = "$Id: fig.c,v 1.29 2015/12/14 01:14:14 uratec Exp $"; /* Standard C Libraries */ #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #include #if defined(WIN32) #include "SPTK.h" #else #include #endif #include "plot.h" /* Default Values */ #define LENG 100 #define CH_NRML 2.5 #define CH_BIG 5.0 #define CW_NRML 2.2 #define CW_BIG 2.6 #define CW_HUGE 4.4 #define TYPE 2 #define FCT 1.0 #define TH 0.0 #define FNTSIZE 0 #define IS_T FA #define XO 20.0 #define YO 20.0 #define PENNO 1 #define JOINNO 0 #define XL LENG #define YL LENG #define WF 1.0 #define HF 1.0 char *BOOL[] = { "FALSE", "TRUE" }; /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - plot a graph\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -F F : factor [%g]\n", FCT); fprintf(stderr, " -R R : rotation angle [%g]\n", TH); fprintf(stderr, " -W W : width of figure [1]\n"); fprintf(stderr, " -H H : height of figure [1]\n"); fprintf(stderr, " -o xo yo : origin in mm [%g %g]\n", XO, YO); fprintf(stderr, " -g g : draw grid [%d]\n", TYPE); fprintf(stderr, " -p p : pen number [%d]\n", PENNO); fprintf(stderr, " -j j : join number [%d]\n", JOINNO); fprintf(stderr, " -s s : font size [%d]\n", FNTSIZE + 1); fprintf(stderr, " -f f : first opened file [NULL]\n"); fprintf(stderr, " -t : transpose x and y axes [%s]\n", BOOL[IS_T]); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " command\n"); fprintf(stderr, " stdout:\n"); fprintf(stderr, " plotter command\n"); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int ltype = 0, penno = PENNO, joinno = JOINNO, type = TYPE, is_t = IS_T; double xo = XO, yo = YO; double xl = XL, yl = YL, x00 = 0, y00 = 0; double mh = 2, mw = 2, h = CH_NRML, w = CW_NRML; double xclip0 = 0, yclip0 = 0, xclip1 = 0, yclip1 = 0; double fct = FCT; double wf = WF, hf = HF; int main(int argc, char *argv[]) { FILE *fp; char *infile[16], *file = NULL; char *s; double th = TH; int c, n, nfiles, fntsize = FNTSIZE; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; for (nfiles = 0; --argc;) { if (*(s = *++argv) == '-') { c = *++s; if (*++s == '\0' && c != 't') { s = *++argv; --argc; } switch (c) { case 'g': type = atoi(s); break; case 'F': fct = atof(s); break; case 'R': th = atof(s); break; case 's': fntsize = atoi(s) - 1; break; case 't': is_t = 1 - is_t; break; case 'o': xo = atof(s); yo = atof(*++argv); --argc; break; case 'f': file = s; break; case 'p': penno = atoi(s); break; case 'j': joinno = atoi(s); break; case 'W': wf = atof(s); xl = atof(s) * LENG; break; case 'H': hf = atof(s); yl = atof(s) * LENG; break; case 'h': usage(0); default: usage(1); } } else infile[nfiles++] = *argv; } if (fntsize < 0 || fntsize > 3) fntsize = 0; if (fntsize & 1) h = CH_BIG; if (fntsize & 2) w = CW_HUGE; if (fntsize == 1) w = CW_BIG; plots(0x81); org(xo, yo); rstbnd(wf, hf, fct); org(0.0, 0.0); font(fntsize); font(0); /* valid only LBP */ plot(xo, yo, -3); rotate(th); pen(1); join(0); italic(0.0); mode(0, 10); xl *= fct; yl *= fct; xclip1 = xl; yclip1 = yl; swap(&xclip1, &yclip1); if (type--) { plot(0.0, 0.0, -3); plot(xl, 0.0, 2); plot(xl, yl, type ? 2 : 3); plot(0.0, yl, type ? 2 : 3); plot(0.0, 0.0, 2); } pen(penno); join(joinno); if (file) { fp = getfp(file, "rt"); graph(fp); fclose(fp); } if (nfiles == 0) graph(stdin); else { for (n = 0; n < nfiles; ++n) { fp = getfp(infile[n], "rt"); graph(fp); fclose(fp); } } plote(); return (0); } SPTK-3.9/bin/fig+fdrw/fig.h0000644001051300105040000000674612637156650012302 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /******************************************************** * $Id: fig.h,v 1.13 2015/12/14 01:14:14 uratec Exp $ * * NAME : fig.h - Header for fig * ********************************************************/ #include #include #define BUFLNG 512 #define SBUFLNG 81 #define LSCALE 1.5 #define MSCALE 1.5 #define NSCALE 3 #define MADJ 1.0 #define LADJ 0.8 #define SSIZE 0.6 #define is_number(c) (isdigit(c) || c=='-') SPTK-3.9/bin/fig+fdrw/fig0.c0000644001051300105040000003730612637156634012353 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /**************************************************************** * NAME : fig0 - subroutines for fig * ****************************************************************/ #include #include #include #include "fig.h" #include "plot.h" #define xt(x) ((is_xlog<0) ? log10(x) : (x)) #define yt(y) ((is_ylog<0) ? log10(y) : (y)) #define abs(x) (((x)<0) ? -(x) : (x)) #define nz(mx, mn) ((mx>mn) ? mx : mn) extern int ltype, type, is_t; extern double xo, yo, xl, yl, x00, y00, mh, mw, h, w; extern double xclip0, yclip0, xclip1, yclip1, wf, hf, fct; static int lmod[] = { 0, 2, 6, 3, 4 }, ptyp = 1; static int is_xlog = 0, is_ylog = 0; static double lpit[] = { 10.0, 1.6, 10.0, 3.0, 5.0 }; static double dhat = 1.0, that = 45.0; static double xfct = 1.0, yfct = 1.0; static char label[BUFLNG / 2] = ""; static double xbuf[BUFLNG], ybuf[BUFLNG]; void graph(FILE * fp) { static char buf[BUFLNG], arg[BUFLNG / 2], xtype[16], ytype[16]; static double xa, ya, xap, yap, xmin, xmax, ymin, ymax; static double xs = -NSCALE, ys = -NSCALE; int n, c; char *s, *p; double x, y, lpt, th, dt, lscale, rad; int is_grid, old_lbl = 0; char xory; h *= fct; w *= fct; for (n = 0; (s = fgets(buf, BUFLNG, fp));) { s = getarg(s, arg); if (s == NULL || *arg == '#'); /* comment line */ else if ((!is_t && strcmp(arg, "x") == 0) || (is_t && strcmp(arg, "y") == 0)) { s = gettyp(s, xtype); if (sscanf(s, "%lf %lf %lf", &xmin, &xmax, &xa) != 3) xa = xmin; if (strncmp(xtype, "log", 3) == 0) { xmin = log10(xmin); xmax = log10(xmax); xa = log10(xa); is_xlog = (xtype[3] == '*') ? -1 : 1; } xfct = xl / (xmax - xmin); xap = (xa - xmin) * xfct; x00 = -xmin * xfct; } else if ((!is_t && strcmp(arg, "y") == 0) || (is_t && strcmp(arg, "x") == 0)) { s = gettyp(s, ytype); if (sscanf(s, "%lf %lf %lf", &ymin, &ymax, &ya) != 3) ya = ymin; if (strncmp(ytype, "log", 3) == 0) { ymin = log10(ymin); ymax = log10(ymax); ya = log10(ya); is_ylog = (ytype[3] == '*') ? -1 : 1; } yfct = (yl) ? yl / (ymax - ymin) : 0; yap = (ya - ymin) * yfct; y00 = -ymin * yfct; } else if ((!is_t && strncmp(arg, "xscale", 6) == 0) || (is_t && strncmp(arg, "yscale", 6) == 0)) { is_grid = *(arg + 6); if (type < 0 || (ya != ymin && ya != ymax)) { plot(0.0, yap, 3); plot(xl, yap, 2); } ys = yap - h - MSCALE; while ((s = getarg(s, p = arg)) != NULL) { if (*p != '"') { x = atof((is_number(*p)) ? p : p + 1); if (strncmp(xtype, "mel", 3) == 0) x = argapf(x / nz(xmax, xmin), atof(xtype + 3)) * nz(xmax, xmin); else if (is_xlog) x = log10(x); x = (x - xmin) * xfct; lscale = (*p == 's') ? LSCALE / 2 : LSCALE; if (*p != '\\' && *p != '@') { plot(x, yap, 3); plot(x, yap + lscale, 2); if (type > 0 && !is_grid && yap == 0) { plot(x, yl, 3); plot(x, yl - lscale, 2); } } else if (*p == '\\') ++p; } if (is_number(*p) || *p++ == '"') _symbol(x - sleng(p, h, w) / 2, ys - ysadj(), p, h, w, 0.0); } } else if ((!is_t && strncmp(arg, "yscale", 6) == 0) || (is_t && strncmp(arg, "xscale", 6) == 0)) { is_grid = *(arg + 6); if (type < 0 || (xa != xmin && xa != xmax)) { plot(xap, 0.0, 3); plot(xap, yl, 2); } while ((s = getarg(s, p = arg)) != NULL) { if (*p != '"') { y = atof((is_number(*p)) ? p : p + 1); if (strncmp(ytype, "mel", 3) == 0) y = argapf(y / nz(ymax, ymin), atof(ytype + 3)) * nz(ymax, ymin); else if (is_ylog) y = log10(y); y = (y - ymin) * yfct; lscale = (*p == 's') ? LSCALE / 2 : LSCALE; if (*p != '\\' && *p != '@') { plot(xap, y, 3); plot(xap + lscale, y, 2); if (type > 0 && !is_grid && xap == 0) { plot(xl, y, 3); plot(xl - lscale, y, 2); } } else if (*p == '\\') ++p; } if (is_number(*p) || *p++ == '"') { x = xap - sleng(p, h, w) - MSCALE; if (x < xs) xs = x; _symbol(x, y - h * 0.5, p, h, w, 0.0); } } } else if (strcmp(arg + 1, "grid") == 0) { draw_fig0(xbuf, ybuf, n, wf, hf, fct); if ((!is_t && (*arg == 'x')) || (is_t && (*arg == 'y'))) { ybuf[0] = 0; ybuf[1] = yl; while ((s = getarg(s, arg)) != NULL) { x = atof(arg); if (is_xlog) x = log10(x); xbuf[0] = xbuf[1] = (x - xmin) * xfct; draw_fig0(xbuf, ybuf, 2, wf, hf, fct); } } else { xbuf[0] = 0; xbuf[1] = xl; while ((s = getarg(s, arg)) != NULL) { y = atof(arg); if (is_ylog) y = log10(y); ybuf[0] = ybuf[1] = (y - ymin) * yfct; draw_fig0(xbuf, ybuf, 2, wf, hf, fct); } } n = 0; } else if (strcmp(arg + 1, "circle") == 0) { xory = *arg; s = getarg(s, arg); x = xt(atof(arg)); s = getarg(s, arg); y = yt(atof(arg)); swap(&x, &y); x = xfct * x + x00; y = yfct * y + y00; while ((s = getarg(s, arg)) != NULL) { if ((!is_t && xory == 'x') || (is_t && xory == 'y')) rad = xt(atof(arg)) * xfct; else rad = yt(atof(arg)) * yfct; pntstyl(ptyp); circle(x, y, rad, rad, 0., 360.); } } else if (strcmp(arg, "circle") == 0) { s = getarg(s, arg); x = xt(atof(arg)); s = getarg(s, arg); y = yt(atof(arg)); swap(&x, &y); x = xfct * x + x00; y = yfct * y + y00; while ((s = getarg(s, arg)) != NULL) { rad = atof(arg); pntstyl(ptyp); circle(x, y, rad, rad, 0., 360.); } } else if (strcmp(arg + 1, "name") == 0) { s = getname(s, p = arg + 1); if ((!is_t && *arg == 'x') || (is_t && *arg == 'y')) _symbol((xl - sleng(s, h, w)) / 2, (*p) ? -atof(p) - h : ys - h - NSCALE, s, h, w, 0.0); else _symbol((*p) ? -atof(p) : xs - MSCALE, (yl - sleng(s, h, w)) / 2, s, h, w, 90.0); } else if (strncmp(arg, "title", 5) == 0 || strncmp(arg, "print", 5) == 0) { sscanf(s, "%lf %lf", &x, &y); swap(&x, &y); if (*arg == 'p') { x = xfct * xt(x) + x00; y = yfct * yt(y) + y00; } s = gettxt_fig(s); th = getarg(s + strlen(s) + 1, arg) ? atof(arg) : 0; if (*(arg + 5)) { x -= rx(LADJ * h / 2, h / 2, th); y -= ry(LADJ * h / 2, h / 2, th); } _symbol(x, y, s, h, w, th); } else if (strcmp(arg, "eod") == 0 || strcmp(arg, "EOD") == 0) { draw_fig0(xbuf, ybuf, n, wf, hf, fct); n = 0; } else if (strcmp(arg, "pen") == 0) { n = flush(xbuf, ybuf, n, wf, hf, fct); pen(atoi(s)); } else if (strcmp(arg, "join") == 0) { n = flush(xbuf, ybuf, n, wf, hf, fct); join(atoi(s)); } else if (strcmp(arg, "csize") == 0) { if (sscanf(s, "%lf %lf", &h, &w) != 2) w = h; } else if (strcmp(arg, "hight") == 0) { if (sscanf(s, "%lf %lf", &mh, &mw) != 2) mw = mh; } else if (strcmp(arg, "line") == 0) { n = flush(xbuf, ybuf, n, wf, hf, fct); if (sscanf(s, "%d %lf", <ype, &lpt) != 2) { if (ltype > 0) lpt = lpit[ltype - 1]; } if (--ltype >= 0) mode(lmod[ltype], lpt); } else if (strcmp(arg, "italic") == 0) italic(atof(s)); else if (strcmp(arg, "mark") == 0) { while (*s == ' ' || *s == '\t') ++s; if (*s == '\\' && *(s + 1) == '0') *label = '\0'; else strcpy(label, s); } else if (strcmp(arg, "paint") == 0) { sscanf(s, "%d %lf %lf", &ptyp, &dhat, &that); } else if (strcmp(arg, "clip") == 0) { draw_fig0(xbuf, ybuf, n, wf, hf, fct); for (n = 0; (s = getarg(s, arg)) != NULL; ++n) { x = xt(atof(arg)); if ((s = getarg(s, arg)) == NULL) break; y = yt(atof(arg)); swap(&x, &y); xbuf[n] = xfct * x + x00; ybuf[n] = yfct * y + y00; } if (n == 0) { xclip0 = yclip0 = 0; xclip1 = xl; yclip1 = yl; swap(&xclip1, &yclip1); } else if (n == 2) { xclip0 = xbuf[0]; yclip0 = ybuf[0]; xclip1 = xbuf[1]; yclip1 = ybuf[1]; } n = 0; } else if (strcmp(arg, "box") == 0) { draw_fig0(xbuf, ybuf, n, wf, hf, fct); for (n = 0; (s = getarg(s, arg)) != NULL; ++n) { x = xt(atof(arg)); if ((s = getarg(s, arg)) == NULL) break; y = yt(atof(arg)); swap(&x, &y); xbuf[n] = xfct * x + x00; ybuf[n] = yfct * y + y00; } if (n == 2) { xbuf[2] = xbuf[1]; ybuf[3] = ybuf[2] = ybuf[1]; ybuf[1] = ybuf[0]; xbuf[3] = xbuf[0]; n = 4; } polyg(xbuf, ybuf, n, wf, hf, fct); n = 0; } else { x = xt(atof(arg)); s = getarg(s, arg); y = yt(atof(arg)); swap(&x, &y); xbuf[n] = x = xfct * x + x00; ybuf[n] = y = yfct * y + y00; if (is_in(x, y) && ((s = getarg(s, arg)) || *label || old_lbl > 0)) { c = 0; if (s || *label) { if (s == NULL) s = getarg(label, arg); if (*arg == '\\' && (abs(c = atoi(arg + 1))) < 16) mark(abs(c), &x, &y, 1, mh, 1); else if (abs(c) == 16) { pntstyl(ptyp); circle(x, y, mh / 2, mh / 2, 0., 360.); } else { if (c) { *arg = c; *(arg + 1) = '\0'; } _symbol(x - LADJ * h / 2, y - w / 2, arg, h, w, atof(s)); } } if (c > 0) n = flush(xbuf, ybuf, n, wf, hf, fct); if ((c > 0 || old_lbl > 0) && n) { dt = atan2(y - ybuf[0], x - xbuf[0]); if (old_lbl > 0) { xbuf[0] += MADJ * mh * cos(dt); ybuf[0] += MADJ * mh * sin(dt); } if (c > 0) { xbuf[1] -= MADJ * mh * cos(dt); ybuf[1] -= MADJ * mh * sin(dt); } draw_fig0(xbuf, ybuf, 2, wf, hf, fct); xbuf[0] = x; ybuf[0] = y; n = 0; } old_lbl = c; } if (++n >= BUFLNG) n = flush(xbuf, ybuf, n, wf, hf, fct); } } draw_fig0(xbuf, ybuf, n, wf, hf, fct); } void draw_fig0(double x[], double y[], int n, double w, double h, double fct) { if (n && ltype >= 0) { bound(xclip0, yclip0, xclip1, yclip1); line(1, x, y, n); rstbnd(w, h, fct); } } int flush(double x[], double y[], int n, double w, double h, double fct) { if (n > 1) { draw_fig0(x, y, n, w, h, fct); x[0] = x[n - 1]; y[0] = y[n - 1]; return (1); } else return (n); } void polyg(double x[], double y[], int n, double w, double h, double fct) { bound(xclip0, yclip0, xclip1, yclip1); hatch(ptyp, x, y, n, dhat, that); rstbnd(w, h, fct); } int is_in(double x, double y) { if (x >= 0 && x <= xl && y >= 0 && y <= yl) return (1); else return (0); } void swap(double *x, double *y) { double t; if (is_t) { t = *y; *y = *x; *x = t; } } SPTK-3.9/bin/fig+fdrw/fig1.c0000644001051300105040000001773212637156634012355 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /**************************************************************** * NAME : fig1 - subroutines for fig * ****************************************************************/ #include #include #include "fig.h" #include "plot.h" /* Required Functions */ #define GRKSIZE 62 static char *grk[] = { "Alpha", "Beta", "Gamma", "Delta", "Epsilon", "Zeta", "Eta", "Theta", "Iota", "Kappa", "Lambda", "Mu", "Nu", "Xi", " ", "Pi", "Rho", "Sigma", "Tau", "Upsilon", "Phi", "Chi", "Psi", "Omega", " ", " ", " ", " ", " ", " ", " ", " ", "alpha", "beta", "gamma", "delta", "epsilon", "zeta", "eta", "theta", "iota", "kappa", "lambda", "mu", "nu", "xi", " ", "pi", "rho", "sigma", "tau", "upsilon", "phi", "chi", "psi", "omega", " ", " ", " ", " ", " ", "infty" }; static char sub[SBUFLNG]; static int nsub; char *gettxt_fig(char *s) { char *p; int i, c; char *script(char *s, int i); while (*s && *s != '"') ++s; if (*s++ == '\0') return (s - 1); for (p = s, nsub = i = 0; *s && (*s != '"' || *(s + 1) == '"'); ++s) { if (*s == '\\') { /* escape sequence */ if ((c = greek(s + 1)) >= 0) { s += strlen(grk[c]); c += 193; } else { switch (c = *++s) { case 'b': c = 0x08; break; case 'n': c = 0x0a; break; case 'r': c = 0x0d; break; case '^': c = '^'; break; case '_': c = '_'; break; case '\\': c = '\\'; break; case 'd': case 'u': s = script(s, i); c = ' '; break; default: sscanf(s, "%3d", &c); s += 2; break; } } p[i++] = c; } else if ((c = *s) == '^' || c == '_') { if (*(s + 1) == '{') { for (*++s = c; *(s + 1) != '}'; p[i++] = ' ') { s = script(s, i); *s = c; } ++s; } else { s = script(s, i); p[i++] = ' '; } } else { if (*s == '"') ++s; p[i++] = *s; } } sub[nsub] = p[i] = '\0'; while (p + i < s) p[++i] = ' '; return (p); } char *script(char *s, int i) { int c; sub[nsub++] = *s; sub[nsub++] = i; if ((c = *++s) == '\\') { if ((c = greek(s + 1)) >= 0) { s += strlen(grk[c]); c += 193; } else { switch (c = *++s) { case '\\': case '{': case '}': case '_': case '^': break; default: sscanf(s, "%3d", &c); s += 2; break; } } } sub[nsub++] = c; sub[nsub++] = '\0'; return (s); } char *getarg(char *s, char *arg) { if (s == NULL) return (s); while (*s == ' ' || *s == '\t' || *s == '\n') ++s; if (*s == '\0') return (NULL); else if (*s == '"') { gettxt_fig(s); while ((*arg++ = *s++)); } else { while (*s != ' ' && *s != '\t' && *s != '\n' && *s != '\0') *arg++ = *s++; *arg = '\0'; } return (s); } char *gettyp(char *s, char *t) { char *p; s = getarg(p = s, t); if (isalpha(*t)) return (s); else { strcpy(t, "lin"); return (p); } } char *getname(char *s, char *t) { if ((s = getarg(s, t)) == NULL) *t = '\0'; else if (*t == '"') *t++ = '\0'; else { if (!is_number(*t)) *t = '\0'; t = gettxt_fig(s); } return (t); } int greek(char *p) { int n; for (n = 0; n < GRKSIZE; ++n) if (strncmp(p, grk[n], strlen(grk[n])) == 0) return (n); return (-1); } double sleng(char *p, double h, double w) { int len = strlen(p); double ret = (len - 1) * w + LADJ * w; return (ret); } void _symbol(double x, double y, char *p, double h, double w, double t) { int i; double dx, dy; symbol(x, y, p, h, w, t); for (i = 0; sub[i]; i += 4) { dy = (sub[i] == 'd' || sub[i] == '_') ? -h * 0.25 : h * 0.7; dx = sub[i + 1] * w; symbol(x + rx(dx, dy, t), y + ry(dx, dy, t), sub + i + 2, h * SSIZE, w, t); } sub[0] = 0; } double ysadj(void) { int i; for (i = 0; sub[i]; i += 4) if (sub[i] == 'u' || sub[i] == '^') return (1.5); return (0); } double rx(double x, double y, double t) { t *= (3.141592653589793 / 180); return (x * cos(t) - y * sin(t)); } double ry(double x, double y, double t) { t *= (3.141592653589793 / 180); return (x * sin(t) + y * cos(t)); } #define PI 3.141592653589793 #include double argapf(double x, double a) { double omg; omg = PI * x; return (x + 2.0 * atan2(a * sin(omg), 1.0 - a * cos(omg)) / PI); } SPTK-3.9/bin/frame/0000755001051300105040000000000012637167703011017 500000000000000SPTK-3.9/bin/frame/Makefile.am0000644001051300105040000000017712442245047012770 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = frame frame_SOURCES = frame.c frame_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/frame/Makefile.in0000644001051300105040000004243412637167412013010 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = frame$(EXEEXT) subdir = bin/frame ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_frame_OBJECTS = frame.$(OBJEXT) frame_OBJECTS = $(am_frame_OBJECTS) frame_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(frame_SOURCES) DIST_SOURCES = $(frame_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include frame_SOURCES = frame.c frame_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/frame/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/frame/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) frame$(EXEEXT): $(frame_OBJECTS) $(frame_DEPENDENCIES) $(EXTRA_frame_DEPENDENCIES) @rm -f frame$(EXEEXT) $(AM_V_CCLD)$(LINK) $(frame_OBJECTS) $(frame_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/frame.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/frame/frame.c0000644001051300105040000002075312637156634012205 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * Extract Frame from Data Sequence * * * * 1985.11 K.Tokuda * * 1996.4 K.Koishida * * * * usage: * * frame [ options ] [ infile ] > stdout * * options: * * -l l : frame length [256] * * -p p : frame period [100] * * -n : no center start point [FALSE] * * infile: * * data sequence * * , x(0), x(1), ..., * * stdout: * * frame sequence * * 0, 0, ..., 0, x(0), x(1), ..., x(l/2), * * , x(t), x(t+1), ..., x(t+l-1), * * , x(2t), x(2t+1), .... * * if -n specified * * x(0), x(1), ..., x(l), * * , x(t), x(t+1), ..., x(t+l-1), * * , x(2t), x(2t+1), .... * * * ************************************************************************/ static char *rcs_id = "$Id: frame.c,v 1.28 2015/12/14 01:14:14 uratec Exp $"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define LENG 256 #define FPERIOD 100 #define NOCTR FA char *BOOL[] = { "FALSE", "TRUE" }; /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - extract frame from data sequence\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -l l : frame length [%d]\n", LENG); fprintf(stderr, " -p p : frame period [%d]\n", FPERIOD); fprintf(stderr, " -n : no center start point [%s]\n", BOOL[NOCTR]); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " data sequence [stdin]\n"); fprintf(stderr, " stdout:\n"); fprintf(stderr, " extracted data sequence\n"); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char **argv) { int l = LENG, fprd = FPERIOD, ns, i, rnum, ts, cs; FILE *fp = stdin; Boolean noctr = NOCTR; double *x, *xx, *p1, *p2, *p; char *s, c; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) if (*(s = *++argv) == '-') { c = *++s; switch (c) { case 'l': l = atoi(*++argv); --argc; break; case 'p': fprd = atoi(*++argv); --argc; break; case 'n': noctr = 1 - noctr; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else fp = getfp(*argv, "rb"); x = dgetmem(l); if (!noctr) { i = (int) ((l + 1) / 2); rnum = freadf(&x[(int) (l / 2)], sizeof(*x), i, fp); } else rnum = freadf(x, sizeof(*x), l, fp); if (rnum == 0) return 0; cs = rnum; fwritef(x, sizeof(*x), l, stdout); if ((ns = (l - fprd)) > 0) { p = &x[fprd]; for (;;) { p1 = x; p2 = p; i = ns; while (i--) { *p1++ = *p2++; } rnum = freadf(p1, sizeof(*p1), fprd, fp); if (rnum < fprd) { ts = fprd - rnum; cs -= ts; while (rnum--) p1++; while (ts--) *p1++ = 0.0; } if (cs <= 0) break; fwritef(x, sizeof(*x), l, stdout); } } else { i = -ns; xx = dgetmem(i); for (;;) { if (freadf(xx, sizeof(*xx), i, fp) != i) break; rnum = freadf(x, sizeof(*x), l, fp); if (rnum < l) { if (rnum == 0) break; ts = l - rnum; p1 = x; while (rnum--) p1++; while (ts--) *p1++ = 0.0; } fwritef(x, sizeof(*x), l, stdout); } } return 0; } SPTK-3.9/bin/freqt/0000755001051300105040000000000012637167703011046 500000000000000SPTK-3.9/bin/freqt/Makefile.am0000644001051300105040000000021012442245050012775 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = freqt freqt_SOURCES = _freqt.c freqt.c freqt_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/freqt/Makefile.in0000644001051300105040000004257412637167412013044 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = freqt$(EXEEXT) subdir = bin/freqt ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_freqt_OBJECTS = _freqt.$(OBJEXT) freqt.$(OBJEXT) freqt_OBJECTS = $(am_freqt_OBJECTS) freqt_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(freqt_SOURCES) DIST_SOURCES = $(freqt_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include freqt_SOURCES = _freqt.c freqt.c freqt_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/freqt/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/freqt/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) freqt$(EXEEXT): $(freqt_OBJECTS) $(freqt_DEPENDENCIES) $(EXTRA_freqt_DEPENDENCIES) @rm -f freqt$(EXEEXT) $(AM_V_CCLD)$(LINK) $(freqt_OBJECTS) $(freqt_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_freqt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/freqt.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/freqt/_freqt.c0000644001051300105040000001054112637156634012414 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /*************************************************************** $Id: _freqt.c,v 1.18 2015/12/14 01:14:15 uratec Exp $ Frequency Transformation void freqt(c1, m1, c2, m2, a) double *c1 : minimum phase sequence int m1 : order of minimum phase sequence double *c2 : warped sequence int m2 : order of warped sequence double a : all-pass constant ***************************************************************/ #include #include #if defined(WIN32) #include "SPTK.h" #else #include #endif void freqt(double *c1, const int m1, double *c2, const int m2, const double a) { int i, j; double b; static double *d = NULL, *g; static int size; if (d == NULL) { size = m2; d = dgetmem(size + size + 2); g = d + size + 1; } if (m2 > size) { free(d); size = m2; d = dgetmem(size + size + 2); g = d + size + 1; } b = 1 - a * a; fillz(g, sizeof(*g), m2 + 1); for (i = -m1; i <= 0; i++) { if (0 <= m2) g[0] = c1[-i] + a * (d[0] = g[0]); if (1 <= m2) g[1] = b * d[0] + a * (d[1] = g[1]); for (j = 2; j <= m2; j++) g[j] = d[j - 1] + a * ((d[j] = g[j]) - g[j - 1]); } movem(g, c2, sizeof(*g), m2 + 1); return; } SPTK-3.9/bin/freqt/freqt.c0000644001051300105040000001700112637156634012253 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * Frequency Transformation * * * * 1988.2 K.Tokuda * * 1996.1 K.Koishida * * * * usage: * * freqt [ options ] [ infile ] > stdout * * options: * * -m m : order of minimum phase sequence [25] * * -M M : order of warped sequence [25] * * -a a : all-pass constant of input sequence [0] * * -A A : all-pass constant of output sequence[0.35] * * infile: * * minimum phase sequence * * , c(0), c(1), ..., c(M), * * stdout: * * warped sequence * * , c~(0), c~(1), ..., c~(N), * * require: * * freqt() * * * ************************************************************************/ static char *rcs_id = "$Id: freqt.c,v 1.24 2015/12/14 01:14:15 uratec Exp $"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define ORDERC1 25 #define ORDERC2 25 #define ALPHA1 0.0 #define ALPHA2 0.35 /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - frequency transformation\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -m m : order of minimum phase sequence [%d]\n", ORDERC1); fprintf(stderr, " -M M : order of warped sequence [%d]\n", ORDERC2); fprintf(stderr, " -a a : all-pass constant of input sequence [%g]\n", ALPHA1); fprintf(stderr, " -A A : all-pass constant of output sequence [%g]\n", ALPHA2); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " minimum phase sequence (%s) [stdin]\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " warped sequence (%s)\n", FORMAT); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char **argv) { int m1 = ORDERC1, m2 = ORDERC2; FILE *fp = stdin; double *c1, *c2, a1 = ALPHA1, a2 = ALPHA2, a; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) if (**++argv == '-') { switch (*(*argv + 1)) { case 'm': m1 = atoi(*++argv); --argc; break; case 'M': m2 = atoi(*++argv); --argc; break; case 'a': a1 = atof(*++argv); --argc; break; case 'A': a2 = atof(*++argv); --argc; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else fp = getfp(*argv, "rb"); c1 = dgetmem(m1 + m2 + 2); c2 = c1 + m1 + 1; a = (a2 - a1) / (1 - a1 * a2); while (freadf(c1, sizeof(*c1), m1 + 1, fp) == m1 + 1) { freqt(c1, m1, c2, m2, a); fwritef(c2, sizeof(*c2), m2 + 1, stdout); } return 0; } SPTK-3.9/bin/gc2gc/0000755001051300105040000000000012637167704010713 500000000000000SPTK-3.9/bin/gc2gc/Makefile.am0000644001051300105040000000021012442245050012641 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = gc2gc gc2gc_SOURCES = _gc2gc.c gc2gc.c gc2gc_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/gc2gc/Makefile.in0000644001051300105040000004257412637167412012710 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = gc2gc$(EXEEXT) subdir = bin/gc2gc ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_gc2gc_OBJECTS = _gc2gc.$(OBJEXT) gc2gc.$(OBJEXT) gc2gc_OBJECTS = $(am_gc2gc_OBJECTS) gc2gc_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(gc2gc_SOURCES) DIST_SOURCES = $(gc2gc_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include gc2gc_SOURCES = _gc2gc.c gc2gc.c gc2gc_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/gc2gc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/gc2gc/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) gc2gc$(EXEEXT): $(gc2gc_OBJECTS) $(gc2gc_DEPENDENCIES) $(EXTRA_gc2gc_DEPENDENCIES) @rm -f gc2gc$(EXEEXT) $(AM_V_CCLD)$(LINK) $(gc2gc_OBJECTS) $(gc2gc_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gc2gc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gc2gc.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/gc2gc/_gc2gc.c0000644001051300105040000001073212637156634012126 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /*************************************************************** $Id: _gc2gc.c,v 1.18 2015/12/14 01:14:15 uratec Exp $ Generalized Cepstral Transformation void gc2gc(c1, m1, g1, c2, m2, g2) double *c1 : normalized generalized cepstrum (input) int m1 : order of gc1 double g1 : gamma of gc1 double *c2 : normalized generalized cepstrum (output) int m2 : order of gc2 double g2 : gamma of gc2 *****************************************************************/ #include #include #if defined(WIN32) #include "SPTK.h" #else #include #endif void gc2gc(double *c1, const int m1, const double g1, double *c2, const int m2, const double g2) { int i, min, k, mk; double ss1, ss2, cc; static double *ca = NULL; static int size; if (ca == NULL) { ca = dgetmem(m1 + 1); size = m1; } if (m1 > size) { free(ca); ca = dgetmem(m1 + 1); size = m1; } movem(c1, ca, sizeof(*c1), m1 + 1); c2[0] = ca[0]; for (i = 1; i <= m2; i++) { ss1 = ss2 = 0.0; min = (m1 < i) ? m1 : i - 1; for (k = 1; k <= min; k++) { mk = i - k; cc = ca[k] * c2[mk]; ss2 += k * cc; ss1 += mk * cc; } if (i <= m1) c2[i] = ca[i] + (g2 * ss2 - g1 * ss1) / i; else c2[i] = (g2 * ss2 - g1 * ss1) / i; } return; } SPTK-3.9/bin/gc2gc/gc2gc.c0000644001051300105040000002465012637156635011774 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************** * * * Generalized Cepstral Transformation * * * * 1987.11 K.Tokuda * * 1996.1 K.Koishida * * * * usage: * * gc2gc [ options ] [ infile ] > stdout * * options: * * -m m : order of generalized cepstrum (input) [25] * * -g g : gamma of generalized cepstrum (input) [0] * * -c c : gamma of generalized cepstrum (input) * * gamma = -1 / (int) c * * -n : regard input as normalized cepstrum [FALSE] * * -u : regard input as multiplied by gamma [FALSE] * * -M M : order of generalized cepstrum (output) [25] * * -G G : gamma of generalized cepstrum (output) [1] * * -C C : gamma of generalized cepstrum (output) * * gamma = -1 / (int) C * * -N : regard output as normalized cepstrum [FALSE] * * -U : regard output as multiplied by gamma [FALSE] * * infile: * * generalized cepstrum * * , c(0), c(1), ..., c(m), * * stdout: * * generalized cepstrum * * , c'(0)(=c(0)), c'(1), ..., c'(M), * * notice: * * value of c and C must be c>=1, C>=1 * * require: * * gc2gc(), gnorm(), ignorm() * * * **************************************************************************/ static char *rcs_id = "$Id: gc2gc.c,v 1.29 2015/12/14 01:14:15 uratec Exp $"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define ORDER1 25 #define ORDER2 25 #define GAMMA1 0.0 #define GAMMA2 1.0 #define NORMFLG1 FA #define NORMFLG2 FA #define MULGFLG1 FA #define MULGFLG2 FA char *BOOL[] = { "FALSE", "TRUE" }; /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - generalized cepstral transformation\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -m m : order of generalized cepstrum (input) [%d]\n", ORDER1); fprintf(stderr, " -g g : gamma of generalized cepstrum (input) [%g]\n", GAMMA1); fprintf(stderr, " -c c : gamma of mel-generalized cepstrum = -1 / (int) c (input) \n"); fprintf(stderr, " -n : regard input as normalized cepstrum [%s]\n", BOOL[NORMFLG1]); fprintf(stderr, " -u : regard input as multiplied by gamma [%s]\n", BOOL[MULGFLG1]); fprintf(stderr, " -M M : order of generalized cepstrum (output) [%d]\n", ORDER2); fprintf(stderr, " -G G : gamma of generalized cepstrum (output) [%g]\n", GAMMA2); fprintf(stderr, " -C C : gamma of mel-generalized cepstrum = -1 / (int) C (output)\n"); fprintf(stderr, " -N : regard output as normalized cepstrum [%s]\n", BOOL[NORMFLG2]); fprintf(stderr, " -U : regard output as multiplied by gamma [%s]\n", BOOL[MULGFLG2]); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " generalized cepstrum (%s) [stdin]\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " transformed generalized cepstrum (%s)\n", FORMAT); fprintf(stderr, " notice:\n"); fprintf(stderr, " value of c and C must be c>=1, C>=1 \n"); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char **argv) { int m1 = ORDER1, m2 = ORDER2, i; double *gc1, *gc2, g1 = GAMMA1, g2 = GAMMA2; Boolean norm1 = NORMFLG1, norm2 = NORMFLG2, mulg1 = MULGFLG1, mulg2 = MULGFLG2; FILE *fp = stdin; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) if (**++argv == '-') { switch (*(*argv + 1)) { case 'm': m1 = atoi(*++argv); --argc; break; case 'M': m2 = atoi(*++argv); --argc; break; case 'g': g1 = atof(*++argv); --argc; break; case 'c': g1 = atoi(*++argv); --argc; if (g1 < 1) fprintf(stderr, "%s : value of c must be c>=1!\n", cmnd); g1 = -1.0 / g1; break; case 'G': g2 = atof(*++argv); --argc; break; case 'C': g2 = atoi(*++argv); --argc; if (g2 < 1) fprintf(stderr, "%s : value of C must be C>=1!\n", cmnd); g2 = -1.0 / g2; break; case 'n': norm1 = 1 - norm1; break; case 'N': norm2 = 1 - norm2; break; case 'u': mulg1 = 1 - mulg1; break; case 'U': mulg2 = 1 - mulg2; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else fp = getfp(*argv, "rb"); gc1 = dgetmem(m1 + m2 + 2); gc2 = gc1 + m1 + 1; while (freadf(gc1, sizeof(*gc1), m1 + 1, fp) == m1 + 1) { if (!norm1) gnorm(gc1, gc1, m1, g1); else if (mulg1) gc1[0] = (gc1[0] - 1.0) / g1; if (mulg1) for (i = m1; i >= 1; i--) gc1[i] /= g1; gc2gc(gc1, m1, g1, gc2, m2, g2); if (!norm2) ignorm(gc2, gc2, m2, g2); else if (mulg1) gc2[0] = gc2[0] * g2 + 1.0; if (mulg2) for (i = m2; i >= 1; i--) gc2[i] *= g2; fwritef(gc2, sizeof(*gc2), m2 + 1, stdout); } return 0; } SPTK-3.9/bin/gcep/0000755001051300105040000000000012637167704010644 500000000000000SPTK-3.9/bin/gcep/Makefile.am0000644001051300105040000000020312442245051012575 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = gcep gcep_SOURCES = _gcep.c gcep.c gcep_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/gcep/Makefile.in0000644001051300105040000004254312637167412012635 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = gcep$(EXEEXT) subdir = bin/gcep ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_gcep_OBJECTS = _gcep.$(OBJEXT) gcep.$(OBJEXT) gcep_OBJECTS = $(am_gcep_OBJECTS) gcep_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(gcep_SOURCES) DIST_SOURCES = $(gcep_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include gcep_SOURCES = _gcep.c gcep.c gcep_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/gcep/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/gcep/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) gcep$(EXEEXT): $(gcep_OBJECTS) $(gcep_DEPENDENCIES) $(EXTRA_gcep_DEPENDENCIES) @rm -f gcep$(EXEEXT) $(AM_V_CCLD)$(LINK) $(gcep_OBJECTS) $(gcep_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gcep.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gcep.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/gcep/_gcep.c0000644001051300105040000002131512637156635012010 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /**************************************************************** $Id: _gcep.c,v 1.24 2015/12/14 01:14:15 uratec Exp $ Generalized Cepstral Analysis int gcep(xw, flng, gc, m, g, itr1, itr2, d, etype, e, f, itype); double *xw : input sequence int flng : frame length double *gc : generalized cepstrum int m : order of generalized cepstrum double g : gamma int itr1 : minimum number of iteration int itr2 : maximum number of iteration double d : end condition int etype : 0 -> e is not used 1 -> e is initial value for log-periodogram 2 -> e is floor periodogram in db double e : initial value for log-periodogram or floor periodogram in db double f : mimimum value of the determinant of the normal matrix int itype : input data type return value : 0 -> completed by end condition -1-> completed by maximum iteration *****************************************************************/ #include #include #include #if defined(WIN32) #include "SPTK.h" #else #include #endif int gcep(double *xw, const int flng, double *gc, const int m, const double g, const int itr1, const int itr2, const double d, const int etype, const double e, const double f, const int itype) { int i, j, flag = 0; double t, s, eps = 0.0, min, max, dd = 0.0; static double *x = NULL, *y, *cr, *ci, *rr, *hr, *hi, *er, *ei; static int size; if (etype == 1 && e < 0.0) { fprintf(stderr, "gcep : value of e must be e>=0!\n"); exit(1); } if (etype == 2 && e >= 0.0) { fprintf(stderr, "gcep : value of E must be E<0!\n"); exit(1); } if (etype == 1) { eps = e; } if (x == NULL) { x = dgetmem(9 * flng); size = flng; y = x + flng; cr = y + flng; ci = cr + flng; rr = ci + flng; hr = rr + flng; hi = hr + flng; er = hi + flng; ei = er + flng; } if (flng > size) { free(x); x = dgetmem(9 * flng); size = flng; y = x + flng; cr = y + flng; ci = cr + flng; rr = ci + flng; hr = rr + flng; hi = hr + flng; er = hi + flng; ei = er + flng; } movem(xw, x, sizeof(*x), flng); switch (itype) { case 0: /* windowed data sequence */ fftr(x, y, flng); for (i = 0; i < flng; i++) { x[i] = x[i] * x[i] + y[i] * y[i] + eps; /* periodogram */ } break; case 1: /* dB */ for (i = 0; i <= flng / 2; i++) { x[i] = exp((x[i] / 20.0) * log(10.0)); /* dB -> amplitude spectrum */ x[i] = x[i] * x[i] + eps; /* amplitude -> periodogram */ } break; case 2: /* log */ for (i = 0; i <= flng / 2; i++) { x[i] = exp(x[i]); /* log -> amplitude spectrum */ x[i] = x[i] * x[i] + eps; /* amplitude -> periodogram */ } break; case 3: /* amplitude */ for (i = 0; i <= flng / 2; i++) { x[i] = x[i] * x[i] + eps; /* amplitude -> periodogram */ } break; case 4: /* periodogram */ for (i = 0; i <= flng / 2; i++) { x[i] = x[i] + eps; } break; default: fprintf(stderr, "gcep : Input type %d is not supported!\n", itype); exit(1); } if (itype > 0) { for (i = 1; i < flng / 2; i++) x[flng - i] = x[i]; } if (etype == 2 && e < 0.0) { max = x[0]; for (i = 1; i < flng; i++) { if (max < x[i]) max = x[i]; } max = sqrt(max); min = max * pow(10.0, e / 20.0); /* floor is 20*log10(min/max) */ min = min * min; for (i = 0; i < flng; i++) { if (x[i] < min) x[i] = min; } } for (i = 0; i < flng; i++) cr[i] = log(x[i]); /* initial value of generalized cepstrum */ ifftr(cr, y, flng); /* x : IFFT[x] */ cr[0] = exp(cr[0] / 2); gc2gc(cr, m, 0.0, gc, m, g); /* gc : generalized cepstrum */ /* Newton-Raphson method */ for (j = 1; j <= itr2; j++) { fillz(cr, sizeof(*cr), flng); movem(&gc[1], &cr[1], sizeof(*cr), m); fftr(cr, ci, flng); /* cr+jci : FFT[gc] */ for (i = 0; i < flng; i++) { t = x[i] / agexp(g, cr[i], ci[i]); cr[i] = 1 + g * cr[i]; ci[i] = g * ci[i]; s = cr[i] * cr[i] + ci[i] * ci[i]; rr[i] = t / s; hr[i] = (cr[i] * cr[i] - ci[i] * ci[i]) * t / (s * s); hi[i] = 2 * cr[i] * ci[i] * t / (s * s); er[i] = cr[i] * t / s; ei[i] = ci[i] * t / s; } ifftr(rr, y, flng); /* rr : r(k) */ ifft(hr, hi, flng); /* hr : h(k) */ ifft(er, ei, flng); /* er : e(k) */ s = gc[0]; /* gc[0] : gain */ for (i = 1, t = 0.0; i <= m; i++) t += er[i] * gc[i]; t = er[0] + g * t; t = sqrt(fabs(t)); if (j >= itr1) { if (fabs((t - dd) / t) < d) { flag = 1; break; } dd = t; } for (i = 2; i <= m + m; i++) hr[i] *= 1 + g; if (theq(rr, &hr[2], &y[1], &er[1], m, f)) { fprintf(stderr, "gcep : Error in theq() at %dth iteration!\n", j); exit(1); } gc[0] = t; for (i = 1; i <= m; i++) gc[i] += y[i]; } if (flag) return (0); else return (-1); } SPTK-3.9/bin/gcep/gcep.c0000644001051300105040000002657112637156635011662 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * Generalized Cepstral Analysis * * * * 1988.11 K.Tokuda * * 1996.1 K.Koishida * * * * usage: * * gcep [ options ] [ infile ] > stdout * * options: * * -m m : order of generalized cepstrum [25] * * -g g : gamma [0] * * -c c : gamma = -1 / (int) c * * -l l : frame length [256] * * -q q : Input format [0] * * 0 (windowed data sequence) * * 1 (20*log|f(w)|) * * 2 (ln|f(w)|) * * 3 (|f(w)|) * * 4 (|f(w)|^2) * * -n : output normalized cepstrum [FALSE] * * (level2) * * -i i : minimum iteration [3] * * -j j : maximum iteration [30] * * -d d : end condition [0.001] * * -e e : small value added to periodogram [0] * * -E E : floor in db calculated per frame [N/A] * * -f f : mimimum value of the determinant * * of the normal matrix [0.000001] * * infile: * * data sequence * * , x(0), x(1), ..., x(L-1), * * stdout: * * generalized cepstral coefficeints * * , c(0), c(1), ..., c(M), * * notice: * * value of c must be c>=1 * * value of e must be e>=0 * * value of E must be E<0 * * require: * * gcep() * * * ************************************************************************/ static char *rcs_id = "$Id: gcep.c,v 1.38 2015/12/14 05:34:34 uratec Exp $"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define ORDER 25 #define GAMMA 0.0 #define FLENG 256 #define ITYPE 0 #define ETYPE 0 #define NORM FA #define MINITR 2 #define MAXITR 30 #define END 0.001 #define EPS 0.0 #define MINDET 0.000001 char *BOOL[] = { "FALSE", "TRUE" }; /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - generalized cepstral analysis\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -m m : order of generalized cepstrum [%d]\n", ORDER); fprintf(stderr, " -g g : gamma [%g]\n", GAMMA); fprintf(stderr, " -c c : gamma = -1 / (int) c \n"); fprintf(stderr, " -l l : frame length [%d]\n", FLENG); fprintf(stderr, " -q q : input format [%d]\n", ITYPE); fprintf(stderr, " 0 (windowed sequence)\n"); fprintf(stderr, " 1 (20*log|f(w)|)\n"); fprintf(stderr, " 2 (ln|f(w)|)\n"); fprintf(stderr, " 3 (|f(w)|)\n"); fprintf(stderr, " 4 (|f(w)|)^2\n"); fprintf(stderr, " -n : output normalized cepstrum [%s]\n", BOOL[NORM]); fprintf(stderr, " (level2)\n"); fprintf(stderr, " -i i : minimum iteration [%d]\n", MINITR); fprintf(stderr, " -j j : maximum iteration [%d]\n", MAXITR); fprintf(stderr, " -d d : end condition [%g]\n", END); fprintf(stderr, " -e e : small value added to periodogram [%g]\n", EPS); fprintf(stderr, " -E E : floor in db calculated per frame [N/A]\n"); fprintf(stderr, " -f f : mimimum value of the determinant [%g]\n", MINDET); fprintf(stderr, " of the normal matrix\n"); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " windowed sequence (%s) [stdin]\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " generalized cepstrum (%s)\n", FORMAT); fprintf(stderr, " notice:\n"); fprintf(stderr, " value of c must be c>=1\n"); fprintf(stderr, " value of e must be e>=0\n"); fprintf(stderr, " value of E must be E<0\n"); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char **argv) { int m = ORDER, flng = FLENG, ilng = FLENG, itr1 = MINITR, itr2 = MAXITR, itype = ITYPE, etype = ETYPE, norm = NORM; FILE *fp = stdin; double *gc, *x, g = GAMMA, end = END, e = EPS, f = MINDET; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) if (**++argv == '-') { switch (*(*argv + 1)) { case 'm': m = atoi(*++argv); --argc; break; case 'l': flng = atoi(*++argv); --argc; break; case 'q': itype = atoi(*++argv); --argc; break; case 'g': g = atof(*++argv); --argc; break; case 'c': g = atoi(*++argv); --argc; if (g < 1) fprintf(stderr, "%s : value of c must be c>=1!\n", cmnd); g = -1.0 / g; break; case 'n': norm = 1 - norm; break; case 'i': itr1 = atoi(*++argv); --argc; break; case 'j': itr2 = atoi(*++argv); --argc; break; case 'd': end = atof(*++argv); --argc; break; case 'e': etype = 1; e = atof(*++argv); --argc; break; case 'E': etype = 2; e = atof(*++argv); --argc; break; case 'f': f = atof(*++argv); --argc; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else fp = getfp(*argv, "rb"); if (itype == 0) ilng = flng; else ilng = flng / 2 + 1; x = dgetmem(flng + m + 1); gc = x + flng; while (freadf(x, sizeof(*x), ilng, fp) == ilng) { gcep(x, flng, gc, m, g, itr1, itr2, end, etype, e, f, itype); if (!norm) ignorm(gc, gc, m, g); fwritef(gc, sizeof(*gc), m + 1, stdout); } return 0; } SPTK-3.9/bin/glsadf/0000755001051300105040000000000012637167704011166 500000000000000SPTK-3.9/bin/glsadf/Makefile.am0000644001051300105040000000021512442245052013123 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = glsadf glsadf_SOURCES = _glsadf.c glsadf.c glsadf_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/glsadf/Makefile.in0000644001051300105040000004262512637167412013160 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = glsadf$(EXEEXT) subdir = bin/glsadf ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_glsadf_OBJECTS = _glsadf.$(OBJEXT) glsadf.$(OBJEXT) glsadf_OBJECTS = $(am_glsadf_OBJECTS) glsadf_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(glsadf_SOURCES) DIST_SOURCES = $(glsadf_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include glsadf_SOURCES = _glsadf.c glsadf.c glsadf_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/glsadf/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/glsadf/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) glsadf$(EXEEXT): $(glsadf_OBJECTS) $(glsadf_DEPENDENCIES) $(EXTRA_glsadf_DEPENDENCIES) @rm -f glsadf$(EXEEXT) $(AM_V_CCLD)$(LINK) $(glsadf_OBJECTS) $(glsadf_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_glsadf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glsadf.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/glsadf/_glsadf.c0000644001051300105040000001620012637156635012651 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /**************************************************************** $Id: _glsadf.c,v 1.17 2015/12/14 01:14:15 uratec Exp $ GLSA Digital Filter double glsadf(x, c, m, n, d) double x : input double *c : filter coefficients (K, g*c'(1), ..., g*c'(m)) int m : order of cepstrum int n : -1/gamma double *d : delay return value : filtered data Inverse GLSA Digital Filter double iglsadf(x, c, m, n, d) double x : input double *c : filter coefficients (K, g*c'(1), ..., g*c'(m)) int m : order of cepstrum int n : -1/gamma double *d : delay return value : filtered data *****************************************************************/ #include #if defined(WIN32) #include "SPTK.h" #else #include #endif /* no option */ static double gpoledf(double x, double *c, int m, const double g, double *d) { double y = 0.0; for (m--; m > 0; m--) { y -= c[m + 1] * d[m]; d[m] = d[m - 1]; } y -= c[1] * d[0]; y *= g; d[0] = (x += y); return (x); } double glsadf(double x, double *c, const int m, const int n, double *d) { int i; for (i = 0; i < n; i++) x = poledf(x, c, m, &d[m * i]); return (x); } double glsadf1(double x, double *c, const int m, const int n, double *d) { int i; double gamma; gamma = -1 / (double) n; for (i = 0; i < n; i++) x = gpoledf(x, c, m, gamma, &d[m * i]); return (x); } /* inverse option */ static double gzerodf(double x, double *c, int m, const double g, double *d) { double y = 0.0; for (m--; m > 0; m--) { y += c[m + 1] * d[m]; d[m] = d[m - 1]; } y += c[1] * d[0]; d[0] = x; x += y * g; return (x); } double iglsadf(double x, double *c, const int m, const int n, double *d) { int i; for (i = 0; i < n; i++) x = zerodf1(x, c, m, &d[m * i]); return (x); } double iglsadf1(double x, double *c, const int m, const int n, double *d) { int i; double gamma; gamma = -1 / (double) n; for (i = 0; i < n; i++) x = gzerodf(x, c, m, gamma, &d[m * i]); return (x); } /* transpose option */ static double glsadfft(double x, double *c, const int m, double *d) { int i; x -= d[0]; d[m] = c[m] * x; for (i = m - 1; i >= 1; i--) d[i] += c[i] * x; for (i = 0; i < m; i++) d[i] = d[i + 1]; return (x); } double glsadft(double x, double *c, const int m, const int n, double *d) { int i; for (i = 0; i < n; i++) x = glsadfft(x, c, m, &d[(m + 1) * i]); return (x); } static double glsadff1t(double x, double *c, const int m, const double g, double *d) { int i; x -= d[0] * g; d[m] = c[m] * x; for (i = m - 1; i >= 1; i--) d[i] += c[i] * x; for (i = 0; i < m; i++) d[i] = d[i + 1]; return (x); } double glsadf1t(double x, double *c, const int m, const int n, double *d) { int i; double gamma; gamma = -1 / (double) n; for (i = 0; i < n; i++) x = glsadff1t(x, c, m, gamma, &d[(m + 1) * i]); return (x); } /* inverse and transpose */ static double iglsadfft(double x, double *c, const int m, double *d) { int i; double y; y = x + d[0]; d[m] = c[m] * x; for (i = m - 1; i >= 1; i--) d[i] += c[i] * x; for (i = 0; i < m; i++) d[i] = d[i + 1]; return (y); } double iglsadft(double x, double *c, const int m, const int n, double *d) { int i; for (i = 0; i < n; i++) x = iglsadfft(x, c, m, &d[i * (m + 1)]); return (x); } static double iglsadff1t(double x, double *c, const int m, const double g, double *d) { int i; double y; y = x + g * d[0]; d[m] = c[m] * x; for (i = m - 1; i >= 1; i--) d[i] += c[i] * x; for (i = 0; i < m; i++) d[i] = c[i + 1]; return (y); } double iglsadf1t(double x, double *c, const int m, const int n, double *d) { int i; double g; g = -1.0 / (double) n; for (i = 0; i < n; i++) x = iglsadff1t(x, c, m, g, &d[i * (m + 1)]); return (x); } SPTK-3.9/bin/glsadf/glsadf.c0000644001051300105040000002737412637156635012530 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * GLSA Digital Filter for Speech Synthesis * * * * 1996.3 K.Koishida * * * * usage: * * glsadf [ options ] gcfile [ infile ] > stdout * * options: * * -m m : order of generalized cepstrum [25] * * -c c : gamma = -1 / (int) c [1] * * -p p : frame period [100] * * -i i : interpolation period [1] * * -n : regard input as normalized [FALSE] * * generalized cepstrum * * -v : inverse filter [FALSE] * * -t : transpose filter [FALSE] * * -k : filtering without gain [FALSE] * * -P Pa : order of Pade approximation [4] * * infile: * * generalized cepstral coefficients * * , c(0), c(1), ..., c(M), * * excitation sequence * * , x(0), x(1), ..., * * stdout: * * filtered sequence * * , y(0), y(1), ..., * * notice: * * if c==0, LMA filter is used, P should be 4 or 5 * * require: * * glsadf(), lmadf(), iglsadf(), glsadft(), iglsadft() * * * ************************************************************************/ static char *rcs_id = "$Id: glsadf.c,v 1.38 2015/12/14 01:14:15 uratec Exp $"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #include #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define ORDER 25 #define STAGE 1 #define FPERIOD 100 #define IPERIOD 1 #define NORM FA #define INVERSE FA #define TRANSPOSE FA #define NGAIN FA #define PADEORD 4 char *BOOL[] = { "FALSE", "TRUE" }; /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - GLSA digital filter for speech synthesis\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] gcfile [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -m m : order of generalized cepstrum [%d]\n", ORDER); fprintf(stderr, " -c c : gamma = -1 / (int) c [%d]\n", STAGE); fprintf(stderr, " -p p : frame period [%d]\n", FPERIOD); fprintf(stderr, " -i i : interpolation period [%d]\n", IPERIOD); fprintf(stderr, " -n : regard input as normalized\n"); fprintf(stderr, " generalized cepstrum [%s]\n", BOOL[NORM]); fprintf(stderr, " -v : inverse filter [%s]\n", BOOL[INVERSE]); fprintf(stderr, " -t : transpose filter [%s]\n", BOOL[TRANSPOSE]); fprintf(stderr, " -k : filtering without gain [%s]\n", BOOL[NGAIN]); fprintf(stderr, " -P P : order of Pade approximation [%d]\n", PADEORD); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " filter input (%s) [stdin]\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " filter output (%s)\n", FORMAT); fprintf(stderr, " gcfile:\n"); fprintf(stderr, " generalized cepstrum (%s)\n", FORMAT); fprintf(stderr, " notice:\n"); fprintf(stderr, " if c==0, LMA filter is used, P should be 4 or 5\n"); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char **argv) { int m = ORDER, fprd = FPERIOD, iprd = IPERIOD, stage = STAGE, i, j, pd = PADEORD; FILE *fp = stdin, *fpc = NULL; Boolean norm = NORM, ngain = NGAIN, transpose = TRANSPOSE, inverse = INVERSE; double *c, *inc, *cc, *d, x, gamma = -1 / (double) STAGE; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) if (**++argv == '-') { switch (*(*argv + 1)) { case 'm': m = atoi(*++argv); --argc; break; case 'c': stage = atoi(*++argv); --argc; break; case 'p': fprd = atoi(*++argv); --argc; break; case 'i': iprd = atoi(*++argv); --argc; break; case 'n': norm = 1 - norm; break; case 'v': inverse = 1 - inverse; break; case 't': transpose = 1 - transpose; break; case 'k': ngain = 1 - ngain; break; case 'P': pd = atoi(*++argv); --argc; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else if (fpc == NULL) fpc = getfp(*argv, "rb"); else fp = getfp(*argv, "rb"); if (fpc == NULL) { fprintf(stderr, "%s : Cannot open cepstrum file!\n", cmnd); return (1); } if (stage != 0) { /* GLSA */ gamma = -1 / (double) stage; } else { /* LMA */ if ((pd < 4) || (pd > 5)) { fprintf(stderr, "%s : Order of Pade approximation should be 4 or 5!\n", cmnd); return (1); } } if (inverse) { if (stage == 0) { fprintf(stderr, "%s : gamma should not equal to 0 in Inverse GLSA!\n", cmnd); usage(1); } } c = (stage != 0) ? dgetmem(m + m + m + 3 + m * stage) : dgetmem(m + m + m + 3 + (m + 1) * pd * 2); cc = c + m + 1; inc = cc + m + 1; d = inc + m + 1; if (freadf(c, sizeof(*c), m + 1, fpc) != m + 1) return (1); if (stage != 0) { if (!norm) gnorm(c, c, m, gamma); c[0] = log(c[0]); for (i = 1; i <= m; i++) c[i] *= gamma; } for (;;) { if (freadf(cc, sizeof(*cc), m + 1, fpc) != m + 1) return (0); if (stage != 0) { /* GLSA */ if (!norm) gnorm(cc, cc, m, gamma); cc[0] = log(cc[0]); for (i = 1; i <= m; i++) cc[i] *= gamma; } for (i = 0; i <= m; i++) inc[i] = (cc[i] - c[i]) * iprd / fprd; for (j = fprd, i = (iprd + 1) / 2; j--;) { if (freadf(&x, sizeof(x), 1, fp) != 1) return (0); if (inverse) { /* IGLSA */ if (!ngain) x *= exp(c[0]); if (transpose) x = iglsadft(x, c, m, stage, d); else x = iglsadf(x, c, m, stage, d); } else { if (stage != 0) { /* GLSA */ if (!ngain) x *= exp(c[0]); if (transpose) { x = glsadft(x, c, m, stage, d); } else { x = glsadf(x, c, m, stage, d); } } else { /* LMA */ if (!ngain) x *= exp(c[0]); x = lmadf(x, c, m, pd, d); } } fwritef(&x, sizeof(x), 1, stdout); if (!--i) { for (i = 0; i <= m; i++) c[i] += inc[i]; i = iprd; } } movem(cc, c, sizeof(*cc), m + 1); } return (0); } SPTK-3.9/bin/gmm/0000755001051300105040000000000012637167704010506 500000000000000SPTK-3.9/bin/gmm/Makefile.am0000644001051300105040000000031112442245052012440 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = gmm gmmp gmm_SOURCES = _gmm.c gmm.c gmm_LDADD = @top_builddir@/lib/libSPTK.a gmmp_SOURCES = _gmm.c gmmp.c gmmp_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/gmm/Makefile.in0000644001051300105040000004344712637167412012503 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = gmm$(EXEEXT) gmmp$(EXEEXT) subdir = bin/gmm ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_gmm_OBJECTS = _gmm.$(OBJEXT) gmm.$(OBJEXT) gmm_OBJECTS = $(am_gmm_OBJECTS) gmm_DEPENDENCIES = @top_builddir@/lib/libSPTK.a am_gmmp_OBJECTS = _gmm.$(OBJEXT) gmmp.$(OBJEXT) gmmp_OBJECTS = $(am_gmmp_OBJECTS) gmmp_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(gmm_SOURCES) $(gmmp_SOURCES) DIST_SOURCES = $(gmm_SOURCES) $(gmmp_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include gmm_SOURCES = _gmm.c gmm.c gmm_LDADD = @top_builddir@/lib/libSPTK.a gmmp_SOURCES = _gmm.c gmmp.c gmmp_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/gmm/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/gmm/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) gmm$(EXEEXT): $(gmm_OBJECTS) $(gmm_DEPENDENCIES) $(EXTRA_gmm_DEPENDENCIES) @rm -f gmm$(EXEEXT) $(AM_V_CCLD)$(LINK) $(gmm_OBJECTS) $(gmm_LDADD) $(LIBS) gmmp$(EXEEXT): $(gmmp_OBJECTS) $(gmmp_DEPENDENCIES) $(EXTRA_gmmp_DEPENDENCIES) @rm -f gmmp$(EXEEXT) $(AM_V_CCLD)$(LINK) $(gmmp_OBJECTS) $(gmmp_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gmm.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gmm.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gmmp.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/gmm/_gmm.c0000644001051300105040000003462112637156635011520 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /**************************************************************** $Id: _gmm.c,v 1.25 2015/12/16 07:24:03 shikano Exp $ GMM output prob calculation functions *****************************************************************/ #include #include #include #if defined(WIN32) #include "SPTK.h" #else #include #endif int choleski(double **cov, double **S, const int L); double cal_ldet(double **var, const int D) { int i, j, l; double ldet = 0.0, **tri; tri = (double **) malloc(sizeof(double *) * D); for (l = 0; l < D; l++) tri[l] = dgetmem(D); for (i = 0; i < D; i++) for (j = 0; j < D; j++) tri[i][j] = 0.0; if (choleski(var, tri, D)) { for (l = 0; l < D; l++) ldet += log(tri[l][l]); for (l = 0; l < D; l++) { free(tri[l]); } free(tri); return (2.0 * ldet); } else { for (l = 0; l < D; l++) { free(tri[l]); } free(tri); return LZERO; } } double cal_gconst(double *var, const int D) { int d; double gconst; gconst = D * log(M_2PI); for (d = 0; d < D; d++) gconst += log(var[d]); return (gconst); } double cal_gconstf(double **var, const int D) { double gconst, tmp; tmp = cal_ldet(var, D); if (tmp == LZERO) { fprintf(stderr, "WARNING : det is 0!\n"); return LZERO; } gconst = D * log(M_2PI); gconst += tmp; return (gconst); } void cal_tri_inv(double **S, double **S_inv, const int L) { int i, j, k; for (i = 0; i < L; i++) { S_inv[i][i] = 1.0 / S[i][i]; } for (i = 1; i < L; i++) for (j = i - 1; j >= 0; j--) for (k = j; k < i; k++) { S_inv[i][j] = S_inv[i][j] - S[i][k] * S_inv[k][j] / S[i][i]; } } int choleski(double **cov, double **S, const int L) { int i, j, k; double tmp; for (i = 0; i < L; i++) { for (j = 0; j < i; j++) { tmp = cov[i][j]; for (k = 0; k < j; k++) tmp -= S[i][k] * S[j][k]; S[i][j] = tmp / S[j][j]; } tmp = cov[i][i]; for (k = 0; k < i; k++) tmp -= S[i][k] * S[i][k]; if (tmp <= 0) { return 0; } S[i][i] = sqrt(tmp); } return 1; } void cal_inv(double **cov, double **inv, const int L) { int i, j, k; double **S, **S_inv; S = (double **) malloc(sizeof(double *) * L); S_inv = (double **) malloc(sizeof(double *) * L); for (i = 0; i < L; i++) { S[i] = dgetmem(L); S_inv[i] = dgetmem(L); } for (i = 0; i < L; i++) { for (j = 0; j < L; j++) { S[i][j] = 0.0; S_inv[i][j] = 0.0; inv[i][j] = 0.0; } } if (choleski(cov, S, L) == 0) return; cal_tri_inv(S, S_inv, L); for (i = 0; i < L; i++) for (j = 0; j < L; j++) { if (i > j) for (k = i; k < L; k++) inv[i][j] = inv[i][j] + S_inv[k][i] * S_inv[k][j]; else for (k = j; k < L; k++) inv[i][j] = inv[i][j] + S_inv[k][i] * S_inv[k][j]; } for (i = 0; i < L; i++) { free(S[i]); free(S_inv[i]); } free(S); free(S_inv); } void fillz_GMM(GMM * gmm) { int m, l, ll; for (m = 0; m < gmm->nmix; m++) { gmm->weight[m] = 0.; if (gmm->full != TR) { for (l = 0; l < gmm->dim; l++) { gmm->gauss[m].mean[l] = 0.0; gmm->gauss[m].var[l] = 0.0; } } else { for (l = 0; l < gmm->dim; l++) { gmm->gauss[m].mean[l] = 0.0; for (ll = 0; ll < gmm->dim; ll++) { gmm->gauss[m].cov[l][ll] = 0.0; gmm->gauss[m].inv[l][ll] = 0.0; } } } } } void maskCov_GMM(GMM * gmm, const int *dim_list, const int cov_dim, const Boolean block_full, const Boolean block_corr) { int row, col, i, k, l, m, *offset; offset = (int *) malloc(sizeof(int) * cov_dim + 1); offset[0] = 0; for (i = 1; i < cov_dim + 1; i++) { offset[i] = offset[i - 1] + dim_list[i - 1]; } for (m = 0; m < gmm->nmix; m++) { if (block_full == FA && block_corr == FA) { /* without -c1 and -c2 */ for (k = 0; k < gmm->dim; k++) { for (l = 0; l < gmm->dim; l++) { if (k != l) { gmm->gauss[m].cov[k][l] = 0.0; } } } } else if (block_full == FA && block_corr == TR) { /* with -c1 */ for (row = 0; row < cov_dim; row++) { for (col = 0; col < cov_dim; col++) { for (k = offset[row]; k < offset[row] + dim_list[row]; k++) { for (l = offset[col]; l < offset[col] + dim_list[col]; l++) { if (dim_list[row] != dim_list[col]) { gmm->gauss[m].cov[k][l] = 0.0; } else { if (offset[row + 1] - k != offset[col + 1] - l) { gmm->gauss[m].cov[k][l] = 0.0; } } } } } } } else if (block_full == TR && block_corr == FA) { /* with -c2 */ for (row = 0; row < cov_dim; row++) { for (col = 0; col < cov_dim; col++) { if (row != col) { for (k = offset[row]; k < offset[row] + dim_list[row]; k++) { for (l = offset[col]; l < offset[col] + dim_list[col]; l++) { gmm->gauss[m].cov[k][l] = 0.0; } } } } } } else { /* with -c1 and -c2 */ for (row = 0; row < cov_dim; row++) { for (col = 0; col < cov_dim; col++) { if (dim_list[row] != dim_list[col]) { for (k = offset[row]; k < offset[row] + dim_list[row]; k++) { for (l = offset[col]; l < offset[col] + dim_list[col]; l++) { gmm->gauss[m].cov[k][l] = 0.0; } } } } } } } free(offset); } double log_wgd(const GMM * gmm, const int m, const int L, const double *dat) { int l, ll; double sum, *diff = NULL, tmp, lwgd; sum = gmm->gauss[m].gconst; if (gmm->full != TR) { for (l = 0; l < L; l++) { tmp = dat[l] - gmm->gauss[m].mean[l]; sum += (tmp * tmp) / gmm->gauss[m].var[l]; } } else { diff = dgetmem(L); for (l = 0; l < L; l++) { diff[l] = dat[l] - gmm->gauss[m].mean[l]; } for (l = 0; l < L; l++) { for (ll = 0, tmp = 0.0; ll < L; ll++) { tmp += diff[ll] * gmm->gauss[m].inv[ll][l]; } sum += tmp * diff[l]; } free(diff); } lwgd = log(gmm->weight[m]) - 0.5 * sum; return (lwgd); } double log_add(double logx, double logy) { double swap, diff, minLogExp, z; if (logx < logy) { swap = logx; logx = logy; logy = swap; } diff = logy - logx; minLogExp = -log(-LZERO); if (diff < minLogExp) return ((logx < LSMALL) ? LZERO : logx); else { z = exp(diff); return (logx + log(1.0 + z)); } } double log_outp(const GMM * gmm, const int L, const double *dat) { int m; double logwgd, logb; for (m = 0, logb = LZERO; m < gmm->nmix; m++) { logwgd = log_wgd(gmm, m, L, dat); logb = log_add(logb, logwgd); } return (logb); } int alloc_GMM(GMM * gmm, const int M, const int L, const Boolean full) { int m; gmm->nmix = M; gmm->dim = L; gmm->full = full; gmm->weight = dgetmem(M); gmm->gauss = (Gauss *) getmem(sizeof(Gauss), M); for (m = 0; m < M; m++) { gmm->gauss[m].mean = dgetmem(L); if (full != TR) { gmm->gauss[m].var = dgetmem(L); } else { gmm->gauss[m].cov = ddgetmem(L, L); gmm->gauss[m].inv = ddgetmem(L, L); } } return (0); } int load_GMM(GMM * gmm, FILE * fp) { int m, l; freadf(gmm->weight, sizeof(*(gmm->weight)), gmm->nmix, fp); for (m = 0; m < gmm->nmix; m++) { freadf(gmm->gauss[m].mean, sizeof(*(gmm->gauss[m].mean)), gmm->dim, fp); if (gmm->full != TR) { freadf(gmm->gauss[m].var, sizeof(*(gmm->gauss[m].var)), gmm->dim, fp); gmm->gauss[m].gconst = cal_gconst(gmm->gauss[m].var, gmm->dim); } else { for (l = 0; l < gmm->dim; l++) { freadf(gmm->gauss[m].cov[l], sizeof(*(gmm->gauss[m].cov[l])), gmm->dim, fp); } } } return (0); } int save_GMM(const GMM * gmm, FILE * fp) { int m, i, j; fwritef(gmm->weight, sizeof(*(gmm->weight)), gmm->nmix, fp); for (m = 0; m < gmm->nmix; m++) { if (gmm->full != TR) { fwritef(gmm->gauss[m].mean, sizeof(*(gmm->gauss[m].mean)), gmm->dim, fp); fwritef(gmm->gauss[m].var, sizeof(*(gmm->gauss[m].var)), gmm->dim, fp); } else { fwritef(gmm->gauss[m].mean, sizeof(*(gmm->gauss[m].mean)), gmm->dim, fp); for (i = 0; i < gmm->dim; i++) { for (j = 0; j < i; j++) { gmm->gauss[m].cov[j][i] = gmm->gauss[m].cov[i][j]; } } for (i = 0; i < gmm->dim; i++) { fwritef(gmm->gauss[m].cov[i], sizeof(*(gmm->gauss[m].cov[i])), gmm->dim, fp); } } } return (0); } int prepareCovInv_GMM(GMM * gmm) { int m; for (m = 0; m < gmm->nmix; m++) { cal_inv(gmm->gauss[m].cov, gmm->gauss[m].inv, gmm->dim); } return (0); } int prepareGconst_GMM(GMM * gmm) { int m; for (m = 0; m < gmm->nmix; m++) { if (gmm->full == FA) { gmm->gauss[m].gconst = cal_gconst(gmm->gauss[m].var, gmm->dim); } else { gmm->gauss[m].gconst = cal_gconstf(gmm->gauss[m].cov, gmm->dim); } if (gmm->gauss[m].gconst == LZERO) { return -1; } } return (0); } int floorWeight_GMM(GMM * gmm, double floor) { int m; double sum_w = 0.0, sum_floor = floor * gmm->nmix; for (m = 0; m < gmm->nmix; m++) { if (gmm->weight[m] < floor) { gmm->weight[m] = floor; } sum_w += gmm->weight[m]; } if (sum_w != 1.0) { for (m = 0; m < gmm->nmix; m++) { gmm->weight[m] = (1.0 - sum_floor) / (sum_w - sum_floor) * (gmm->weight[m] - floor) + floor; } } return (0); } int floorVar_GMM(GMM * gmm, double floor) { int m, l; if (gmm->full == FA) { for (m = 0; m < gmm->nmix; m++) { for (l = 0; l < gmm->dim; l++) { if (gmm->gauss[m].var[l] < floor) { gmm->gauss[m].var[l] = floor; } } } } else { for (m = 0; m < gmm->nmix; m++) { for (l = 0; l < gmm->dim; l++) { if (gmm->gauss[m].cov[l][l] < floor) { gmm->gauss[m].cov[l][l] = floor; } } } } return (0); } int free_GMM(GMM * gmm) { int m; for (m = 0; m < gmm->nmix; m++) { free(gmm->gauss[m].mean); if (gmm->full != TR) { free(gmm->gauss[m].var); } else { free(gmm->gauss[m].cov[0]); free(gmm->gauss[m].inv[0]); free(gmm->gauss[m].cov); free(gmm->gauss[m].inv); } } free(gmm->gauss); free(gmm->weight); gmm->nmix = 0; gmm->dim = 0; gmm->full = FA; gmm->weight = NULL; gmm->gauss = NULL; return (0); } SPTK-3.9/bin/gmm/gmm.c0000644001051300105040000007703712637156635011371 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /********************************************************************************* * * * Gaussian Mixture Model * * * * 2000.7 C. Miyajima * * 2010.4 A. Saito * * 2010.9 A. Tamamori * * * * usage: * * gmm [options] [infile] > stdout * * options: * * -l l : length of vector [26] * * -m m : number of Gaussian components [16] * * -s s : seed of random var. for LBG algo. [1] * * -a a : minimum number of EM iterations [0] * * -b b : maximum number of EM iterations [20] * * -e e : convergence factor [0.00001] * * -v v : floor value of variances [0.001] * * -w w : floor value of weights [0.001] * * -f : full covariance [FALSE] * * -M M : using maximum a posteriori(MAP) estimation, [0] * * where M is the parameter for * * Dirichlet and normal-Wishart densities. * * -F fn : gmm initial parameter file [FALSE] * * If -M option is specified, * * fn is regarded as the parameter for UBM. * * (level 2) * * -B B1 ... Bb : block size in covariance matrix [FALSE] * * where (B1 + B2 + ... + Bb) = l * * -c1 : inter-block correlation [FALSE] * * -c2 : full covariance in each block [FALSE] * * infile: * * training data sequence [stdin] * * stdout: * * GMM parameters * * * ********************************************************************************/ static char *rcs_id = "$Id: gmm.c,v 1.28 2015/12/16 07:27:40 shikano Exp $"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #include #include #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define DEF_L 26 #define DEF_M 16 #define DEF_T -1 #define DEF_S 1 #define DEF_IMIN 0 #define DEF_IMAX 20 #define DEF_E 0.00001 #define DEF_V 0.001 #define DEF_W 0.001 #define DEF_X 0.0 #define DELTA 0.0001 #define END 0.0001 #define EPSILON 1.0e-6 #define MAXVALUE 1.0e10 #define FULL 0 /* Default values for lbg */ #define ITER 1000 #define CENTUP 1 #define MINTRAIN 1 #define sq(x) ( (x)*(x) ) char *BOOL[] = { "FALSE", "TRUE" }; /* Command Name */ char *cmnd; typedef struct _float_list { float *f; struct _float_list *next; } float_list; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - EM estimation of GMM\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -l l : dimension of vector [%d]\n", DEF_L); fprintf(stderr, " -m m : number of Gaussian components [%d]\n", DEF_M); fprintf(stderr, " -s s : seed of random var. for LBG algo. [%d]\n", DEF_S); fprintf(stderr, " -a a : minimum number of EM iterations [%d]\n", DEF_IMIN); fprintf(stderr, " -b b : maximum number of EM iterations [%d]\n", DEF_IMAX); fprintf(stderr, " -e e : convergence factor [%g]\n", DEF_E); fprintf(stderr, " -v v : flooring value for variance [%g]\n", DEF_V); fprintf(stderr, " -w w : flooring value for weights [%g]\n", DEF_W); fprintf(stderr, " -f : full covariance [%s]\n", BOOL[FULL]); fprintf(stderr, " -M M : using maximum a posteriori(MAP) estimation, [%g]\n", DEF_X); fprintf(stderr, " where M is the parameter for \n"); fprintf(stderr, " Dirichlet and normal-Wishart densities.\n"); fprintf(stderr, " -F fn : GMM initial parameter file [N/A]\n"); fprintf(stderr, " If -M option is specified, \n"); fprintf(stderr, " fn is regarded as the parameter for UBM.\n"); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " (level 2)\n"); fprintf(stderr, " -B B1 B2 ... Bb : block size in covariance matrix, [FALSE]\n"); fprintf(stderr, " where (B1 + B2 + ... + Bb) = l\n"); fprintf(stderr, " -c1 : inter-block correlation [FALSE]\n"); fprintf(stderr, " -c2 : full covariance in each block [FALSE]\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " training data sequence (float) [stdin]\n"); fprintf(stderr, " stdout:\n"); fprintf(stderr, " GMM parameters (float)\n"); fprintf(stderr, " output order:\n"); fprintf(stderr, " weight-1, weight-2, ..., weight-m, mean_vec-1, variance_vec-1,\n"); fprintf(stderr, " mean_vec-2, variance_vec-2, ..., mean_vec-m, variance_vec-m\n"); fprintf(stderr, " notice:\n"); fprintf(stderr, " -e option specifies a threshold for the change of average\n"); fprintf(stderr, " log-likelihood for training data at each iteration.\n"); fprintf(stderr, " -F option specifies a GMM initial parameter file in which\n"); fprintf(stderr, " weight, mean, and variance parameters must be aligned\n"); fprintf(stderr, " in the same order as output.\n"); fprintf(stderr, " -B option specifies the size of each blocks in covariance matrix.\n"); fprintf(stderr, " -c1 and -c2 option must be used with -B option.\n"); fprintf(stderr, " Without -c1 and -c2 option, a diagonal covariance can be obtained.\n"); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char **argv) { FILE *fp = stdin, *fgmm = NULL; GMM gmm, bgmgmm, tgmm; double E = DEF_E, V = DEF_V, W = DEF_W, X = DEF_X, *dat, *pd, *cb, *icb, *logwgd, logb, *sum, *xi = NULL, *eta = NULL, diff, ave_logp0 = 0.0, ave_logp1, change = MAXVALUE, tmp1, tmp2, mapt; int l, L = DEF_L, m, M = DEF_M, N, t, T = DEF_T, S = DEF_S, full = FULL, i, j, k, Imin = DEF_IMIN, Imax = DEF_IMAX, *tindex, *cntcb, offset_row = 0, offset_col = 0, row = 0, col = 0; void cal_inv(double **cov, double **inv, const int L); float_list *top, *cur, *prev, *tmpf, *tmpff; Boolean block_full = FA, block_corr = FA, multiple_dim = FA, full_cov = FA; int cov_dim = 0, dim_list[1024]; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; /* -- Check options -- */ while (--argc) if (**++argv == '-') { switch (*(*argv + 1)) { case 'h': usage(0); break; case 'l': L = atoi(*++argv); --argc; break; case 'm': M = atoi(*++argv); --argc; break; case 's': S = atoi(*++argv); --argc; break; case 'a': Imin = atoi(*++argv); --argc; break; case 'b': Imax = atoi(*++argv); --argc; break; case 'e': E = atof(*++argv); --argc; break; case 'v': V = atof(*++argv); --argc; break; case 'w': W = atof(*++argv); --argc; break; case 'f': full = TR - full; full_cov = TR; break; case 'M': X = atof(*++argv); --argc; break; case 'F': fgmm = getfp(*++argv, "rb"); --argc; break; /* level 2 */ case 'B': multiple_dim = TR; dim_list[0] = atoi(*++argv); i = 1; argc--; while ((**(argv + 1) != '\0') && isdigit(**(argv + 1))) { dim_list[i++] = atoi(*++argv); if (--argc <= 1) { break; } } cov_dim = i; break; case 'c': if (strncmp("1", *(argv) + 2, 1) == 0) { block_corr = TR - block_corr; } else if (strncmp("2", *(argv) + 2, 1) == 0) { block_full = TR - block_full; } break; default: fprintf(stderr, "%s: Illegal option \"%s\".\n", cmnd, *argv); usage(1); } } else fp = getfp(*argv, "rb"); if (multiple_dim == TR) { for (i = 0, j = 0; i < cov_dim; i++) { j += dim_list[i]; } if (j != L) { fprintf(stderr, "%s: block size must be coincided with dimention of vector\n", cmnd); usage(1); } full = TR; } else { if (block_corr == TR || block_full == TR) { if (full_cov != TR) { fprintf(stderr, "%s: -c1 and -c2 option must be specified with -B option!\n", cmnd); usage(1); } } } if (X > 1.0 || X < 0.0) { fprintf(stderr, "%s : the weight for UBM must be specified between 0.0 and 1.0!\n", cmnd); usage(1); } if (W * M > 1.0) { fprintf(stderr, "%s : the floor for weight must be smaller than 1.0/m !", cmnd); usage(1); } if (X != 0.0 && fgmm == NULL) { fprintf(stderr, "%s : the prior distribution must be specified, if the MAP method is valid!\n", cmnd); usage(1); } /* -- Count number of input vectors and read -- */ dat = dgetmem(L); top = prev = (float_list *) getmem(1, sizeof(float_list)); top->f = fgetmem(L); T = 0; prev->next = NULL; while (freadf(dat, sizeof(*dat), L, fp) == L) { cur = (float_list *) getmem(1, sizeof(float_list)); cur->f = fgetmem(L); for (i = 0; i < L; i++) { cur->f[i] = (float) dat[i]; } T++; prev->next = cur; cur->next = NULL; prev = cur; } free(dat); dat = dgetmem(L * T); for (i = 0, tmpf = top->next; tmpf != NULL; i++, tmpf = tmpff) { for (j = 0; j < L; j++) { dat[i * L + j] = tmpf->f[j]; } tmpff = tmpf->next; free(tmpf->f); free(tmpf); } free(top); logwgd = dgetmem(M); sum = dgetmem(M); if (X != 0.0) { xi = dgetmem(M); eta = dgetmem(M); } /* Initialization of GMM parameters */ alloc_GMM(&gmm, M, L, full); alloc_GMM(&tgmm, M, L, full); if (fgmm != NULL) { if (X == 0.0) { load_GMM(&gmm, fgmm); floorWeight_GMM(&gmm, W); floorVar_GMM(&gmm, V); if (full == TR) { prepareCovInv_GMM(&gmm); } prepareGconst_GMM(&gmm); fprintf(stderr, "T = %d L = %d M = %d\n", T, L, M); fclose(fgmm); } else { alloc_GMM(&bgmgmm, M, L, full); load_GMM(&bgmgmm, fgmm); floorWeight_GMM(&gmm, W); floorVar_GMM(&gmm, V); if (full == TR) { prepareCovInv_GMM(&bgmgmm); } prepareGconst_GMM(&bgmgmm); fprintf(stderr, "T = %d L = %d M = %d\n", T, L, M); fclose(fgmm); for (m = 0; m < M; m++) { gmm.weight[m] = bgmgmm.weight[m]; for (l = 0; l < L; l++) { gmm.gauss[m].mean[l] = bgmgmm.gauss[m].mean[l]; } /* variance or covariance */ if (full != TR) { for (l = 0; l < L; l++) { gmm.gauss[m].var[l] = bgmgmm.gauss[m].var[l]; } } else { for (l = 0; l < L; l++) { for (j = 0; j < L; j++) { gmm.gauss[m].cov[l][j] = bgmgmm.gauss[m].cov[l][j]; } } } xi[m] = X * bgmgmm.weight[m]; if (full != TR) { eta[m] = xi[m] + 1.0; } else { eta[m] = xi[m] + L; } } } } else { /* for VQ */ N = 1; while (N < M) N *= 2; cb = dgetmem(N * L); icb = dgetmem(L); tindex = (int *) getmem(T, sizeof(int)); cntcb = (int *) getmem(M, sizeof(int)); /* LBG */ vaverage(dat, L, T, icb); lbg(dat, L, T, icb, 1, cb, N, ITER, MINTRAIN, S, CENTUP, DELTA, END); for (t = 0, pd = dat; t < T; t++, pd += L) { tindex[t] = vq(pd, cb, L, M); cntcb[tindex[t]]++; } for (m = 0; m < M; m++) if (cntcb[m] == 0) { fprintf(stderr, "Error: No data for mixture No.%d\n", m); usage(1); } fprintf(stderr, "T = %d L = %d M = %d\n", T, L, M); /* weights */ for (m = 0; m < M; m++) { gmm.weight[m] = (double) cntcb[m] / (double) T; } floorWeight_GMM(&gmm, W); /* mean */ for (m = 0, pd = cb; m < M; m++, pd += L) movem(pd, gmm.gauss[m].mean, sizeof(double), L); /* variance */ if (full != TR) { for (t = 0, pd = dat; t < T; t++, pd += L) for (l = 0; l < L; l++) { diff = gmm.gauss[tindex[t]].mean[l] - pd[l]; gmm.gauss[tindex[t]].var[l] += diff * diff; } for (m = 0; m < M; m++) { for (l = 0; l < L; l++) { gmm.gauss[m].var[l] /= (double) cntcb[m]; } } } /* full covariance */ else { for (t = 0, pd = dat; t < T; t++, pd += L) { for (l = 0; l < L; l++) { for (i = 0; i <= l; i++) { diff = (gmm.gauss[tindex[t]].mean[l] - pd[l]) * (gmm.gauss[tindex[t]].mean[i] - pd[i]); gmm.gauss[tindex[t]].cov[l][i] += diff; } } } for (m = 0; m < M; m++) for (l = 0; l < L; l++) for (i = 0; i <= l; i++) { gmm.gauss[m].cov[l][i] /= (double) cntcb[m]; } /* masking */ if (multiple_dim == TR) { maskCov_GMM(&gmm, dim_list, cov_dim, block_full, block_corr); } } floorVar_GMM(&gmm, V); } /* end of initialization */ /* EM training of GMM parameters */ for (i = 0; (i <= Imax) && ((i <= Imin) || (fabs(change) > E)); i++) { fillz_GMM(&tgmm); fillz(sum, sizeof(double), M); if (full != TR) { for (m = 0; m < M; m++) gmm.gauss[m].gconst = cal_gconst(gmm.gauss[m].var, L); } else { for (m = 0; m < M; m++) { gmm.gauss[m].gconst = cal_gconstf(gmm.gauss[m].cov, L); if (gmm.gauss[m].gconst == LZERO) { fprintf(stderr, "ERROR : Can't caluculate covdet\n"); exit(EXIT_FAILURE); } } } if (full == TR) { prepareCovInv_GMM(&gmm); } for (t = 0, ave_logp1 = 0.0, pd = dat; t < T; t++, pd += L) { for (m = 0, logb = LZERO; m < M; m++) { logwgd[m] = log_wgd(&gmm, m, L, pd); logb = log_add(logb, logwgd[m]); } ave_logp1 += logb; for (m = 0; m < M; m++) { tmp1 = exp(logwgd[m] - logb); sum[m] += tmp1; for (l = 0; l < L; l++) { tmp2 = tmp1 * pd[l]; tgmm.gauss[m].mean[l] += tmp2; if (full != TR) tgmm.gauss[m].var[l] += tmp2 * pd[l]; else { for (j = 0; j <= l; j++) { tgmm.gauss[m].cov[l][j] += tmp1 * (pd[l] - gmm.gauss[m].mean[l]) * (pd[j] - gmm.gauss[m]. mean[j]); } } } } } /* Output average log likelihood at each iteration */ ave_logp1 /= (double) T; if (i == 1 && M == 1) ave_logp0 = ave_logp1; fprintf(stderr, "iter %3d : ", i); fprintf(stderr, "ave_logprob = %g", ave_logp1); if (i) { change = ave_logp1 - ave_logp0; fprintf(stderr, " change = %g", change); } fprintf(stderr, "\n"); ave_logp0 = ave_logp1; /* Update perameters */ /* weights */ if (X == 0.0) { for (m = 0; m < M; m++) gmm.weight[m] = sum[m] / (double) T; } else { mapt = 0.0; for (m = 0; m < M; m++) { mapt += (sum[m] + xi[m]); } for (m = 0; m < M; m++) { gmm.weight[m] = (sum[m] + xi[m]) / mapt; } } floorWeight_GMM(&gmm, W); /* mean, variance */ for (m = 0; m < M; m++) { if (X == 0.0) { for (l = 0; l < L; l++) gmm.gauss[m].mean[l] = tgmm.gauss[m].mean[l] / sum[m]; } else { for (l = 0; l < L; l++) gmm.gauss[m].mean[l] = (tgmm.gauss[m].mean[l] + xi[m] * bgmgmm.gauss[m].mean[l]) / (sum[m] + xi[m]); } if (multiple_dim == TR) { if (block_full == FA && block_corr == FA) { if (full_cov != TR) { /* -f is not specified */ for (l = 0; l < L; l++) { gmm.gauss[m].cov[l][l] = tgmm.gauss[m].cov[l][l] / sum[m]; if (X != 0.0) { gmm.gauss[m].cov[l][l] = sum[m] * gmm.gauss[m].cov[l][l] + sum[m] * sq(tgmm.gauss[m].mean[l] / sum[m] - gmm.gauss[m].mean[l]) + xi[m] * bgmgmm.gauss[m].cov[l][l] + xi[m] * sq(gmm.gauss[m].mean[l] - bgmgmm.gauss[m].mean[l]); gmm.gauss[m].cov[l][l] /= (sum[m] + eta[m] - 1.0); } } } else { for (l = 0; l < L; l++) { for (j = 0; j <= l; j++) { gmm.gauss[m].cov[l][j] = tgmm.gauss[m].cov[l][j] / sum[m]; if (X != 0.0) { gmm.gauss[m].cov[l][j] = sum[m] * gmm.gauss[m].cov[l][j] + sum[m] * (tgmm.gauss[m].mean[l] / sum[m] - gmm.gauss[m].mean[l]) * (tgmm.gauss[m].mean[j] / sum[m] - gmm.gauss[m].mean[j]) + xi[m] * bgmgmm.gauss[m].cov[l][j] + xi[m] * (gmm.gauss[m].mean[l] - bgmgmm.gauss[m].mean[l]) * (gmm.gauss[m].mean[j] - bgmgmm.gauss[m].mean[j]); gmm.gauss[m].cov[l][j] /= (sum[m] + eta[m] - L); } } } } } else { /* for each block (lower triangle) */ offset_row = 0; for (row = 0; row < cov_dim; row++) { /* row block number */ offset_col = 0; for (col = 0; col <= row; col++) { /* column block number */ if (dim_list[row] == dim_list[col]) { /* block is square */ if (block_full == FA && block_corr == TR) { /* blockwise diagonal */ for (k = offset_row, l = offset_col; k < offset_row + dim_list[row]; k++, l++) { gmm.gauss[m].cov[k][l] = tgmm.gauss[m].cov[k][l] / sum[m]; if (X != 0.0) { gmm.gauss[m].cov[k][l] = sum[m] * gmm.gauss[m].cov[k][l] + sum[m] * (tgmm.gauss[m].mean[k] / sum[m] - gmm.gauss[m].mean[k]) * (tgmm.gauss[m].mean[l] / sum[m] - gmm.gauss[m].mean[l]) + xi[m] * bgmgmm.gauss[m].cov[k][l] + xi[m] * (gmm.gauss[m].mean[k] - bgmgmm.gauss[m].mean[k]) * (gmm.gauss[m].mean[l] - bgmgmm.gauss[m].mean[l]); gmm.gauss[m].cov[k][l] /= (sum[m] + eta[m] - L); } } } else { /* block_full is TR */ for (k = offset_row; k < offset_row + dim_list[row]; k++) { for (l = offset_col; l < offset_col + dim_list[col]; l++) { if (row == col) { if (l <= k) { gmm.gauss[m].cov[k][l] = tgmm.gauss[m].cov[k][l] / sum[m]; if (X != 0.0) { gmm.gauss[m].cov[k][l] = sum[m] * gmm.gauss[m].cov[k][l] + sum[m] * (tgmm.gauss[m].mean[k] / sum[m] - gmm.gauss[m].mean[k]) * (tgmm.gauss[m].mean[l] / sum[m] - gmm.gauss[m].mean[l]) + xi[m] * bgmgmm.gauss[m].cov[k][l] + xi[m] * (gmm.gauss[m].mean[k] - bgmgmm. gauss[m].mean[k]) * (gmm.gauss[m].mean[l] - bgmgmm.gauss[m].mean[l]); gmm.gauss[m].cov[k][l] /= (sum[m] + eta[m] - L); } } } else { if (block_corr == TR) { gmm.gauss[m].cov[k][l] = tgmm.gauss[m].cov[k][l] / sum[m]; if (X != 0.0) { gmm.gauss[m].cov[k][l] = sum[m] * gmm.gauss[m].cov[k][l] + sum[m] * (tgmm.gauss[m].mean[k] / sum[m] - gmm.gauss[m].mean[k]) * (tgmm.gauss[m].mean[l] / sum[m] - gmm.gauss[m].mean[l]) + xi[m] * bgmgmm.gauss[m].cov[k][l] + xi[m] * (gmm.gauss[m].mean[k] - bgmgmm. gauss[m].mean[k]) * (gmm.gauss[m].mean[l] - bgmgmm.gauss[m].mean[l]); gmm.gauss[m].cov[k][l] /= (sum[m] + eta[m] - L); } } } } } } } offset_col += dim_list[col]; } offset_row += dim_list[row]; } } } else { if (full != TR) { for (l = 0; l < L; l++) { gmm.gauss[m].var[l] = tgmm.gauss[m].var[l] / sum[m] - gmm.gauss[m].mean[l] * gmm.gauss[m].mean[l]; if (X != 0.0) { gmm.gauss[m].var[l] = sum[m] * (gmm.gauss[m].var[l] + sq(tgmm.gauss[m].mean[l] / sum[m] - gmm.gauss[m].mean[l])) + xi[m] * sq(gmm.gauss[m].mean[l] - bgmgmm.gauss[m].mean[l]) + xi[m] * bgmgmm.gauss[m].var[l]; gmm.gauss[m].var[l] /= (sum[m] + eta[m] - 1.0); } } } else { for (l = 0; l < L; l++) { for (j = 0; j <= l; j++) { gmm.gauss[m].cov[l][j] = tgmm.gauss[m].cov[l][j] / sum[m]; if (X != 0.0) { gmm.gauss[m].cov[l][j] = sum[m] * gmm.gauss[m].cov[l][j] + sum[m] * (tgmm.gauss[m].mean[l] / sum[m] - gmm.gauss[m].mean[l]) * (tgmm.gauss[m].mean[j] / sum[m] - gmm.gauss[m].mean[j]) + xi[m] * bgmgmm.gauss[m].cov[l][j] + xi[m] * (gmm.gauss[m].mean[l] - bgmgmm.gauss[m].mean[l]) * (gmm.gauss[m].mean[j] - bgmgmm.gauss[m].mean[j]); gmm.gauss[m].cov[l][j] /= (sum[m] + eta[m] - L); } } } } } } floorVar_GMM(&gmm, V); } /* Output GMM parameters */ save_GMM(&gmm, stdout); return (0); } SPTK-3.9/bin/gmm/gmmp.c0000644001051300105040000002572112637156635011542 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************* * * * Calculation of GMM log-probagility * * * * 2000.7 C. Miyajima * * * * usage: * * gmmp [options] gmmfile [infile] > stdout * * options: * * -l l : length of vector [26] * * -m m : number of Gaussian components [16] * * -f : full covariance [FALSE] * * -a : output average log-probability [FALSE] * * (level 2) * * -B B1 ... Bb : block size in covariance matrix [FALSE] * * where (B1 + B2 + ... + Bb) = l * * -c1 : inter-block correlation [FALSE] * * -c2 : full covariance in each block [FALSE] * * infile: * * input vector sequence [stdin] * * stdout: * * sequence of frame log-probabilities * * average log-probability (if -a is used) * * * ************************************************************************/ static char *rcs_id = "$Id: gmmp.c,v 1.21 2015/12/14 05:34:34 uratec Exp $"; /* Standard C Libraries */ #include #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #include #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define DEF_L 26 #define DEF_M 16 #define DEF_A FA #define FULL FA char *BOOL[] = { "FALSE", "TRUE" }; /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - Calculaton of GMM log-probability\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] gmmfile [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -l l : dimensionality of vectors [%d]\n", DEF_L); fprintf(stderr, " -m m : number of Gaussian components [%d]\n", DEF_M); fprintf(stderr, " -f : full covariance [%s]\n", BOOL[FULL]); fprintf(stderr, " -a : output average log-probability [%s]\n", BOOL[DEF_A]); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " (level 2)\n"); fprintf(stderr, " -B B1 B2 ... Bb : block size in covariance matrix, [FALSE]\n"); fprintf(stderr, " where (B1 + B2 + ... + Bb) = l\n"); fprintf(stderr, " -c1 : inter-block correlation [FALSE]\n"); fprintf(stderr, " -c2 : full covariance in each block [FALSE]\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " input data sequence (float) [stdin]\n"); fprintf(stderr, " gmmfile:\n"); fprintf(stderr, " GMM parameters (float)\n"); fprintf(stderr, " stdout:\n"); fprintf(stderr, " log-probabilities or average log-probability (float)\n"); fprintf(stderr, " notice:\n"); fprintf(stderr, " -B option specifies the size of each blocks in covariance matrix.\n"); fprintf(stderr, " -c1 and -c2 option must be used with -B option.\n"); fprintf(stderr, " Without -c1 and -c2 option, a diagonal covariance can be obtained.\n"); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char **argv) { FILE *fp = stdin, *fgmm = NULL; GMM gmm; double logp, ave_logp, *x; int M = DEF_M, L = DEF_L, T; Boolean aflag = DEF_A, full = FULL; int cov_dim = 0, dim_list[1024], i, j; Boolean block_full = FA, block_corr = FA, multiple_dim = FA; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) if (**++argv == '-') { switch (*(*argv + 1)) { case 'h': usage(0); break; case 'l': L = atoi(*++argv); --argc; break; case 'm': M = atoi(*++argv); --argc; break; case 'f': full = TR - full; break; case 'a': aflag = TR; break; /* level 2 */ case 'B': multiple_dim = TR; dim_list[0] = atoi(*++argv); i = 1; argc--; while ((**(argv + 1) != '\0') && isdigit(**(argv + 1))) { dim_list[i++] = atoi(*++argv); if (--argc <= 1) { break; } } cov_dim = i; break; case 'c': if (strncmp("1", *(argv) + 2, 1) == 0) { block_corr = TR - block_corr; } else if (strncmp("2", *(argv) + 2, 1) == 0) { block_full = TR - block_full; } break; default: fprintf(stderr, "%s: Illegal option \"%s\".\n", cmnd, *argv); usage(1); } } else if (fgmm == NULL) fgmm = getfp(*argv, "rb"); else fp = getfp(*argv, "rb"); if (multiple_dim == TR) { for (i = 0, j = 0; i < cov_dim; i++) { j += dim_list[i]; } if (j != L) { fprintf(stderr, "%s: block size must be coincided with dimention of vector\n", cmnd); usage(1); } full = TR; } else { if (block_corr == TR || block_full == TR) { if (full != TR) { fprintf(stderr, "%s: -c1 and -c2 option must be specified with -B option!\n", cmnd); usage(1); } } } /* Read GMM parameters */ if (fgmm == NULL) { fprintf(stderr, "%s: GMM file must be specified!\n", cmnd); usage(1); } alloc_GMM(&gmm, M, L, full); load_GMM(&gmm, fgmm); fclose(fgmm); if (gmm.full != TR && full == TR) { fprintf(stderr, "%s: GMM is diagonal covariance, so -f or -B option is inappropriate!\n", cmnd); usage(1); } if (full == TR && multiple_dim == TR) { maskCov_GMM(&gmm, dim_list, cov_dim, block_full, block_corr); } if (gmm.full == TR) { prepareCovInv_GMM(&gmm); prepareGconst_GMM(&gmm); } /* Calculate and output log-probability */ T = 0; ave_logp = 0.0; x = dgetmem(L); while (freadf(x, sizeof(*x), L, fp) == L) { if (!aflag) { logp = log_outp(&gmm, L, x); fwritef(&logp, sizeof(double), 1, stdout); } else { ave_logp += log_outp(&gmm, L, x); T++; } } fclose(fp); if (aflag) { if (T == 0) { fprintf(stderr, "%s: No input data!\n", cmnd); usage(1); } else { ave_logp /= (double) T; fwritef(&ave_logp, sizeof(double), 1, stdout); } } return (0); } SPTK-3.9/bin/gnorm/0000755001051300105040000000000012637167704011050 500000000000000SPTK-3.9/bin/gnorm/Makefile.am0000644001051300105040000000021012442245053013001 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = gnorm gnorm_SOURCES = _gnorm.c gnorm.c gnorm_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/gnorm/Makefile.in0000644001051300105040000004257412637167412013045 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = gnorm$(EXEEXT) subdir = bin/gnorm ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_gnorm_OBJECTS = _gnorm.$(OBJEXT) gnorm.$(OBJEXT) gnorm_OBJECTS = $(am_gnorm_OBJECTS) gnorm_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(gnorm_SOURCES) DIST_SOURCES = $(gnorm_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include gnorm_SOURCES = _gnorm.c gnorm.c gnorm_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/gnorm/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/gnorm/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) gnorm$(EXEEXT): $(gnorm_OBJECTS) $(gnorm_DEPENDENCIES) $(EXTRA_gnorm_DEPENDENCIES) @rm -f gnorm$(EXEEXT) $(AM_V_CCLD)$(LINK) $(gnorm_OBJECTS) $(gnorm_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_gnorm.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gnorm.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/gnorm/_gnorm.c0000644001051300105040000000760412637156635012425 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ $Id: _gnorm.c,v 1.19 2015/12/14 01:14:15 uratec Exp $ Gain Normalization void gnorm(c1, c2, m, g) double *c1 : generalized cepstral coefficients double *c2 : normalized generalized cepstral coefficients int m : order of coefficients double g : gamma ************************************************************************/ #include #include #if defined(WIN32) #include "SPTK.h" #else #include #endif void gnorm(double *c1, double *c2, int m, const double g) { double k; if (g != 0.0) { k = 1.0 + g * c1[0]; for (; m >= 1; m--) c2[m] = c1[m] / k; c2[0] = pow(k, 1.0 / g); } else { movem(&c1[1], &c2[1], sizeof(*c1), m); c2[0] = exp(c1[0]); } return; } SPTK-3.9/bin/gnorm/gnorm.c0000644001051300105040000001641612637156635012267 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * Gain Normalization * * 1995.11 T.Masuko * * * * usage: * * gnorm [ options ] [ infile ] > stdout * * options: * * -m m : order of generalized cepstrum [25] * * -g g : gamma [0] * * -c c : gamma = -1 / (int) c * * infile: * * generalized cepstral coefficients * * , c~(0), c~(1), ..., c~(M), * * stdout: * * normalized generalized cepstral coefficients * * , K, c'(1), ..., c'(M), * * notice: * * value of c must be c>=1 * * require: * * gnorm(), * * * ************************************************************************/ static char *rcs_id = "$Id: gnorm.c,v 1.29 2015/12/14 01:14:15 uratec Exp $"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define GAMMA 0.0 #define ORDER 25 /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - gain normalization\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -m m : order of generalized cepstrum [%d]\n", ORDER); fprintf(stderr, " -g g : gamma [%g]\n", GAMMA); fprintf(stderr, " -c c : gamma = -1 / (int) c \n"); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " generalized cepstrum (%s) [stdin]\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " normalized generalized cepstrum (%s)\n", FORMAT); fprintf(stderr, " notice:\n"); fprintf(stderr, " value of c must be c>=1\n"); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char **argv) { double g = GAMMA, *c; int m = ORDER; FILE *fp = stdin; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) if (**++argv == '-') { switch (*(*argv + 1)) { case 'g': g = atof(*++argv); --argc; break; case 'c': g = atoi(*++argv); --argc; if (g < 1) fprintf(stderr, "%s : value of c must be c>=1!\n", cmnd); g = -1.0 / g; break; case 'm': m = atoi(*++argv); --argc; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else fp = getfp(*argv, "rb"); c = dgetmem(m + 1); while (freadf(c, sizeof(*c), m + 1, fp) == m + 1) { gnorm(c, c, m, g); fwritef(c, sizeof(*c), m + 1, stdout); } return (0); } SPTK-3.9/bin/grpdelay/0000755001051300105040000000000012637167704011535 500000000000000SPTK-3.9/bin/grpdelay/Makefile.am0000644001051300105040000000022712442245053013476 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = grpdelay grpdelay_SOURCES = _grpdelay.c grpdelay.c grpdelay_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/grpdelay/Makefile.in0000644001051300105040000004270712637167413013531 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = grpdelay$(EXEEXT) subdir = bin/grpdelay ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_grpdelay_OBJECTS = _grpdelay.$(OBJEXT) grpdelay.$(OBJEXT) grpdelay_OBJECTS = $(am_grpdelay_OBJECTS) grpdelay_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(grpdelay_SOURCES) DIST_SOURCES = $(grpdelay_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include grpdelay_SOURCES = _grpdelay.c grpdelay.c grpdelay_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/grpdelay/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/grpdelay/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) grpdelay$(EXEEXT): $(grpdelay_OBJECTS) $(grpdelay_DEPENDENCIES) $(EXTRA_grpdelay_DEPENDENCIES) @rm -f grpdelay$(EXEEXT) $(AM_V_CCLD)$(LINK) $(grpdelay_OBJECTS) $(grpdelay_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_grpdelay.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/grpdelay.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/grpdelay/_grpdelay.c0000644001051300105040000001045212637156635013572 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /*************************************************************** $Id: _grpdelay.c,v 1.18 2015/12/14 01:14:15 uratec Exp $ group delay of digital filter grpdelay(x, gd, size, is_alma); double *x : filter coefficients seaqunece double *gd : group delay sequence int size : FFT size int is_arma : if a then ARMA filter Naohiro Isshiki Feb. 1996 ****************************************************************/ #include #include #if defined(WIN32) #include "SPTK.h" #else #include #endif void grpdelay(double *x, double *gd, const int size, const int is_arma) { static double *y; static int fsize; double *u, *v; int k, size_2; if (fsize < size) { if (y != NULL) free(y); fsize = size; y = dgetmem(3 * size); } movem(x, gd, sizeof(*x), size); u = y + size; v = u + size; size_2 = size / 2; if (is_arma) gd[0] = 1; for (k = 0; k < size; ++k) u[k] = gd[k] * k; fftr(gd, y, size); fftr(u, v, size); for (k = 0; k <= size_2; k++) { gd[k] = (gd[k] * u[k] + y[k] * v[k]) / (gd[k] * gd[k] + y[k] * y[k]); if (is_arma) gd[k] *= -1; } return; } SPTK-3.9/bin/grpdelay/grpdelay.c0000644001051300105040000001605512637156636013441 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * Group Delay of Digital Filter * * * * 1988.8 T.Kobayashi * * 1996.1 N.Isshiki modified * * * * usage: * * grpdelay [ options ] [ infile ] > stdout * * options: * * -l l : FFT size power of 2 [256] * * -m m : order of filter [l-1] * * -a : ARMA filter [FALSE] * * infile: * * stdin for default * * input is asumed to be float * * Note that double precision FFT is used. * ************************************************************************/ static char *rcs_id = "$Id: grpdelay.c,v 1.28 2015/12/14 01:14:15 uratec Exp $"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #if defined(WIN32) #include "SPTK.h" #else #include #endif /*Default Values */ #define SIZE 256 #define AMRA 0 /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - group delay of digital filter\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -l l : FFT size power of 2 [%d]\n", SIZE); fprintf(stderr, " -m m : order of filter [l-1]\n"); fprintf(stderr, " -a : ARMA filter [FALSE]\n"); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " data sequence (%s) [stdin]\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " group delay (%s)\n", FORMAT); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char *argv[]) { FILE *fp; char *s, *infile = NULL, c; int size = SIZE, nd = -1, is_arma = AMRA; double *x, *d; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) { if (*(s = *++argv) == '-') { c = *++s; if ((c != 'a') && (*++s == '\0')) { s = *++argv; --argc; } switch (c) { case 'm': nd = atoi(s) + 1; break; case 'l': size = atoi(s); break; case 'a': is_arma = 1; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, c); break; } } else infile = s; } if (nd == -1) nd = size; if (nd > size) { fprintf(stderr, "%s : Order of sequence %d should be less than the FFT size %d!\n", cmnd, nd, size); return (1); } if (infile) { fp = getfp(infile, "rb"); } else fp = stdin; x = dgetmem(2 * size); d = x + size; while (!feof(fp)) { fillz(x, size, sizeof(*x)); if (freadf(x, sizeof(*x), nd, fp) != nd) break; grpdelay(x, d, size, is_arma); fwritef(d, sizeof(*x), size / 2 + 1, stdout); } return 0; } SPTK-3.9/bin/histogram/0000755001051300105040000000000012637167705011724 500000000000000SPTK-3.9/bin/histogram/Makefile.am0000644001051300105040000000023412442245054013663 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = histogram histogram_SOURCES = _histogram.c histogram.c histogram_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/histogram/Makefile.in0000644001051300105040000004274012637167413013714 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = histogram$(EXEEXT) subdir = bin/histogram ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_histogram_OBJECTS = _histogram.$(OBJEXT) histogram.$(OBJEXT) histogram_OBJECTS = $(am_histogram_OBJECTS) histogram_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(histogram_SOURCES) DIST_SOURCES = $(histogram_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include histogram_SOURCES = _histogram.c histogram.c histogram_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/histogram/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/histogram/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) histogram$(EXEEXT): $(histogram_OBJECTS) $(histogram_DEPENDENCIES) $(EXTRA_histogram_DEPENDENCIES) @rm -f histogram$(EXEEXT) $(AM_V_CCLD)$(LINK) $(histogram_OBJECTS) $(histogram_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_histogram.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/histogram.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/histogram/_histogram.c0000644001051300105040000000765212637156636014157 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /*************************************************************** $Id: _histogram.c,v 1.20 2015/12/14 01:14:15 uratec Exp $ histogram histogram(x, size, min, max, step, h); Naohiro Isshiki Feb. 1996 ****************************************************************/ #include #if defined(WIN32) #include "SPTK.h" #else #include #endif int histogram(double *x, const int size, const double min, const double max, const double step, double *h) { int k, ii, flg = 0; int jj; k = (int) ((max - min) / step + 1.0); fillz(h, sizeof(*h), k); for (ii = 0; ii < size; ii++) { if ((x[ii] < min) || (x[ii] > max)) { flg = 1; } else { for (jj = 0; jj < k; jj++) { if (x[ii] < min + (jj + 1) * step) { h[jj] += 1.0; break; } } } } return (flg); } SPTK-3.9/bin/histogram/histogram.c0000644001051300105040000002031312637156636014005 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * Histogram * * * * 1986.9 K.Tokuda * * 1995.7 K.Tokuda * * 1996.3 N.Miyazaki * * 2000.3 Y.Nankaku * * * * usage: * * histogram [ options ] [ infile ] > stdout * * options: * * -l l : frame size [0] * * -i i : infimum [0.0] * * -j j : supremum [1.0] * * -s s : step size [0.1] * * -n : normalization [FALSE] * * infile: * * sample data (float) * * stdout: * * histogram (float) * * * * notice: * * if l>0,calculate histogram frame by frame * ************************************************************************/ static char *rcs_id = "$Id: histogram.c,v 1.27 2015/12/14 01:14:15 uratec Exp $"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Command Name */ char *cmnd; int usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - histogram\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -l l : frame size [0]\n"); fprintf(stderr, " -i i : infimum [0.0]\n"); fprintf(stderr, " -j j : supremum [1.0]\n"); fprintf(stderr, " -s s : step size [0.1]\n"); fprintf(stderr, " -n : normalization [FALSE]\n"); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " data sequence (%s) [stdin]\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " histogram (%s)\n", FORMAT); fprintf(stderr, " notice:\n"); fprintf(stderr, " if l > 0, calculate histogram frame by frame\n"); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char *argv[]) { char *s, c; double i = 0, j = 1, st = 0.1; int l = 0, k, ii; int flg = 0, n = 0; double *h; double *x, xx; FILE *fp = stdin; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) { if (*(s = *++argv) == '-') { c = *++s; if ((c != 'n') && (*++s == '\0')) { s = *++argv; --argc; } switch (c) { case 'l': l = atoi(s); break; case 'i': i = atof(s); break; case 'j': j = atof(s); break; case 's': st = atof(s); break; case 'n': n = 1; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, c); usage(1); break; } } else fp = getfp(*argv, "rb"); } k = (int) ((j - i) / st + 1.0); h = dgetmem(k + 2); if (l) { x = dgetmem(l); while (freadf(x, sizeof(*x), l, fp) == l) { flg += histogram(x, l, i, j, st, h); if (n && l) for (ii = 0; ii <= k; ii++) h[ii] /= (double) l; fwritef(h, sizeof(*h), k, stdout); } } else { fillz(h, sizeof(*h), k + 2); while (freadf(&xx, sizeof(xx), 1, fp) == 1) { if ((xx < i) || (xx > j)) { flg = 1; } else { for (ii = 0; ii <= k; ii++) { if (xx < i + (ii + 1) * st) { h[ii]++; break; } l++; } } } if (n && l) for (ii = 0; ii <= k; ii++) h[ii] /= (double) l; fwritef(h, sizeof(*h), k, stdout); } return flg; } SPTK-3.9/bin/idct/0000755001051300105040000000000012637167705010652 500000000000000SPTK-3.9/bin/idct/Makefile.am0000644001051300105040000000017212442245055012613 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = idct idct_SOURCES = idct.c idct_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/idct/Makefile.in0000644001051300105040000004240512637167413012640 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = idct$(EXEEXT) subdir = bin/idct ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_idct_OBJECTS = idct.$(OBJEXT) idct_OBJECTS = $(am_idct_OBJECTS) idct_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(idct_SOURCES) DIST_SOURCES = $(idct_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include idct_SOURCES = idct.c idct_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/idct/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/idct/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) idct$(EXEEXT): $(idct_OBJECTS) $(idct_DEPENDENCIES) $(EXTRA_idct_DEPENDENCIES) @rm -f idct$(EXEEXT) $(AM_V_CCLD)$(LINK) $(idct_OBJECTS) $(idct_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idct.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/idct/idct.c0000644001051300105040000002450412637156636011667 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * IDCT : Inverse Discrete Cosine Transform * * * * 2011.4 Akira Tamamori * * * * usage: * * idct [ options ] [ infile ] > stdout * * options: * * -l l : IDCT size [256] * * -c : use complex number [FALSE] * * -d : without using FFT algorithm [FALSE] * * infile: * * stdin for default * * stdout: * * IDCT data sequence * * * ************************************************************************/ static char *rcs_id = "$Id: idct.c,v 1.11 2015/12/14 01:14:15 uratec Exp $"; /* Standard C Libraries */ #include #include #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define SIZE 256 #define DFTMODE FA #define COMPLEX FA char *BOOL[] = { "FALSE", "TRUE" }; /* Command Name */ char *cmnd; /* workspace */ static int dct_table_size = 0; static double *dct_workspace = NULL; static double *pLocalReal = NULL; static double *pLocalImag = NULL; static double *pWeightReal = NULL; static double *pWeightImag = NULL; Boolean dftmode = DFTMODE; int size = SIZE; int usage(void) { fprintf(stderr, "\n"); fprintf(stderr, " %s - Inverse Discrete Cosine Transform\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -l l : IDCT size [%d]\n", SIZE); fprintf(stderr, " -c : use comlex number [FALSE]\n"); fprintf(stderr, " -d : without using FFT algorithm (with DFT) [%s]\n", BOOL[DFTMODE]); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " data sequence (%s) [stdin]\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " IDCT sequence (%s)\n", FORMAT); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(1); } int idct_create_table(const int nSize) { int k; if (nSize == dct_table_size) { /* no need to resize workspace */ return (0); } else { /* release resources to resize workspace */ if (dct_workspace != NULL) { free(dct_workspace); dct_workspace = NULL; } pLocalReal = NULL; pLocalImag = NULL; pWeightReal = NULL; pWeightImag = NULL; } if (nSize <= 0) { dct_table_size = 0; fprintf(stderr, "DCT size must be positive!\n"); return (-1); } else { dct_table_size = nSize; dct_workspace = dgetmem(dct_table_size * 8); pWeightReal = dct_workspace; pWeightImag = dct_workspace + 2 * dct_table_size; pLocalReal = dct_workspace + (4 * dct_table_size); pLocalImag = dct_workspace + (6 * dct_table_size); for (k = 0; k < 2 * dct_table_size; k++) { pWeightReal[k] = cos(k * PI / (2.0 * dct_table_size)) / sqrt(2.0 * dct_table_size); pWeightImag[k] = -sin(k * PI / (2.0 * dct_table_size)) / sqrt(2.0 * dct_table_size); } pWeightReal[0] *= sqrt(2.0); pWeightImag[0] *= sqrt(2.0); } return (0); } int idct(double *pReal, double *pImag, const double *pInReal, const double *pInImag, int PowerOf2) { int k, n; double rtemp, itemp; for (n = 1; n < dct_table_size; n++) { pLocalReal[n] = pInReal[n]; pLocalImag[n] = pInImag[n]; pLocalReal[dct_table_size + n] = -pInReal[dct_table_size - n]; pLocalImag[dct_table_size + n] = -pInImag[dct_table_size - n]; } pLocalReal[0] = pInReal[0]; pLocalImag[0] = pInImag[0]; pLocalReal[dct_table_size] = 0.0; pLocalImag[dct_table_size] = 0.0; /* 1/2 sample shift in the temporal domain */ for (k = 0; k < 2 * dct_table_size; k++) { rtemp = pLocalReal[k]; itemp = pLocalImag[k]; pLocalReal[k] = rtemp * pWeightReal[k] - itemp * pWeightImag[k]; pLocalImag[k] = rtemp * pWeightImag[k] + itemp * pWeightReal[k]; } if (size != PowerOf2 || dftmode) { dft(pLocalReal, pLocalImag, dct_table_size * 2); } else { fft(pLocalReal, pLocalImag, dct_table_size * 2); } for (k = 0; k < dct_table_size; k++) { pReal[k] = pLocalReal[k]; pImag[k] = pLocalImag[k]; } return (0); } int main(int argc, char *argv[]) { char *s, *infile = NULL, c; int i, j, iter, size2; double *x, *y, *pReal, *pImag; FILE *fp; Boolean comp = COMPLEX; if ((cmnd = strrchr(argv[0], '/')) == NULL) { cmnd = argv[0]; } else { cmnd++; } while (--argc) { if (*(s = *++argv) == '-') { c = *++s; if ((c == 'l') && (*++s == '\0')) { s = *++argv; --argc; } switch (c) { case 'l': /* IDCT size */ size = atoi(s); break; case 'c': /* use complex number */ comp = 1 - COMPLEX; break; case 'd': /* IDCT without FFT (DFT) */ dftmode = 1 - dftmode; break; case 'h': default: usage(); } } else { infile = s; } } if (infile) { fp = getfp(infile, "rb"); } else { fp = stdin; } /* memory allocation */ x = dgetmem(size2 = size + size); y = x + size; pReal = dgetmem(size2); pImag = pReal + size; while (!feof(fp)) { fillz(x, size2, sizeof(*x)); if (freadf(x, sizeof(*x), size, fp) == 0) { break; } if (comp) { if (freadf(y, sizeof(*y), size, fp) == 0) { break; } } /* decide wheather 'size' is a power of 2 or not */ for (iter = 0, i = size; (i /= 2) != 0; iter++); for (i = 1, j = 1; i <= iter; i++, j *= 2); /* IDCT-II (DCT-III) routine */ idct_create_table(size); idct(pReal, pImag, (const double *) x, (const double *) y, j); /* output IDCT sequence */ fwritef(pReal, sizeof(*pReal), size, stdout); if (comp) { fwritef(pImag, sizeof(*pImag), size, stdout); } } if (infile) { fclose(fp); } return (0); } SPTK-3.9/bin/ifft/0000755001051300105040000000000012637167705010657 500000000000000SPTK-3.9/bin/ifft/Makefile.am0000644001051300105040000000020312442245056012614 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = ifft ifft_SOURCES = _ifft.c ifft.c ifft_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/ifft/Makefile.in0000644001051300105040000004254312637167413012650 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = ifft$(EXEEXT) subdir = bin/ifft ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_ifft_OBJECTS = _ifft.$(OBJEXT) ifft.$(OBJEXT) ifft_OBJECTS = $(am_ifft_OBJECTS) ifft_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(ifft_SOURCES) DIST_SOURCES = $(ifft_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include ifft_SOURCES = _ifft.c ifft.c ifft_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/ifft/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/ifft/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) ifft$(EXEEXT): $(ifft_OBJECTS) $(ifft_DEPENDENCIES) $(EXTRA_ifft_DEPENDENCIES) @rm -f ifft$(EXEEXT) $(AM_V_CCLD)$(LINK) $(ifft_OBJECTS) $(ifft_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_ifft.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ifft.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/ifft/_ifft.c0000644001051300105040000001003012637156636012025 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /***************************************************************** * $Id: _ifft.c,v 1.21 2015/12/14 01:14:15 uratec Exp $ * * NAME: * * ifft - Inverse Fast Fourier Transform * * SYNOPSIS: * * int ifft(x, y, m) * * * * real x[]; real part * * real y[]; imaginary part * * int m; size of FFT * *****************************************************************/ #include #if defined(WIN32) #include "SPTK.h" #else #include #endif int ifft(double *x, double *y, const int m) { int i; if (fft(y, x, m) == -1) return (-1); for (i = m; --i >= 0; ++x, ++y) { *x /= m; *y /= m; } return (0); } SPTK-3.9/bin/ifft/ifft.c0000644001051300105040000001514512637156636011702 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * Inverse FFT for Complex Sequence * * * * usage: * * ifft [ options ] [ infile ] > stdout * * * * options: * * -l l : FFT size power of 2 [256] * * -R : real part [FALSE] * * -I : imaginary part [FALSE] * * infile: * * stdin for default * * input is assumed to be real * * * ************************************************************************/ static char *rcs_id = "$Id: ifft.c,v 1.29 2015/12/14 01:14:16 uratec Exp $"; /* Standard C Libraries */ #include #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #if defined(WIN32) #include "SPTK.h" #else #include #endif static int size = 256, out = ' '; /* Command Name */ char *cmnd; int usage(void) { fprintf(stderr, "\n"); fprintf(stderr, " %s - inverse FFT for complex sequence\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -l l : FFT size power of 2 [256]\n"); fprintf(stderr, " -R : real part [FALSE]\n"); fprintf(stderr, " -I : imaginary part [FALSE]\n"); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " data sequence (%s) [stdin]\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " IFFT sequence (%s)\n", FORMAT); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(1); } int main(int argc, char *argv[]) { FILE *fp; char *s, *infile = NULL, c; int size2; double *x, *y; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) { if (*(s = *++argv) == '-') { c = *++s; if ((c == 'l') && (*++s == '\0')) { s = *++argv; --argc; } switch (c) { case 'l': size = atoi(s); break; case 'i': case 'r': c -= ('a' - 'A'); case 'I': case 'R': out = c; break; case 'h': default: usage(); } } else infile = s; } fp = stdin; if (infile) { fp = getfp(infile, "rb"); } x = dgetmem(size2 = size + size); y = x + size; while (!feof(fp)) { if (freadf(x, sizeof(*x), size2, fp) != size2) break; ifft(x, y, size); if (out != 'I') fwritef(x, sizeof(*x), size, stdout); if (out != 'R') fwritef(y, sizeof(*y), size, stdout); } if (infile) { fclose(fp); } return (0); } SPTK-3.9/bin/ifftr/0000755001051300105040000000000012637167705011041 500000000000000SPTK-3.9/bin/ifftr/Makefile.am0000644001051300105040000000020712442245060012775 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = ifftr ifftr_SOURCES = _ifftr.c ifftr.c ifftr_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/ifftr/Makefile.in0000644001051300105040000004257312637167413013035 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = ifftr$(EXEEXT) subdir = bin/ifftr ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_ifftr_OBJECTS = _ifftr.$(OBJEXT) ifftr.$(OBJEXT) ifftr_OBJECTS = $(am_ifftr_OBJECTS) ifftr_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(ifftr_SOURCES) DIST_SOURCES = $(ifftr_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include ifftr_SOURCES = _ifftr.c ifftr.c ifftr_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/ifftr/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/ifftr/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) ifftr$(EXEEXT): $(ifftr_OBJECTS) $(ifftr_DEPENDENCIES) $(EXTRA_ifftr_DEPENDENCIES) @rm -f ifftr$(EXEEXT) $(AM_V_CCLD)$(LINK) $(ifftr_OBJECTS) $(ifftr_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_ifftr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ifftr.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/ifftr/_ifftr.c0000644001051300105040000000726312637156636012407 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /*************************************************************** $Id: _ifftr.c,v 1.5 2015/12/14 01:14:16 uratec Exp $ Inverse Fast Fourier Transform for Real Sequence int ifftr(x, y, l) double *x : real part of data double *y : working area int l : number of data(radix 2) ***************************************************************/ #include #if defined(WIN32) #include "SPTK.h" #else #include #endif int ifftr(double *x, double *y, const int l) { int i; double *xp, *yp; fftr(x, y, l); xp = x; yp = y; i = l; while (i--) { *xp++ /= l; *yp++ /= -l; } return (0); } SPTK-3.9/bin/ifftr/ifftr.c0000644001051300105040000001561412637156636012247 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * IFFT for Real Sequence * * * * 2012.8 Akira Tamamori * * * * usage: * * ifftr [ options ] [ infile ] > stdout * * options: * * -l l : FFT size power of 2 [256] * * -m m : order of sequence [l-1] * * infile: * * stdin for default * * input is assumed to be float * * * ************************************************************************/ static char *rcs_id = "$Id: ifftr.c,v 1.4 2015/12/14 01:14:16 uratec Exp $"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #include #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define SIZE 256 /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - IFFT for real sequence\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -l l : FFT size power of 2 [%d]\n", SIZE); fprintf(stderr, " -m m : order of sequence [l-1]\n"); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " FFT sequence (%s) [stdin]\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " data sequence (%s)\n", FORMAT); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char *argv[]) { FILE *fp; char *s, *infile = NULL, c; int size = SIZE, nd = -1, size2; double *x, *y; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) { if (*(s = *++argv) == '-') { c = *++s; if ((c == 'l' || c == 'm') && (*++s == '\0')) { s = *++argv; --argc; } switch (c) { case 'l': size = atoi(s); break; case 'm': nd = atoi(s) + 1; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, c); usage(1); } } else infile = s; } if (nd == -1) nd = size; if (nd > size) { fprintf(stderr, "%s : Order of sequence %d should be less than the FFT size %d!\n", cmnd, nd, size); usage(1); } fp = stdin; if (infile) { fp = getfp(infile, "rb"); } x = dgetmem(size2 = size + size); y = x + size; while (!feof(fp)) { fillz(x, size2, sizeof(*x)); if (freadf(x, sizeof(*x), nd, fp) == 0) break; if (freadf(y, sizeof(*y), nd, fp) == 0) break; ifft(x, y, nd); /* output real sequence */ fwritef(x, sizeof(*x), size, stdout); } if (infile) { fclose(fp); } return (0); } SPTK-3.9/bin/ifft2/0000755001051300105040000000000012637167705010741 500000000000000SPTK-3.9/bin/ifft2/Makefile.am0000644001051300105040000000021012442245057012675 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = ifft2 ifft2_SOURCES = _ifft2.c ifft2.c ifft2_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/ifft2/Makefile.in0000644001051300105040000004257412637167413012736 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = ifft2$(EXEEXT) subdir = bin/ifft2 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_ifft2_OBJECTS = _ifft2.$(OBJEXT) ifft2.$(OBJEXT) ifft2_OBJECTS = $(am_ifft2_OBJECTS) ifft2_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(ifft2_SOURCES) DIST_SOURCES = $(ifft2_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include ifft2_SOURCES = _ifft2.c ifft2.c ifft2_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/ifft2/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/ifft2/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) ifft2$(EXEEXT): $(ifft2_OBJECTS) $(ifft2_DEPENDENCIES) $(EXTRA_ifft2_DEPENDENCIES) @rm -f ifft2$(EXEEXT) $(AM_V_CCLD)$(LINK) $(ifft2_OBJECTS) $(ifft2_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_ifft2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ifft2.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/ifft2/_ifft2.c0000644001051300105040000001160312637156636012200 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /**************************************************************** * $Id: _ifft2.c,v 1.18 2015/12/14 01:14:16 uratec Exp $ * * ifft2 : two dimensional inverse fast Fourier * * transform * * * * int ifft2( x, y, n ) * * * * real x[0]...x[n*n-1]; real part * * real y[0]...y[n*n-1]; imaginary part * * int n; size of IDFT * * * * T. Kobayashi May, 1989. * ****************************************************************/ #include #include #if defined(WIN32) #include "SPTK.h" #else #include #endif int ifft2(double x[], double y[], const int n) { double *xq, *yq; static double *xb = NULL, *yb; double *xp, *yp; int i, j; static int size_f; if (xb == NULL) { size_f = 2 * n; xb = dgetmem(size_f); yb = xb + n; } if (2 * n > size_f) { free(xb); size_f = 2 * n; xb = dgetmem(size_f); yb = xb + n; } for (i = 0; i < n; i++) { xp = xb; xq = x + i; yp = yb; yq = y + i; for (j = n; --j >= 0; xq += n, yq += n) { *xp++ = *xq; *yp++ = *yq; } if (ifft(xb, yb, n) < 0) return (-1); xp = xb; xq = x + i; yp = yb; yq = y + i; for (j = n; --j >= 0; xq += n, yq += n) { *xq = *xp++; *yq = *yp++; } } for (i = n, xp = x, yp = y; --i >= 0; xp += n, yp += n) { if (ifft(xp, yp, n) < 0) return (-1); } return (0); } SPTK-3.9/bin/ifft2/ifft2.c0000644001051300105040000002111112637156636012034 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * 2D Inverse FFT for complex sequence * * * * 1989 T.Kobayashi * * 1996.2 N.Miyazaki modified * * * * usage: * * ifft2 [ options ] [ infile ] > stdout * * options: * * -l l : FFT size power of 2 [64] * * +r : input is real [FALSE] * * -t : transposed output [FALSE] * * -c : compensated boundary [FALSE] * * -q : first quadrant output [FALSE] * * -R : output real part [FALSE] * * -I : output imaginary part [FALSE] * * infile: * * stdin for default * * input is assumed to be complex * * * ************************************************************************/ static char *rcs_id = "$Id: ifft2.c,v 1.28 2015/12/14 01:14:16 uratec Exp $"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #if defined(WIN32) #include "SPTK.h" #else #include #endif static int size = 64, outopt = 0, out = ' ', is_fftr = 0; /* Command Name */ static char *cmnd; int usage(void) { fprintf(stderr, "\n"); fprintf(stderr, " %s - 2D inverse FFT for complex sequence\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -l l : FFT size power of 2 [64]\n"); fprintf(stderr, " +r : input is real [FALSE]\n"); fprintf(stderr, " -t : transposed output [FALSE]\n"); fprintf(stderr, " -c : compensated boundary [FALSE]\n"); fprintf(stderr, " -q : first quadrant output [FALSE]\n"); fprintf(stderr, " -R : output real part [FALSE]\n"); fprintf(stderr, " -I : output imaginary part [FALSE]\n"); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " data sequence (%s) [stdin]\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " IFFT sequence (%s)\n", FORMAT); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(1); } int main(int argc, char *argv[]) { FILE *fp; char *s, *infile = NULL, c; int size2, nread; double *x, *y; void trans(double *p); if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) { if (*(s = *++argv) == '-') { c = *++s; if ((c == 'l') && (*++s == '\0')) { s = *++argv; --argc; } switch (c) { case 'l': size = atoi(s); break; case 't': case 'c': case 'q': if ((c == 't') || (*++s == 't')) outopt = 1; if ((c == 'c') || (*s == 'c')) outopt = 2; if (c == 'q') outopt = -1; break; case 'i': case 'r': c -= ('a' - 'A'); case 'I': case 'R': out = c; break; case 'h': default: usage(); } } else if ((*s == '+') && (*(s + 1) == 'r')) is_fftr = 1 - is_fftr; else infile = s; } fp = stdin; if (infile) { fp = getfp(infile, "rb"); } size2 = size * size; x = dgetmem(2 * size2); y = x + size2; nread = (is_fftr) ? size2 : 2 * size2; while (!feof(fp)) { if (freadf(x, sizeof(*x), nread, fp) != nread) break; if (is_fftr) fillz(y, sizeof(*y), size2 * (sizeof(double) / sizeof(long))); ifft2(x, y, size); if (out != 'I') { if (outopt) trans(x); else fwritef(x, sizeof(*x), size2, stdout); } if (out != 'R') { if (outopt) trans(y); else fwritef(y, sizeof(*y), size2, stdout); } } free(x); if (infile) { fclose(fp); } return (0); } void trans(double *p) { int k, sizeh, nout; double *q; sizeh = size / 2; nout = (outopt == 1) ? sizeh : sizeh + 1; if (outopt > 0) for (q = p + sizeh * size, k = sizeh; --k >= 0; q += size) { fwritef(q + sizeh, sizeof(*p), sizeh, stdout); fwritef(q, sizeof(*p), nout, stdout); } for (q = p, k = nout; --k >= 0; q += size) { if (outopt > 0) fwritef(q + sizeh, sizeof(*p), sizeh, stdout); fwritef(q, sizeof(*p), nout, stdout); } } SPTK-3.9/bin/ignorm/0000755001051300105040000000000012637167705011222 500000000000000SPTK-3.9/bin/ignorm/Makefile.am0000644001051300105040000000021512442245060013155 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = ignorm ignorm_SOURCES = _ignorm.c ignorm.c ignorm_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/ignorm/Makefile.in0000644001051300105040000004262512637167413013214 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = ignorm$(EXEEXT) subdir = bin/ignorm ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_ignorm_OBJECTS = _ignorm.$(OBJEXT) ignorm.$(OBJEXT) ignorm_OBJECTS = $(am_ignorm_OBJECTS) ignorm_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(ignorm_SOURCES) DIST_SOURCES = $(ignorm_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include ignorm_SOURCES = _ignorm.c ignorm.c ignorm_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/ignorm/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/ignorm/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) ignorm$(EXEEXT): $(ignorm_OBJECTS) $(ignorm_DEPENDENCIES) $(EXTRA_ignorm_DEPENDENCIES) @rm -f ignorm$(EXEEXT) $(AM_V_CCLD)$(LINK) $(ignorm_OBJECTS) $(ignorm_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_ignorm.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ignorm.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/ignorm/_ignorm.c0000644001051300105040000000761212637156636012747 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ $Id: _ignorm.c,v 1.19 2015/12/14 01:14:16 uratec Exp $ Inverse Gain Normalization void ignorm(c1, c2, m, g) double *c1 : normalized generalized cepstral coefficients double *c2 : genenralized cepstral coefficients int m : order of coefficients double g : gamma ************************************************************************/ #include #include #if defined(WIN32) #include "SPTK.h" #else #include #endif void ignorm(double *c1, double *c2, int m, const double g) { double k; k = pow(c1[0], g); if (g != 0.0) { for (; m >= 1; m--) c2[m] = k * c1[m]; c2[0] = (k - 1.0) / g; } else { movem(&c1[1], &c2[1], sizeof(*c1), m); c2[0] = log(c1[0]); } return; } SPTK-3.9/bin/ignorm/ignorm.c0000644001051300105040000001641512637156636012611 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * Inverse Gain Normalization * * 1995.11 T.Masuko * * * * usage: * * ignorm [ options ] [ infile ] > stdout * * options: * * -m m : order of generalized cepstrum [25] * * -g g : gamma [0] * * -c c : gamma = -1 / (int) c * * infile: * * normalized generalized cepstral coefficients * * , K, c'(1), ..., c'(M), * * stdout: * * generalized cepstral coefficients * * , c~(0), c~(1), ..., c~(M), * * notice: * * value of c must be c>=1 * * require: * * ignorm(), * * * ************************************************************************/ static char *rcs_id = "$Id: ignorm.c,v 1.28 2015/12/14 01:14:16 uratec Exp $"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define GAMMA 0.0 #define ORDER 25 /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - inverse gain normalization\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -m m : order of generalized cepstrum [%d]\n", ORDER); fprintf(stderr, " -g g : gamma [%g]\n", GAMMA); fprintf(stderr, " -c c : gamma = -1 / (int) c \n"); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " normalized generalized cepstrum (%s) [stdin]\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " generalized cepstrum (%s)\n", FORMAT); fprintf(stderr, " notice:\n"); fprintf(stderr, " value of c must be c>=1\n"); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char **argv) { double g = GAMMA, *c; int m = ORDER; FILE *fp = stdin; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) if (**++argv == '-') { switch (*(*argv + 1)) { case 'g': g = atof(*++argv); --argc; break; case 'c': g = atoi(*++argv); --argc; if (g < 1) fprintf(stderr, "%s : value of c must be c>=1!\n", cmnd); g = -1.0 / g; break; case 'm': m = atoi(*++argv); --argc; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else fp = getfp(*argv, "rb"); c = dgetmem(m + 1); while (freadf(c, sizeof(*c), m + 1, fp) == m + 1) { ignorm(c, c, m, g); fwritef(c, sizeof(*c), m + 1, stdout); } return (0); } SPTK-3.9/bin/impulse/0000755001051300105040000000000012637167705011405 500000000000000SPTK-3.9/bin/impulse/Makefile.am0000644001051300105040000000020712442245061013342 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = impulse impulse_SOURCES = impulse.c impulse_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/impulse/Makefile.in0000644001051300105040000004251012637167413013370 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = impulse$(EXEEXT) subdir = bin/impulse ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_impulse_OBJECTS = impulse.$(OBJEXT) impulse_OBJECTS = $(am_impulse_OBJECTS) impulse_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(impulse_SOURCES) DIST_SOURCES = $(impulse_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include impulse_SOURCES = impulse.c impulse_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/impulse/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/impulse/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) impulse$(EXEEXT): $(impulse_OBJECTS) $(impulse_DEPENDENCIES) $(EXTRA_impulse_DEPENDENCIES) @rm -f impulse$(EXEEXT) $(AM_V_CCLD)$(LINK) $(impulse_OBJECTS) $(impulse_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/impulse.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/impulse/impulse.c0000644001051300105040000001464012637156636013155 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * Generate Impulse Sequence * * * * 1996.4 K.Koishida * * * * usage: * * impulse [options] > stdout * * options: * * -l l : length [256] * * -n n : order [255] * * stdout: * * impulse sequence * * , 1, 0, 0, ... * * notice: * * if l<0, generate infinite sequence * * * ************************************************************************/ static char *rcs_id = "$Id: impulse.c,v 1.24 2015/12/14 01:14:16 uratec Exp $"; /* Standard C Libralies */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define LENG 256 /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - generate impulse sequence\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -l l : length [%d]\n", LENG); fprintf(stderr, " -n n : order [%d]\n", LENG - 1); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " stdout:\n"); fprintf(stderr, " impulse sequence (%s)\n", FORMAT); fprintf(stderr, " notice:\n"); fprintf(stderr, " if l<0, generate infinite sequence\n"); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char **argv) { int l = LENG, i; double x = 1.0, y = 0.0; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) if (**++argv == '-') { switch (*(*argv + 1)) { case 'l': l = atoi(*++argv); --argc; break; case 'n': l = atoi(*++argv) + 1; --argc; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } if (l == 0) return (0); else fwritef(&x, sizeof(x), 1, stdout); for (i = 0;; i++) { if (i == l - 1) break; fwritef(&y, sizeof(y), 1, stdout); } return (0); } SPTK-3.9/bin/imsvq/0000755001051300105040000000000012637167705011066 500000000000000SPTK-3.9/bin/imsvq/Makefile.am0000644001051300105040000000021012442245062013016 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = imsvq imsvq_SOURCES = _imsvq.c imsvq.c imsvq_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/imsvq/Makefile.in0000644001051300105040000004257412637167413013063 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = imsvq$(EXEEXT) subdir = bin/imsvq ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_imsvq_OBJECTS = _imsvq.$(OBJEXT) imsvq.$(OBJEXT) imsvq_OBJECTS = $(am_imsvq_OBJECTS) imsvq_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(imsvq_SOURCES) DIST_SOURCES = $(imsvq_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include imsvq_SOURCES = _imsvq.c imsvq.c imsvq_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/imsvq/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/imsvq/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) imsvq$(EXEEXT): $(imsvq_OBJECTS) $(imsvq_DEPENDENCIES) $(EXTRA_imsvq_DEPENDENCIES) @rm -f imsvq$(EXEEXT) $(AM_V_CCLD)$(LINK) $(imsvq_OBJECTS) $(imsvq_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_imsvq.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imsvq.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/imsvq/_imsvq.c0000644001051300105040000001023212637156636012447 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /**************************************************************** $Id: _imsvq.c,v 1.18 2015/12/14 01:14:16 uratec Exp $ Decoder of Multi Stage Vector Quantization imsvq(index, cb, l, cbsize, stage, x) int *index : index of codebook real *cb : codebook vector int l : order of vector int *cbsize : size of codebook int stage : number of stage real *x : decoded vector *****************************************************************/ #include #include #if defined(WIN32) #include "SPTK.h" #else #include #endif void imsvq(int *index, double *cb, const int l, int *cbsize, const int stage, double *x) { int i, j; static double *xx = NULL; static int size; if (xx == NULL) { xx = dgetmem(l); size = l; } if (size > l) { free(xx); xx = dgetmem(l); size = l; } fillz(x, sizeof(*x), l); for (i = 0; i < stage; i++) { ivq(index[i], cb, l, xx); for (j = 0; j < l; j++) x[j] += xx[j]; cb += cbsize[i] * l; } return; } SPTK-3.9/bin/imsvq/imsvq.c0000644001051300105040000002033312637156637012314 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * Decoder of Multi Stage Vector Quantization * * * * 1996.1 K.Koishida * * * * usage: * * imsvq [options] [ infile ] > stdout * * options: * * -l l : length of vector [26] * * -n n : order of vector [25] * * -s s f : codebook [N/A N/A] * * s : codebook size * * f : codebook file * * infile: * * codebook index (int) * * index(0), index(1), ..., index(N), * * stdout: * * quantized vector * * x'(0), x'(1), ..., x'(l-1), * * notice: * * -s option are specified number of stages * * require: * * imsvq(), ivq() * * * ************************************************************************/ static char *rcs_id = "$Id: imsvq.c,v 1.23 2015/12/14 01:14:16 uratec Exp $"; /* Standard C Libraries */ #include #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define LENG 26 /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - decoder of multi stage vector quantization \n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -l l : length of vector [%d]\n", LENG); fprintf(stderr, " -n n : order of vector [%d]\n", LENG - 1); fprintf(stderr, " -s s f : codebook [N/A N/A]\n"); fprintf(stderr, " s: codebook size\n"); fprintf(stderr, " f: codebook file\n"); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " stdin:\n"); fprintf(stderr, " index (int)\n"); fprintf(stderr, " stdout:\n"); fprintf(stderr, " quantized vectors (%s)\n", FORMAT); fprintf(stderr, " codebook file:\n"); fprintf(stderr, " codebook (%s)\n", FORMAT); fprintf(stderr, " notice:\n"); fprintf(stderr, " -s option are specified number of stages\n"); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char **argv) { int l = LENG, *cbsize, *index, stage = 0, ss = 0, num, i; FILE *fp = stdin, *fpcb; double *x, *cb = NULL, *p; char **cbfile; cbsize = (int *) calloc(argc / 2, sizeof(*cbsize)); index = (int *) calloc(argc / 2, sizeof(*index)); cbfile = (char **) calloc(argc / 2, sizeof(**cbfile)); p = cb; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) if (**++argv == '-') { switch (*(*argv + 1)) { case 'l': l = atoi(*++argv); --argc; break; case 'n': l = atoi(*++argv) + 1; --argc; break; case 's': cbsize[stage] = atoi(*++argv); cbfile[stage++] = *++argv; argc -= 2; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else fp = getfp(*argv, "rb"); for (i = 0, num = 0; i < stage; i++) num += cbsize[i]; cb = dgetmem(num * l); p = cb; for (i = 0; i < stage; i++) { fpcb = getfp(cbfile[i], "rb"); if (freadf(p, sizeof(*p), cbsize[i] * l, fpcb) != cbsize[i] * l) { fprintf(stderr, "%s : Codebook size error of %d stage!\n", cmnd, ss); return (1); } p += cbsize[i] * l; } x = dgetmem(l); while (freadx(index, sizeof(*index), stage, fp) == stage) { imsvq(index, cb, l, cbsize, stage, x); fwritef(x, sizeof(*x), l, stdout); } return (0); } SPTK-3.9/bin/interpolate/0000755001051300105040000000000012637167705012255 500000000000000SPTK-3.9/bin/interpolate/Makefile.am0000644001051300105040000000022712442245062014215 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = interpolate interpolate_SOURCES = interpolate.c interpolate_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/interpolate/Makefile.in0000644001051300105040000004264012637167413014244 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = interpolate$(EXEEXT) subdir = bin/interpolate ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_interpolate_OBJECTS = interpolate.$(OBJEXT) interpolate_OBJECTS = $(am_interpolate_OBJECTS) interpolate_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(interpolate_SOURCES) DIST_SOURCES = $(interpolate_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include interpolate_SOURCES = interpolate.c interpolate_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/interpolate/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/interpolate/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) interpolate$(EXEEXT): $(interpolate_OBJECTS) $(interpolate_DEPENDENCIES) $(EXTRA_interpolate_DEPENDENCIES) @rm -f interpolate$(EXEEXT) $(AM_V_CCLD)$(LINK) $(interpolate_OBJECTS) $(interpolate_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/interpolate.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/interpolate/interpolate.c0000644001051300105040000002001412637156637014666 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * Interpolation of data sequence * * * * 1996.4 K.Koishida * * * * usage: * * interpolate [ options ] [ infile ] > stdout * * options: * * -l l : length of vector [1] * * -p p : interpolation period [10] * * -s s : start sample [0] * * infile: * * data sequence * * , x(0), x(1), ... * * stdout: * * decimated data * * * * if -d is not specified (default) * * , 0, ..., 0, x(0), 0, ..., x(1), 0, ..., * * --------- ---------- ------------- * * s-1 p p * * * * otherwise, * * , 0, ..., 0, x(0), x(0), ..., x(1), x(1), ..., * * --------- ---------- ---------------- * * s-1 p p * * * ************************************************************************/ static char *rcs_id = "$Id: interpolate.c,v 1.29 2015/12/14 01:14:16 uratec Exp $"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define PERIOD 10 #define START 0 #define PADINPUT FA #define LENG 1 char *BOOL[] = { "FALSE", "TRUE" }; /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - interpolation of data sequence\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -l l : length of vector [%d]\n", LENG); fprintf(stderr, " -p p : interpolation period [%d]\n", PERIOD); fprintf(stderr, " -s s : start sample [%d]\n", START); fprintf(stderr, " -d : padding input rather than 0 [%s]\n", BOOL[PADINPUT]); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " data sequence (%s) [stdin]\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " interpolated data sequence (%s)\n", FORMAT); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char **argv) { int i, j = 0, period = PERIOD, start = START, fleng = LENG; FILE *fp = stdin; double *x; Boolean padinput = PADINPUT; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) if (**++argv == '-') { switch (*(*argv + 1)) { case 'p': period = atoi(*++argv); --argc; break; case 's': start = atoi(*++argv); --argc; break; case 'l': fleng = atoi(*++argv); --argc; break; case 'd': padinput = 1 - padinput; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else fp = getfp(*argv, "rb"); x = dgetmem(period * fleng); fwritef(x, sizeof(*x), start * fleng, stdout); while (freadf(x, sizeof(*x), fleng, fp) == fleng) { if (padinput) { for (i = fleng; i < period * fleng; i++) { if (j >= fleng) j = 0; x[i] = x[j]; j++; } } fwritef(x, sizeof(*x), period * fleng, stdout); } return (0); } SPTK-3.9/bin/ivq/0000755001051300105040000000000012637167705010526 500000000000000SPTK-3.9/bin/ivq/Makefile.am0000644001051300105040000000017612442245063012472 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = ivq ivq_SOURCES = _ivq.c ivq.c ivq_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/ivq/Makefile.in0000644001051300105040000004251212637167413012513 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = ivq$(EXEEXT) subdir = bin/ivq ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_ivq_OBJECTS = _ivq.$(OBJEXT) ivq.$(OBJEXT) ivq_OBJECTS = $(am_ivq_OBJECTS) ivq_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(ivq_SOURCES) DIST_SOURCES = $(ivq_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include ivq_SOURCES = _ivq.c ivq.c ivq_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/ivq/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/ivq/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) ivq$(EXEEXT): $(ivq_OBJECTS) $(ivq_DEPENDENCIES) $(EXTRA_ivq_DEPENDENCIES) @rm -f ivq$(EXEEXT) $(AM_V_CCLD)$(LINK) $(ivq_OBJECTS) $(ivq_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_ivq.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ivq.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/ivq/_ivq.c0000644001051300105040000000722512637156637011560 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /**************************************************************** $Id: _ivq.c,v 1.18 2015/12/14 01:14:16 uratec Exp $ Decoder of Vector Quantization void ivq(index, cb, l, x) int index : index of codebook double *cb : codebook vector int l : vector order double *x : decoded vector *****************************************************************/ #include #if defined(WIN32) #include "SPTK.h" #else #include #endif void ivq(const int index, double *cb, const int l, double *x) { movem((cb + index * l), x, sizeof(*cb), l); return; } SPTK-3.9/bin/ivq/ivq.c0000644001051300105040000001637012637156637011422 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * Decoder of Vector Quantization * * * * 1996.1 K.Koishida * * * * usage: * * ivq [ options ] cbfile [ infile ] > stdout * * options: * * -l l : length of vector [26] * * -n n : order of vector [25] * * infile: * * codebook index (int) * * stdout: * * quantized vector * * x'(0), x'(1), ..., x'(l-1), * * require: * * ivq() * * * ************************************************************************/ static char *rcs_id = "$Id: ivq.c,v 1.24 2015/12/14 01:14:16 uratec Exp $"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define LENG 26 #define CBSIZE 256 /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - decoder of vector quantization \n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] cbfile [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -l l : length of vector [%d]\n", LENG); fprintf(stderr, " -n n : order of vector [%d]\n", LENG - 1); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " index (int) [stdin]\n"); fprintf(stderr, " stdout:\n"); fprintf(stderr, " quantized vector (%s)\n", FORMAT); fprintf(stderr, " cbfile:\n"); fprintf(stderr, " codebook (%s)\n", FORMAT); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char **argv) { int l = LENG, cbsize = CBSIZE, index; FILE *fp = stdin, *fpcb = NULL; double *x, *cb; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) if (**++argv == '-') { switch (*(*argv + 1)) { case 'l': l = atoi(*++argv); --argc; break; case 'n': l = atoi(*++argv) + 1; --argc; break; case 's': cbsize = atoi(*++argv); --argc; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else if (fpcb == NULL) fpcb = getfp(*argv, "rb"); else fp = getfp(*argv, "rb"); fseek(fpcb, 0, 2); #ifdef DOUBLE cbsize = ftell(fpcb) / sizeof(double) / l; #else cbsize = ftell(fpcb) / sizeof(float) / l; #endif /* DOUBLE */ rewind(fpcb); x = dgetmem(l + cbsize * l); cb = x + l; if (freadf(cb, sizeof(*cb), cbsize * l, fpcb) != cbsize * l) { fprintf(stderr, "%s : Codebook size error!\n", cmnd); return (1); } while (freadx(&index, sizeof(index), 1, fp) == 1) { ivq(index, cb, l, x); fwritef(x, sizeof(*x), l, stdout); } return (0); } SPTK-3.9/bin/lbg/0000755001051300105040000000000012637167706010474 500000000000000SPTK-3.9/bin/lbg/Makefile.am0000644001051300105040000000017612442245063012437 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = lbg lbg_SOURCES = _lbg.c lbg.c lbg_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/lbg/Makefile.in0000644001051300105040000004251212637167414012461 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = lbg$(EXEEXT) subdir = bin/lbg ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_lbg_OBJECTS = _lbg.$(OBJEXT) lbg.$(OBJEXT) lbg_OBJECTS = $(am_lbg_OBJECTS) lbg_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(lbg_SOURCES) DIST_SOURCES = $(lbg_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include lbg_SOURCES = _lbg.c lbg.c lbg_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/lbg/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/lbg/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) lbg$(EXEEXT): $(lbg_OBJECTS) $(lbg_DEPENDENCIES) $(EXTRA_lbg_DEPENDENCIES) @rm -f lbg$(EXEEXT) $(AM_V_CCLD)$(LINK) $(lbg_OBJECTS) $(lbg_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_lbg.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lbg.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/lbg/_lbg.c0000644001051300105040000002011512637156637011463 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /********************************************************************************************** $Id: _lbg.c,v 1.22 2015/12/14 01:14:16 uratec Exp $ LBG Algorithm for Vector Quantizer Design void lbg(x, l, tnum, icb, icbsize, cb, ecbsize, iter, mintnum, seed, centup, delta, end) double *x : training vector double l : length of vector int tnum : number of training vector double *icb : initial codebook int icbsize : initial codebook size double *cb : final codebook int ecbsize : final codebook size int iter : maximum number of iteration for centroid update int mintnum : minimum number of training vectors for each cell int seed : seed for normalized random vector int centup : type of exception procedure for centroid update double delta : splitting factor double end : end condition ***********************************************************************************************/ #include #include #if defined(WIN32) #include "SPTK.h" #else #include #endif #define MAXVALUE 1e23 #define SEED 1 #define abs(x) ( (x<0) ? (-(x)) : (x) ) void lbg(double *x, const int l, const int tnum, double *icb, int icbsize, double *cb, const int ecbsize, const int iter, const int mintnum, const int seed, const int centup, const double delta, const double end) { int i, j, k, it, maxindex, tnum1, tnum2; static int *cntcb, *tindex, size, sizex, sizecb; unsigned long next = SEED; double d0, d1, dl, err, tmp, rand; static double *cb1 = NULL; double *p, *q, *r; if (cb1 == NULL) { cb1 = dgetmem(ecbsize * l); tindex = (int *) dgetmem(tnum); cntcb = (int *) dgetmem(ecbsize); size = l; sizex = tnum; sizecb = ecbsize; } if (l > size) { free(cb1); cb1 = dgetmem(ecbsize * l); size = l; } if (tnum > sizex) { free(tindex); tindex = (int *) dgetmem(tnum); sizex = tnum; } if (sizecb > ecbsize) { free(cb1); free(cntcb); cb1 = dgetmem(ecbsize * l); cntcb = (int *) dgetmem(ecbsize); } movem(icb, cb, sizeof(*icb), icbsize * l); if (seed != 1) next = srnd((unsigned int) seed); for (; icbsize * 2 <= ecbsize;) { q = cb; r = cb + icbsize * l; for (i = 0; i < icbsize; i++) { for (j = 0; j < l; j++) { dl = delta * nrandom(&next); *r = *q - dl; r++; *q = *q + dl; q++; } } icbsize *= 2; d0 = MAXVALUE; for (it = 1; it <= iter; it++) { fillz((double *) cntcb, sizeof(*cntcb), icbsize); d1 = 0.0; p = x; for (i = 0; i < tnum; i++, p += l) { tindex[i] = vq(p, cb, l, icbsize); cntcb[tindex[i]]++; q = cb + tindex[i] * l; d1 += edist(p, q, l); } d1 /= tnum; err = abs((d0 - d1) / d1); if (err < end) break; d0 = d1; fillz(cb1, sizeof(*cb), icbsize * l); p = x; for (i = 0; i < tnum; i++) { q = cb1 + tindex[i] * l; for (j = 0; j < l; j++) *q++ += *p++; } k = maxindex = 0; for (i = 0; i < icbsize; i++) if (cntcb[i] > k) { k = cntcb[i]; maxindex = i; } q = cb; r = cb1; for (i = 0; i < icbsize; i++, r += l, q += l) if (cntcb[i] >= mintnum) for (j = 0; j < l; j++) q[j] = r[j] / (double) cntcb[i]; else { if (centup == 1) { p = cb + maxindex * l; for (j = 0; j < l; j++) { rand = nrandom(&next); q[j] = p[j] + delta * rand; p[j] = p[j] - delta * rand; } } else if (centup == 2) { if (i < icbsize / 2) { p = q + icbsize / 2 * l; tnum1 = cntcb[i]; tnum2 = cntcb[i + icbsize / 2]; for (j = 0; j < l; j++) { tmp = (tnum2 * q[j] + tnum1 * p[j]) / (tnum1 + tnum2); rand = nrandom(&next); q[j] = tmp + delta * rand; p[j] = tmp - delta * rand; } } else { p = q - icbsize / 2 * l; tnum1 = cntcb[i]; tnum2 = cntcb[i - icbsize / 2]; for (j = 0; j < l; j++) { tmp = (tnum2 * q[j] + tnum1 * p[j]) / (tnum1 + tnum2); rand = nrandom(&next); q[j] = tmp + delta * rand; p[j] = tmp - delta * rand; } } } } } if (icbsize == ecbsize) break; } return; } SPTK-3.9/bin/lbg/lbg.c0000644001051300105040000003404112637156637011327 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /****************************************************************************** * * * LBG Algorithm for Vector Quantizer Design * * * * 1996. 4 K.Koishida * * 2010. 8 A.Tamamori * * * * usage: * * lbg [ options ] [ indexfile ] < stdin > stdout * * options: * * -l l : length of vector [26] * * -n n : order of vector [25] * * -s s : initial codebook size [1] * * -e e : final codebook size [256] * * -F F : initial codebook filename [NULL] * * -i i : maximum number of iteration [1000] * * -m m : minimum num. of training [NULL] * * vectors for each cell [1] * * -S S : seed for each centroid [NULL] * * -c c : type of exception procedure [1] * * for centroid update * * c = 1 : split the centroid * * with most train. vector * * c = 2 : split the vector which * * internally divide two * * centroids sharing the * * same parent centroid. * * (level 2) * * -d d : end condition [0.0001] * * -r r : splitting factor [0.0001] * * infile: * * training vector (stdin) * * x(0), x(1), ... x(t*l-1) * * stdout: * * trained codebook * * cb'(0), cb'(1), ... cb(l*e-1) * * ifile: (if s>1) * * initial codebook (cbfile) * * cb(0), cb(1), ... cb(l*s-1) * * indexfile: * * VQ index of training vector (int) * * index(0), index(1), ... index(t-1) * * sfile: * * seq. of seed given to each centroid (int) * * seed(0), seed(1), ... , seed(e-1) * * notice: * * codebook size (s and e) must be power of 2 * * -t option can be omitted, when input from redirect * * require: * * lbg(), vq() * * * ******************************************************************************/ static char *rcs_id = "$Id: lbg.c,v 1.31 2015/12/14 01:14:16 uratec Exp $"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define LENG 26 #define TNUMBER -1 #define ICBSIZE 1 #define ECBSIZE 256 #define DELTA 0.0001 #define END 0.0001 #define MINTRAIN 1 #define SEED 1 #define CENTUP 1 #define ITER 1000 #define MAXVALUE 1e23 #define abs(x) ( (x<0) ? (-(x)) : (x) ) /* Command Name */ char *cmnd; typedef struct _float_list { float *f; struct _float_list *next; } float_list; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - LBG algorithm for vector quantizer design \n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ ifile ]stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -l l : length of vector [%d]\n", LENG); fprintf(stderr, " -n n : order of vector [%d]\n", LENG - 1); fprintf(stderr, " -s s : initial codebook size [%d]\n", ICBSIZE); fprintf(stderr, " -e e : final codebook size [%d]\n", ECBSIZE); fprintf(stderr, " -F F : initial codebook filename [NULL]\n"); fprintf(stderr, " -i i : maximum number of iteration for centroid update [%d]\n", ITER); fprintf(stderr, " -m m : minimum number of training vectors for each cell [%d]\n", MINTRAIN); fprintf(stderr, " -S S : seed for each centroid [%d]\n", SEED); fprintf(stderr, " -c c : type of exception procedure for centorid update [%d]\n", CENTUP); fprintf(stderr, " c = 1 : split the centroid with most training vector\n"); fprintf(stderr, " c = 2 : split the vector which internally divide \n"); fprintf(stderr, " the two centroids sharing the same parent\n"); fprintf(stderr, " centroids\n"); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " (level 2)\n"); fprintf(stderr, " -d d : end condition [%g]\n", END); fprintf(stderr, " -r r : splitting factor [%g]\n", DELTA); fprintf(stderr, " stdin:\n"); fprintf(stderr, " data sequence (%s)\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " codebook (%s)\n", FORMAT); fprintf(stderr, " ifile:\n"); fprintf(stderr, " index (int)\n"); fprintf(stderr, " notice:\n"); fprintf(stderr, " codebook size (s and e) must be power of 2\n"); fprintf(stderr, " -t option can be omitted, when input from redirect\n"); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char **argv) { int l = LENG, icbsize = ICBSIZE, ecbsize = ECBSIZE, iter = ITER, tnum = TNUMBER, seed = SEED, csize, i, j, *tindex, mintnum = MINTRAIN, centup = CENTUP; FILE *fp = stdin, *fpi = NULL, *fpcb = NULL; double delta = DELTA, minerr = END, *x, *cb, *icb; double *p; float_list *top, *cur, *prev, *tmpf, *tmpff; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) if (**++argv == '-') { switch (*(*argv + 1)) { case 'l': l = atoi(*++argv); --argc; break; case 'n': l = atoi(*++argv) + 1; --argc; break; case 's': icbsize = atoi(*++argv); --argc; break; case 'e': ecbsize = atoi(*++argv); --argc; break; case 'd': minerr = atof(*++argv); --argc; break; case 'r': delta = atof(*++argv); --argc; break; case 'F': fpcb = getfp(*++argv, "rb"); --argc; break; case 'm': mintnum = atoi(*++argv); --argc; break; case 'S': seed = atoi(*++argv); --argc; break; case 'c': centup = atoi(*++argv); --argc; break; case 'i': iter = atoi(*++argv); --argc; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else fpi = getfp(*argv, "wb"); /* -- Count number of input vectors and read -- */ x = dgetmem(l); top = prev = (float_list *) malloc(sizeof(float_list)); top->f = fgetmem(l); tnum = 0; prev->next = NULL; while (freadf(x, sizeof(*x), l, fp) == l) { cur = (float_list *) malloc(sizeof(float_list)); cur->f = fgetmem(l); for (i = 0; i < l; i++) { cur->f[i] = (float) x[i]; } tnum++; prev->next = cur; cur->next = NULL; prev = cur; } free(x); x = dgetmem(tnum * l); for (i = 0, tmpf = top->next; tmpf != NULL; i++, tmpf = tmpff) { for (j = 0; j < l; j++) { x[i * l + j] = tmpf->f[j]; } tmpff = tmpf->next; free(tmpf->f); free(tmpf); } free(top); csize = ecbsize * l; cb = dgetmem(csize); if (icbsize == 1) { icb = dgetmem(l); fillz(icb, sizeof(*icb), l); for (i = 0, p = x; i < tnum; i++) for (j = 0; j < l; j++) icb[j] += *p++; for (j = 0; j < l; j++) icb[j] /= (double) tnum; } else { icb = dgetmem(icbsize * l); if (fpcb == NULL) { fprintf(stderr, "%s : initial codebook filename must be specified!\n", cmnd); return (1); } if (freadf(icb, sizeof(*icb), icbsize * l, fpcb) != icbsize * l) { fprintf(stderr, "%s : Size error of initial codebook!\n", cmnd); return (1); } } lbg(x, l, tnum, icb, icbsize, cb, ecbsize, iter, mintnum, seed, centup, delta, minerr); fwritef(cb, sizeof(*cb), csize, stdout); if (fpi != NULL) { tindex = (int *) dgetmem(tnum); for (i = 0, p = x; i < tnum; i++, p += l) tindex[i] = vq(p, cb, l, ecbsize); fwritex(tindex, sizeof(*tindex), tnum, fpi); } return (0); } SPTK-3.9/bin/levdur/0000755001051300105040000000000012637167706011231 500000000000000SPTK-3.9/bin/levdur/Makefile.am0000644001051300105040000000021512442245064013167 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = levdur levdur_SOURCES = _levdur.c levdur.c levdur_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/levdur/Makefile.in0000644001051300105040000004262512637167414013223 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = levdur$(EXEEXT) subdir = bin/levdur ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_levdur_OBJECTS = _levdur.$(OBJEXT) levdur.$(OBJEXT) levdur_OBJECTS = $(am_levdur_OBJECTS) levdur_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(levdur_SOURCES) DIST_SOURCES = $(levdur_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include levdur_SOURCES = _levdur.c levdur.c levdur_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/levdur/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/levdur/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) levdur$(EXEEXT): $(levdur_OBJECTS) $(levdur_DEPENDENCIES) $(EXTRA_levdur_DEPENDENCIES) @rm -f levdur$(EXEEXT) $(AM_V_CCLD)$(LINK) $(levdur_OBJECTS) $(levdur_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_levdur.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/levdur.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/levdur/_levdur.c0000644001051300105040000001166412637156637012766 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /**************************************************************** $Id: _levdur.c,v 1.22 2015/12/14 01:14:17 uratec Exp $ Solve an Autocorrelation Normal Equation Using Levinson-Durbin Method int levdur(r, a, m, eps); double *r : autocorrelation sequence double *a : LP coefficients int m : order of LPC double eps : singular check (eps(if -1., 1.0e-6 is assumed)) return value : 0 -> normally completed -1 -> abnormally completed -2 -> unstable LPC ******************************************************************/ #include #include #include #if defined(WIN32) #include "SPTK.h" #else #include #endif int levdur(double *r, double *a, const int m, double eps) { int l, k, flag = 0; double rmd, mue; static double *c = NULL; static int size; if (c == NULL) { c = dgetmem(m + 1); size = m; } if (m > size) { free(c); c = dgetmem(m + 1); size = m; } if (eps < 0.0) eps = 1.0e-6; rmd = r[0]; #ifdef WIN32 if ((((rmd < 0.0) ? -rmd : rmd) <= eps) || _isnan(rmd)) return (-1); #else if ((((rmd < 0.0) ? -rmd : rmd) <= eps) || isnan(rmd)) return (-1); #endif a[0] = 0.0; for (l = 1; l <= m; l++) { mue = -r[l]; for (k = 1; k < l; k++) mue -= c[k] * r[l - k]; mue = mue / rmd; for (k = 1; k < l; k++) a[k] = c[k] + mue * c[l - k]; a[l] = mue; rmd = (1.0 - mue * mue) * rmd; #ifdef WIN32 if ((((rmd < 0.0) ? -rmd : rmd) <= eps) || _isnan(rmd)) return (-1); #else if ((((rmd < 0.0) ? -rmd : rmd) <= eps) || isnan(rmd)) return (-1); #endif if (((mue < 0.0) ? -mue : mue) >= 1.0) flag = -2; for (k = 0; k <= l; k++) c[k] = a[k]; } a[0] = sqrt(rmd); return (flag); } SPTK-3.9/bin/levdur/levdur.c0000644001051300105040000001621712637156637012626 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * Solve an Autocorrelation Normal Equation * * Using Levinson-Durbin Method * * * * 1987.9 K.Tokuda * * 1996.1 K.Koishida * * * * usage: * * levdur [ options ] [ infile ] > stdout * * options: * * -m m : order of correlation [25] * * -f f : mimimum value of the determinant * * of the normal matrix [0.000001] * * infile: * * autocorrelation * * , r(0), r(1), ..., r(m), * * stdout: * * LP Coefficeints * * , K, a(1), ..., a(m), * * require: * * levdur() * * * ************************************************************************/ static char *rcs_id = "$Id: levdur.c,v 1.27 2015/12/14 05:34:34 uratec Exp $"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define ORDER 25 #define MINDET 0.000001 /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - solve an autocorrelation normal equation\n", cmnd); fprintf(stderr, " using Levinson-Durbin method\n"); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -m m : order of correlation [%d]\n", ORDER); fprintf(stderr, " -f f : mimimum value of the determinant [%g]\n", MINDET); fprintf(stderr, " of the normal matrix\n"); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " autocorrelation (%s) [stdin]\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " LP coefficients (%s)\n", FORMAT); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char **argv) { int m = ORDER; FILE *fp = stdin; double *r, *a, f = MINDET; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) if (**++argv == '-') { switch (*(*argv + 1)) { case 'm': m = atoi(*++argv); --argc; break; case 'f': f = atof(*++argv); --argc; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else fp = getfp(*argv, "rb"); a = dgetmem(m + m + 2); r = a + m + 1; while (freadf(r, sizeof(*r), m + 1, fp) == m + 1) { levdur(r, a, m, f); fwritef(a, sizeof(*a), m + 1, stdout); } return (0); } SPTK-3.9/bin/linear_intpl/0000755001051300105040000000000012637167706012410 500000000000000SPTK-3.9/bin/linear_intpl/Makefile.am0000644001051300105040000000023312442245064014346 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = linear_intpl linear_intpl_SOURCES = linear_intpl.c linear_intpl_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/linear_intpl/Makefile.in0000644001051300105040000004266612637167414014407 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = linear_intpl$(EXEEXT) subdir = bin/linear_intpl ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_linear_intpl_OBJECTS = linear_intpl.$(OBJEXT) linear_intpl_OBJECTS = $(am_linear_intpl_OBJECTS) linear_intpl_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(linear_intpl_SOURCES) DIST_SOURCES = $(linear_intpl_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include linear_intpl_SOURCES = linear_intpl.c linear_intpl_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/linear_intpl/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/linear_intpl/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) linear_intpl$(EXEEXT): $(linear_intpl_OBJECTS) $(linear_intpl_DEPENDENCIES) $(EXTRA_linear_intpl_DEPENDENCIES) @rm -f linear_intpl$(EXEEXT) $(AM_V_CCLD)$(LINK) $(linear_intpl_OBJECTS) $(linear_intpl_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/linear_intpl.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/linear_intpl/linear_intpl.c0000644001051300105040000002031512637156637015156 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * Linear Interpolation of Data * * * * 1987.1 K.Tokuda * * 1996.4 K.Koishida * * * * usage: * * linear-intpl [ options ] [ infile ] > stdout * * options: * * -l l : output length [256] * * -m m : number of interpolation [255] * * -x xmin xmax : minimum of x & maximum of x [0.0 0.5] * * -i xmin : minimum of x [0] * * -j xmax : maximum of x [0.5] * * infile: * * data sequence * * , x0, y0, x1, y1..., xK, yK * * (x0 = xmin, xk = xmax) * * stdout: * * interpolated data * * , y0, ..., yn * * * ************************************************************************/ static char *rcs_id = "$Id: linear_intpl.c,v 1.27 2015/12/14 01:14:17 uratec Exp $"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define LENG 255 #define MIN 0.0 #define MAX 0.5 /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - linear interpolation of data\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -l l : output length [%d]\n", LENG + 1); fprintf(stderr, " -m m : number of interpolation [%d]\n", LENG); fprintf(stderr, " -x xmin xmax : minimum of x & maximum of x [%g %g]\n", MIN, MAX); fprintf(stderr, " -i xmin : minimum of x [%g]\n", MIN); fprintf(stderr, " -j xmax : maximum of x [%g]\n", MAX); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " data sequence (%s) [stdin]\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " interpolated data sequence (%s)\n", FORMAT); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char **argv) { int l = LENG, ii, end; FILE *fp = stdin; double i = MIN, j = MAX, x1, y1, x2, y2, y, x, t; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) if (**++argv == '-') { switch (*(*argv + 1)) { case 'l': l = atoi(*++argv) - 1; --argc; break; case 'm': l = atoi(*++argv); --argc; break; case 'x': i = atof(*++argv); --argc; j = atof(*++argv); --argc; break; case 'i': i = atof(*++argv); --argc; break; case 'j': j = atof(*++argv); --argc; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else fp = getfp(*argv, "rb"); t = (j - i) / (double) l; for (;;) { if (freadf(&x2, sizeof(x2), 1, fp) != 1) break; if (freadf(&y2, sizeof(y2), 1, fp) != 1) break; fwritef(&y2, sizeof(y2), 1, stdout); for (end = 0, ii = 1; end == 0;) { x1 = x2; y1 = y2; if (freadf(&x2, sizeof(x2), 1, fp) != 1) break; if (freadf(&y2, sizeof(y2), 1, fp) != 1) break; if (x2 == j) end = 1; for (;; ii++) { x = i + t * ii; if (x > x2) break; y = ((y1 - y2) * x + x1 * y2 - x2 * y1) / (x1 - x2); fwritef(&y, sizeof(y), 1, stdout); } } } return (0); } SPTK-3.9/bin/lmadf/0000755001051300105040000000000012637167706011013 500000000000000SPTK-3.9/bin/lmadf/Makefile.am0000644001051300105040000000021012442245065012745 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = lmadf lmadf_SOURCES = _lmadf.c lmadf.c lmadf_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/lmadf/Makefile.in0000644001051300105040000004257412637167414013010 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = lmadf$(EXEEXT) subdir = bin/lmadf ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_lmadf_OBJECTS = _lmadf.$(OBJEXT) lmadf.$(OBJEXT) lmadf_OBJECTS = $(am_lmadf_OBJECTS) lmadf_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(lmadf_SOURCES) DIST_SOURCES = $(lmadf_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include lmadf_SOURCES = _lmadf.c lmadf.c lmadf_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/lmadf/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/lmadf/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) lmadf$(EXEEXT): $(lmadf_OBJECTS) $(lmadf_DEPENDENCIES) $(EXTRA_lmadf_DEPENDENCIES) @rm -f lmadf$(EXEEXT) $(AM_V_CCLD)$(LINK) $(lmadf_OBJECTS) $(lmadf_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_lmadf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lmadf.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/lmadf/_lmadf.c0000644001051300105040000001530012637156637012321 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /**************************************************************** $Id: _lmadf.c,v 1.19 2015/12/14 01:14:17 uratec Exp $ LMA Digital Filter double lmadflt(x, c, m, pd, d) double x : input double *c : cepstrum int m : order of cepstrum int pd : order of Pade approximation double *d : delay return value : filtered data *****************************************************************/ #include #if defined(WIN32) #include "SPTK.h" #else #include #endif static double pade[] = { 1.0, 1.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.4999273, 0.1067005, 0.01170221, 0.0005656279, 1.0, 0.4999391, 0.1107098, 0.01369984, 0.0009564853, 0.00003041721 }; double *ppade; /**************************************************************** double lmafir(x, c, d, m, m1, m2) double x : input double *c : cepstrum int m : order of cepstrum double *d : delay int m1 : start order int m2 : end order *****************************************************************/ static double lmafir(double x, double *c, const int m, double *d, const int m1, const int m2) { int i; for (i = m - 1; i >= 1; i--) d[i] = d[i - 1]; d[0] = x; for (x = 0.0, i = m1; i <= m2; i++) x += c[i] * d[i - 1]; return (x); } double lmadf(double x, double *c, const int m, const int pd, double *d) { ppade = &pade[pd * (pd + 1) / 2]; x = lmadf1(x, c, m, d, 1, 1, pd); /* D1(z) */ x = lmadf1(x, c, m, &d[(m + 1) * pd], 2, m, pd); /* D2(z) */ return (x); } /**************************************************************** double lmadf1(x, c, m, d, m1, m2, pd) double x : input double *c : cepstrum int m : order of cepstrum double *d : delay int m1 : start order int m2 : end order int pd : order of Pade approximation *****************************************************************/ double lmadf1(double x, double *c, const int m, double *d, const int m1, const int m2, const int pd) { double y, t, *pt; int i; pt = &d[pd * m]; t = lmafir(pt[pd - 1], c, m, &d[(pd - 1) * m], m1, m2); y = (t *= ppade[pd]); x += (1 & pd) ? t : -t; for (i = pd - 1; i >= 1; i--) { pt[i] = t = lmafir(pt[i - 1], c, m, &d[(i - 1) * m], m1, m2); y += (t *= ppade[i]); x += (1 & i) ? t : -t; } y += (pt[0] = x); return (y); } /* transpose */ double lmadf1t(double x, double *b, const int pd, double *d) { double v, out = 0.0, *pt; int i; pt = &d[pd + 1]; for (i = pd; i >= 1; i--) { d[i] = pt[i - 1]; pt[i] = d[i] * b[1]; v = pt[i] * ppade[i]; x += (1 & i) ? v : -v; out += v; } pt[0] = x; out += x; return (out); } static double lmafirt(double x, double *b, const int m, double *d) { int i; double y = 0.0; y = d[0]; d[m] = b[m] * x; for (i = m - 1; i > 1; i--) d[i] += b[i] * x; d[1] += 0; for (i = 0; i < m; i++) d[i] = d[i + 1]; return (y); } static double lmadf2t(double x, double *b, const int m, const int pd, double *d) { double v, out = 0.0, *pt; int i; pt = &d[pd * (m + 2)]; for (i = pd; i >= 1; i--) { pt[i] = lmafirt(pt[i - 1], b, m, &d[(i - 1) * (m + 2)]); v = pt[i] * ppade[i]; x += (1 & i) ? v : -v; out += v; } pt[0] = x; out += x; return (out); } double lmadft(double x, double *c, const int m, const int pd, double *d) { ppade = &pade[pd * (pd + 1) / 2]; x = lmadf1t(x, c, pd, d); x = lmadf2t(x, c, m, pd, &d[2 * (pd + 1)]); return (x); } SPTK-3.9/bin/lmadf/lmadf.c0000644001051300105040000002431112637156640012156 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * LMA Digital Filter for Speech Synthesis * * * * 1986.6 K.Tokuda * * 1996.1 K.Koishida * * * * usage: * * lmadf [ options ] cfile [ infile ] > stdout * * options: * * -m m : order of cepstrum [25] * * -p p : frame period [100] * * -i i : interpolation period [1] * * -P P : order of Pade approximation [4] * * -k : filtering without gain [FALSE] * * -v : inverse filter [FALSE] * * -t : transpose filter [FALSE] * * infile: * * cepstral coefficients * * , c~(0), c~(1), ..., c~(M), * * excitation sequence * * , x(0), x(1), ..., * * stdout: * * filtered sequence * * , y(0), y(1), ..., * * notice: * * P = 4 or 5 * * require: * * lmadf() * * * ************************************************************************/ static char *rcs_id = "$Id: lmadf.c,v 1.33 2015/12/14 01:14:17 uratec Exp $"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #include #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define ORDER 25 #define FPERIOD 100 #define IPERIOD 1 #define PADEORD 4 #define NGAIN FA #define INVERSE FA #define TRANSPOSE FA char *BOOL[] = { "FALSE", "TRUE" }; /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - LMA digital filter for speech synthesis\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] cfile [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -m m : order of cepstrum [%d]\n", ORDER); fprintf(stderr, " -p p : frame period [%d]\n", FPERIOD); fprintf(stderr, " -i i : interpolation period [%d]\n", IPERIOD); fprintf(stderr, " -P P : order of Pade approximation [%d]\n", PADEORD); fprintf(stderr, " -v : inverse filter [%s]\n", BOOL[INVERSE]); fprintf(stderr, " -t : transpose filter [%s]\n", BOOL[TRANSPOSE]); fprintf(stderr, " -k : filtering without gain [%s]\n", BOOL[NGAIN]); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " filter input (%s) [stdin]\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " filter output (%s)\n", FORMAT); fprintf(stderr, " cfile:\n"); fprintf(stderr, " cepstrum (%s)\n", FORMAT); fprintf(stderr, " notice:\n"); fprintf(stderr, " P = 4 or 5\n"); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char **argv) { int m = ORDER, fprd = FPERIOD, iprd = IPERIOD, i, j, pd = PADEORD; FILE *fp = stdin, *fpc = NULL; double *c, *inc, *cc, *d, x; Boolean ngain = NGAIN, inverse = INVERSE, transpose = TRANSPOSE; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) if (**++argv == '-') { switch (*(*argv + 1)) { case 'm': m = atoi(*++argv); --argc; break; case 'p': fprd = atoi(*++argv); --argc; break; case 'i': iprd = atoi(*++argv); --argc; break; case 't': transpose = 1 - transpose; break; case 'P': pd = atoi(*++argv); --argc; break; case 'k': ngain = 1 - ngain; break; case 'v': inverse = 1 - inverse; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else if (fpc == NULL) fpc = getfp(*argv, "rb"); else fp = getfp(*argv, "rb"); if ((pd < 4) || (pd > 5)) { fprintf(stderr, "%s : Order of Pade approximation should be 4 or 5!\n", cmnd); return (1); } if (fpc == NULL) { fprintf(stderr, "%s : Cannot open cepstrum file!\n", cmnd); return (1); } c = dgetmem(m + m + m + 3 + (m + 1) * pd * 2); cc = c + m + 1; inc = cc + m + 1; d = inc + m + 1; if (freadf(c, sizeof(*c), m + 1, fpc) != m + 1) return (1); if (inverse) { if (!ngain) { for (i = 0; i <= m; i++) c[i] *= -1; } else { c[0] = 0; for (i = 1; i <= m; i++) c[i] *= -1; } } for (;;) { if (freadf(cc, sizeof(*cc), m + 1, fpc) != m + 1) return (0); if (inverse) { if (!ngain) { for (i = 0; i <= m; i++) cc[i] *= -1; } else { cc[0] = 0; for (i = 1; i <= m; i++) cc[i] *= -1; } } for (i = 0; i <= m; i++) inc[i] = (cc[i] - c[i]) * iprd / fprd; for (j = fprd, i = (iprd + 1) / 2; j--;) { if (freadf(&x, sizeof(x), 1, fp) != 1) return (0); if (!ngain) x *= exp(c[0]); if (transpose) x = lmadft(x, c, m, pd, d); else x = lmadf(x, c, m, pd, d); fwritef(&x, sizeof(x), 1, stdout); if (!--i) { for (i = 0; i <= m; i++) c[i] += inc[i]; i = iprd; } } movem(cc, c, sizeof(*cc), m + 1); } return (0); } SPTK-3.9/bin/lpc/0000755001051300105040000000000012637167706010506 500000000000000SPTK-3.9/bin/lpc/Makefile.am0000644001051300105040000000017612442245066012454 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = lpc lpc_SOURCES = _lpc.c lpc.c lpc_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/lpc/Makefile.in0000644001051300105040000004251212637167414012473 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = lpc$(EXEEXT) subdir = bin/lpc ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_lpc_OBJECTS = _lpc.$(OBJEXT) lpc.$(OBJEXT) lpc_OBJECTS = $(am_lpc_OBJECTS) lpc_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(lpc_SOURCES) DIST_SOURCES = $(lpc_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include lpc_SOURCES = _lpc.c lpc.c lpc_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/lpc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/lpc/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) lpc$(EXEEXT): $(lpc_OBJECTS) $(lpc_DEPENDENCIES) $(EXTRA_lpc_DEPENDENCIES) @rm -f lpc$(EXEEXT) $(AM_V_CCLD)$(LINK) $(lpc_OBJECTS) $(lpc_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_lpc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lpc.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/lpc/_lpc.c0000644001051300105040000001023512637156640011503 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /**************************************************************** $Id: _lpc.c,v 1.19 2015/12/14 01:14:17 uratec Exp $ LPC Analysis Using Levinson-Durbin method int lpc(x, flng, a, m); double *x : input sequence int flng : flame length double *a : LP coefficients int m : order of LPC double f : mimimum value of the determinant of the normal matrix return value : 0 -> normally completed -1 -> abnormally completed -2 -> unstable LPC ******************************************************************/ #include #include #if defined(WIN32) #include "SPTK.h" #else #include #endif int lpc(double *x, const int flng, double *a, const int m, const double f) { int flag; static double *r = NULL; static int size; if (r == NULL) { r = dgetmem(m + 1); size = m; } if (m > size) { free(r); r = dgetmem(m + 1); size = m; } acorr(x, flng, r, m); flag = levdur(r, a, m, f); return (flag); } SPTK-3.9/bin/lpc/lpc.c0000644001051300105040000001715512637156640011354 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * LPC Analysis Using Levinson-Durbin Method * * * * 1996.1 K.Koishida * * * * usage: * * lpc [ options ] [ infile ] > stdout * * options: * * -l l : frame length [256] * * -m m : order of LPC [25] * * -f f : mimimum value of the determinant * * of the normal matrix [0.000001] * * infile: * * data sequence * * , x(0), x(1), ..., x(l-1), * * stdout: * * LP Coefficeints * * , K, a(1), ..., a(m), * * require: * * lpc() * * * ************************************************************************/ static char *rcs_id = "$Id: lpc.c,v 1.28 2015/12/14 01:14:17 uratec Exp $"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define ORDER 25 #define FLNG 256 #define MINDET 0.000001 /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - LPC analysis using Levinson-Durbin method\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -l l : frame length [%d]\n", FLNG); fprintf(stderr, " -m m : order of LPC [%d]\n", ORDER); fprintf(stderr, " -f f : mimimum value of the determinant [%g]\n", MINDET); fprintf(stderr, " of the normal matrix\n"); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " windowed sequence (%s) [stdin]\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " LP coefficients (%s)\n", FORMAT); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char **argv) { int m = ORDER, l = FLNG, flag, t = 0; FILE *fp = stdin; double *x, *a, f = MINDET; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) if (**++argv == '-') { switch (*(*argv + 1)) { case 'm': m = atoi(*++argv); --argc; break; case 'l': l = atoi(*++argv); --argc; break; case 'f': f = atof(*++argv); --argc; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else fp = getfp(*argv, "rb"); x = dgetmem(l + m + 1); a = x + l; while (freadf(x, sizeof(*x), l, fp) == l) { flag = lpc(x, l, a, m, f); switch (flag) { case -1: fprintf(stderr, "%s : The coefficient matrix of the normal equation is singular at %dth frame!\n", cmnd, t); exit(1); break; case -2: fprintf(stderr, "%s : Extracted LPC coefficients become unstable at %dth frame!\n", cmnd, t); break; } fwritef(a, sizeof(*a), m + 1, stdout); t++; } return (0); } SPTK-3.9/bin/lpc2c/0000755001051300105040000000000012637167706010733 500000000000000SPTK-3.9/bin/lpc2c/Makefile.am0000644001051300105040000000021012442245066012666 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = lpc2c lpc2c_SOURCES = _lpc2c.c lpc2c.c lpc2c_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/lpc2c/Makefile.in0000644001051300105040000004257412637167414012730 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = lpc2c$(EXEEXT) subdir = bin/lpc2c ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_lpc2c_OBJECTS = _lpc2c.$(OBJEXT) lpc2c.$(OBJEXT) lpc2c_OBJECTS = $(am_lpc2c_OBJECTS) lpc2c_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(lpc2c_SOURCES) DIST_SOURCES = $(lpc2c_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include lpc2c_SOURCES = _lpc2c.c lpc2c.c lpc2c_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/lpc2c/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/lpc2c/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) lpc2c$(EXEEXT): $(lpc2c_OBJECTS) $(lpc2c_DEPENDENCIES) $(EXTRA_lpc2c_DEPENDENCIES) @rm -f lpc2c$(EXEEXT) $(AM_V_CCLD)$(LINK) $(lpc2c_OBJECTS) $(lpc2c_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_lpc2c.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lpc2c.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/lpc2c/_lpc2c.c0000644001051300105040000000762612637156640012167 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /**************************************************************** $Id: _lpc2c.c,v 1.18 2015/12/14 01:14:17 uratec Exp $ Transformation LPC to Cepstrum void lpc2c(a, m1, c, m2) double *a : LP coefficients int m1 : order of LPC double *c : cepstral coefficients int m2 : order of cepstrum ****************************************************************/ #include #include #if defined(WIN32) #include "SPTK.h" #else #include #endif void lpc2c(double *a, int m1, double *c, const int m2) { int i, k, upl; double d; c[0] = log(a[0]); c[1] = -a[1]; for (k = 2; k <= m2; ++k) { upl = (k > m2) ? m2 + 1 : k; for (d = 0.0, i = (k > m1) ? k - m1 : 1; i < upl; i++) d += i * c[i] * a[k - i]; c[k] = -d / k; if (k <= m1) c[k] -= a[k]; } return; } SPTK-3.9/bin/lpc2c/lpc2c.c0000644001051300105040000001541612637156640012024 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * Transform LPC to Cepstrum * * * * 1988.7 T.Kobayashi * * 1996.1 K.Koishida * * * * usage: * * lpc2c [ options ] [ infile ] > stdout * * options: * * -m m : order of LPC [25] * * -M M : order of cepstrum [25] * * infile: * * LP Coefficients * * , K, a(1), ..., a(M), * * stdout: * * cepstral coefficients * * , c(0), c(1), ..., c(N), * * require: * * lpc2c() * * * ************************************************************************/ static char *rcs_id = "$Id: lpc2c.c,v 1.25 2015/12/14 01:14:17 uratec Exp $"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define ORDERC 25 #define ORDERA 25 /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - transform LPC to cepstrum\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -m m : order of LPC [%d]\n", ORDERA); fprintf(stderr, " -M M : order of cepstrum [%d]\n", ORDERC); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " LP coefficients (%s) [stdin]\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " cepstrum (%s)\n", FORMAT); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char **argv) { int m = ORDERA, n = ORDERC; FILE *fp = stdin; double *c, *a; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) if (**++argv == '-') { switch (*(*argv + 1)) { case 'm': m = atoi(*++argv); --argc; break; case 'M': n = atoi(*++argv); --argc; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else fp = getfp(*argv, "rb"); a = dgetmem(m + n + 2); c = a + m + 1; while (freadf(a, sizeof(*a), m + 1, fp) == m + 1) { lpc2c(a, m, c, n); fwritef(c, sizeof(*c), n + 1, stdout); } return (0); } SPTK-3.9/bin/lpc2lsp/0000755001051300105040000000000012637167706011307 500000000000000SPTK-3.9/bin/lpc2lsp/Makefile.am0000644001051300105040000000022212442245067013246 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = lpc2lsp lpc2lsp_SOURCES = _lpc2lsp.c lpc2lsp.c lpc2lsp_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/lpc2lsp/Makefile.in0000644001051300105040000004265612637167414013305 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = lpc2lsp$(EXEEXT) subdir = bin/lpc2lsp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_lpc2lsp_OBJECTS = _lpc2lsp.$(OBJEXT) lpc2lsp.$(OBJEXT) lpc2lsp_OBJECTS = $(am_lpc2lsp_OBJECTS) lpc2lsp_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(lpc2lsp_SOURCES) DIST_SOURCES = $(lpc2lsp_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include lpc2lsp_SOURCES = _lpc2lsp.c lpc2lsp.c lpc2lsp_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/lpc2lsp/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/lpc2lsp/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) lpc2lsp$(EXEEXT): $(lpc2lsp_OBJECTS) $(lpc2lsp_DEPENDENCIES) $(EXTRA_lpc2lsp_DEPENDENCIES) @rm -f lpc2lsp$(EXEEXT) $(AM_V_CCLD)$(LINK) $(lpc2lsp_OBJECTS) $(lpc2lsp_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_lpc2lsp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lpc2lsp.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/lpc2lsp/_lpc2lsp.c0000644001051300105040000001435412637156640013113 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /**************************************************************** $Id: _lpc2lsp.c,v 1.17 2015/12/14 01:14:17 uratec Exp $ Transformation LPC to LSP int lpc2lsp(lpc, lsp, order, numsp, maxp, maxq, eps) double *lpc : LPC double *lsp : LSP int order : order of LPC int numsp : split number of unit circle int maxitr : maximum number of interpolation double eps : end condition for interpolation return value 0 : completed normally -1 : completed irregularly *****************************************************************/ #include #include #include #if defined(WIN32) #include "SPTK.h" #else #include #endif static double chebpoly(const double x, double *c, const int mh) { int i; double b[3]; b[1] = b[2] = 0.0; for (i = mh; i > 0; i--) { b[0] = 2.0 * x * b[1] - b[2] + c[i]; b[2] = b[1]; b[1] = b[0]; } b[0] = x * b[1] - b[2] + c[0]; return (b[0]); } int lpc2lsp(double *lpc, double *lsp, const int order, const int numsp, const int maxitr, const double eps) { int i; double *p1, *p2; int mh1, mh2, mh, mm, itr, flag_odd; double delta, x0, x1, g0, g1, x, y; static double *c1 = NULL, *c2; static int size_order; delta = 1.0 / (double) numsp; flag_odd = 0; if (order % 2 == 0) mh1 = mh2 = order / 2; else { mh1 = (order + 1) / 2; mh2 = (order - 1) / 2; flag_odd = 1; } if (c1 == NULL) { c1 = dgetmem(2 * (mh1 + 1)); c2 = c1 + (mh1 + 1); size_order = order; } if (order > size_order) { free(c1); c1 = dgetmem(2 * (mh1 + 1)); c2 = c1 + (mh1 + 1); size_order = order; } /* calculate symmetric and antisymmetrica polynomials */ p1 = lpc + 1; p2 = lpc + order; c1[mh1] = c2[mh2] = 1.0; if (flag_odd) { c2[mh2 + 1] = 0.0; for (i = mh2 - 1; i >= 0; i--) { c1[i + 1] = *p1 + *p2; c2[i] = *p1++ - *p2-- + c2[i + 2]; } c1[0] = *p1 + *p2; } else { for (i = mh1 - 1; i >= 0; i--) { c1[i] = *p1 + *p2 - c1[i + 1]; c2[i] = *p1++ - *p2-- + c2[i + 1]; } } c1[0] *= 0.5; c2[0] *= 0.5; /* root search */ p1 = c1; mh = mh1; g0 = chebpoly(1.0, p1, mh); mm = 0; for (x = 1.0 - delta; x > -delta - 1.0; x -= delta) { g1 = chebpoly(x, p1, mh); if (g0 * g1 <= 0.0) { x0 = x + delta; x1 = x; itr = 0; do { x = (x0 + x1) / 2.0; y = chebpoly(x, p1, mh); if (y * g0 < 0.0) { x1 = x; g1 = y; } else { x0 = x; g0 = y; } itr++; } while ((fabs(y) > eps) && (itr < maxitr)); x = (g1 * x0 - g0 * x1) / (g1 - g0); lsp[mm] = acos(x) / PI2; mm++; if (mm == order) return (0); if (p1 == c1) { p1 = c2; mh = mh2; } else { p1 = c1; mh = mh1; } g1 = chebpoly(x, p1, mh); } g0 = g1; } return (-1); } SPTK-3.9/bin/lpc2lsp/lpc2lsp.c0000644001051300105040000002427012637156640012752 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************* * * * Transform LPC to LSP * * * * 1998.11 K.Koishida * * * * usage: * * lpc2lsp [ options ] [ infile ] > stdout * * options: * * -m m : order of LPC [25] * * -s s : sampling frequency [10] * * -k : output gain [TRUE] * * -L : output log gain rather than linear gain [FALSE] * * -o o : output format [0] * * 0 (normalized frequency [0...pi]) * * 1 (normalized frequency [0...0.5]) * * 2 (frequency [kHz]) * * 3 (frequency [Hz]) * * (level 2) * * -n n : split number of unit circle [128] * * -p p : maximum number of interpolation [4] * * -d d : end condition of interpolation [1e-6] * * infile: * * LP coefficients * * , K, a(1), ..., a(m), * * stdout: * * output format LSP * * 0 normalized frequency (0 ~ pi) * * 1 normalized frequency (0 ~ 0.5) * * 2 frequency (kHz) * * 3 frequency (Hz) * * LSP * * , f(1), ..., f(m), * * require: * * lpc2lsp() * * * *************************************************************************/ static char *rcs_id = "$Id: lpc2lsp.c,v 1.36 2015/12/14 01:14:17 uratec Exp $"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #include #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define ORDER 25 #define SAMPLING 10.0 #define OTYPE 0 #define SPNUM 128 #define MAXITR 4 #define END 1e-6 #define GAIN TR #define LOGGAIN FA char *BOOL[] = { "FALSE", "TRUE" }; /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - transform LPC to LSP\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -m m : order of LPC [%d]\n", ORDER); fprintf(stderr, " -s s : sampling frequency [%g]\n", SAMPLING); fprintf(stderr, " -k : output gain [%s]\n", BOOL[GAIN]); fprintf(stderr, " -L : output log gain rather than linear gain [%s]\n", BOOL[LOGGAIN]); fprintf(stderr, " -o o : output format [%d]\n", OTYPE); fprintf(stderr, " 0 (normalized frequency [0...pi])\n"); fprintf(stderr, " 1 (normalized frequency [0...0.5])\n"); fprintf(stderr, " 2 (frequency [kHz])\n"); fprintf(stderr, " 3 (frequency [Hz])\n"); fprintf(stderr, " (level 2)\n"); fprintf(stderr, " -n n : split number of unit circle [%d]\n", SPNUM); fprintf(stderr, " -p p : maximum number of interpolation [%d]\n", MAXITR); fprintf(stderr, " -d d : end condition of interpolation [%g]\n", END); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " LP coefficients (%s) [stdin]\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " LSP (%s)\n", FORMAT); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char **argv) { int m = ORDER, otype = OTYPE, n = SPNUM, p = MAXITR, i; FILE *fp = stdin; double *a, *lsp, end = END, sampling = SAMPLING; Boolean gain = GAIN, loggain = LOGGAIN; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) if (**++argv == '-') { switch (*(*argv + 1)) { case 'm': m = atoi(*++argv); --argc; break; case 's': sampling = atof(*++argv); --argc; break; case 'o': otype = atoi(*++argv); --argc; break; case 'p': p = atoi(*++argv); --argc; break; case 'n': n = atoi(*++argv); --argc; break; case 'd': end = atof(*++argv); --argc; break; case 'k': gain = 1 - gain; break; case 'l': case 'L': loggain = 1 - loggain; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else fp = getfp(*argv, "rb"); lsp = dgetmem(m + m + 1); a = lsp + m; while (freadf(a, sizeof(*a), m + 1, fp) == m + 1) { lpc2lsp(a, lsp, m, n, p, end); if (otype == 0) for (i = 0; i < m; i++) lsp[i] *= PI2; else if (otype == 2 || otype == 3) for (i = 0; i < m; i++) lsp[i] *= sampling; if (otype == 3) for (i = 0; i < m; i++) lsp[i] *= 1000; if (gain) { if (loggain) *a = log(*a); fwritef(a, sizeof(*a), 1, stdout); } fwritef(lsp, sizeof(*lsp), m, stdout); } return (0); } SPTK-3.9/bin/lpc2par/0000755001051300105040000000000012637167706011273 500000000000000SPTK-3.9/bin/lpc2par/Makefile.am0000644001051300105040000000022212442245067013232 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = lpc2par lpc2par_SOURCES = _lpc2par.c lpc2par.c lpc2par_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/lpc2par/Makefile.in0000644001051300105040000004265612637167414013271 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = lpc2par$(EXEEXT) subdir = bin/lpc2par ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_lpc2par_OBJECTS = _lpc2par.$(OBJEXT) lpc2par.$(OBJEXT) lpc2par_OBJECTS = $(am_lpc2par_OBJECTS) lpc2par_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(lpc2par_SOURCES) DIST_SOURCES = $(lpc2par_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include lpc2par_SOURCES = _lpc2par.c lpc2par.c lpc2par_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/lpc2par/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/lpc2par/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) lpc2par$(EXEEXT): $(lpc2par_OBJECTS) $(lpc2par_DEPENDENCIES) $(EXTRA_lpc2par_DEPENDENCIES) @rm -f lpc2par$(EXEEXT) $(AM_V_CCLD)$(LINK) $(lpc2par_OBJECTS) $(lpc2par_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_lpc2par.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lpc2par.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/lpc2par/_lpc2par.c0000644001051300105040000001044712637156640013062 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /*************************************************************** $Id: _lpc2par.c,v 1.17 2015/12/14 01:14:17 uratec Exp $ Transformation LPC to PARCOR int lpc2par(a, k, m) double *a : LP coefficients double *k : PARCOR coefficients int m : order of LPC return value : 0 -> normally completed -1 -> abnormally completed ****************************************************************/ #include #include #if defined(WIN32) #include "SPTK.h" #else #include #endif int lpc2par(double *a, double *k, const int m) { int i, n, flg = 0; double s; static double *kk = NULL, *aa; static int size; if (kk == NULL) { kk = dgetmem(m + m + 2); aa = kk + m + 1; size = m; } if (m > size) { free(kk); kk = dgetmem(m + m + 2); aa = kk + m + 1; size = m; } movem(a, aa, sizeof(*aa), m + 1); kk[0] = aa[0]; for (n = m; n >= 1; n--) { movem(&aa[1], &kk[1], sizeof(*aa), n); if (kk[n] >= 1.0 || kk[n] <= -1.0) flg = -1; s = 1.0 - kk[n] * kk[n]; for (i = 1; i < n; i++) aa[i] = (kk[i] - kk[n] * kk[n - i]) / s; } movem(kk, k, sizeof(*kk), m + 1); return (flg); } SPTK-3.9/bin/lpc2par/lpc2par.c0000644001051300105040000002015612637156640012721 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * Transform LPC to PARCOR * * * * 1988 K.Tokuda * * 1996.1 K.Koishida * * * * usage: * * lpc2par [ options ] [ infile ] > stdout * * options: * * -m m : order of LPC [25] * * -g g : gamma of generalized cepsrtum [1] * * -c c : gamma of generalized cepstrum (input) * * gamma = -1 / (int) c * * -s : check stable or unstable [FALSE] * * infile: * * LP Coefficeints * * , K, a(1), ..., a(m), * * stdout: * * PARCOR * * , K, k(1), ..., k(m), * * require: * * lpc2par() * * notice: * * value of c must be c>=1 * * * ************************************************************************/ static char *rcs_id = "$Id: lpc2par.c,v 1.28 2015/12/14 01:14:17 uratec Exp $"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define ORDER 25 #define GAMMA 1.0 #define STABLE FA char *BOOL[] = { "FALSE", "TRUE" }; /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - transform LPC to PARCOR\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -m m : order of LPC [%d]\n", ORDER); fprintf(stderr, " -g g : gamma of generalized cepstrum [%g]\n", GAMMA); fprintf(stderr, " -c c : gamma of mel-generalized cepstrum = -1 / (int) c (input) \n"); fprintf(stderr, " -s : check stable or unstable [%s]\n", BOOL[STABLE]); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " stdin\n"); fprintf(stderr, " LP coefficients (%s) [stdin]\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " PARCOR (%s) or \n", FORMAT); fprintf(stderr, " 0 , -1 (int) if -s option is specified\n"); fprintf(stderr, " notice:\n"); fprintf(stderr, " value of c must be c>=1\n"); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char **argv) { int m = ORDER, stable, i; FILE *fp = stdin; double *k, *a, g = GAMMA; Boolean flags = STABLE; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) if (**++argv == '-') { switch (*(*argv + 1)) { case 'm': m = atoi(*++argv); --argc; break; case 'g': g = atof(*++argv); --argc; break; case 'c': g = atoi(*++argv); --argc; if (g < 1) fprintf(stderr, "%s : value of c must be c>=1!\n", cmnd); g = -1.0 / g; break; case 's': flags = 1 - flags; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else fp = getfp(*argv, "rb"); a = dgetmem(m + m + 2); k = a + m + 1; while (freadf(a, sizeof(*a), m + 1, fp) == m + 1) { if (g != 1.0) for (i = 1; i <= m; i++) a[i] *= g; stable = lpc2par(a, k, m); if (flags) fwritex(&stable, sizeof(stable), 1, stdout); else fwritef(k, sizeof(*k), m + 1, stdout); } return (0); } SPTK-3.9/bin/lsp2lpc/0000755001051300105040000000000012637167707011310 500000000000000SPTK-3.9/bin/lsp2lpc/Makefile.am0000644001051300105040000000022212442245070013240 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = lsp2lpc lsp2lpc_SOURCES = _lsp2lpc.c lsp2lpc.c lsp2lpc_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/lsp2lpc/Makefile.in0000644001051300105040000004265612637167415013306 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = lsp2lpc$(EXEEXT) subdir = bin/lsp2lpc ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_lsp2lpc_OBJECTS = _lsp2lpc.$(OBJEXT) lsp2lpc.$(OBJEXT) lsp2lpc_OBJECTS = $(am_lsp2lpc_OBJECTS) lsp2lpc_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(lsp2lpc_SOURCES) DIST_SOURCES = $(lsp2lpc_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include lsp2lpc_SOURCES = _lsp2lpc.c lsp2lpc.c lsp2lpc_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/lsp2lpc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/lsp2lpc/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) lsp2lpc$(EXEEXT): $(lsp2lpc_OBJECTS) $(lsp2lpc_DEPENDENCIES) $(EXTRA_lsp2lpc_DEPENDENCIES) @rm -f lsp2lpc$(EXEEXT) $(AM_V_CCLD)$(LINK) $(lsp2lpc_OBJECTS) $(lsp2lpc_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_lsp2lpc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lsp2lpc.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/lsp2lpc/_lsp2lpc.c0000644001051300105040000001304212637156640013104 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /**************************************************************** $Id: _lsp2lpc.c,v 1.18 2015/12/14 01:14:17 uratec Exp $ Transformation LSP to LPC void lsp2lpc(lsp, a, m) double *lsp : LSP double *a : LPC int m : order of LPC *****************************************************************/ #include #include #include #if defined(WIN32) #include "SPTK.h" #else #include #endif void lsp2lpc(double *lsp, double *a, const int m) { int i, k, mh1, mh2, flag_odd; double xx, xf, xff; static double *f = NULL, *p, *q, *a0, *a1, *a2, *b0, *b1, *b2; static int size; flag_odd = 0; if (m % 2 == 0) mh1 = mh2 = m / 2; else { mh1 = (m + 1) / 2; mh2 = (m - 1) / 2; flag_odd = 1; } if (f == NULL) { f = dgetmem(5 * m + 6); p = f + m; q = p + mh1; a0 = q + mh2; a1 = a0 + (mh1 + 1); a2 = a1 + (mh1 + 1); b0 = a2 + (mh1 + 1); b1 = b0 + (mh2 + 1); b2 = b1 + (mh2 + 1); size = m; } if (m > size) { free(f); f = dgetmem(5 * m + 6); p = f + m; q = p + mh1; a0 = q + mh2; a1 = a0 + (mh1 + 1); a2 = a1 + (mh1 + 1); b0 = a2 + (mh1 + 1); b1 = b0 + (mh2 + 1); b2 = b1 + (mh2 + 1); size = m; } movem(lsp, f, sizeof(*lsp), m); fillz(a0, sizeof(*a0), mh1 + 1); fillz(b0, sizeof(*b0), mh2 + 1); fillz(a1, sizeof(*a1), mh1 + 1); fillz(b1, sizeof(*b1), mh2 + 1); fillz(a2, sizeof(*a2), mh1 + 1); fillz(b2, sizeof(*b2), mh2 + 1); /* lsp filter parameters */ for (i = k = 0; i < mh1; i++, k += 2) p[i] = -2.0 * cos(PI2 * f[k]); for (i = k = 0; i < mh2; i++, k += 2) q[i] = -2.0 * cos(PI2 * f[k + 1]); /* impulse response of analysis filter */ xx = 1.0; xf = xff = 0.0; for (k = 0; k <= m; k++) { if (flag_odd) { a0[0] = xx; b0[0] = xx - xff; xff = xf; xf = xx; } else { a0[0] = xx + xf; b0[0] = xx - xf; xf = xx; } for (i = 0; i < mh1; i++) { a0[i + 1] = a0[i] + p[i] * a1[i] + a2[i]; a2[i] = a1[i]; a1[i] = a0[i]; } for (i = 0; i < mh2; i++) { b0[i + 1] = b0[i] + q[i] * b1[i] + b2[i]; b2[i] = b1[i]; b1[i] = b0[i]; } if (k != 0) a[k - 1] = -0.5 * (a0[mh1] + b0[mh2]); xx = 0.0; } for (i = m - 1; i >= 0; i--) a[i + 1] = -a[i]; a[0] = 1.0; return; } SPTK-3.9/bin/lsp2lpc/lsp2lpc.c0000644001051300105040000002170312637156640012750 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * Transform LSP to LPC * * * * 1996.1 K.Koishida * * * * usage: * * lsp2lpc [ options ] [ infile ] > stdout * * options: * * -m m : order of LPC [25] * * -s s : sampling frequency [10] * * -k : input & output gain [TRUE] * * -L : regard input as log gain [FALSE] * * and output linear one * * -q q : input format [0] * * 0 (normalized frequency <0...pi>) * * 1 (normalized frequency <0...0.5>) * * 2 (frequency (kHz)) * * 3 (frequency (Hz)) * * infile: * * LSP * * , f(1), ..., f(m), * * stdout: * * LPC * * , K(=1), a(1), ..., a(M), * * require: * * lsp2lpc() * * * ************************************************************************/ static char *rcs_id = "$Id: lsp2lpc.c,v 1.37 2015/12/14 01:14:17 uratec Exp $"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #include #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define ORDER 25 #define ITYPE 0 #define SAMPLING 10.0 #define GAIN 1 #define LOGGAIN FA char *BOOL[] = { "FALSE", "TRUE" }; /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - transform LSP to LPC\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile ]>stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -m m : order of LPC [%d]\n", ORDER); fprintf(stderr, " -s s : sampling frequency [%g]\n", SAMPLING); fprintf(stderr, " -k : input & output gain [TRUE]\n"); fprintf(stderr, " -L : regard input as log gain and output linear one [%s]\n", BOOL[LOGGAIN]); fprintf(stderr, " -q q : input format [%d]\n", ITYPE); fprintf(stderr, " 0 (normalized frequency <0...pi>)\n"); fprintf(stderr, " 1 (normalized frequency <0...0.5>)\n"); fprintf(stderr, " 2 (frequency (kHz))\n"); fprintf(stderr, " 3 (frequency (Hz))\n"); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " LSP (%s) [stdin]\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " LP coefficients (%s)\n", FORMAT); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char **argv) { int m = ORDER, itype = ITYPE, i, gain = GAIN; FILE *fp = stdin; double *a, *lsp, sampling = SAMPLING; Boolean loggain = LOGGAIN; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) if (**++argv == '-') { switch (*(*argv + 1)) { case 'm': m = atoi(*++argv); --argc; break; case 's': sampling = atof(*++argv); --argc; break; case 'k': gain = 0; break; case 'l': case 'L': loggain = TR; break; case 'i': case 'q': itype = atoi(*++argv); --argc; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else fp = getfp(*argv, "rb"); lsp = dgetmem(m + m + 1 + gain); a = lsp + m + gain; while (freadf(lsp, sizeof(*lsp), m + gain, fp) == m + gain) { if (itype == 0) for (i = gain; i < m + gain; i++) lsp[i] /= PI2; else if (itype == 2 || itype == 3) for (i = gain; i < m + gain; i++) lsp[i] /= sampling; if (itype == 3) for (i = gain; i < m + gain; i++) lsp[i] /= 1000; lsp2lpc(lsp + gain, a, m); if (gain) { if (loggain) *lsp = exp(*lsp); fwritef(lsp, sizeof(*lsp), 1, stdout); } fwritef(a + gain, sizeof(*a), m + 1 - gain, stdout); } return (0); } SPTK-3.9/bin/lsp2sp/0000755001051300105040000000000012637167707011154 500000000000000SPTK-3.9/bin/lsp2sp/Makefile.am0000644001051300105040000000021512442245116013107 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = lsp2sp lsp2sp_SOURCES = _lsp2sp.c lsp2sp.c lsp2sp_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/lsp2sp/Makefile.in0000644001051300105040000004262512637167415013146 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = lsp2sp$(EXEEXT) subdir = bin/lsp2sp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_lsp2sp_OBJECTS = _lsp2sp.$(OBJEXT) lsp2sp.$(OBJEXT) lsp2sp_OBJECTS = $(am_lsp2sp_OBJECTS) lsp2sp_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(lsp2sp_SOURCES) DIST_SOURCES = $(lsp2sp_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include lsp2sp_SOURCES = _lsp2sp.c lsp2sp.c lsp2sp_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/lsp2sp/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/lsp2sp/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) lsp2sp$(EXEEXT): $(lsp2sp_OBJECTS) $(lsp2sp_DEPENDENCIES) $(EXTRA_lsp2sp_DEPENDENCIES) @rm -f lsp2sp$(EXEEXT) $(AM_V_CCLD)$(LINK) $(lsp2sp_OBJECTS) $(lsp2sp_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_lsp2sp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lsp2sp.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/lsp2sp/_lsp2sp.c0000644001051300105040000001166212637156645012627 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /*************************************************************** $Id: _lsp2sp.c,v 1.6 2015/12/14 01:14:17 uratec Exp $ Transform LSP to spectrum void lsp2sp(lsp, m, x, l) double *lsp : LSP int m : order of LSP double *x : real part of spectrum double l : FFT length ***************************************************************/ #include #include #include #if defined(WIN32) #include "SPTK.h" #else #include #endif #define LOG2 (0.693147180559945) double log_conv(double x) { double temp; temp = log(fabs(x)); if (temp < LSMALL) return LZERO; else return temp; } double log_add(double x, double y) { double lmin, lmax; if (x == y) return x + LOG2; lmin = (x < y) ? x : y; lmax = (x < y) ? y : x; if (lmax > lmin + 50) return lmax; else return lmax + log_conv(exp(lmin - lmax) + 1.0); } void lsp2sp(double *lsp, const int m, double *x, const int l, const int gain) { int i, p; double w, eq1, eq2, ap = 0.0; for (p = 0; p < l; p++) { eq1 = 0.0; eq2 = 0.0; w = p * (M_PI / (l - 1)); if (m % 2 == 0) { for (i = 0; i < m / 2; i++) { eq1 += 2 * log_conv(cos(w) - cos(lsp[2 * i + gain])); eq2 += 2 * log_conv(cos(w) - cos(lsp[2 * i + 1 + gain])); } eq1 += 2 * log_conv(cos(w / 2)); eq2 += 2 * log_conv(sin(w / 2)); ap = m * log(2) + log_add(eq1, eq2); } else { for (i = 0; i < (m + 1) / 2; i++) eq1 += 2 * log_conv(cos(w) - cos(lsp[2 * i + gain])); for (i = 0; i < (m - 1) / 2; i++) eq2 += 2 * log_conv(cos(w) - cos(lsp[2 * i + 1 + gain])); eq2 += 2 * log_conv(sin(w)); ap = (m - 1) * log(2) + log_add(eq1, eq2); } x[p] = -0.5 * ap; if (gain == 1) x[p] += lsp[0]; } } SPTK-3.9/bin/lsp2sp/lsp2sp.c0000644001051300105040000002525612637156645012474 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * Transform LSP to Spectrum * * * * 2013.6 T.Aritake * * * * usage: * * lsp2sp [ options ] [ infile ] > stdout * * options: * * -m m : order of LSP [25] * * -s s : sampling frequency [10] * * -l l : frame length [256] * * -L : regard input log gain as linear one [FALSE]* * -k : input gain [TRUE] * * -q q : input format [0] * * 0 (normalized frequency <0...pi)> * * 1 (normalized frequency <0...0.5>) * * 2 (frequency (kHz)) * * 3 (frequency (Hz)) * * -o o : output format [0] * * 0 (20 * log|H(z)|) * * 1 (ln|H(z)|) * * 2 (|H(z)|) * * 3 (|H(z)|^2) * * infile: * * LSP * * , f(1), ..., f(m), * * stdout: * * spectrum * * , s(0), s(1), ..., s(L/2), * * require: * * lsp2sp() * * * ************************************************************************/ static char *rcs_id = "$Id: lsp2sp.c,v 1.7 2015/12/14 01:14:18 uratec Exp $"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #include #include #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define ORDER 10 #define ITYPE 0 #define SAMPLING 10.0 #define GAIN 1 #define LENG 256 #define OTYPE 0 char *BOOL[] = { "FALSE", "TRUE" }; /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - transform LSP to spectrum\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -m m : order of LSP [%d]\n", ORDER); fprintf(stderr, " -s s : sampling frequency [%.1f]\n", SAMPLING); fprintf(stderr, " -l l : frame length [%d]\n", LENG); fprintf(stderr, " -L : regard input log gain as linear one [FALSE]\n"); fprintf(stderr, " -k : input gain [TRUE]\n"); fprintf(stderr, " -q q : input format [%d]\n", ITYPE); fprintf(stderr, " 0 (normalized frequency <0...pi>)\n"); fprintf(stderr, " 1 (normalized frequency <0...0.5>)\n"); fprintf(stderr, " 2 (frequency (kHz))\n"); fprintf(stderr, " 3 (frequency (Hz))\n"); fprintf(stderr, " -o o : output format [%d]\n", OTYPE); fprintf(stderr, " 0 (20*log|H(z)|)\n"); fprintf(stderr, " 1 (ln|H(z)|)\n"); fprintf(stderr, " 2 (|H(z)|)\n"); fprintf(stderr, " 3 (|H(z)|^2)\n"); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " LSP (%s) [stdin]\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " spectrum (%s)\n", FORMAT); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char **argv) { int leng = LENG, m = ORDER, itype = ITYPE, otype = OTYPE, gain = GAIN; FILE *fp = stdin; double logk, sampling = SAMPLING; double *x, *lsp; int i, no, loggain = 1; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) if (**++argv == '-') { switch (*(*argv + 1)) { case 'm': case 's': case 'l': case 'i': case 'q': case 'o': if (isdigit(**(argv + 1)) == 0) { if ((**(argv + 1)) != '+') { fprintf(stderr, "%s : %s option need positive value !\n", cmnd, *argv); usage(1); } else if (isdigit(*(*(argv + 1) + 1)) == 0) { fprintf(stderr, "%s : %s option need positive value !\n", cmnd, *argv); usage(1); } } if ((*(*argv + 1)) == 'm') m = atoi(*++argv); else if ((*(*argv + 1)) == 's') sampling = atof(*++argv); else if ((*(*argv + 1)) == 'l') leng = atoi(*++argv); else if ((*(*argv + 1)) == 'i' || (*(*argv + 1)) == 'q') itype = atoi(*++argv); else if ((*(*argv + 1)) == 'o') otype = atoi(*++argv); --argc; break; case 'L': loggain = 0; break; case 'k': gain = 0; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else fp = getfp(*argv, "rb"); lsp = dgetmem(m + gain); no = leng / 2 + 1; x = dgetmem(no); logk = 20.0 / log(10.0); while (freadf(lsp, sizeof(*lsp), m + gain, fp) == m + gain) { if (itype == 1) for (i = gain; i < m + gain; i++) lsp[i] *= PI2; else if (itype == 2 || itype == 3) { for (i = gain; i < m + gain; i++) lsp[i] = lsp[i] / sampling * PI2; } if (loggain == 0) *lsp = log(*lsp); lsp2sp(lsp, m, x, no, gain); switch (otype) { case 1: break; case 2: for (i = no; i--;) x[i] = exp(x[i]); break; case 3: for (i = no; i--;) x[i] = exp(2 * x[i]); break; default: for (i = no; i--;) x[i] *= logk; break; } fwritef(x, sizeof(*x), no, stdout); } free(x); free(lsp); return (0); } SPTK-3.9/bin/lspcheck/0000755001051300105040000000000012637167707011525 500000000000000SPTK-3.9/bin/lspcheck/Makefile.am0000644001051300105040000000022712442245071013463 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = lspcheck lspcheck_SOURCES = _lspcheck.c lspcheck.c lspcheck_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/lspcheck/Makefile.in0000644001051300105040000004270712637167415013520 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = lspcheck$(EXEEXT) subdir = bin/lspcheck ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_lspcheck_OBJECTS = _lspcheck.$(OBJEXT) lspcheck.$(OBJEXT) lspcheck_OBJECTS = $(am_lspcheck_OBJECTS) lspcheck_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(lspcheck_SOURCES) DIST_SOURCES = $(lspcheck_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include lspcheck_SOURCES = _lspcheck.c lspcheck.c lspcheck_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/lspcheck/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/lspcheck/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) lspcheck$(EXEEXT): $(lspcheck_OBJECTS) $(lspcheck_DEPENDENCIES) $(EXTRA_lspcheck_DEPENDENCIES) @rm -f lspcheck$(EXEEXT) $(AM_V_CCLD)$(LINK) $(lspcheck_OBJECTS) $(lspcheck_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_lspcheck.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lspcheck.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/lspcheck/_lspcheck.c0000644001051300105040000001143612637156640013543 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /**************************************************************** $Id: _lspcheck.c,v 1.19 2015/12/14 01:14:18 uratec Exp $ Check order of LSP int lspcheck(lsp, ord) double *lsp : LSP int ord : order of LSP return value : 0 -> normal -1 -> ill condition *****************************************************************/ #include #include #if defined(WIN32) #include "SPTK.h" #else #include #endif #define TH 100 int lspcheck(double *lsp, const int ord) { int i; for (i = 1; i < ord; i++) { if (lsp[i] <= lsp[i - 1]) return (-1); } if ((lsp[0] <= 0.0) || (lsp[ord - 1] >= 0.5)) return (-1); return (0); } /**************************************************************** $Id: _lspcheck.c,v 1.19 2015/12/14 01:14:18 uratec Exp $ Rearrangement of LSP void lsparrange(lsp, ord, min) double *lsp : LSP int ord : order of LSP double min : minimal distance between two consecutive LSPs *****************************************************************/ void lsparrange(double *lsp, int ord, double min) { int i, count, flag; double tmp; /* check distance between two consecutive LSPs */ for (count = 0; count < TH; count++) { flag = 0; for (i = 1; i < ord; i++) { tmp = lsp[i] - lsp[i - 1]; if (min > tmp) { lsp[i - 1] -= (min - tmp) / 2; lsp[i] += (min - tmp) / 2; flag = 1; } } if (lsp[0] < 0.0) { lsp[0] = min; flag = 1; } if (lsp[ord - 1] > 0.5) { lsp[ord - 1] = 0.5 - min; flag = 1; } if (!flag) break; } return; } SPTK-3.9/bin/lspcheck/lspcheck.c0000644001051300105040000003130312637156640013377 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * Check stability and rearrange LSP * * * * 1996.6 K.Koishida * * 2009.9 A.Saito * * usage: * * lspcheck [ options ] [ infile ] > stdout * * options: * * -m m : order of LSP [25] * * -s s : sampling frequency [10] * * -k : input & output gain [FALSE] * * -q q : input format [0] * * -o o : output format [i] * * 0 (normalized frequency <0...pi>) * * 1 (normalized frequency <0...0.5>) * * 2 (frequency (kHz)) * * 3 (frequency (Hz)) * * -c : rearrange LSP [N/A] * * distance between two consecutive LSPs * * extend the distance (if it is smaller * * than R*pi/m) s.t. (0 <= R <= 1) * * -r R : threshold of rearrangement [0.0] * * -g : modify gain value [N/A] * * check whether gain is less than G or not * * -L : regard input as log gain [N/A] * * -G G : min. value of gain s.t. G > 0 [1.0E-10] * * infile: * * LSP * * , f(1), ..., f(m), * * stdout: * * LSP or rearranged LSP if -r option is specified * * stderr: * * frame number of irregular LSP * * * ************************************************************************/ static char *rcs_id = "$Id: lspcheck.c,v 1.42 2015/12/14 01:14:18 uratec Exp $"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #include #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define ORDER 25 #define ITYPE 0 #define OTYPE -1 #define SAMPLING 10.0 #define ARRANGE 0 #define GAIN TR #define LOGGAIN FA #define GAIN_MIN 1.0E-10 #define ALPHA 0.0 char *BOOL[] = { "FALSE", "TRUE" }; /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - check stability and rearrange LSP\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -m m : order of LPC [%d]\n", ORDER); fprintf(stderr, " -s s : sampling frequency [%g]\n", SAMPLING); fprintf(stderr, " -k : input & output gain [%s]\n", BOOL[GAIN]); fprintf(stderr, " -q q : input format [%d]\n", ITYPE); fprintf(stderr, " -o o : output format [i]\n"); fprintf(stderr, " 0 (normalized frequency <0...pi>)\n"); fprintf(stderr, " 1 (normalized frequency <0...0.5>)\n"); fprintf(stderr, " 2 (frequency (kHz))\n"); fprintf(stderr, " 3 (frequency (Hz))\n"); fprintf(stderr, " -c : rearrange LSP [N/A]\n"); fprintf(stderr, " check the distance between two\n"); fprintf(stderr, " consecutive LSPs and extend the distance\n"); fprintf(stderr, " (if it is smaller than R*pi/m)\n"); fprintf(stderr, " -r R : threshold of rearrangement of LSP [%.1f]\n", ALPHA); fprintf(stderr, " s.t. 0 <= R <= 1\n"); fprintf(stderr, " -g : modify gain value if gain is less than G [N/A]\n"); fprintf(stderr, " -L : regard input as log gain [%s]\n", BOOL[LOGGAIN]); fprintf(stderr, " -G G : min. value of gain [%g]\n", GAIN_MIN); fprintf(stderr, " s.t. G > 0\n"); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " LSP (%s) [stdin]\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " LSP (%s) or rearranged LSP (%s) if -r option \n", FORMAT, FORMAT); fprintf(stderr, " is specified\n"); fprintf(stderr, " stderr:\n"); fprintf(stderr, " irregular LSP and its frame number\n"); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char **argv) { int m = ORDER, itype = ITYPE, otype = OTYPE, i, num; Boolean arrange = ARRANGE, gain = GAIN, modify_gain = FA, loggain = LOGGAIN; FILE *fp = stdin; double *lsp, alpha = ALPHA, sampling = SAMPLING, min, gain_min = GAIN_MIN; void lsparrange(double *lsp, const int ord, double min); if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) if (**++argv == '-') { switch (*(*argv + 1)) { case 'm': m = atoi(*++argv); --argc; break; case 's': sampling = atof(*++argv); --argc; break; case 'i': case 'q': itype = atoi(*++argv); --argc; break; case 'o': otype = atoi(*++argv); --argc; break; case 'r': alpha = atof(*++argv); if (alpha < 0 || alpha > 1) { fprintf(stderr, "%s : Invalid option 'r'!\n", cmnd); usage(0); } --argc; break; case 'k': gain = 1 - gain; break; case 'l': case 'L': loggain = 1 - loggain; break; case 'g': modify_gain = 1 - modify_gain; break; case 'G': gain_min = atof(*++argv); --argc; break; case 'c': arrange = 1 - arrange; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else { fp = getfp(*argv, "rb"); } if (otype < 0) otype = itype; lsp = dgetmem(m + gain); num = 0; min = alpha * PI / m; switch (itype) { case 0: min /= PI2; break; case 1: break; case 2: min /= sampling; break; case 3: min /= (sampling * 1000); break; } while (freadf(lsp, sizeof(*lsp), m + gain, fp) == m + (int) gain) { if (gain) { if (loggain) { if (lsp[0] < log(gain_min)) { fprintf(stderr, "[No. %d] log gain %g is less than %g\n", num, lsp[0], log(gain_min)); if (modify_gain) { lsp[0] = log(gain_min); } } } else { if (lsp[0] < gain_min) { fprintf(stderr, "[No. %d] gain %g is less than %g\n", num, lsp[0], gain_min); if (modify_gain) { lsp[0] = gain_min; } } } } switch (itype) { case 0: for (i = gain; i < m + (int) gain; i++) lsp[i] /= PI2; break; case 1: break; case 2: for (i = gain; i < m + (int) gain; i++) lsp[i] /= sampling; break; case 3: for (i = gain; i < m + (int) gain; i++) lsp[i] /= (sampling * 1000); break; } if (lspcheck(lsp + gain, m) == -1) { /* unstable */ fprintf(stderr, "[No. %d] is unstable frame\n", num); } if (arrange) { lsparrange(lsp + gain, m, min); } switch (otype) { case 0: for (i = gain; i < m + (int) gain; i++) lsp[i] *= PI2; break; case 1: break; case 2: for (i = gain; i < m + (int) gain; i++) lsp[i] *= sampling; break; case 3: for (i = gain; i < m + (int) gain; i++) lsp[i] *= (sampling * 1000); break; } fwritef(lsp, sizeof(*lsp), m + gain, stdout); num++; } return (0); } SPTK-3.9/bin/lspdf/0000755001051300105040000000000012637167707011041 500000000000000SPTK-3.9/bin/lspdf/Makefile.am0000644001051300105040000000021012442245071012767 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = lspdf lspdf_SOURCES = _lspdf.c lspdf.c lspdf_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/lspdf/Makefile.in0000644001051300105040000004257412637167415013036 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = lspdf$(EXEEXT) subdir = bin/lspdf ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_lspdf_OBJECTS = _lspdf.$(OBJEXT) lspdf.$(OBJEXT) lspdf_OBJECTS = $(am_lspdf_OBJECTS) lspdf_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(lspdf_SOURCES) DIST_SOURCES = $(lspdf_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include lspdf_SOURCES = _lspdf.c lspdf.c lspdf_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/lspdf/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/lspdf/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) lspdf$(EXEEXT): $(lspdf_OBJECTS) $(lspdf_DEPENDENCIES) $(EXTRA_lspdf_DEPENDENCIES) @rm -f lspdf$(EXEEXT) $(AM_V_CCLD)$(LINK) $(lspdf_OBJECTS) $(lspdf_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_lspdf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lspdf.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/lspdf/_lspdf.c0000644001051300105040000001151612637156641012373 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /**************************************************************** $Id: _lspdf.c,v 1.19 2015/12/14 05:34:35 uratec Exp $ LSP Speech Synthesis Digital Filter double lspdf_even(x, a, m, d) double x : input double *f : LSP coefficients int m : order of coefficients double *d : delay return value : filtered data *****************************************************************/ #include #include #if defined(WIN32) #include "SPTK.h" #else #include #endif double lspdf_even(double x, double *f, const int m, double *d) { double *d1, *d2, *lsp, x1, x2; int i; d1 = d + 1; d2 = d1 + m; lsp = f + 1; x1 = x2 = d[0]; for (i = 0; i < m; i += 2) { d1[i] -= 2.0 * x1 * cos(lsp[i]); d2[i] -= 2.0 * x2 * cos(lsp[i + 1]); d1[i + 1] += x1; d2[i + 1] += x2; x += d1[i] + d2[i]; x1 = d1[i + 1]; x2 = d2[i + 1]; } x -= d2[m - 1] - d1[m - 1]; for (i = m - 1; i > 0; i--) { d1[i] = d1[i - 1]; d2[i] = d2[i - 1]; } d1[0] = d2[0] = d[0]; d[0] = -0.5 * x; return (x); } double lspdf_odd(double x, double *f, const int m, double *d) { int i; int mh1; double *d1, *d2, *lsp, x1, x2; mh1 = (m + 1) / 2; d1 = d + 1; d2 = d1 + (mh1 + mh1 - 1); lsp = f + 1; x1 = x2 = d[0]; for (i = 0; i < m - 1; i += 2) { d1[i] -= 2.0 * x1 * cos(lsp[i]); d2[i] -= 2.0 * x2 * cos(lsp[i + 1]); d1[i + 1] += x1; d2[i + 1] += x2; x += d1[i] + d2[i]; x1 = d1[i + 1]; x2 = d2[i + 1]; } d1[i] -= 2.0 * x1 * cos(lsp[i]); x += d1[i] - d2[i]; for (i = m - 1; i > 0; i--) { d1[i] = d1[i - 1]; d2[i] = d2[i - 1]; } d1[0] = d2[0] = d[0]; d[0] = -0.5 * x; return (x); } SPTK-3.9/bin/lspdf/lspdf.c0000644001051300105040000002212212637156641012227 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * LSP Speech Synthesis Digital Filter * * * * 1996.9 K.Koishida * * * * usage: * * lspdf [ options ] lspfile [ infile ] > stdout * * options: * * -m m : order of coefficients [25] * * -p p : frame period [100] * * -i i : interpolation period [1] * * -k : filtering without gain [FALSE] * * -L : regard input gain as log gain [FALSE] * * infile: * * coefficients * * , K, f(1), ..., f(m), * * excitation sequence * * , x(0), x(1), ..., * * stdout: * * filtered sequence * * , y(0), y(1), ..., * * require: * * lspdf_even() * * lspdf_odd() * * * ************************************************************************/ static char *rcs_id = "$Id: lspdf.c,v 1.31 2015/12/14 01:14:18 uratec Exp $"; /* Standard C Libralies */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #include #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define ORDER 25 #define FPERIOD 100 #define IPERIOD 1 #define TRANSPOSE FA #define NGAIN FA #define LOGGAIN FA char *BOOL[] = { "FALSE", "TRUE" }; /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - LSP speech synthesis digital filter\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] lspfile [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -m m : order of coefficients [%d]\n", ORDER); fprintf(stderr, " -p p : frame period [%d]\n", FPERIOD); fprintf(stderr, " -i i : interpolation period [%d]\n", IPERIOD); fprintf(stderr, " -k : filtering without gain [%s]\n", BOOL[NGAIN]); fprintf(stderr, " -L : regard input gain as log gain [%s]\n", BOOL[LOGGAIN]); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " filter input (%s) [stdin]\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " filter output (%s)\n", FORMAT); fprintf(stderr, " lspfile:\n"); fprintf(stderr, " LSP coefficients (%s)\n", FORMAT); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char **argv) { int m = ORDER, fprd = FPERIOD, iprd = IPERIOD, i, j, flag_odd; FILE *fp = stdin, *fpc = NULL; double *c, *inc, *cc, *d, x; Boolean ngain = NGAIN, loggain = LOGGAIN; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) if (**++argv == '-') { switch (*(*argv + 1)) { case 'm': m = atoi(*++argv); --argc; break; case 'p': fprd = atoi(*++argv); --argc; break; case 'i': iprd = atoi(*++argv); --argc; break; /* case 't': tp = 1 - tp; break; */ case 'k': ngain = 1 - ngain; break; case 'l': case 'L': loggain = 1 - loggain; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else if (fpc == NULL) fpc = getfp(*argv, "rb"); else fp = getfp(*argv, "rb"); if (fpc == NULL) { fprintf(stderr, "%s : Cannot open LSP file!\n", cmnd); return (1); } if (m % 2 == 0) flag_odd = 0; else flag_odd = 1; c = dgetmem(5 * m + 4); cc = c + m + 1; inc = cc + m + 1; d = inc + m + 1; if (freadf(c, sizeof(*c), m + 1, fpc) != m + 1) return (1); for (;;) { if (freadf(cc, sizeof(*cc), m + 1, fpc) != m + 1) return (0); if (!ngain && loggain) c[0] = exp(c[0]); for (i = 0; i <= m; i++) inc[i] = (cc[i] - c[i]) * iprd / fprd; for (j = fprd, i = (iprd + 1) / 2; j--;) { if (freadf(&x, sizeof(x), 1, fp) != 1) return (0); if (!ngain) x *= c[0]; if (flag_odd) x = lspdf_odd(x, c, m, d); else x = lspdf_even(x, c, m, d); fwritef(&x, sizeof(x), 1, stdout); if (!--i) { for (i = 0; i <= m; i++) c[i] += inc[i]; i = iprd; } } movem(cc, c, sizeof(*cc), m + 1); } return (0); } SPTK-3.9/bin/ltcdf/0000755001051300105040000000000012637167707011025 500000000000000SPTK-3.9/bin/ltcdf/Makefile.am0000644001051300105040000000021012442245072012754 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = ltcdf ltcdf_SOURCES = _ltcdf.c ltcdf.c ltcdf_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/ltcdf/Makefile.in0000644001051300105040000004257412637167415013022 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = ltcdf$(EXEEXT) subdir = bin/ltcdf ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_ltcdf_OBJECTS = _ltcdf.$(OBJEXT) ltcdf.$(OBJEXT) ltcdf_OBJECTS = $(am_ltcdf_OBJECTS) ltcdf_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(ltcdf_SOURCES) DIST_SOURCES = $(ltcdf_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include ltcdf_SOURCES = _ltcdf.c ltcdf.c ltcdf_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/ltcdf/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/ltcdf/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) ltcdf$(EXEEXT): $(ltcdf_OBJECTS) $(ltcdf_DEPENDENCIES) $(EXTRA_ltcdf_DEPENDENCIES) @rm -f ltcdf$(EXEEXT) $(AM_V_CCLD)$(LINK) $(ltcdf_OBJECTS) $(ltcdf_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_ltcdf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ltcdf.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/ltcdf/_ltcdf.c0000644001051300105040000000726612637156641012352 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /**************************************************************** $Id: _ltcdf.c,v 1.14 2015/12/14 01:14:18 uratec Exp $ All-Pole Lattice Digital Filter double ltcdf(x, k, m, d) double x : input double *k : reflection coefficients int m : order of coefficients double *d : delay return value : filtered data *****************************************************************/ double ltcdf(double x, double *k, int m, double *d) { x -= k[m] * d[m - 1]; for (m--; m >= 1; m--) { x -= k[m] * d[m - 1]; d[m] = d[m - 1] + k[m] * x; } d[0] = x; return (x); } SPTK-3.9/bin/ltcdf/ltcdf.c0000644001051300105040000002064012637156641012202 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * All-Pole Lattice Digital Filter for Speech Synthesis * * * * 1987.9 K.Tokuda * * 1996.3 K.Koishida * * * * usage: * * ltcdf [ options ] kfile [ infile ] > stdout * * options: * * -m m : order of coefficients [25] * * -p p : frame period [100] * * -i i : interpolation period [1] * * -k : filtering without gain [FALSE] * * infile: * * coefficients * * , K, k(1), ..., k(m), * * excitation sequence * * , x(0), x(1), ..., * * stdout: * * filtered sequence * * , y(0), y(1), ..., * * require: * * ltcdf() * * * ************************************************************************/ static char *rcs_id = "$Id: ltcdf.c,v 1.25 2015/12/14 01:14:18 uratec Exp $"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define ORDER 25 #define FPERIOD 100 #define IPERIOD 1 #define NGAIN FA char *BOOL[] = { "FALSE", "TRUE" }; /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - all-pole lattice digital filter for speech synthesis\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] kfile [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -m m : order of coefficients [%d]\n", ORDER); fprintf(stderr, " -p p : frame period [%d]\n", FPERIOD); fprintf(stderr, " -i i : interpolation period [%d]\n", IPERIOD); fprintf(stderr, " -k : filtering without gain [%s]\n", BOOL[NGAIN]); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " filter input (%s) [stdin]\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " filter output (%s)\n", FORMAT); fprintf(stderr, " kfile:\n"); fprintf(stderr, " PARCOR (%s)\n", FORMAT); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char **argv) { int m = ORDER, fprd = FPERIOD, iprd = IPERIOD, i, j; FILE *fp = stdin, *fpc = NULL; double *c, *inc, *cc, *d, x; Boolean ngain = NGAIN; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) if (**++argv == '-') { switch (*(*argv + 1)) { case 'm': m = atoi(*++argv); --argc; break; case 'p': fprd = atoi(*++argv); --argc; break; case 'i': iprd = atoi(*++argv); --argc; break; case 'k': ngain = 1 - ngain; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else if (fpc == NULL) fpc = getfp(*argv, "rb"); else fp = getfp(*argv, "rb"); if (fpc == NULL) { fprintf(stderr, "%s : Cannot open cepstrum file!\n", cmnd); return (1); } c = dgetmem(m + m + m + 3 + m); cc = c + m + 1; inc = cc + m + 1; d = inc + m + 1; if (freadf(c, sizeof(*c), m + 1, fpc) != m + 1) return (1); for (;;) { if (freadf(cc, sizeof(*cc), m + 1, fpc) != m + 1) return (0); for (i = 0; i <= m; i++) inc[i] = (cc[i] - c[i]) * iprd / fprd; for (j = fprd, i = (iprd + 1) / 2; j--;) { if (freadf(&x, sizeof(x), 1, fp) != 1) return (0); if (!ngain) x *= c[0]; x = ltcdf(x, c, m, d); fwritef(&x, sizeof(x), 1, stdout); if (!--i) { for (i = 0; i <= m; i++) c[i] += inc[i]; i = iprd; } } movem(cc, c, sizeof(*cc), m + 1); } return (0); } SPTK-3.9/bin/mc2b/0000755001051300105040000000000012637167707010554 500000000000000SPTK-3.9/bin/mc2b/Makefile.am0000644001051300105040000000020312442245072012505 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = mc2b mc2b_SOURCES = _mc2b.c mc2b.c mc2b_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/mc2b/Makefile.in0000644001051300105040000004254312637167415012545 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = mc2b$(EXEEXT) subdir = bin/mc2b ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_mc2b_OBJECTS = _mc2b.$(OBJEXT) mc2b.$(OBJEXT) mc2b_OBJECTS = $(am_mc2b_OBJECTS) mc2b_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(mc2b_SOURCES) DIST_SOURCES = $(mc2b_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include mc2b_SOURCES = _mc2b.c mc2b.c mc2b_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/mc2b/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/mc2b/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) mc2b$(EXEEXT): $(mc2b_OBJECTS) $(mc2b_DEPENDENCIES) $(EXTRA_mc2b_DEPENDENCIES) @rm -f mc2b$(EXEEXT) $(AM_V_CCLD)$(LINK) $(mc2b_OBJECTS) $(mc2b_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_mc2b.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mc2b.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/mc2b/_mc2b.c0000644001051300105040000000734212637156641011623 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /*************************************************************** $Id: _mc2b.c,v 1.16 2015/12/14 01:14:18 uratec Exp $ Transform Mel Cepstrum to MLSA Digital Filter Coefficients void mc2b(mc, b, m, a) double *mc : mel cepstral coefficients double *b : MLSA digital filter coefficients int m : order of mel cepstrum double a : all-pass constant ***************************************************************/ #include #if defined(WIN32) #include "SPTK.h" #else #include #endif void mc2b(double *mc, double *b, int m, const double a) { b[m] = mc[m]; for (m--; m >= 0; m--) b[m] = mc[m] - a * b[m + 1]; return; } SPTK-3.9/bin/mc2b/mc2b.c0000644001051300105040000001533112637156641011461 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * Transform Mel Cepstrum to MLSA Digital Filter Coefficients * * * * 1995.12 K.Koishida * * * * usage: * * mc2b [ options ] [ infile ] > stdout * * options: * * -a a : all-pass constant [0.35] * * -m m : order of mel cepstrum [25] * * infile: * * mel cepstral coefficients * * , c~(0), c~(1), ..., c~(M), * * stdout: * * MLSA filter coefficients * * , b(0), b(1), ..., b(M), * * require: * * mc2b() * * * ************************************************************************/ static char *rcs_id = "$Id:"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define ALPHA 0.35 #define ORDER 25 /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - transform mel cepstrum \n", cmnd); fprintf(stderr, " to MLSA digital filter coefficients\n"); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -a a : all-pass constant [%g]\n", ALPHA); fprintf(stderr, " -m m : order of mel-cepstrum [%d]\n", ORDER); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " mel-cepstrum (%s) [stdin]\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " MLSA filter coefficients (%s)\n", FORMAT); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char **argv) { int m = ORDER, m1; FILE *fp = stdin; double a = ALPHA, *x; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) if (**++argv == '-') { switch (*(*argv + 1)) { case 'a': a = atof(*++argv); --argc; break; case 'm': m = atoi(*++argv); --argc; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else fp = getfp(*argv, "rb"); m1 = m + 1; x = dgetmem(m1); while (freadf(x, sizeof(*x), m1, fp) == m1) { mc2b(x, x, m, a); fwritef(x, sizeof(*x), m1, stdout); } return (0); } SPTK-3.9/bin/mcep/0000755001051300105040000000000012637167707010655 500000000000000SPTK-3.9/bin/mcep/Makefile.am0000644001051300105040000000020312442245073012607 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = mcep mcep_SOURCES = _mcep.c mcep.c mcep_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/mcep/Makefile.in0000644001051300105040000004254312637167415012646 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = mcep$(EXEEXT) subdir = bin/mcep ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_mcep_OBJECTS = _mcep.$(OBJEXT) mcep.$(OBJEXT) mcep_OBJECTS = $(am_mcep_OBJECTS) mcep_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(mcep_SOURCES) DIST_SOURCES = $(mcep_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include mcep_SOURCES = _mcep.c mcep.c mcep_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/mcep/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/mcep/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) mcep$(EXEEXT): $(mcep_OBJECTS) $(mcep_DEPENDENCIES) $(EXTRA_mcep_DEPENDENCIES) @rm -f mcep$(EXEEXT) $(AM_V_CCLD)$(LINK) $(mcep_OBJECTS) $(mcep_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_mcep.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mcep.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/mcep/_mcep.c0000644001051300105040000002325612637156641012027 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /**************************************************************** $Id: _mcep.c,v 1.32 2015/12/14 01:14:18 uratec Exp $ Mel-Cepstral Analysis int mcep(xw, flng, mc, m, a, itr1, itr2, dd, etype, e, f, itype); double *xw : input sequence int flng : frame length double *mc : mel cepstrum int m : order of mel cepstrum double a : alpha int itr1 : minimum number of iteration int itr2 : maximum number of iteration double dd : end condition int etype : 0 -> e is not used 1 -> e is initial value for log-periodogram 2 -> e is floor periodogram in db double e : initial value for log-periodogram or floor periodogram in db double f : mimimum value of the determinant of the normal matrix int itype : input data type return value : 0 -> completed by end condition -1-> completed by maximum iteration *****************************************************************/ #include #include #include #if defined(WIN32) #include "SPTK.h" #else #include #endif int mcep(double *xw, const int flng, double *mc, const int m, const double a, const int itr1, const int itr2, const double dd, const int etype, const double e, const double f, const int itype) { int i, j; int flag = 0, f2, m2; double t, s, eps = 0.0, min, max; static double *x = NULL, *y, *c, *d, *al, *b; static int size_x, size_d; if (etype == 1 && e < 0.0) { fprintf(stderr, "mcep : value of e must be e>=0!\n"); exit(1); } if (etype == 2 && e >= 0.0) { fprintf(stderr, "mcep : value of E must be E<0!\n"); exit(1); } if (etype == 1) { eps = e; } if (x == NULL) { x = dgetmem(3 * flng); y = x + flng; c = y + flng; size_x = flng; d = dgetmem(3 * m + 3); al = d + (m + 1); b = al + (m + 1); size_d = m; } if (flng > size_x) { free(x); x = dgetmem(3 * flng); y = x + flng; c = y + flng; size_x = flng; } if (m > size_d) { free(d); d = dgetmem(3 * m + 3); al = d + (m + 1); b = al + (m + 1); size_d = m; } f2 = flng / 2; m2 = m + m; movem(xw, x, sizeof(*x), flng); switch (itype) { case 0: /* windowed data sequence */ fftr(x, y, flng); for (i = 0; i < flng; i++) { x[i] = x[i] * x[i] + y[i] * y[i] + eps; /* periodogram */ } break; case 1: /* dB */ for (i = 0; i <= flng / 2; i++) { x[i] = exp((x[i] / 20.0) * log(10.0)); /* dB -> amplitude spectrum */ x[i] = x[i] * x[i] + eps; /* amplitude -> periodogram */ } break; case 2: /* log */ for (i = 0; i <= flng / 2; i++) { x[i] = exp(x[i]); /* log -> amplitude spectrum */ x[i] = x[i] * x[i] + eps; /* amplitude -> periodogram */ } break; case 3: /* amplitude */ for (i = 0; i <= flng / 2; i++) { x[i] = x[i] * x[i] + eps; /* amplitude -> periodogram */ } break; case 4: /* periodogram */ for (i = 0; i <= flng / 2; i++) { x[i] = x[i] + eps; } break; default: fprintf(stderr, "mcep : input type %d is not supported!\n", itype); exit(1); } if (itype > 0) { for (i = 1; i < flng / 2; i++) x[flng - i] = x[i]; } if (etype == 2 && e < 0.0) { max = x[0]; for (i = 1; i < flng; i++) { if (max < x[i]) max = x[i]; } max = sqrt(max); min = max * pow(10.0, e / 20.0); /* floor is 20*log10(min/max) */ min = min * min; for (i = 0; i < flng; i++) { if (x[i] < min) x[i] = min; } } for (i = 0; i < flng; i++) { if (x[i] <= 0.0) { fprintf(stderr, "mcep : periodogram has '0', use '-e' option to floor it!\n"); exit(1); } c[i] = log(x[i]); } /* 1, (-a), (-a)^2, ..., (-a)^M */ al[0] = 1.0; for (i = 1; i <= m; i++) al[i] = -a * al[i - 1]; /* initial value of cepstrum */ ifftr(c, y, flng); /* c : IFFT[x] */ c[0] /= 2.0; c[f2] /= 2.0; freqt(c, f2, mc, m, a); /* mc : mel cep. */ s = c[0]; /* Newton Raphson method */ for (j = 1; j <= itr2; j++) { fillz(c, sizeof(*c), flng); freqt(mc, m, c, f2, -a); /* mc : mel cep. */ fftr(c, y, flng); /* c, y : FFT[mc] */ for (i = 0; i < flng; i++) c[i] = x[i] / exp(c[i] + c[i]); ifftr(c, y, flng); frqtr(c, f2, c, m2, a); /* c : r(k) */ t = c[0]; if (j >= itr1) { if (fabs((t - s) / t) < dd) { flag = 1; break; } s = t; } for (i = 0; i <= m; i++) b[i] = c[i] - al[i]; for (i = 0; i <= m2; i++) y[i] = c[i]; for (i = 0; i <= m2; i += 2) y[i] -= c[0]; for (i = 2; i <= m; i += 2) c[i] += c[0]; c[0] += c[0]; if (theq(c, y, d, b, m + 1, f)) { fprintf(stderr, "mcep : Error in theq() at %dth iteration !\n", j); exit(1); } for (i = 0; i <= m; i++) mc[i] += d[i]; } if (flag) return (0); else return (-1); } /*************************************************************** Frequency Transformation for Calculating Coefficients void frqtr(c1, m1, c2, m2, a) double *c1 : minimum phase sequence int m1 : order of minimum phase sequence double *c2 : warped sequence int m2 : order of warped sequence double a : all-pass constant ***************************************************************/ void frqtr(double *c1, int m1, double *c2, int m2, const double a) { int i, j; static double *d = NULL, *g; static int size; if (d == NULL) { size = m2; d = dgetmem(size + size + 2); g = d + size + 1; } if (m2 > size) { free(d); size = m2; d = dgetmem(size + size + 2); g = d + size + 1; } fillz(g, sizeof(*g), m2 + 1); for (i = -m1; i <= 0; i++) { if (0 <= m2) { d[0] = g[0]; g[0] = c1[-i]; } for (j = 1; j <= m2; j++) g[j] = d[j - 1] + a * ((d[j] = g[j]) - g[j - 1]); } movem(g, c2, sizeof(*g), m2 + 1); return; } SPTK-3.9/bin/mcep/mcep.c0000644001051300105040000002525012637156641011664 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * Mel Cepstral Analysis * * * * 1993.5 K.Tokuda * * 1996.1 K.Koishida * * * * usage: * * mcep [ options ] [infile] > stdout * * options: * * -a alpha : all-pass constant [0.35] * * -m m : order of mel cepstrum [25] * * -l l : frame length (FFT length) [256] * * -q q : Input format [0] * * 0 (windowed data sequence) * * 1 (20*log|f(w)|) * * 2 (ln|f(w)|) * * 3 (|f(w)|) * * 4 (|f(w)|^2) * * (level 2) * * -i i : minimum iteration [2] * * -j j : maximum iteration [30] * * -d d : end condition [0.001] * * -e e : small value added to periodogram [0] * * -E E : floor in db calculated per frame[N/A] * * -f f : minimum value of the determinant * * of the normal matrix [0.000001] * * infile: * * windowed sequence (if q==0) * * , x(0), x(1), ..., x(L-1), * * spectrum sequence (otherwise) * * , f(0), f(1), ..., f(L/2), * * stdout: * * mel cepstrum * * , c~(0), c~(1), ..., c~(M), * * notice: * * value of e must be e>=0 * * value of E must be E<0 * * require: * * mcep() * * * ************************************************************************/ static char *rcs_id = "$Id: mcep.c,v 1.36 2015/12/14 05:34:35 uratec Exp $"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define ALPHA 0.35 #define ORDER 25 #define FLENG 256 #define ITYPE 0 #define ETYPE 0 #define MINITR 2 #define MAXITR 30 #define END 0.001 #define EPS 0.0 #define MINDET 0.000001 /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - mel cepstral analysis\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -a a : all-pass constant [%g]\n", ALPHA); fprintf(stderr, " -m m : order of mel cepstrum [%d]\n", ORDER); fprintf(stderr, " -l l : frame length [%d]\n", FLENG); fprintf(stderr, " -q q : input format [%d]\n", ITYPE); fprintf(stderr, " 0 (windowed sequence\n"); fprintf(stderr, " 1 (20*log|f(w)|)\n"); fprintf(stderr, " 2 (ln|f(w)|)\n"); fprintf(stderr, " 3 (|f(w)|)\n"); fprintf(stderr, " 4 (|f(w)|)^2\n"); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " (level 2)\n"); fprintf(stderr, " -i i : minimum iteration [%d]\n", MINITR); fprintf(stderr, " -j j : maximum iteration [%d]\n", MAXITR); fprintf(stderr, " -d d : end condition [%g]\n", END); fprintf(stderr, " -e e : small value added to periodogram [%g]\n", EPS); fprintf(stderr, " -E E : floor in db calculated per frame [N/A]\n"); fprintf(stderr, " -f f : minimum value of the determinant [%g]\n", MINDET); fprintf(stderr, " of the normal matrix\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " windowed sequences (%s) [stdin]\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " mel-cepstrum (%s)\n", FORMAT); fprintf(stderr, " notice:\n"); fprintf(stderr, " value of e must be e>=0\n"); fprintf(stderr, " value of E must be E<0\n"); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char **argv) { int m = ORDER, flng = FLENG, ilng = FLENG, itr1 = MINITR, itr2 = MAXITR, itype = ITYPE, etype = ETYPE; FILE *fp = stdin; double *mc, *x, a = ALPHA, end = END, e = EPS, f = MINDET; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) if (**++argv == '-') { switch (*(*argv + 1)) { case 'a': a = atof(*++argv); --argc; break; case 'm': m = atoi(*++argv); --argc; break; case 'l': flng = atoi(*++argv); --argc; break; case 'q': itype = atoi(*++argv); --argc; break; case 'i': itr1 = atoi(*++argv); --argc; break; case 'j': itr2 = atoi(*++argv); --argc; break; case 'd': end = atof(*++argv); --argc; break; case 'e': etype = 1; e = atof(*++argv); --argc; break; case 'E': etype = 2; e = atof(*++argv); --argc; break; case 'f': f = atof(*++argv); --argc; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else fp = getfp(*argv, "rb"); if (itype == 0) ilng = flng; else ilng = flng / 2 + 1; x = dgetmem(flng + m + 1); mc = x + flng; while (freadf(x, sizeof(*x), ilng, fp) == ilng) { mcep(x, flng, mc, m, a, itr1, itr2, end, etype, e, f, itype); fwritef(mc, sizeof(*mc), m + 1, stdout); } return (0); } SPTK-3.9/bin/merge/0000755001051300105040000000000012637167707011030 500000000000000SPTK-3.9/bin/merge/Makefile.am0000644001051300105040000000017712442245074012775 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = merge merge_SOURCES = merge.c merge_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/merge/Makefile.in0000644001051300105040000004243412637167415013020 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = merge$(EXEEXT) subdir = bin/merge ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_merge_OBJECTS = merge.$(OBJEXT) merge_OBJECTS = $(am_merge_OBJECTS) merge_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(merge_SOURCES) DIST_SOURCES = $(merge_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include merge_SOURCES = merge.c merge_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/merge/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/merge/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) merge$(EXEEXT): $(merge_OBJECTS) $(merge_DEPENDENCIES) $(EXTRA_merge_DEPENDENCIES) @rm -f merge$(EXEEXT) $(AM_V_CCLD)$(LINK) $(merge_OBJECTS) $(merge_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/merge.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/merge/merge.c0000644001051300105040000003006712637156641012214 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * Data Merge * * * * 1986.6 K.Tokuda * * 1996.5 K.Koishida * * * * usage: * * merge [options] file1 [infile] > stdout * * options: * * -s s : insert point [0] * * -l l : frame length of input data [25] * * -n n : order of input data [l-1] * * -L L : frame length of insert data [10] * * -N N : order of insert data [L-1] * * -o : over write mode [FALSE] * * +type : data type [f] * * c (char) C (unsigned char) * * s (short) S (unsigned short) * * i (int) I (unsigned int) * * i3 (int, 3byte) I3 (unsigned int, 3byte) * * l (long) L (unsigned long) * * le (long long) LE (unsigned long long) * * f (float) d (double) * * de (long double) * * file1: inserted data , x(0), x(1), ..., x(l-1) * * file2: input data , y(0), y(1), ..., y(n-1) * * stdout: * * x(0), ..., x(s), y(0), ...,y(n-1), x(s+1), ..., x(n-1) * * * ************************************************************************/ static char *rcs_id = "$Id: merge.c,v 1.33 2015/12/14 01:14:18 uratec Exp $"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #include #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define START 0 #define LENG1 25 #define LENG2 10 #define WRITE FA char *BOOL[] = { "FALSE", "TRUE" }; /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - data merge\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] file1 [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -s s : insert point [%d]\n", START); fprintf(stderr, " -l l : frame length of input data [%d]\n", LENG1); fprintf(stderr, " -n n : order of input data [l-1]\n"); fprintf(stderr, " -L L : frame length of insert data [%d]\n", LENG2); fprintf(stderr, " -N N : order of insert data [L-1]\n"); fprintf(stderr, " -o : over write mode [%s]\n", BOOL[WRITE]); fprintf(stderr, " +type : data type [f]\n"); fprintf(stderr, " c (char, %lubyte) C (unsigned char, %lubyte)\n", (unsigned long) sizeof(char), (unsigned long) sizeof(unsigned char)); fprintf(stderr, " s (short, %lubyte) S (unsigned short, %lubyte)\n", (unsigned long) sizeof(short), (unsigned long) sizeof(unsigned short)); fprintf(stderr, " i3 (int, 3byte) I3 (unsigned int, 3byte)\n"); fprintf(stderr, " i (int, %lubyte) I (unsigned int, %lubyte)\n", (unsigned long) sizeof(int), (unsigned long) sizeof(unsigned int)); fprintf(stderr, " l (long, %lubyte) L (unsigned long, %lubyte)\n", (unsigned long) sizeof(long), (unsigned long) sizeof(unsigned long)); fprintf(stderr, " le (long long, %lubyte) LE (unsigned long long, %lubyte)\n", (unsigned long) sizeof(long long), (unsigned long) sizeof(unsigned long long)); fprintf(stderr, " f (float, %lubyte) d (double, %lubyte)\n", (unsigned long) sizeof(float), (unsigned long) sizeof(double)); fprintf(stderr, " de (long double, %lubyte)\n", (unsigned long) sizeof(long double)); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " data sequence [stdin]\n"); fprintf(stderr, " stdout:\n"); fprintf(stderr, " merged data sequence\n"); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char **argv) { FILE *fp2 = NULL, *fp1 = stdin; int start = START, leng1 = LENG1, leng2 = LENG2, i, j, flag = 1; size_t size = sizeof(float); Boolean write = WRITE; char *y, c, *s; long double x; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) if (*(s = *++argv) == '-') { c = *++s; switch (c) { case 's': start = atoi(*++argv); --argc; break; case 'l': leng1 = atoi(*++argv); --argc; break; case 'n': leng1 = atoi(*++argv) + 1; --argc; break; case 'L': leng2 = atoi(*++argv); --argc; break; case 'N': leng2 = atoi(*++argv) + 1; --argc; break; case 'o': write = 1 - write; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else if (*s == '+') { c = *++s; switch (c) { case 'c': size = sizeof(char); break; case 's': size = sizeof(short); break; case 'i': if (*(s + 1) == '3') { size = 3; (*argv)++; } else { size = sizeof(int); } break; case 'l': if (*(s + 1) == 'e') { size = sizeof(long long); (*argv)++; } else { size = sizeof(long); } break; case 'C': size = sizeof(unsigned char); break; case 'S': size = sizeof(unsigned short); break; case 'I': if (*(s + 1) == '3') { size = 3; (*argv)++; } else { size = sizeof(unsigned int); } break; case 'L': if (*(s + 1) == 'E') { size = sizeof(unsigned long long); (*argv)++; } else { size = sizeof(unsigned long); } break; case 'f': size = sizeof(float); break; case 'd': if (*(s + 1) == 'e') { size = sizeof(long double); (*argv)++; } else { size = sizeof(double); } break; default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else if (fp2 == NULL) fp2 = getfp(*argv, "rb"); else fp1 = getfp(*argv, "rb"); if (fp2 == NULL) { fprintf(stderr, "%s : Inserted data must be specified !\n", cmnd); usage(1); } y = (char *) dgetmem(leng2 * size); for (;;) { for (j = start, i = leng1; j-- && i--;) { if (freadx(&x, size, 1, fp1) != 1) break; fwritex(&x, size, 1, stdout); } for (j = leng2; j--;) if (write) { if (freadx(&x, size, 1, fp1) != 1) break; i--; } if (freadx(y, size, leng2, fp2) != leng2) if (!flag) break; fwritex(y, size, leng2, stdout); flag = 0; for (; i-- > 0;) { if (freadx(&x, size, 1, fp1) != 1) break; fwritex(&x, size, 1, stdout); } } if ((fgetc(fp1) == EOF) && (fgetc(fp2) == EOF)) { if (feof(fp1) && feof(fp2)) return (0); } return (1); } SPTK-3.9/bin/mfcc/0000755001051300105040000000000012637167707010641 500000000000000SPTK-3.9/bin/mfcc/Makefile.am0000644001051300105040000000020312442245075012575 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = mfcc mfcc_SOURCES = _mfcc.c mfcc.c mfcc_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/mfcc/Makefile.in0000644001051300105040000004254312637167415012632 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = mfcc$(EXEEXT) subdir = bin/mfcc ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_mfcc_OBJECTS = _mfcc.$(OBJEXT) mfcc.$(OBJEXT) mfcc_OBJECTS = $(am_mfcc_OBJECTS) mfcc_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(mfcc_SOURCES) DIST_SOURCES = $(mfcc_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include mfcc_SOURCES = _mfcc.c mfcc.c mfcc_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/mfcc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/mfcc/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) mfcc$(EXEEXT): $(mfcc_OBJECTS) $(mfcc_DEPENDENCIES) $(EXTRA_mfcc_DEPENDENCIES) @rm -f mfcc$(EXEEXT) $(AM_V_CCLD)$(LINK) $(mfcc_OBJECTS) $(mfcc_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_mfcc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mfcc.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/mfcc/_mfcc.c0000644001051300105040000001772712637156641012005 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /**************************************************************** $Id: _mfcc.c,v 1.15 2015/12/14 05:34:35 uratec Exp $ Mel-Frequency Cepstral Analysis void mfcc(in, mc, sampleFreq, alpha, eps, wlng, flng m, n, ceplift, dftmode, usehamming); double *in : input sequence double *mc : mel-frequency cepstral coefficients double sampleFreq : sample frequency double alpha : pre-emphasis coefficient double eps : epsilon int wlng : frame length of input sequence int flng : frame length for fft int m : order of cepstrum int n : number of channel for mel-filter bank int ceplift : liftering coefficients Boolean dftmode : use dft Boolean usehamming : use hamming window ******************************************************************/ #include #include #include #include #if defined(WIN32) #include "SPTK.h" #else #include #endif #define MEL 1127.01048 #define EZERO (-1.0E10) double freq_mel(double freq) { return MEL * log(freq / 700.0 + 1.0); } double sample_mel(int sample, int num, double fs) { double freq; freq = (double) (sample + 1) / (double) (num) * (fs / 2.0); return freq_mel(freq); } double cal_energy(double *x, const int leng) { int k; double energy = 0.0; for (k = 0; k < leng; k++) energy += x[k] * x[k]; return ((energy <= 0) ? EZERO : log(energy)); } void hamming(double *x, const int leng) { int k; double arg; arg = M_2PI / (leng - 1); for (k = 0; k < leng; k++) x[k] *= (0.54 - 0.46 * cos(k * arg)); } void pre_emph(double *x, double *y, const double alpha, const int leng) { int k; y[0] = x[0] * (1.0 - alpha); for (k = 1; k < leng; k++) y[k] = x[k] - x[k - 1] * alpha; } void spec(double *x, double *sp, const int leng) { int k, no; double *y, *mag; no = leng / 2; y = dgetmem(leng + no); mag = y + leng; fftr(x, y, leng); for (k = 1; k < no; k++) { mag[k] = x[k] * x[k] + y[k] * y[k]; sp[k] = sqrt(mag[k]); } free(y); } void fbank(double *x, double *fb, const double eps, const double fs, const int leng, const int n) { int k, fnum, no, chanNum = 0; int *noMel; double *w, *countMel; double maxMel, kMel; no = leng / 2; noMel = (int *) getmem((size_t) no, sizeof(int)); countMel = dgetmem(n + 1 + no); w = countMel + n + 1; maxMel = freq_mel(fs / 2.0); for (k = 0; k <= n; k++) countMel[k] = (double) (k + 1) / (double) (n + 1) * maxMel; for (k = 1; k < no; k++) { kMel = sample_mel(k - 1, no, fs); while (countMel[chanNum] < kMel && chanNum <= n) chanNum++; noMel[k] = chanNum; } for (k = 1; k < no; k++) { chanNum = noMel[k]; kMel = sample_mel(k - 1, no, fs); w[k] = (countMel[chanNum] - kMel) / (countMel[0]); } for (k = 1; k < no; k++) { fnum = noMel[k]; if (fnum > 0) fb[fnum] += x[k] * w[k]; if (fnum <= n) fb[fnum + 1] += (1 - w[k]) * x[k]; } free(noMel); free(countMel); for (k = 1; k <= n; k++) { if (fb[k] < eps) fb[k] = eps; fb[k] = log(fb[k]); } } void lifter(double *x, double *y, const int m, const int leng) { int k; double theta; for (k = 0; k < m; k++) { theta = PI * (double) k / (double) leng; y[k] = (1.0 + (double) leng / 2.0 * sin(theta)) * x[k]; } } void mfcc(double *in, double *mc, const double sampleFreq, const double alpha, const double eps, const int wlng, const int flng, const int m, const int n, const int ceplift, const Boolean dftmode, const Boolean usehamming) { static double *x = NULL, *px, *wx, *sp, *fb, *dc; double energy = 0.0, c0 = 0.0; int k; if (x == NULL) { x = dgetmem(wlng + wlng + flng + flng + n + 1 + m + 1); px = x + wlng; wx = px + wlng; sp = wx + flng; fb = sp + flng; dc = fb + n + 1; } else { free(x); x = dgetmem(wlng + wlng + flng + flng + n + 1 + m + 1); px = x + wlng; wx = px + wlng; sp = wx + flng; fb = sp + flng; dc = fb + n + 1; } movem(in, x, sizeof(*in), wlng); /* calculate energy */ energy = cal_energy(x, wlng); pre_emph(x, px, alpha, wlng); /* apply hamming window */ if (usehamming) window(HAMMING, px, wlng, 0); for (k = 0; k < wlng; k++) wx[k] = px[k]; spec(wx, sp, flng); fbank(sp, fb, eps, sampleFreq, flng, n); /* calculate 0'th coefficient */ for (k = 1; k <= n; k++) c0 += fb[k]; c0 *= sqrt(2.0 / (double) n); dct(fb + 1, dc, n, m, dftmode, 0); /* liftering */ if (ceplift > 0) lifter(dc, mc, m, ceplift); else movem(dc, mc, sizeof(*dc), m); for (k = 0; k < m - 1; k++) mc[k] = mc[k + 1]; mc[m - 1] = c0; mc[m] = energy; } SPTK-3.9/bin/mfcc/mfcc.c0000644001051300105040000002650512637156641011640 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************* * * * MFCC Analysis * * * * 2011.9 T.Sawada * * * * usage: * * mfcc [ options ] [ infile ] > stdout * * options: * * -a a : pre-emphasis coefficient [0.97] * * -c c : liftering coefficient [0] * * -e e : flooring value for culculating log(x)[1.0] * * in filterbank analysis * * if x < e then x = e * * -l l : frame length of input [256] * * -L L : frame length of window [256] * * -m m : order of cepstrum [13] * * -n n : order of channel for mel-filter bank [26] * * -s s : sampling frequency (kHz) [16.0] * * -d : without using fft algorithm [FALSE] * * -w : use hamming window [FALSE] * * -E : use power [FALSE] * * -0 : use 0'th static coefficient [FALSE] * * infile: * * data sequence * * , x(0), x(1), ..., x(l-1), * * stdout: * * mel-frequency cepstral coefficients * * , mc(0), mc(1), ..., mc(m-1), * * if -E or -0 option is given, Energy E and 0'th static * * coefficient C0 is output as follows, * * , mc(0), mc(1), ..., mc(m-1), E (C0) * * if Both -E and -0 option is given, C0 is output before E * * * * require: * * mfcc() * * * *************************************************************************/ static char *rcs_id = "$Id: mfcc.c,v 1.12 2015/12/14 01:14:19 uratec Exp $"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define ORDER 12 #define WLNG 256 #define EPS 1.0 #define CHANNEL 20 #define USEHAMMING FA #define DFTMODE FA #define CZERO FA #define ENERGY FA #define SAMPLEFREQ 16.0 #define ALPHA 0.97 #define LIFT 22 #define WTYPE 0 char *BOOL[] = { "FALSE", "TRUE" }; /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - MFCC analysis\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -a a : pre-emphasis coefficient [%g]\n", ALPHA); fprintf(stderr, " -c c : liftering coefficient [%d]\n", LIFT); fprintf(stderr, " -e e : flooring value for calculating log(x) [%g]\n", EPS); fprintf(stderr, " in filterbank analysis\n"); fprintf(stderr, " if x < e, then x = e\n"); fprintf(stderr, " -s s : sampling frequency (kHz) [%.1f]\n", SAMPLEFREQ); fprintf(stderr, " -l l : frame length of input [%d]\n", WLNG); fprintf(stderr, " -L L : frame length for fft [2^n]\n"); fprintf(stderr, " default value 2^n satisfies l < 2^n\n"); fprintf(stderr, " -m m : order of cepstrum [%d]\n", ORDER); fprintf(stderr, " -n n : order of channel for mel-filter bank [%d]\n", CHANNEL); fprintf(stderr, " -w w : type of window [%d]\n", WTYPE); fprintf(stderr, " 0 (hamming)\n"); fprintf(stderr, " 1 (do not use a window function)\n"); fprintf(stderr, " -d : without using fft algorithm (use dft) [%s]\n", BOOL[DFTMODE]); fprintf(stderr, " -E : output energy [%s]\n", BOOL[ENERGY]); fprintf(stderr, " -0 : output 0'th static coefficient [%s]\n", BOOL[CZERO]); fprintf(stderr, "\n"); fprintf(stderr, " if -E or -0 option is given, the value is output\n"); fprintf(stderr, " after the MFCC. Also, if both -E and -0 option are\n"); fprintf(stderr, " given, 0'th static coefficient C0 is output before energy E.\n"); fprintf(stderr, "\n"); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " sequence (%s) [stdin]\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " mfcc (%s)\n", FORMAT); fprintf(stderr, " note:\n"); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char **argv) { int m = ORDER, l = WLNG, L = -1, n = CHANNEL, lift = LIFT, wtype = WTYPE, num = 0; double eps = EPS, fs = SAMPLEFREQ, alpha = ALPHA, *x, *mc; FILE *fp = stdin; Boolean dftmode = DFTMODE, czero = CZERO, usehamming = USEHAMMING; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) if (**++argv == '-') { switch (*(*argv + 1)) { case 'a': alpha = atof(*++argv); --argc; break; case 'c': lift = atoi(*++argv); --argc; break; case 'e': eps = atof(*++argv); --argc; break; case 'f': fs = atof(*++argv); --argc; break; case 's': fs = atof(*++argv); --argc; break; case 'l': l = atoi(*++argv); --argc; break; case 'L': L = atoi(*++argv); --argc; break; case 'm': m = atoi(*++argv); --argc; break; case 'n': n = atoi(*++argv); --argc; break; case 'w': wtype = atoi(*++argv); --argc; break; case 'd': dftmode = 1 - dftmode; break; case 'E': num++; break; case '0': czero = 1 - czero; num++; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else fp = getfp(*argv, "rb"); fs *= 1000; /* kHz -> Hz */ if (L < 0) for (L = 2; L <= l; L *= 2) { } if (wtype == 0) usehamming = 1 - usehamming; x = dgetmem(l + m + 2); mc = x + l; while (freadf(x, sizeof(*x), l, fp) == l) { mfcc(x, mc, fs, alpha, eps, l, L, m + 1, n, lift, dftmode, usehamming); if (!czero) mc[m] = mc[m + 1]; fwritef(mc, sizeof(*mc), m + num, stdout); } return 0; } SPTK-3.9/bin/mgc2mgc/0000755001051300105040000000000012637167710011242 500000000000000SPTK-3.9/bin/mgc2mgc/Makefile.am0000644001051300105040000000022212442245075013205 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = mgc2mgc mgc2mgc_SOURCES = _mgc2mgc.c mgc2mgc.c mgc2mgc_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/mgc2mgc/Makefile.in0000644001051300105040000004265612637167415013246 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = mgc2mgc$(EXEEXT) subdir = bin/mgc2mgc ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_mgc2mgc_OBJECTS = _mgc2mgc.$(OBJEXT) mgc2mgc.$(OBJEXT) mgc2mgc_OBJECTS = $(am_mgc2mgc_OBJECTS) mgc2mgc_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(mgc2mgc_SOURCES) DIST_SOURCES = $(mgc2mgc_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include mgc2mgc_SOURCES = _mgc2mgc.c mgc2mgc.c mgc2mgc_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/mgc2mgc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/mgc2mgc/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) mgc2mgc$(EXEEXT): $(mgc2mgc_OBJECTS) $(mgc2mgc_DEPENDENCIES) $(EXTRA_mgc2mgc_DEPENDENCIES) @rm -f mgc2mgc$(EXEEXT) $(AM_V_CCLD)$(LINK) $(mgc2mgc_OBJECTS) $(mgc2mgc_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_mgc2mgc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mgc2mgc.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/mgc2mgc/_mgc2mgc.c0000644001051300105040000001073012637156642013007 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /*********************************************************************** $Id: _mgc2mgc.c,v 1.17 2015/12/14 01:14:19 uratec Exp $ Frequency and Generalized Cepstral Transformation void mgc2mgc(c1, m1, a1, g1, c2, m2, a2, g2) double *c1 : minimum phase sequence (input) int m1 : order of c1 double a1 : alpha of c1 double g1 : gamma of c1 double *c2 : transformed sequence (output) int m2 : order of c2 double a2 : alpha of c2 double g2 : gamma of c2 ***********************************************************************/ #include #include #if defined(WIN32) #include "SPTK.h" #else #include #endif void mgc2mgc(double *c1, const int m1, const double a1, const double g1, double *c2, const int m2, const double a2, const double g2) { double a; static double *ca = NULL; static int size_a; if (ca == NULL) { ca = dgetmem(m1 + 1); size_a = m1; } if (m1 > size_a) { free(ca); ca = dgetmem(m1 + 1); size_a = m1; } a = (a2 - a1) / (1 - a1 * a2); if (a == 0) { movem(c1, ca, sizeof(*c1), m1 + 1); gnorm(ca, ca, m1, g1); gc2gc(ca, m1, g1, c2, m2, g2); ignorm(c2, c2, m2, g2); } else { freqt(c1, m1, c2, m2, a); gnorm(c2, c2, m2, g1); gc2gc(c2, m2, g1, c2, m2, g2); ignorm(c2, c2, m2, g2); } return; } SPTK-3.9/bin/mgc2mgc/mgc2mgc.c0000644001051300105040000002666712637156642012670 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************* * * * Frequency and Generalized Cepstral Transformation * * * * 1996.1 K.Koishida * * * * usage: * * mgc2mgc [ options ] [ infile ] > stdout * * options: * * -m m : order of generalized cepstrum (input) [25] * * -a a : alpha of generalized cepstrum (input) [0] * * -g g : gamma of generalized cepstrum (input) [0] * * -c c : gamma of generalized cepstrum (input) * * gamma = -1 / (int) c * * -n : regard input as normalized * * mel-generalized cepstrum [FALSE]* * -u : regard input as multiplied by gamma [FALSE]* * -M M : order of generalized cepstrum (output) [25] * * -A A : alpha of generalized cepstrum (output) [0] * * -G G : gamma of generalized cepstrum (output) [1] * * -C C : gamma of generalized cepstrum (output) * * gamma = -1 / (int) C * * -N N : regard output as normalized * * mel-generalized cepstrum [FALSE]* * -U : regard output as multiplied by gamma [FALSE]* * infile: * * mel-generalized cepstrum * * , c(0), c(1), ..., c(m), * * stdout: * * mel-generalized cepstrum * * , c'(0)(=c(0)), c'(1), ..., c'(M), * * notice: * * value of c and C must be c>=1, C>=1 * * require: * * mgc2mgc(), gnorm(), ignorm() * * * *************************************************************************/ static char *rcs_id = "$Id: mgc2mgc.c,v 1.32 2015/12/14 01:14:19 uratec Exp $"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define ORDER1 25 #define ORDER2 25 #define ALPHA1 0.0 #define ALPHA2 0.0 #define GAMMA1 0.0 #define GAMMA2 1.0 #define NORMFLG1 FA #define NORMFLG2 FA #define MULGFLG1 FA #define MULGFLG2 FA char *BOOL[] = { "FALSE", "TRUE" }; /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - frequency and generalized cepstral transformation\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -m m : order of mel-generalized cepstrum (input) [%d]\n", ORDER1); fprintf(stderr, " -a a : alpha of mel-generalized cepstrum (input) [%g]\n", ALPHA1); fprintf(stderr, " -g g : gamma of mel-generalized cepstrum (input) [%g]\n", GAMMA1); fprintf(stderr, " -c c : gamma of mel-generalized cepstrum = -1 / (int) c (input) \n"); fprintf(stderr, " -n : regard input as normalized mel-generalized cepstrum [%s]\n", BOOL[NORMFLG1]); fprintf(stderr, " -u : regard input as multiplied by gamma [%s]\n", BOOL[MULGFLG1]); fprintf(stderr, " -M M : order of mel-generalized cepstrum (output) [%d]\n", ORDER2); fprintf(stderr, " -A A : alpha of mel-generalized cepstrum (output) [%g]\n", ALPHA2); fprintf(stderr, " -G G : gamma of mel-generalized cepstrum (output) [%g]\n", GAMMA2); fprintf(stderr, " -C C : gamma of mel-generalized cepstrum = -1 / (int) C (output)\n"); fprintf(stderr, " -N : regard output as normalized mel-generalized cepstrum [%s]\n", BOOL[NORMFLG2]); fprintf(stderr, " -U : regard output as multiplied by gamma [%s]\n", BOOL[MULGFLG2]); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " mel-generalized cepstrum (%s) [stdin]\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " transformed mel-generalized cepstrum (%s)\n", FORMAT); fprintf(stderr, " notice:\n"); fprintf(stderr, " value of c and C must be c>=1, C>=1 \n"); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char **argv) { int m1 = ORDER1, m2 = ORDER2, i; double a1 = ALPHA1, a2 = ALPHA2, g1 = GAMMA1, g2 = GAMMA2, *c1, *c2; Boolean norm1 = NORMFLG1, norm2 = NORMFLG2, mulg1 = MULGFLG1, mulg2 = MULGFLG2; FILE *fp = stdin; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) if (**++argv == '-') { switch (*(*argv + 1)) { case 'm': m1 = atoi(*++argv); --argc; break; case 'M': m2 = atoi(*++argv); --argc; break; case 'a': a1 = atof(*++argv); --argc; break; case 'A': a2 = atof(*++argv); --argc; break; case 'g': g1 = atof(*++argv); --argc; break; case 'c': g1 = atoi(*++argv); --argc; if (g1 < 1) fprintf(stderr, "%s : value of c must be c>=1!\n", cmnd); g1 = -1.0 / g1; break; case 'G': g2 = atof(*++argv); --argc; break; case 'C': g2 = atoi(*++argv); --argc; if (g2 < 1) fprintf(stderr, "%s : value of C must be C>=1!\n", cmnd); g2 = -1.0 / g2; break; case 'n': norm1 = 1 - norm1; break; case 'N': norm2 = 1 - norm2; break; case 'u': mulg1 = 1 - mulg1; break; case 'U': mulg2 = 1 - mulg2; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else fp = getfp(*argv, "rb"); c1 = dgetmem(m1 + m2 + 2); c2 = c1 + m1 + 1; if (mulg1 && g1 == 0) { fprintf(stderr, "%s : gamma for input mgc coefficients should not equal to 0 if you specify -u option!\n", cmnd); usage(1); } while (freadf(c1, sizeof(*c1), m1 + 1, fp) == m1 + 1) { if (norm1) ignorm(c1, c1, m1, g1); else if (mulg1) c1[0] = (c1[0] - 1.0) / g1; if (mulg1) for (i = m1; i >= 1; i--) c1[i] /= g1; mgc2mgc(c1, m1, a1, g1, c2, m2, a2, g2); if (norm2) gnorm(c2, c2, m2, g2); else if (mulg2) c1[0] = c1[0] * g2 + 1.0; if (mulg2) for (i = m2; i >= 1; i--) c2[i] *= g2; fwritef(c2, sizeof(*c2), m2 + 1, stdout); } return (0); } SPTK-3.9/bin/mgc2sp/0000755001051300105040000000000012637167710011116 500000000000000SPTK-3.9/bin/mgc2sp/Makefile.am0000644001051300105040000000021512442245076013064 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = mgc2sp mgc2sp_SOURCES = _mgc2sp.c mgc2sp.c mgc2sp_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/mgc2sp/Makefile.in0000644001051300105040000004262512637167415013116 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = mgc2sp$(EXEEXT) subdir = bin/mgc2sp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_mgc2sp_OBJECTS = _mgc2sp.$(OBJEXT) mgc2sp.$(OBJEXT) mgc2sp_OBJECTS = $(am_mgc2sp_OBJECTS) mgc2sp_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(mgc2sp_SOURCES) DIST_SOURCES = $(mgc2sp_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include mgc2sp_SOURCES = _mgc2sp.c mgc2sp.c mgc2sp_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/mgc2sp/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/mgc2sp/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) mgc2sp$(EXEEXT): $(mgc2sp_OBJECTS) $(mgc2sp_DEPENDENCIES) $(EXTRA_mgc2sp_DEPENDENCIES) @rm -f mgc2sp$(EXEEXT) $(AM_V_CCLD)$(LINK) $(mgc2sp_OBJECTS) $(mgc2sp_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_mgc2sp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mgc2sp.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/mgc2sp/_mgc2sp.c0000644001051300105040000001023412637156642012536 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /*********************************************************************** $Id: _mgc2sp.c,v 1.17 2015/12/14 01:14:19 uratec Exp $ Transformation mel-generalized cepstrum to log spectrum void mgc2sp(mgc, m, a, g, sp, flng) double *mgc : mel-generalize cepstrum int m : order of mel-generalized cepstrum double a : alpha double g : gamma double *x : real part of spectrum double *y : imaginary part of spectrum int flng : FFT length ***********************************************************************/ #include #include #if defined(WIN32) #include "SPTK.h" #else #include #endif void mgc2sp(double *mgc, const int m, const double a, const double g, double *x, double *y, const int flng) { static double *c = NULL; static int size; if (c == NULL) { c = dgetmem(flng / 2 + 1); size = flng; } if (flng > size) { free(c); c = dgetmem(flng / 2 + 1); size = flng; } mgc2mgc(mgc, m, a, g, c, flng / 2, 0.0, 0.0); c2sp(c, flng / 2, x, y, flng); return; } SPTK-3.9/bin/mgc2sp/mgc2sp.c0000644001051300105040000002736412637156642012413 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * Transform Mel-Generalize Cepstrum to Spectrum * * * * 1996.4 K.Koishida * * 2010.5 A.Tamamori * * * * usage: * * mgc2sp [ options ] [ infile ] > stdout * * options: * * -a a : alpha [0] * * -g g : gamma [0] * * -c c : gamma = -1 / (int) c * * -m m : order of mel-generalized cepstrum [25] * * -n : regard input as normalized cepstrum [FALSE] * * -u : regard input as multiplied by gamma [FALSE] * * -l l : FFT length [256] * * -p : output phase [FALSE] * * -o o : output format (see stdout) [0] * * 0 (20 * log|H(z)|) * * 1 (ln|H(z)|) * * 2 (|H(z)|) * * 3 (|H(z)|^2) * * -p option is specified * * 0 (arg|H(z)| / pi [pi rad]) * * 1 (arg|H(z)| [rad]) * * 2 (arg|H(z)| * 180 / pi [deg]) * * infile: * * mel-generalized cepstrum * * , c(0), c(1), ..., c(m), * * stdout: * * spectrum * * , s(0), s(1), ..., s(L/2), * * notice: * * value of c must be c>=1 * * require: * * mgc2sp() * * * ************************************************************************/ static char *rcs_id = "$Id: mgc2sp.c,v 1.32 2015/12/14 01:14:19 uratec Exp $"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #include #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define ORDER 25 #define ALPHA 0.0 #define GAMMA 0.0 #define NORM FA #define LENG 256 #define OTYPE 0 #define PHASE FA #define MULG FA char *BOOL[] = { "FALSE", "TRUE" }; /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - transform mel-generalized cepstrum to spectrum\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -a a : alpha [%g]\n", ALPHA); fprintf(stderr, " -g g : gamma [%g]\n", GAMMA); fprintf(stderr, " -c c : gamma = -1 / (int) c \n"); fprintf(stderr, " -m m : order of mel-generalized cepstrum [%d]\n", ORDER); fprintf(stderr, " -n : regard input as normalized cepstrum [%s]\n", BOOL[NORM]); fprintf(stderr, " -u : regard input as multiplied by gamma [%s]\n", BOOL[MULG]); fprintf(stderr, " -l l : FFT length [%d]\n", LENG); fprintf(stderr, " -p : output phase [%s]\n", BOOL[PHASE]); fprintf(stderr, " -o o : output format [%d]\n", OTYPE); fprintf(stderr, " 0 (20*log|H(z)|)\n"); fprintf(stderr, " 1 (ln|H(z)|)\n"); fprintf(stderr, " 2 (|H(z)|)\n"); fprintf(stderr, " 3 (|H(z)|^2)\n"); fprintf(stderr, " -p option is specified\n"); fprintf(stderr, " 0 (arg|H(z)|/pi [pi rad])\n"); fprintf(stderr, " 1 (arg|H(z)| [rad])\n"); fprintf(stderr, " 2 (arg|H(z)|*180/pi [deg])\n"); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " mel-generalized cepstrum (%s) [stdin]\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " spectrum (%s)\n", FORMAT); fprintf(stderr, " notice:\n"); fprintf(stderr, " value of c must be c>=1\n"); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char **argv) { int m = ORDER, l = LENG, otype = OTYPE, no, i; double alpha = ALPHA, gamma = GAMMA, *c, *x, *y, logk; Boolean norm = NORM, phase = PHASE, mulg = MULG; FILE *fp = stdin; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) if (**++argv == '-') { switch (*(*argv + 1)) { case 'm': m = atoi(*++argv); --argc; break; case 'a': alpha = atof(*++argv); --argc; break; case 'g': gamma = atof(*++argv); --argc; break; case 'c': gamma = atoi(*++argv); --argc; if (gamma < 1) fprintf(stderr, "%s : value of c must be c>=1!\n", cmnd); gamma = -1.0 / gamma; break; case 'n': norm = 1 - norm; break; case 'u': mulg = 1 - mulg; break; case 'l': l = atoi(*++argv); --argc; break; case 'o': otype = atoi(*++argv); --argc; break; case 'p': phase = 1 - phase; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else fp = getfp(*argv, "rb"); x = dgetmem(l + l + m + 1); y = x + l; c = y + l; no = l / 2 + 1; logk = 20.0 / log(10.0); while (freadf(c, sizeof(*c), m + 1, fp) == m + 1) { if (norm) ignorm(c, c, m, gamma); else if (mulg) { if (gamma == 0) { fprintf(stderr, "%s : gamma for input mgc coefficients should not equal to 0 if you specify -u option!\n", cmnd); usage(1); } c[0] = (c[0] - 1.0) / gamma; } if (mulg) { if (gamma == 0) { fprintf(stderr, "%s : gamma for input mgc coefficients should not equal to 0 if you specify -u option!\n", cmnd); usage(1); } for (i = m; i > 0; i--) c[i] /= gamma; } mgc2sp(c, m, alpha, gamma, x, y, l); if (phase) switch (otype) { case 1: for (i = no; i--;) x[i] = y[i]; break; case 2: for (i = no; i--;) x[i] = y[i] * 180 / PI; break; default: for (i = no; i--;) x[i] = y[i] / PI; break; } else switch (otype) { case 1: break; case 2: for (i = no; i--;) x[i] = exp(x[i]); break; case 3: for (i = no; i--;) x[i] = exp(2 * x[i]); break; default: for (i = no; i--;) x[i] *= logk; break; } fwritef(x, sizeof(*x), no, stdout); } return (0); } SPTK-3.9/bin/mgclsp2sp/0000755001051300105040000000000012637167710011635 500000000000000SPTK-3.9/bin/mgclsp2sp/Makefile.am0000644001051300105040000000023412442245151013576 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = mgclsp2sp mgclsp2sp_SOURCES = _mgclsp2sp.c mgclsp2sp.c mgclsp2sp_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/mgclsp2sp/Makefile.in0000644001051300105040000004274012637167416013634 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = mgclsp2sp$(EXEEXT) subdir = bin/mgclsp2sp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_mgclsp2sp_OBJECTS = _mgclsp2sp.$(OBJEXT) mgclsp2sp.$(OBJEXT) mgclsp2sp_OBJECTS = $(am_mgclsp2sp_OBJECTS) mgclsp2sp_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(mgclsp2sp_SOURCES) DIST_SOURCES = $(mgclsp2sp_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include mgclsp2sp_SOURCES = _mgclsp2sp.c mgclsp2sp.c mgclsp2sp_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/mgclsp2sp/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/mgclsp2sp/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) mgclsp2sp$(EXEEXT): $(mgclsp2sp_OBJECTS) $(mgclsp2sp_DEPENDENCIES) $(EXTRA_mgclsp2sp_DEPENDENCIES) @rm -f mgclsp2sp$(EXEEXT) $(AM_V_CCLD)$(LINK) $(mgclsp2sp_OBJECTS) $(mgclsp2sp_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_mgclsp2sp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mgclsp2sp.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/mgclsp2sp/_mgclsp2sp.c0000644001051300105040000001224212637156647014002 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /*************************************************************** $ $ Transform mgc-lsp to spectrum void mgclsp2sp(a, g, lsp, m, x, l) double a : alpha double g : gamma double *lsp : mgc-lsp int m : order of mgc-lsp double *x : real part of spectrum double l : FFT length ***************************************************************/ #include #include #include #if defined(WIN32) #include "SPTK.h" #else #include #endif #define LOG2 (0.693147180559945) double log_conv(double x) { double temp; temp = log(fabs(x)); if (temp < LSMALL) return LZERO; else return temp; } double log_add(double x, double y) { double lmin, lmax; if (x == y) return x + LOG2; lmin = (x < y) ? x : y; lmax = (x < y) ? y : x; if (lmax > lmin + 50) return lmax; else return lmax + log_conv(exp(lmin - lmax) + 1.0); } double mel_conv(double a, double w) { return w + 2.0 * atan(a * sin(w) / (1.0 - a * cos(w))); } void mgclsp2sp(double a, double g, double *lsp, const int m, double *x, const int l, const int gain) { int i, p; double w, eq1, eq2, ap = 0.0; for (p = 0; p < l; p++) { eq1 = 0.0; eq2 = 0.0; w = mel_conv(a, p * (M_PI / (l - 1))); if (m % 2 == 0) { for (i = 0; i < m / 2; i++) { eq1 += 2.0 * log_conv(cos(w) - cos(lsp[2 * i + gain])); eq2 += 2.0 * log_conv(cos(w) - cos(lsp[2 * i + 1 + gain])); } eq1 += 2.0 * log_conv(cos(w / 2.0)); eq2 += 2.0 * log_conv(sin(w / 2.0)); ap = m * log(2.0) + log_add(eq1, eq2); } else { for (i = 0; i < (m + 1) / 2; i++) eq1 += 2.0 * log_conv(cos(w) - cos(lsp[2 * i + gain])); for (i = 0; i < (m - 1) / 2; i++) eq2 += 2.0 * log_conv(cos(w) - cos(lsp[2 * i + 1 + gain])); eq2 += 2.0 * log_conv(sin(w)); ap = (m - 1.0) * log(2.0) + log_add(eq1, eq2); } x[p] = -0.5 * ap; x[p] *= -(1.0 / g); if (gain == 1) x[p] += lsp[0]; } } SPTK-3.9/bin/mgclsp2sp/mgclsp2sp.c0000644001051300105040000003001412637156647013640 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************* * * * Transform LSP to Spectrum * * * * 2013.6 T.Aritake * * * * usage: * * mgclsp2sp [ options ] [ infile ] > stdout * * options: * * -a a : alpha [0] * * -g g : gamma [1] * * -c c : gamma = -1 / (int) c * * -m m : order of LSP [25] * * -s s : sampling frequency [10] * * -l l : frame length [256] * * -L : regard input log gain as linear one [FALSE] * * -k : input gain [TRUE] * * -q q : input format [0] * * 0 (normalized frequency <0...pi)> * * 1 (normalized frequency <0...0.5>) * * 2 (frequency (kHz)) * * 3 (frequency (Hz)) * * infile: * * mgc-lsp * * , f(1), ..., f(m), [stdin] * * stdout: * * spectrum * * , s(0), s(1), ..., s(L/2), * * require: * * mgclsp2sp() * * * *************************************************************************/ static char *rcs_id = ""; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #include #include #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define ORDER 10 #define ALPHA 0.0 #define GAMMA -1.0 #define ITYPE 0 #define SAMPLING 10.0 #define GAIN 1 #define LENG 256 #define OTYPE 0 char *BOOL[] = { "FALSE", "TRUE" }; /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - transform LSP to spectrum\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -a a : alpha [%g]\n", ALPHA); fprintf(stderr, " -g g : gamma [%g]\n", GAMMA); fprintf(stderr, " -c c : gamma = -1 / (int) c \n"); fprintf(stderr, " -m m : order of mgc-lsp [%d]\n", ORDER); fprintf(stderr, " -s s : sampling frequency [%.1f]\n", SAMPLING); fprintf(stderr, " -l l : frame length [%d]\n", LENG); fprintf(stderr, " -L : regard input log gain as linear one [FALSE]\n"); fprintf(stderr, " -k : input gain [TRUE]\n"); fprintf(stderr, " -q q : input format [%d]\n", ITYPE); fprintf(stderr, " 0 (normalized frequency <0...pi>)\n"); fprintf(stderr, " 1 (normalized frequency <0...0.5>)\n"); fprintf(stderr, " 2 (frequency (kHz))\n"); fprintf(stderr, " 3 (frequency (Hz))\n"); fprintf(stderr, " -o o : output format [%d]\n", OTYPE); fprintf(stderr, " 0 (20*log|H(z)|)\n"); fprintf(stderr, " 1 (ln|H(z)|)\n"); fprintf(stderr, " 2 (|H(z)|)\n"); fprintf(stderr, " 3 (|H(z)|^2)\n"); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " mgc-lsp (%s) [stdin]\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " spectrum (%s)\n", FORMAT); fprintf(stderr, " notice:\n"); fprintf(stderr, " Value of gamma must be -1 <= gamma < 0\n"); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char **argv) { int leng = LENG, m = ORDER, itype = ITYPE, otype = OTYPE, gain = GAIN; double alpha = ALPHA, gamma = GAMMA; FILE *fp = stdin; double logk, sampling = SAMPLING; double *x, *lsp; int i, no, loggain = 1; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) if (**++argv == '-') { switch (*(*argv + 1)) { case 'a': case 'g': case 'c': if (isdigit(**(argv + 1)) == 0) { /* Check the value is correct */ if (**(argv + 1) != '+' && **(argv + 1) != '-') { fprintf(stderr, "%s : need numerical number !\n", cmnd); usage(1); } else if (isdigit(*(*(argv + 1) + 1)) == 0) { fprintf(stderr, "%s : need numerical number !\n", cmnd); usage(1); } } if ((*(*argv + 1)) == 'a') { alpha = atof(*++argv); } else if ((*(*argv + 1)) == 'g') { gamma = atof(*++argv); if (gamma == 0.0) { fprintf(stderr, "%s : value of g must not be zero!\n", cmnd); } } else { gamma = atof(*++argv); if (gamma < 1) fprintf(stderr, "%s : value of c must be c>=1!\n", cmnd); gamma = -1.0 / gamma; } --argc; break; case 'm': case 's': case 'l': case 'i': case 'q': case 'o': if (isdigit(**(argv + 1)) == 0) { if ((**(argv + 1)) != '+') { fprintf(stderr, "%s : %s option need positive value !\n", cmnd, *argv); usage(1); } else if (isdigit(*(*(argv + 1) + 1)) == 0) { fprintf(stderr, "%s : %s option need positive value !\n", cmnd, *argv); usage(1); } } if ((*(*argv + 1)) == 'm') m = atoi(*++argv); else if ((*(*argv + 1)) == 's') sampling = atof(*++argv); else if ((*(*argv + 1)) == 'l') leng = atoi(*++argv); else if ((*(*argv + 1)) == 'i' || (*(*argv + 1)) == 'q') itype = atoi(*++argv); else if ((*(*argv + 1)) == 'o') otype = atoi(*++argv); --argc; break; case 'L': loggain = 0; break; case 'k': gain = 0; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else fp = getfp(*argv, "rb"); lsp = dgetmem(m + gain); no = leng / 2 + 1; x = dgetmem(no); logk = 20.0 / log(10.0); while (freadf(lsp, sizeof(*lsp), m + gain, fp) == m + gain) { if (itype == 1) for (i = gain; i < m + gain; i++) lsp[i] *= PI2; else if (itype == 2 || itype == 3) { for (i = gain; i < m + gain; i++) lsp[i] = lsp[i] / sampling * PI2; } if (loggain == 0) *lsp = log(*lsp); mgclsp2sp(alpha, gamma, lsp, m, x, no, gain); switch (otype) { case 1: break; case 2: for (i = no; i--;) x[i] = exp(x[i]); break; case 3: for (i = no; i--;) x[i] = exp(2 * x[i]); break; default: for (i = no; i--;) x[i] *= logk; break; } fwritef(x, sizeof(*x), no, stdout); } free(lsp); free(x); return (0); } SPTK-3.9/bin/mgcep/0000755001051300105040000000000012637167710011016 500000000000000SPTK-3.9/bin/mgcep/Makefile.am0000644001051300105040000000021012442245077012760 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = mgcep mgcep_SOURCES = _mgcep.c mgcep.c mgcep_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/mgcep/Makefile.in0000644001051300105040000004257412637167416013022 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = mgcep$(EXEEXT) subdir = bin/mgcep ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_mgcep_OBJECTS = _mgcep.$(OBJEXT) mgcep.$(OBJEXT) mgcep_OBJECTS = $(am_mgcep_OBJECTS) mgcep_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(mgcep_SOURCES) DIST_SOURCES = $(mgcep_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include mgcep_SOURCES = _mgcep.c mgcep.c mgcep_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/mgcep/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/mgcep/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) mgcep$(EXEEXT): $(mgcep_OBJECTS) $(mgcep_DEPENDENCIES) $(EXTRA_mgcep_DEPENDENCIES) @rm -f mgcep$(EXEEXT) $(AM_V_CCLD)$(LINK) $(mgcep_OBJECTS) $(mgcep_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_mgcep.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mgcep.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/mgcep/_mgcep.c0000644001051300105040000003002112637156642012332 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /**************************************************************** $Id: _mgcep.c,v 1.31 2015/12/14 01:14:19 uratec Exp $ Mel-Generalized Cepstral Analysis int mgcep(xw, flng, b, m, a, g, n, itr1, itr2, dd, etype, e, f, itype); double *xw : input sequence int flng : frame length double *b : coefficient b'(m) int m : order of mel cepstrum double a : alpha double g : gamma int n : order of recursions int itr1 : minimum number of iteration int itr2 : maximum number of iteration double dd : end condition int etype : 0 -> e is not used 1 -> e is initial value for log-periodogram 2 -> e is floor periodogram in db double e : value for log-periodogram or floor periodogram in db double f : mimimum value of the determinant of the normal matrix int itype : input data type return value : 0 -> completed by end condition -1-> completed by maximum iteration *****************************************************************/ #include #include #include #if defined(WIN32) #include "SPTK.h" #else #include #endif /* gain(epsilon) calculation */ static double gain(double *er, double *c, int m, double g) { int i; double t; if (g != 0.0) { for (t = 0.0, i = 1; i <= m; i++) t += er[i] * c[i]; return (er[0] + g * t); } else return (er[0]); } /* b'(m) to c(m) */ static void b2c(double *b, int m1, double *c, int m2, double a) { int i, j; static double *d = NULL, *g; static int size; double k; if (d == NULL) { size = m2; d = dgetmem(size + size + 2); g = d + size + 1; } if (m2 > size) { free(d); size = m2; d = dgetmem(size + size + 2); g = d + size + 1; } k = 1 - a * a; fillz(g, sizeof(*g), m2 + 1); for (i = -m1; i <= 0; i++) { d[0] = g[0]; g[0] = b[-i]; if (1 <= m2) g[1] = k * d[0] + a * (d[1] = g[1]); for (j = 2; j <= m2; j++) g[j] = d[j - 1] + a * ((d[j] = g[j]) - g[j - 1]); } movem(g, c, sizeof(*g), m2 + 1); return; } /* recursion for p(m) */ static void ptrans(double *p, int m, double a) { double d, o; d = p[m]; for (m--; m > 0; m--) { o = p[m] + a * d; d = p[m]; p[m] = o; } o = a * d; p[m] = (1. - a * a) * p[m] + o + o; return; } /* recursion for q(m) */ static void qtrans(double *q, int m, double a) { int i; double d, o; m += m; i = 1; d = q[i]; for (i++; i <= m; i++) { o = q[i] + a * d; d = q[i]; q[i] = o; } return; } int mgcep(double *xw, int flng, double *b, const int m, const double a, const double g, const int n, const int itr1, const int itr2, const double dd, const int etype, const double e, const double f, const int itype) { int i, j, flag = 0; static double *x = NULL, *y, *d; static int size_x, size_c; double ep, epo, eps = 0.0, min, max; if (etype == 1 && e < 0.0) { fprintf(stderr, "mgcep : value of e must be e>=0!\n"); exit(1); } if (etype == 2 && e >= 0.0) { fprintf(stderr, "mgcep : value of E must be E<0!\n"); exit(1); } if (etype == 1) { eps = e; } if (x == NULL) { x = dgetmem(flng + flng); y = x + flng; size_x = flng; d = dgetmem(m + 1); size_c = m; } if (flng > size_x) { free(x); x = dgetmem(flng + flng); y = x + flng; size_x = flng; } if (m > size_c) { free(d); d = dgetmem(m + 1); size_c = m; } movem(xw, x, sizeof(*x), flng); switch (itype) { case 0: /* windowed data sequence */ fftr(x, y, flng); for (i = 0; i < flng; i++) { x[i] = x[i] * x[i] + y[i] * y[i] + eps; /* periodogram */ } break; case 1: /* dB */ for (i = 0; i <= flng / 2; i++) { x[i] = exp((x[i] / 20.0) * log(10.0)); /* dB -> amplitude spectrum */ x[i] = x[i] * x[i] + eps; /* amplitude -> periodogram */ } break; case 2: /* log */ for (i = 0; i <= flng / 2; i++) { x[i] = exp(x[i]); /* log -> amplitude spectrum */ x[i] = x[i] * x[i] + eps; /* amplitude -> periodogram */ } break; case 3: /* amplitude */ for (i = 0; i <= flng / 2; i++) { x[i] = x[i] * x[i] + eps; /* amplitude -> periodogram */ } break; case 4: /* periodogram */ for (i = 0; i <= flng / 2; i++) { x[i] = x[i] + eps; } break; default: fprintf(stderr, "mgcep : Input type %d is not supported!\n", itype); exit(1); } if (itype > 0) { for (i = 1; i < flng / 2; i++) x[flng - i] = x[i]; } if (etype == 2 && e < 0.0) { max = x[0]; for (i = 1; i < flng; i++) { if (max < x[i]) max = x[i]; } max = sqrt(max); min = max * pow(10.0, e / 20.0); /* floor is 20*log10(min/max) */ min = min * min; for (i = 0; i < flng; i++) { if (x[i] < min) x[i] = min; } } /* initial value */ fillz(b, sizeof(*b), m + 1); ep = newton(x, flng, b, m, a, -1.0, n, 0, f); if (g != -1.0) { if (a != 0.0) { ignorm(b, b, m, -1.0); /* K, b'r(m) -> br(m) */ b2mc(b, b, m, a); /* br(m) -> c~r(m) */ gnorm(b, d, m, -1.0); /* c~r(m) -> K~, c~'r(m) */ } else movem(b, d, sizeof(*b), m + 1); gc2gc(d, m, -1.0, b, m, g); /* K~, c~'r(m) -> K~, c~'r'(m) */ if (a != 0.0) { ignorm(b, b, m, g); /* K~, c~'r'(m) -> c~r(m) */ mc2b(b, b, m, a); /* c~r(m) -> br(m) */ gnorm(b, b, m, g); /* br(m) -> K, b'r'(m) */ } } /* Newton-Raphson method */ if (g != -1.0) { for (j = 1; j <= itr2; j++) { epo = ep; ep = newton(x, flng, b, m, a, g, n, j, f); if (j >= itr1) if (fabs((epo - ep) / ep) < dd) { flag = 1; break; } } } if (flag) return (0); else return (-1); } double newton(double *x, const int flng, double *c, const int m, const double a, const double g, const int n, const int j, const double f) { int i, m2; double t = 0, s, tr, ti, trr, tii; static double *cr = NULL, *ci, *pr, *qr, *qi, *rr, *ri, *b; static int size_cr, size_b; if (cr == NULL) { cr = dgetmem(7 * flng); ci = cr + flng; pr = ci + flng; qr = pr + flng; qi = qr + flng; rr = qi + flng; ri = rr + flng; size_cr = flng; b = dgetmem(m + 1); size_b = m; } if (flng > size_cr) { free(cr); cr = dgetmem(7 * flng); ci = cr + flng; pr = ci + flng; qr = pr + flng; qi = qr + flng; rr = qi + flng; ri = rr + flng; size_cr = flng; } if (m > size_b) { free(b); b = dgetmem(m + 1); size_b = m; } m2 = m + m; fillz(cr, sizeof(*cr), flng); movem(&c[1], &cr[1], sizeof(*c), m); if (a != 0.0) b2c(cr, m, cr, n, -a); fftr(cr, ci, flng); /* cr +j ci : FFT[c] */ if (g == -1.0) movem(x, pr, sizeof(*x), flng); else if (g == 0.0) for (i = 0; i < flng; i++) pr[i] = x[i] / exp(cr[i] + cr[i]); else for (i = 0; i < flng; i++) { tr = 1 + g * cr[i]; ti = g * ci[i]; s = (trr = tr * tr) + (tii = ti * ti); t = x[i] * pow(s, -1.0 / g); pr[i] = (t /= s); rr[i] = tr * t; ri[i] = ti * t; t /= s; qr[i] = (trr - tii) * t; s = tr * ti * t; qi[i] = s + s; } ifftr(pr, ci, flng); if (a != 0.0) b2c(pr, n, pr, m2, a); if (g == 0.0 || g == -1.0) { movem(pr, qr, sizeof(*pr), m2 + 1); movem(pr, rr, sizeof(*pr), m + 1); } else { ifft(qr, qi, flng); ifft(rr, ri, flng); if (a != 0.0) { b2c(qr, n, qr, n, a); b2c(rr, n, rr, m, a); } } if (a != 0.0) { ptrans(pr, m, a); qtrans(qr, m, a); } /* c[0] : gain, t : epsilon */ if (g != -1.0) c[0] = sqrt(t = gain(rr, c, m, g)); if (g == -1.0) fillz(qr, sizeof(*qr), m2 + 1); else if (g != 0.0) for (i = 2; i <= m2; i++) qr[i] *= 1.0 + g; if (theq(pr, &qr[2], &b[1], &rr[1], m, f)) { fprintf(stderr, "mgcep : Error in theq() at %dth iteration!\n", j); exit(1); } for (i = 1; i <= m; i++) c[i] += b[i]; /* c[0] : gain, t : epsilon */ if (g == -1.0) c[0] = sqrt(t = gain(rr, c, m, g)); return (log(t)); } SPTK-3.9/bin/mgcep/mgcep.c0000644001051300105040000003230012637156642012175 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * Mel-Generalized Cepstral Analysis * * * * 1990.7 K.Tokuda * * 1996.3 K.Koishida * * * * usage: * * mgcep [ options ] [ infile ] > stdout * * options: * * -a a : alpha [0.35] * * -g g : gamma [0] * * -c c : gamma = -1 / (int) c * * -m m : order of mel-generalized cepstrum [25] * * -l l : frame length (FFT length) [256] * * -q q : Input format [0] * * 0 (windowed data sequence) * * 1 (20*log|f(w)|) * * 2 (ln|f(w)|) * * 3 (|f(w)|) * * 4 (|f(w)|^2) * * -o o : output format (see stdout) [0] * * 0 (c~0...c~m) * * 1 (b0...bm) * * 2 (K~,c~'1...c~'m) * * 3 (K,b'1...b'm) * * 4 (K~,g*c~'1...g*c~'m) * * 5 (K,g*b'1...g*b'm) * * (level 2) * * -i i : minimum iteration [2] * * -j j : maximum iteration [30] * * -d d : end condition [0.001] * * -p p : order of recursions [l-1] * * -e e : small value added to periodogram [0] * * -E E : floor in db calculated per frame [N/A] * * -f f : mimimum value of the determinant * * of the normal matrix [0.000001] * * infile: * * windowed sequence (if q==0) * * , x(0), x(1), ..., x(L-1), * * spectrum sequence (otherwise) * * , f(0), f(1), ..., f(L/2), * * stdout: * * mel-generalized cepstrum (float) * * notice: * * value of c must be c>=1 * * value of e must be e>=0 * * value of E must be E<0 * * require: * * mgcep() * * * ************************************************************************/ static char *rcs_id = "$Id: mgcep.c,v 1.43 2015/12/14 05:34:35 uratec Exp $"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define ALPHA 0.35 #define GAMMA 0.0 #define ORDER 25 #define FLENG 256 #define OTYPE 0 #define ITYPE 0 #define ETYPE 0 #define MINITR 2 #define MAXITR 30 #define END 0.001 #define EPS 0.0 #define MINDET 0.000001 /* Command Name */ char *cmnd; void usage(const int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - mel-generalized cepstral analysis\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -a a : alpha [%g]\n", ALPHA); fprintf(stderr, " -g g : gamma [%g]\n", GAMMA); fprintf(stderr, " -c c : gamma = -1 / (int) c \n"); fprintf(stderr, " -m m : order of mel-generalized cepstrum [%d]\n", ORDER); fprintf(stderr, " -l l : frame length (FFT length) [%d]\n", FLENG); fprintf(stderr, " -q q : input format [%d]\n", ITYPE); fprintf(stderr, " 0 (windowed sequence\n"); fprintf(stderr, " 1 (20*log|f(w)|)\n"); fprintf(stderr, " 2 (ln|f(w)|)\n"); fprintf(stderr, " 3 (|f(w)|)\n"); fprintf(stderr, " 4 (|f(w)|)^2\n"); fprintf(stderr, " -o o : output format [%d]\n", OTYPE); fprintf(stderr, " 0 (c~0...c~m)\n"); fprintf(stderr, " 1 (b0...bm)\n"); fprintf(stderr, " 2 (K~,c~'1...c~'m)\n"); fprintf(stderr, " 3 (K,b'1...b'm)\n"); fprintf(stderr, " 4 (K~,g*c~'1...g*c~'m)\n"); fprintf(stderr, " 5 (K,g*b'1...g*b'm)\n"); fprintf(stderr, " (level 2)\n"); fprintf(stderr, " -i i : minimum iteration [%d]\n", MINITR); fprintf(stderr, " -j j : maximum iteration [%d]\n", MAXITR); fprintf(stderr, " -d d : end condition [%g]\n", END); fprintf(stderr, " -p p : order of recursions [l-1]\n"); fprintf(stderr, " -e e : small value added to periodogram [%g]\n", EPS); fprintf(stderr, " -E E : floor in db calculated per frame [N/A]\n"); fprintf(stderr, " -f f : mimimum value of the determinant [%g]\n", MINDET); fprintf(stderr, " of the normal matrix\n"); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " windowed sequence or spectrum (%s) [stdin]\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " mel-generalized cepstrum (%s)\n", FORMAT); fprintf(stderr, " notice:\n"); fprintf(stderr, " value of c must be c>=1\n"); fprintf(stderr, " value of e must be e>=0\n"); fprintf(stderr, " value of E must be E<0\n"); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char **argv) { int m = ORDER, flng = FLENG, ilng = FLENG, itr1 = MINITR, itr2 = MAXITR, n = -1, otype = OTYPE, itype = ITYPE, etype = ETYPE, i; FILE *fp = stdin; double *b, *x, a = ALPHA, g = GAMMA, end = END, e = EPS, f = MINDET; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) if (**++argv == '-') { switch (*(*argv + 1)) { case 'a': a = atof(*++argv); --argc; break; case 'g': g = atof(*++argv); --argc; break; case 'c': g = atoi(*++argv); --argc; if (g < 1) fprintf(stderr, "%s : value of c must be c>=1!\n", cmnd); g = -1.0 / g; break; case 'm': m = atoi(*++argv); --argc; break; case 'l': flng = atoi(*++argv); --argc; break; case 'q': itype = atoi(*++argv); --argc; break; case 'o': otype = atoi(*++argv); --argc; break; case 'i': itr1 = atoi(*++argv); --argc; break; case 'j': itr2 = atoi(*++argv); --argc; break; case 'p': n = atoi(*++argv); --argc; break; case 'd': end = atof(*++argv); --argc; break; case 'e': etype = 1; e = atof(*++argv); --argc; break; case 'E': etype = 2; e = atof(*++argv); --argc; break; case 'f': f = atof(*++argv); --argc; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else fp = getfp(*argv, "rb"); if (n == -1) n = flng - 1; if (itype == 0) ilng = flng; else ilng = flng / 2 + 1; x = dgetmem(flng + m + m + 2); b = x + flng; while (freadf(x, sizeof(*x), ilng, fp) == ilng) { mgcep(x, flng, b, m, a, g, n, itr1, itr2, end, etype, e, f, itype); if (otype == 0 || otype == 1 || otype == 2 || otype == 4) ignorm(b, b, m, g); /* K, b'r --> br */ if (otype == 0 || otype == 2 || otype == 4) if (a != 0.0) b2mc(b, b, m, a); /* br --> c~r */ if (otype == 2 || otype == 4) gnorm(b, b, m, g); /* c~r --> K~, c~'r */ if (otype == 4 || otype == 5) for (i = m; i >= 1; i--) b[i] *= g; fwritef(b, sizeof(*b), m + 1, stdout); } return (0); } SPTK-3.9/bin/mglsadf/0000755001051300105040000000000012637167710011340 500000000000000SPTK-3.9/bin/mglsadf/Makefile.am0000644001051300105040000000022212442245100013270 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = mglsadf mglsadf_SOURCES = _mglsadf.c mglsadf.c mglsadf_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/mglsadf/Makefile.in0000644001051300105040000004265612637167416013345 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = mglsadf$(EXEEXT) subdir = bin/mglsadf ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_mglsadf_OBJECTS = _mglsadf.$(OBJEXT) mglsadf.$(OBJEXT) mglsadf_OBJECTS = $(am_mglsadf_OBJECTS) mglsadf_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(mglsadf_SOURCES) DIST_SOURCES = $(mglsadf_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include mglsadf_SOURCES = _mglsadf.c mglsadf.c mglsadf_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/mglsadf/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/mglsadf/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) mglsadf$(EXEEXT): $(mglsadf_OBJECTS) $(mglsadf_DEPENDENCIES) $(EXTRA_mglsadf_DEPENDENCIES) @rm -f mglsadf$(EXEEXT) $(AM_V_CCLD)$(LINK) $(mglsadf_OBJECTS) $(mglsadf_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_mglsadf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mglsadf.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/mglsadf/_mglsadf.c0000644001051300105040000002153512637156642013210 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /**************************************************************** $Id: _mglsadf.c,v 1.20 2015/12/14 01:14:19 uratec Exp $ MGLSA Digital Filter double mglsadf(x, b, m, a, n, d) double x : input double *b : filter coefficients (K, g*b'(1), ..., g*b'(m)) int m : order of cepstrum double a : alpha int n : -1/gamma double *d : delay return value : filtered data Inverse MGLSA Digital Filter double imglsadf(x, b, m, a, n, d) double x : input double *b : filter coefficients (K, g*b'(1), ..., g*b'(m)) int m : order of cepstrum double a : alpha int n : -1/gamma double *d : delay return value : filtered data *****************************************************************/ #include #if defined(WIN32) #include "SPTK.h" #else #include #endif static double mglsadff(double x, double *b, const int m, const double a, double *d) { int i; double y, aa; aa = 1 - a * a; y = d[0] * b[1]; for (i = 1; i < m; i++) { d[i] += a * (d[i + 1] - d[i - 1]); y += d[i] * b[i + 1]; } x -= y; for (i = m; i > 0; i--) d[i] = d[i - 1]; d[0] = a * d[0] + aa * x; return (x); } double mglsadf(double x, double *b, const int m, const double a, const int n, double *d) { int i; for (i = 0; i < n; i++) x = mglsadff(x, b, m, a, &d[i * (m + 1)]); return (x); } static double mglsadff1(double x, double *b, const int m, const double a, const double g, double *d) { int i; double y, aa; aa = 1 - a * a; y = d[0] * b[1]; for (i = 1; i < m; i++) { d[i] += a * (d[i + 1] - d[i - 1]); y += d[i] * b[i + 1]; } x -= g * y; for (i = m; i > 0; i--) d[i] = d[i - 1]; d[0] = a * d[0] + aa * x; return (x); } double mglsadf1(double x, double *b, const int m, const double a, const int n, double *d) { int i; double g; g = -1.0 / (double) n; for (i = 0; i < n; i++) x = mglsadff1(x, b, m, a, g, &d[i * (m + 1)]); return (x); } static double mglsadfft(double x, double *b, const int m, const double a, double *d) { int i; x -= d[0] * (1.0 - a * a); d[m] = b[m] * x + a * d[m - 1]; for (i = m - 1; i >= 1; i--) d[i] += b[i] * x + a * (d[i - 1] - d[i + 1]); for (i = 0; i < m; i++) d[i] = d[i + 1]; return (x); } double mglsadft(double x, double *b, const int m, const double a, const int n, double *d) { int i; for (i = 0; i < n; i++) x = mglsadfft(x, b, m, a, &d[i * (m + 1)]); return (x); } static double mglsadff1t(double x, double *b, const int m, const double a, const double g, double *d) { int i; x -= d[0] * (1.0 - a * a) * g; d[m] = b[m] * x + a * d[m - 1]; for (i = m - 1; i >= 1; i--) d[i] += b[i] * x + a * (d[i - 1] - d[i + 1]); for (i = 0; i < m; i++) d[i] = d[i + 1]; return (x); } double mglsadf1t(double x, double *b, const int m, const double a, const int n, double *d) { int i; double g; g = -1.0 / (double) n; for (i = 0; i < n; i++) x = mglsadff1t(x, b, m, a, g, &d[i * (m + 1)]); return (x); } static double imglsadff(double x, double *b, const int m, const double a, double *d) { int i; double y, aa; aa = 1 - a * a; y = d[0] * b[1]; for (i = 1; i < m; i++) { d[i] += a * (d[i + 1] - d[i - 1]); y += d[i] * b[i + 1]; } y += x; for (i = m; i > 0; i--) d[i] = d[i - 1]; d[0] = a * d[0] + aa * x; return (y); } double imglsadf(double x, double *b, const int m, const double a, const int n, double *d) { int i; for (i = 0; i < n; i++) x = imglsadff(x, b, m, a, &d[i * (m + 1)]); return (x); } static double imglsadff1(double x, double *b, const int m, const double a, const double g, double *d) { int i; double y, aa; aa = 1 - a * a; y = d[0] * b[1]; for (i = 1; i < m; i++) { d[i] += a * (d[i + 1] - d[i - 1]); y += d[i] * b[i + 1]; } y = g * y + x; for (i = m; i > 0; i--) d[i] = d[i - 1]; d[0] = a * d[0] + aa * x; return (y); } double imglsadf1(double x, double *b, const int m, const double a, const int n, double *d) { int i; double g; g = -1.0 / (double) n; for (i = 0; i < n; i++) x = imglsadff1(x, b, m, a, g, &d[i * (m + 1)]); return (x); } static double imglsadfft(double x, double *b, const int m, const double a, double *d) { int i; double y; y = x + (1.0 - a * a) * d[0]; d[m] = b[m] * x + a * d[m - 1]; for (i = m - 1; i >= 1; i--) d[i] += b[i] * x + a * (d[i - 1] - d[i + 1]); for (i = 0; i < m; i++) d[i] = d[i + 1]; return (y); } double imglsadft(double x, double *b, const int m, const double a, const int n, double *d) { int i; for (i = 0; i < n; i++) x = imglsadfft(x, b, m, a, &d[i * (m + 1)]); return (x); } static double imglsadff1t(double x, double *b, const int m, const double a, const double g, double *d) { int i; double y; y = x + g * (1.0 - a * a) * d[0]; d[m] = b[m] * x + a * d[m - 1]; for (i = m - 1; i >= 1; i--) d[i] += b[i] * x + a * (d[i - 1] - d[i + 1]); for (i = 0; i < m; i++) d[i] = d[i + 1]; return (y); } double imglsadf1t(double x, double *b, const int m, const double a, const int n, double *d) { int i; double g; g = -1.0 / (double) n; for (i = 0; i < n; i++) x = imglsadff1t(x, b, m, a, g, &d[i * (m + 1)]); return (x); } SPTK-3.9/bin/mglsadf/mglsadf.c0000644001051300105040000002745212637156642013055 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * MGLSA Digital Filter for Speech Synthesis * * * * 1996.3 K.Koishida * * * * usage: * * mglsadf [ options ] [ infile ] > stdout * * options: * * -m m : order of mel-generalized cepstrum [25] * * -a a : alpha [0.35] * * -c c : gamma = -1 / (int) c [1] * * -p p : frame period [100] * * -i i : interpolation period [1] * * -t : transpose filter [FALSE] * * -v : inverse filter [FALSE] * * -k : filtering without gain [FALSE] * * -P P : order of Pade approximation [4] * * infile: * * mel-generalized cepstral coefficients * * , c~(0), c~(1), ..., c~(M), * * excitation sequence * * , x(0), x(1), ..., * * stdout: * * filtered sequence * * , y(0), y(1), ..., * * notice: * * if c==0, MLSA filter is used, P should be 4 or 5 * * require: * * mglsadf(), mlsadf(), imglsadf(), mglsadft(), imglsadft()* * * ************************************************************************/ static char *rcs_id = "$Id: mglsadf.c,v 1.35 2015/12/14 01:14:20 uratec Exp $"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #include #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define ORDER 25 #define ALPHA 0.35 #define STAGE 1 #define FPERIOD 100 #define IPERIOD 1 #define TRANSPOSE FA #define INVERSE FA #define NGAIN FA #define PADEORDER 4 char *BOOL[] = { "FALSE", "TRUE" }; /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - MGLSA digital filter for speech synthesis\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] mgcfile [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -m m : order of mel-generalized cepstrum [%d]\n", ORDER); fprintf(stderr, " -a a : alpha [%g]\n", ALPHA); fprintf(stderr, " -c c : gamma = -1 / (int) c [%d]\n", STAGE); fprintf(stderr, " -p p : frame period [%d]\n", FPERIOD); fprintf(stderr, " -i i : interpolation period [%d]\n", IPERIOD); fprintf(stderr, " -t : transpose filter [%s]\n", BOOL[TRANSPOSE]); fprintf(stderr, " -v : inverse filter [%s]\n", BOOL[INVERSE]); fprintf(stderr, " -k : filtering without gain [%s]\n", BOOL[NGAIN]); fprintf(stderr, " -P P : order of Pade approximation [%d]\n", PADEORDER); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " filter input (%s) [stdin]\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " filter output (%s)\n", FORMAT); fprintf(stderr, " mgcfile:\n"); fprintf(stderr, " mel-generalized cepstrum (%s)\n", FORMAT); fprintf(stderr, " notice:\n"); fprintf(stderr, " if c==0, MLSA filter is used, P should be 4 or 5\n"); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char **argv) { int m = ORDER, fprd = FPERIOD, iprd = IPERIOD, stage = STAGE, pd = PADEORDER, i, j; Boolean transpose = TRANSPOSE, ngain = NGAIN, inverse = INVERSE; FILE *fp = stdin, *fpc = NULL; double alpha = ALPHA, gamma = -1 / (double) STAGE, x, *c, *inc, *cc, *d; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) if (**++argv == '-') { switch (*(*argv + 1)) { case 'm': m = atoi(*++argv); --argc; break; case 'a': alpha = atof(*++argv); --argc; break; case 'c': stage = atoi(*++argv); --argc; break; case 'p': fprd = atoi(*++argv); --argc; break; case 'i': iprd = atoi(*++argv); --argc; break; case 't': transpose = 1 - transpose; break; case 'v': inverse = 1 - inverse; break; case 'k': ngain = 1 - ngain; break; case 'P': pd = atoi(*++argv); --argc; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else if (fpc == NULL) fpc = getfp(*argv, "rb"); else fp = getfp(*argv, "rb"); if (fpc == NULL) { fprintf(stderr, "%s : Cannot open cepstrum file!\n", cmnd); return (1); } if (inverse) { if (stage == 0) { fprintf(stderr, "%s : gamma should not equal to 0 in Inverse MGLSA!\n", cmnd); usage(1); } } if (stage != 0) { /* MGLSA */ gamma = -1 / (double) stage; } else { /* MLSA */ if ((pd < 4) || (pd > 5)) { fprintf(stderr, "%s : Order of Pade approximation should be 4 or 5!\n", cmnd); return (1); } } c = (stage != 0) ? dgetmem(m + m + m + 3 + (m + 1) * stage) /* MGLSA */ : dgetmem(3 * (m + 1) + 3 * (pd + 1) + pd * (m + 2)); /* MLSA */ cc = c + m + 1; inc = cc + m + 1; d = inc + m + 1; if (freadf(c, sizeof(*c), m + 1, fpc) != m + 1) return (1); mc2b(c, c, m, alpha); if (stage != 0) { /* MGLSA */ gnorm(c, c, m, gamma); c[0] = log(c[0]); for (i = 1; i <= m; i++) c[i] *= gamma; } for (;;) { if (freadf(cc, sizeof(*cc), m + 1, fpc) != m + 1) return (0); mc2b(cc, cc, m, alpha); if (stage != 0) { gnorm(cc, cc, m, gamma); cc[0] = log(cc[0]); for (i = 1; i <= m; i++) cc[i] *= gamma; } for (i = 0; i <= m; i++) inc[i] = (cc[i] - c[i]) * iprd / fprd; for (j = fprd, i = (iprd + 1) / 2; j--;) { if (freadf(&x, sizeof(x), 1, fp) != 1) return (0); if (inverse) { /* IMGLSA */ if (!ngain) x /= exp(c[0]); if (transpose) x = imglsadft(x, c, m, alpha, stage, d); else x = imglsadf(x, c, m, alpha, stage, d); } else { if (stage != 0) { /* MGLSA */ if (!ngain) x *= exp(c[0]); if (transpose) x = mglsadft(x, c, m, alpha, stage, d); else x = mglsadf(x, c, m, alpha, stage, d); } else { /* MLSA */ if (!ngain) x *= exp(c[0]); x = mlsadf(x, c, m, alpha, pd, d); } } fwritef(&x, sizeof(x), 1, stdout); if (!--i) { for (i = 0; i <= m; i++) c[i] += inc[i]; i = iprd; } } movem(cc, c, sizeof(*cc), m + 1); } return (0); } SPTK-3.9/bin/minmax/0000755001051300105040000000000012637167710011214 500000000000000SPTK-3.9/bin/minmax/Makefile.am0000644001051300105040000000020312442245100013143 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = minmax minmax_SOURCES = minmax.c minmax_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/minmax/Makefile.in0000644001051300105040000004246212637167416013214 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = minmax$(EXEEXT) subdir = bin/minmax ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_minmax_OBJECTS = minmax.$(OBJEXT) minmax_OBJECTS = $(am_minmax_OBJECTS) minmax_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(minmax_SOURCES) DIST_SOURCES = $(minmax_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include minmax_SOURCES = minmax.c minmax_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/minmax/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/minmax/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) minmax$(EXEEXT): $(minmax_OBJECTS) $(minmax_DEPENDENCIES) $(EXTRA_minmax_DEPENDENCIES) @rm -f minmax$(EXEEXT) $(AM_V_CCLD)$(LINK) $(minmax_OBJECTS) $(minmax_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minmax.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/minmax/minmax.c0000644001051300105040000004053412637156642012601 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * Find Minimum and Maximum Values * * * * 1988.7 T.Kobayashi * * 1996.1 N.Isshiki * * 1998.7 M.Tamura * * * * usage: * * minmax [ options ] [ infile ] > stdout * * options: * * -l l : length of vector [1] * * -n n : order of vector [l-1] * * -b b : find n-best values [1] * * -o o : output format [0] * * 0 minimum & maximum * * 1 minimum * * 2 maximum * * -d d : output data number [FALSE] * * infile: * * data sequence (float) * * stdout: * * minimum & maximum(float) * * n-best minimums & n-best maximum (float) * * ,when -n option is specified * * minimum:datanumber,... (ascii) * * maximum:datanumber,... (ascii) * * ,when -d option is specified * * * ************************************************************************/ static char *rcs_id = "$Id: minmax.c,v 1.28 2015/12/14 01:14:20 uratec Exp $"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Defualt Values */ #define OUTMIN TR #define OUTMAX TR #define DIM 1 #define NBEST 1 #define FLT_MAX 3.4e+38 #define FLT_MIN -3.4e+38 #define OUTNUM FA char *BOOL[] = { "FALSE", "TRUE" }; /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - find minimum and maximum values\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -l l : length of vector [%d]\n", DIM); fprintf(stderr, " -n n : order of vector [l-1]\n"); fprintf(stderr, " -b b : find n-best values [%d]\n", NBEST); fprintf(stderr, " -o o : output format [0]\n"); fprintf(stderr, " 0 minimum & maximum\n"); fprintf(stderr, " 1 minimum\n"); fprintf(stderr, " 2 maximum\n"); fprintf(stderr, " -d : output data number [%s]\n", BOOL[OUTNUM]); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " data sequence (%s) [stdin]\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " minimum and maximum values (%s)\n", FORMAT); fprintf(stderr, " or \"values:datanumber,...\" (ascii)\n"); fprintf(stderr, " ,if -d option is specified\n"); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char *argv[]) { FILE *fp; char *s, *infile = NULL, c; Boolean outnum = OUTNUM, outmin = OUTMIN, outmax = OUTMAX; int dim = DIM, nbest = NBEST, outtype = 0; int minmax(FILE * fp, int dim, int nbest, Boolean outnum, Boolean outmin, Boolean outmax); if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) { if (*(s = *++argv) == '-') { c = *++s; if (*++s == '\0' && ((c == 'l') || (c == 'n') || (c == 'b') || (c == 'o'))) { s = *++argv; --argc; } switch (c) { case 'l': dim = atoi(s); break; case 'n': dim = atoi(s) + 1; break; case 'b': nbest = atoi(s); break; case 'o': outtype = atoi(s); break; case 'd': outnum = 1 - outnum; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, c); usage(1); break; } } else infile = s; } if (infile) { fp = getfp(infile, "rb"); } else fp = stdin; switch (outtype) { case 1: outmax = FA; break; case 2: outmin = FA; break; } minmax(fp, dim, nbest, outnum, outmin, outmax); return (0); } int minmax(FILE * fp, int dim, int nbest, Boolean outnum, Boolean outmin, Boolean outmax) { double *s; int k, n, i, j; int **minpos = NULL, **maxpos = NULL, *nmaxpos = NULL, *nminpos = NULL, *tmp, t = 0; double *min, *max; min = dgetmem(nbest); max = dgetmem(nbest); s = dgetmem(dim); if (outnum) { minpos = (int **) calloc(sizeof(*minpos), nbest); maxpos = (int **) calloc(sizeof(*maxpos), nbest); nminpos = (int *) calloc(sizeof(*nminpos), nbest); nmaxpos = (int *) calloc(sizeof(*nminpos), nbest); } for (k = 0; !feof(fp);) { if ((n = freadf(s, sizeof(*s), dim, fp)) == 0) break; if (dim != 1 || k == 0) { for (i = 1; i < nbest; i++) { min[i] = FLT_MAX; max[i] = FLT_MIN; } min[0] = s[0]; max[0] = s[0]; if (outnum) { for (i = 0; i < nbest; i++) { nminpos[i] = 1; nmaxpos[i] = 1; free(minpos[i]); free(maxpos[i]); minpos[i] = (int *) calloc(sizeof(**minpos), 1); maxpos[i] = (int *) calloc(sizeof(**maxpos), 1); minpos[i][0] = -1; maxpos[i][0] = -1; } minpos[0][0] = 0; maxpos[0][0] = 0; } } else { for (i = 0; i < nbest; i++) { if (s[0] == min[i] && outnum) { tmp = (int *) calloc(sizeof(*tmp), nminpos[i]); movem((double *) minpos[i], (double *) tmp, sizeof(*tmp), nminpos[i]); free(minpos[i]); minpos[i] = (int *) calloc(sizeof(**minpos), ++nminpos[i]); movem((double *) tmp, (double *) minpos[i], sizeof(**minpos), nminpos[i] - 1); minpos[i][nminpos[i] - 1] = t; free(tmp); break; } if (s[0] < min[i]) { if (outnum) free(minpos[nbest - 1]); for (j = nbest - 1; j > i; j--) { min[j] = min[j - 1]; if (outnum) { minpos[j] = minpos[j - 1]; nminpos[j] = nminpos[j - 1]; } } min[i] = s[0]; if (outnum) { minpos[i] = (int *) calloc(sizeof(**minpos), 1); minpos[i][0] = t; nminpos[i] = 1; } break; } } for (i = 0; i < nbest; i++) { if (s[0] == max[i] && outnum) { tmp = (int *) calloc(sizeof(*tmp), nmaxpos[i]); movem((double *) maxpos[i], (double *) tmp, sizeof(*tmp), nmaxpos[i]); free(maxpos[i]); maxpos[i] = (int *) calloc(sizeof(**maxpos), ++nmaxpos[i]); movem((double *) tmp, (double *) maxpos[i], sizeof(**maxpos), nmaxpos[i] - 1); maxpos[i][nmaxpos[i] - 1] = t; free(tmp); break; } if (s[0] > max[i]) { if (outnum) free(maxpos[nbest - 1]); for (j = nbest - 1; j > i; j--) { max[j] = max[j - 1]; if (outnum) { maxpos[j] = maxpos[j - 1]; nmaxpos[j] = nmaxpos[j - 1]; } } max[i] = s[0]; if (outnum) { maxpos[i] = (int *) calloc(sizeof(**minpos), 1); maxpos[i][0] = t; nmaxpos[i] = 1; } break; } } } for (k = 1; k < n; ++k) { for (i = 0; i < nbest; i++) { if (s[k] == min[i] && outnum) { tmp = (int *) calloc(sizeof(*tmp), nminpos[i]); movem((double *) minpos[i], (double *) tmp, sizeof(*tmp), nminpos[i]); free(minpos[i]); minpos[i] = (int *) calloc(sizeof(**minpos), ++nminpos[i]); movem((double *) tmp, (double *) minpos[i], sizeof(**minpos), nminpos[i] - 1); minpos[i][nminpos[i] - 1] = k; free(tmp); break; } if (s[k] < min[i]) { if (outnum) free(minpos[nbest - 1]); for (j = nbest - 1; j > i; j--) { min[j] = min[j - 1]; if (outnum) { minpos[j] = minpos[j - 1]; nminpos[j] = nminpos[j - 1]; } } min[i] = s[k]; if (outnum) { minpos[i] = (int *) calloc(sizeof(**minpos), 1); minpos[i][0] = k; nminpos[i] = 1; } break; } } for (i = 0; i < nbest; i++) { if (s[k] == max[i] && outnum) { tmp = (int *) calloc(sizeof(*tmp), nmaxpos[i]); movem((double *) maxpos[i], (double *) tmp, sizeof(*tmp), nmaxpos[i]); free(maxpos[i]); maxpos[i] = (int *) calloc(sizeof(**maxpos), ++nmaxpos[i]); movem((double *) tmp, (double *) maxpos[i], sizeof(**maxpos), nmaxpos[i] - 1); maxpos[i][nmaxpos[i] - 1] = k; free(tmp); break; } if (s[k] > max[i]) { if (outnum) free(maxpos[nbest - 1]); for (j = nbest - 1; j > i; j--) { max[j] = max[j - 1]; if (outnum) { maxpos[j] = maxpos[j - 1]; nmaxpos[j] = nmaxpos[j - 1]; } } max[i] = s[k]; if (outnum) { maxpos[i] = (int *) calloc(sizeof(**maxpos), 1); maxpos[i][0] = k; nmaxpos[i] = 1; } break; } } } if (dim != 1) { if (outnum) { if (outmin) { for (i = 0; i < nbest; i++) { printf("%g:", min[i]); printf("%d", minpos[i][0]); for (j = 1; j < nminpos[i]; j++) printf(",%d", minpos[i][j]); printf("\n"); } } if (outmax) { for (i = 0; i < nbest; i++) { printf("%g:", max[i]); printf("%d", maxpos[i][0]); for (j = 1; j < nmaxpos[i]; j++) printf(",%d", maxpos[i][j]); printf("\n"); } } } else { if (outmin) fwritef(min, sizeof(*min), nbest, stdout); if (outmax) fwritef(max, sizeof(*max), nbest, stdout); } } else t++; } if (dim == 1) { if (outnum) { if (outmin) { for (i = 0; i < nbest; i++) { printf("%g:", min[i]); printf("%d", minpos[i][0]); for (j = 1; j < nminpos[i]; j++) printf(",%d", minpos[i][j]); printf("\n"); } } if (outmax) { for (i = 0; i < nbest; i++) { printf("%g:", max[i]); printf("%d", maxpos[i][0]); for (j = 1; j < nmaxpos[i]; j++) printf(",%d", maxpos[i][j]); printf("\n"); } } } else { if (outmin) fwritef(min, sizeof(*min), nbest, stdout); if (outmax) fwritef(max, sizeof(*max), nbest, stdout); } } free(nmaxpos); free(nminpos); return (0); } SPTK-3.9/bin/mlpg/0000755001051300105040000000000012637167711010663 500000000000000SPTK-3.9/bin/mlpg/Makefile.am0000644001051300105040000000020312442245100012611 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = mlpg mlpg_SOURCES = _mlpg.c mlpg.c mlpg_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/mlpg/Makefile.in0000644001051300105040000004254312637167416012662 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = mlpg$(EXEEXT) subdir = bin/mlpg ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_mlpg_OBJECTS = _mlpg.$(OBJEXT) mlpg.$(OBJEXT) mlpg_OBJECTS = $(am_mlpg_OBJECTS) mlpg_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(mlpg_SOURCES) DIST_SOURCES = $(mlpg_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include mlpg_SOURCES = _mlpg.c mlpg.c mlpg_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/mlpg/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/mlpg/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) mlpg$(EXEEXT): $(mlpg_OBJECTS) $(mlpg_DEPENDENCIES) $(EXTRA_mlpg_DEPENDENCIES) @rm -f mlpg$(EXEEXT) $(AM_V_CCLD)$(LINK) $(mlpg_OBJECTS) $(mlpg_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_mlpg.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mlpg.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/mlpg/_mlpg.c0000644001051300105040000001134312637156642012050 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /**************************************************************** $Id: _mlpg.c,v 1.8 2015/12/14 01:14:20 uratec Exp $ MLPG related functsions *****************************************************************/ #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #include #include #if defined(WIN32) #include "SPTK.h" #else #include #endif int str2darray(char *c, double **x) { int i, size, sp; char *p, *buf; while (isspace(*c)) c++; if (*c == '\0') { *x = NULL; return (0); } size = 1; sp = 0; for (p = c; *p != '\0'; p++) { if (!isspace(*p)) { if (sp == 1) { size++; sp = 0; } } else sp = 1; } buf = getmem(strlen(c), sizeof(*buf)); *x = dgetmem(size); for (i = 0; i < size; i++) (*x)[i] = strtod(c, &c); return (size); } int isfloat(char *c) { int isnum = 0, wfe = 1; int i = 0; if (strlen(c) == 0) return (0); if ((c[i] == '+') || (c[i] == '-')) i++; while ((c[i] >= '0') && (c[i] <= '9')) { isnum = 1; i++; } if (c[i] == '.') { i++; while ((c[i] >= '0') && (c[i] <= '9')) { isnum = 1; i++; } } if ((c[i] == 'e') || (c[i] == 'E')) { wfe = 0; i++; if ((c[i] == '+') || (c[i] == '-')) i++; while ((c[i] >= '0') && (c[i] <= '9')) { wfe = 1; i++; } } if ((c[i] == 'f') || (c[i] == 'F') || (c[i] == 'l') || (c[i] == 'L')) i++; if ((c[i] == '\0') && isnum && wfe) return (1); else return (0); } SPTK-3.9/bin/mlpg/mlpg.c0000644001051300105040000005731012637156642011715 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /**************************************************************************************** * * * ML-based Parameter Generation from PDFs * * * * 2000.4 T.Masuko * * * * usage: * * mlpg [ options ] [infile] > stdout * * options: * * -m m : order of vector [25] * * -l l : length of vector [m+1] * * -d fn : filename of delta coefficients [N/A] * * -d coef [coef...] : delta coefficients [N/A] * * -r n w1 [w2] : number and width of regression coefficients [N/A] * * -i i : type of input PDFs [0] * * 0: ( m , U ) * * 1: ( m , U^{-1} ) * * 2: ( mU^{-1} , U^{-1} ) * * -s s : range of influenced frames [30] * * -h : print this message * * infile: * * PDF sequence * * ex.) , m(0), m(1), ..., m((m+1)*d-1), * * U(0), U(1), ..., U((m+1)*d-1), * * stdout: * * parameter sequence * * , c(0), c(1), ..., c_1(m), * * * ****************************************************************************************/ static char *rcs_id = "$Id: mlpg.c,v 1.38 2015/12/14 05:34:35 uratec Exp $"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #include #if defined(WIN32) #include "SPTK.h" #else #include #endif /* default values */ #define ORDER 25 #define ITYPE 0 #define RANGE 30 /* Command Name */ char *cmnd; /* Other Definitions */ #ifdef DOUBLE typedef double real; #else typedef float real; #endif #define LENGTH 256 #define INFTY ((double) 1.0e+38) #define INFTY2 ((double) 1.0e+19) #define INVINF ((double) 1.0e-38) #define INVINF2 ((double) 1.0e-19) #define WLEFT 0 #define WRIGHT 1 #define abs(x) ((x)>0.0 ? (x) : -(x)) #define sign(x) ((x) >= 0.0 ? 1 : -1) #define finv(x) (abs(x) <= INVINF2 ? sign(x)*INFTY : (abs(x) >= INFTY2 ? 0 : 1.0/(x))) #define min(x, y) ((x)<(y) ? (x) : (y)) typedef struct _DWin { int num; /* number of static + deltas */ int calccoef; /* calculate regression coefficients */ char **fn; /* delta window coefficient file */ int **width; /* width [0..num-1][0(left) 1(right)] */ double **coef; /* coefficient [0..num-1][length[0]..length[1]] */ int maxw[2]; /* max width [0(left) 1(right)] */ } DWin; typedef struct _SMatrix { double **mseq; /* sequence of mean vector */ double **ivseq; /* sequence of invarsed variance vector */ double ***P; /* matrix P[th][tv][m] */ double **c; /* parameter c */ double **pi; double **k; int t; /* time index */ int length; /* matrix length (must be power of 2) */ unsigned int mask; /* length - 1 */ } SMatrix; typedef struct _PStream { int vSize; /* data vector size */ int order; /* order of cepstrum */ int range; DWin dw; double *mean; /* input mean vector */ double *ivar; /* input inversed variance vector */ double *par; /* output parameter vector */ int iType; /* type of input PDFs */ /* 0: ( m , U ) */ /* 1: ( m , U^{-1} ) */ /* 2: ( mU^{-1} , U^{-1} ) */ SMatrix sm; } PStream; /* Required Functions */ void init_pstream(PStream * pst); void init_dwin(PStream * pst); double *dcalloc(int x, int xoff); double **ddcalloc(int x, int y, int xoff, int yoff); double ***dddcalloc(int x, int y, int z, int xoff, int yoff, int zoff); double *mlpg(PStream * pst); int doupdate(PStream * pst, int d); void calc_pi(PStream * pst, int d); void calc_k(PStream * pst, int d); void update_P(PStream * pst); void update_c(PStream * pst, int d); void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - obtain parameter sequence from PDF sequence\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [infile] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -m m : order of vector [%d]\n", ORDER); fprintf(stderr, " -l l : length of vector [m+1]\n"); fprintf(stderr, " -d fn : filename of delta coefficients [N/A]\n"); fprintf(stderr, " -d coef [coef...] : delta coefficients [N/A]\n"); fprintf(stderr, " -r n t1 [t2] : number and width of regression coefficients [N/A]\n"); fprintf(stderr, " -i i : type of input PDFs [%d]\n", ITYPE); fprintf(stderr, " 0: ( m , U )\n"); fprintf(stderr, " 1: ( m , U^{-1} )\n"); fprintf(stderr, " 2: ( mU^{-1} , U^{-1} )\n"); fprintf(stderr, " -s s : range of influenced frames [%d]\n", RANGE); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, "\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " PDF sequence [stdin]\n"); fprintf(stderr, " stdout:\n"); fprintf(stderr, " parameter sequence\n"); fprintf(stderr, " notice:\n"); fprintf(stderr, " 1) Option '-d' may be repeated to use multiple delta parameters.\n"); fprintf(stderr, " 2) Options '-d' and '-r' should not be defined simultaneously.\n"); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char **argv) { FILE *pdffp = stdin, *parfp = stdout; int nframe, delay; char *coef; int coeflen; PStream pst; int i, j; void init_pstream(PStream *); double *mlpg(PStream *); pst.order = ORDER; pst.range = RANGE; pst.iType = ITYPE; pst.dw.fn = (char **) calloc(sizeof(char *), argc); pst.dw.num = 1; pst.dw.calccoef = -1; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) { if (**++argv == '-') { switch (*(*argv + 1)) { case 'd': if (pst.dw.calccoef == 1) { fprintf(stderr, "%s : Options '-r' and '-d' should not be defined simultaneously!\n", cmnd); return (1); } pst.dw.calccoef = 0; if (isfloat(*++argv)) { coeflen = 0; for (i = 0; (i < argc - 1) && isfloat(argv[i]); i++) { coeflen += strlen(argv[i]) + 1; } coeflen += 1; coef = pst.dw.fn[pst.dw.num] = getmem(coeflen, sizeof(char)); for (j = 0; j < i; j++) { sprintf(coef, " %s", *argv); coef += strlen(*argv) + 1; if (j < i - 1) { argv++; argc--; } } } else { pst.dw.fn[pst.dw.num] = *argv; } pst.dw.num++; --argc; break; case 'r': if (pst.dw.calccoef == 0) { fprintf(stderr, "%s : Options '-r' and '-d' should not be defined simultaneously!\n", cmnd); return (1); } pst.dw.calccoef = 1; coeflen = atoi(*++argv); --argc; if ((coeflen != 1) && (coeflen != 2)) { fprintf(stderr, "%s : Number of delta parameter should be 1 or 2!\n", cmnd); return (1); } if (argc <= 1) { fprintf(stderr, "%s : Window size for delta parameter required!\n", cmnd); return (1); } pst.dw.fn[pst.dw.num] = *++argv; pst.dw.num++; --argc; if (coeflen == 2) { if (argc <= 1) { fprintf(stderr, "%s : Window size for delta-delta parameter required!\n", cmnd); return (1); } pst.dw.fn[pst.dw.num] = *++argv; pst.dw.num++; --argc; } break; case 'm': pst.order = atoi(*++argv); --argc; break; case 'l': pst.order = atoi(*++argv) - 1; --argc; break; case 'i': pst.iType = atoi(*++argv); --argc; break; case 's': pst.range = atoi(*++argv); --argc; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else pdffp = getfp(*argv, "rb"); } init_pstream(&pst); delay = pst.range + pst.dw.maxw[WRIGHT]; nframe = 0; while (freadf(pst.mean, sizeof(*(pst.mean)), pst.vSize * 2, pdffp) == pst.vSize * 2) { if (pst.dw.num == 1) fwritef(pst.mean, sizeof(*pst.mean), pst.order + 1, parfp); else { if (pst.iType == 0) for (i = 0; i < pst.vSize; i++) pst.ivar[i] = finv(pst.ivar[i]); mlpg(&pst); if (nframe >= delay) fwritef(pst.par, sizeof(*(pst.par)), pst.order + 1, parfp); } nframe++; } if (pst.dw.num > 1) { for (i = 0; i < pst.vSize; i++) { pst.mean[i] = 0.0; pst.ivar[i] = 0.0; } for (i = 0; i < min(nframe, delay); i++) { mlpg(&pst); fwritef(pst.par, sizeof(*(pst.par)), pst.order + 1, parfp); } } return (0); } void init_pstream(PStream * pst) { void init_dwin(PStream *); double *dcalloc(int, int); double **ddcalloc(int, int, int, int); double ***dddcalloc(int, int, int, int, int, int); int half, full; int i, m; init_dwin(pst); half = pst->range * 2; full = pst->range * 4 + 1; pst->vSize = (pst->order + 1) * pst->dw.num; pst->sm.length = LENGTH; while (pst->sm.length < pst->range + pst->dw.maxw[WRIGHT]) pst->sm.length *= 2; pst->mean = dcalloc(pst->vSize * 2, 0); pst->ivar = pst->mean + pst->vSize; pst->sm.mseq = ddcalloc(pst->sm.length, pst->vSize, 0, 0); pst->sm.ivseq = ddcalloc(pst->sm.length, pst->vSize, 0, 0); pst->sm.c = ddcalloc(pst->sm.length, pst->order + 1, 0, 0); pst->sm.P = dddcalloc(full, pst->sm.length, pst->order + 1, half, 0, 0); pst->sm.pi = ddcalloc(pst->range + pst->dw.maxw[WRIGHT] + 1, pst->order + 1, pst->range, 0); pst->sm.k = ddcalloc(pst->range + pst->dw.maxw[WRIGHT] + 1, pst->order + 1, pst->range, 0); for (i = 0; i < pst->sm.length; i++) for (m = 0; m < pst->vSize; m++) pst->sm.ivseq[i][m] = 0.0; for (i = 0; i < pst->sm.length; i++) for (m = 0; m <= pst->order; m++) pst->sm.P[0][i][m] = INFTY; pst->sm.t = pst->range - 1; pst->sm.mask = pst->sm.length - 1; return; } void init_dwin(PStream * pst) { double *dcalloc(int, int); int i, j; int fsize, leng; double a0, a1, a2; FILE *fp; /* memory allocation */ if ((pst->dw.width = (int **) calloc(pst->dw.num, sizeof(int *))) == NULL) { fprintf(stderr, "%s : Cannot allocate memory!\n", cmnd); exit(1); } for (i = 0; i < pst->dw.num; i++) if ((pst->dw.width[i] = (int *) calloc(2, sizeof(int))) == NULL) { fprintf(stderr, "%s : Cannot allocate memory!\n", cmnd); exit(1); } if ((pst->dw.coef = (double **) calloc(pst->dw.num, sizeof(double *))) == NULL) { fprintf(stderr, "%s : Cannot allocate memory!\n", cmnd); exit(1); } /* window for static parameter */ pst->dw.width[0][WLEFT] = pst->dw.width[0][WRIGHT] = 0; pst->dw.coef[0] = dcalloc(1, 0); pst->dw.coef[0][0] = 1; /* set delta coefficients */ if (pst->dw.calccoef == 0) { for (i = 1; i < pst->dw.num; i++) { if (pst->dw.fn[i][0] == ' ') { fsize = str2darray(pst->dw.fn[i], &(pst->dw.coef[i])); } else { /* read from file */ fp = getfp(pst->dw.fn[i], "rb"); /* check the number of coefficients */ fseek(fp, 0L, 2); fsize = ftell(fp) / sizeof(real); fseek(fp, 0L, 0); /* read coefficients */ pst->dw.coef[i] = dcalloc(fsize, 0); freadf(pst->dw.coef[i], sizeof(**(pst->dw.coef)), fsize, fp); } /* set pointer */ leng = fsize / 2; pst->dw.coef[i] += leng; pst->dw.width[i][WLEFT] = -leng; pst->dw.width[i][WRIGHT] = leng; if (fsize % 2 == 0) pst->dw.width[i][WRIGHT]--; } } else if (pst->dw.calccoef == 1) { for (i = 1; i < pst->dw.num; i++) { leng = atoi(pst->dw.fn[i]); if (leng < 1) { fprintf(stderr, "%s : Width for regression coefficient shuould be more than 1!\n", cmnd); exit(1); } pst->dw.width[i][WLEFT] = -leng; pst->dw.width[i][WRIGHT] = leng; pst->dw.coef[i] = dcalloc(leng * 2 + 1, 0); pst->dw.coef[i] += leng; } leng = atoi(pst->dw.fn[1]); for (a1 = 0, j = -leng; j <= leng; a1 += j * j, j++); for (j = -leng; j <= leng; j++) pst->dw.coef[1][j] = (double) j / (double) a1; if (pst->dw.num > 2) { leng = atoi(pst->dw.fn[2]); for (a0 = a1 = a2 = 0, j = -leng; j <= leng; a0++, a1 += j * j, a2 += j * j * j * j, j++); for (j = -leng; j <= leng; j++) pst->dw.coef[2][j] = ((double) (a0 * j * j - a1)) / ((double) (a2 * a0 - a1 * a1)) / 2; } } pst->dw.maxw[WLEFT] = pst->dw.maxw[WRIGHT] = 0; for (i = 0; i < pst->dw.num; i++) { if (pst->dw.maxw[WLEFT] > pst->dw.width[i][WLEFT]) pst->dw.maxw[WLEFT] = pst->dw.width[i][WLEFT]; if (pst->dw.maxw[WRIGHT] < pst->dw.width[i][WRIGHT]) pst->dw.maxw[WRIGHT] = pst->dw.width[i][WRIGHT]; } return; } double *dcalloc(int x, int xoff) { double *ptr; if ((ptr = (double *) calloc(x, sizeof(*ptr))) == NULL) { fprintf(stderr, "%s : Cannot allocate memory!\n", cmnd); exit(1); } ptr += xoff; return (ptr); } double **ddcalloc(int x, int y, int xoff, int yoff) { double *dcalloc(int, int); double **ptr; int i; if ((ptr = (double **) calloc(x, sizeof(*ptr))) == NULL) { fprintf(stderr, "%s : Cannot allocate memory!\n", cmnd); exit(1); } for (i = 0; i < x; i++) ptr[i] = dcalloc(y, yoff); ptr += xoff; return (ptr); } double ***dddcalloc(int x, int y, int z, int xoff, int yoff, int zoff) { double **ddcalloc(int, int, int, int); double ***ptr; int i; if ((ptr = (double ***) calloc(x, sizeof(*ptr))) == NULL) { fprintf(stderr, "%s : Cannot allocate memory!\n", cmnd); exit(1); } for (i = 0; i < x; i++) ptr[i] = ddcalloc(y, z, yoff, zoff); ptr += xoff; return (ptr); } /*--------------------------------------------------------------------*/ double *mlpg(PStream * pst) { int doupdate(PStream *, int); void calc_pi(PStream *, int); void calc_k(PStream *, int); void update_P(PStream *); void update_c(PStream *, int); int tmin, tmax; int d, m, u; pst->sm.t++; tmin = (pst->sm.t - pst->range) & pst->sm.mask; tmax = (pst->sm.t + pst->dw.maxw[WRIGHT]) & pst->sm.mask; for (u = -pst->range * 2; u <= pst->range * 2; u++) { for (m = 0; m <= pst->order; m++) pst->sm.P[u][tmax][m] = 0.0; } for (m = 0; m < pst->vSize; m++) { pst->sm.mseq[tmax][m] = pst->mean[m]; pst->sm.ivseq[tmax][m] = pst->ivar[m]; } for (m = 0; m <= pst->order; m++) { if (pst->iType != 2) pst->sm.c[tmax][m] = pst->mean[m]; else pst->sm.c[tmax][m] = pst->mean[m] * finv(pst->ivar[m]); pst->sm.P[0][tmax][m] = finv(pst->ivar[m]); } for (d = 1; d < pst->dw.num; d++) { if (doupdate(pst, d)) { calc_pi(pst, d); calc_k(pst, d); update_P(pst); update_c(pst, d); } } pst->par = pst->sm.c[tmin]; return (pst->par); } int doupdate(PStream * pst, int d) { int j; if (pst->sm.ivseq[pst->sm.t & pst->sm.mask][(pst->order + 1) * d] == 0.0) return (0); for (j = pst->dw.width[d][WLEFT]; j <= pst->dw.width[d][WRIGHT]; j++) if (pst->sm.P[0][(pst->sm.t + j) & pst->sm.mask][0] == INFTY) return (0); return (1); } void calc_pi(PStream * pst, int d) { int j, m, u; for (m = 0; m <= pst->order; m++) for (u = -pst->range; u <= pst->dw.maxw[WRIGHT]; u++) { pst->sm.pi[u][m] = 0.0; for (j = pst->dw.width[d][WLEFT]; j <= pst->dw.width[d][WRIGHT]; j++) pst->sm.pi[u][m] += pst->sm.P[u - j][(pst->sm.t + j) & pst->sm.mask][m] * pst->dw.coef[d][j]; } return; } void calc_k(PStream * pst, int d) { int j, m, u; double *ivar, x; ivar = pst->sm.ivseq[pst->sm.t & pst->sm.mask] + (pst->order + 1) * d; for (m = 0; m <= pst->order; m++) { x = 0.0; for (j = pst->dw.width[d][WLEFT]; j <= pst->dw.width[d][WRIGHT]; j++) x += pst->dw.coef[d][j] * pst->sm.pi[j][m]; x = ivar[m] / (1.0 + ivar[m] * x); for (u = -pst->range; u <= pst->dw.maxw[WRIGHT]; u++) { pst->sm.k[u][m] = pst->sm.pi[u][m] * x; } } return; } void update_P(PStream * pst) { int m, u, v; for (m = 0; m <= pst->order; m++) for (u = -pst->range; u <= pst->dw.maxw[WRIGHT]; u++) for (v = u; v <= pst->dw.maxw[WRIGHT]; v++) { pst->sm.P[v - u][(pst->sm.t + u) & pst->sm.mask][m] -= pst->sm.k[v][m] * pst->sm.pi[u][m]; if (v != u) pst->sm.P[u - v][(pst->sm.t + v) & pst->sm.mask][m] = pst->sm.P[v - u][(pst->sm.t + u) & pst->sm.mask][m]; } return; } void update_c(PStream * pst, int d) { int j, m, u; double *mean, *ivar, x; ivar = pst->sm.ivseq[pst->sm.t & pst->sm.mask] + (pst->order + 1) * d; mean = pst->sm.mseq[pst->sm.t & pst->sm.mask] + (pst->order + 1) * d; for (m = 0; m <= pst->order; m++) { x = mean[m]; if (pst->iType == 2) x *= finv(ivar[m]); for (j = pst->dw.width[d][WLEFT]; j <= pst->dw.width[d][WRIGHT]; j++) x -= pst->dw.coef[d][j] * pst->sm.c[(pst->sm.t + j) & pst->sm.mask][m]; for (u = -pst->range; u <= pst->dw.maxw[WRIGHT]; u++) pst->sm.c[(pst->sm.t + u) & pst->sm.mask][m] += pst->sm.k[u][m] * x; } return; } SPTK-3.9/bin/mlsacheck/0000755001051300105040000000000012637167711011656 500000000000000SPTK-3.9/bin/mlsacheck/Makefile.am0000644001051300105040000000021612442245101013611 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = mlsacheck mlsacheck_SOURCES = mlsacheck.c mlsacheck_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/mlsacheck/Makefile.in0000644001051300105040000004256312637167416013657 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = mlsacheck$(EXEEXT) subdir = bin/mlsacheck ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_mlsacheck_OBJECTS = mlsacheck.$(OBJEXT) mlsacheck_OBJECTS = $(am_mlsacheck_OBJECTS) mlsacheck_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(mlsacheck_SOURCES) DIST_SOURCES = $(mlsacheck_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include mlsacheck_SOURCES = mlsacheck.c mlsacheck_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/mlsacheck/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/mlsacheck/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) mlsacheck$(EXEEXT): $(mlsacheck_OBJECTS) $(mlsacheck_DEPENDENCIES) $(EXTRA_mlsacheck_DEPENDENCIES) @rm -f mlsacheck$(EXEEXT) $(AM_V_CCLD)$(LINK) $(mlsacheck_OBJECTS) $(mlsacheck_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mlsacheck.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/mlsacheck/mlsacheck.c0000644001051300105040000003361312637156642013703 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * Check stability of MLSA filter coefficients * * * * 2012.9 Akira Tamamori * * * * usage: * * mlsacheck [ options ] [ infile] > stdout * * options: * * -m m : order of mel-cepstrum [25] * * -a a : all-pass constant [0.35] * * -l L : FFT length [256] * * -c C : stability check and modification of [0] * * MLSA filter coefficients * * 0 : only check * * 1 : only check (fast mode) * * 2 : check and modification by clipping * * 3 : check and modification by scaling * * 4 : check and modification (fast mode) * * -r r : stable condition for MLSA filter [0] * * 0 : keeping log approximation error * * not exceeding 0.24 dB (P=4) * * or 0.2735 dB (P=5) * * 1 : keeing MLSA filter stable * * -P P : order of Pade approximation [4] * * -R R : threshold value for modification [N/A] * * if this option wasn't specified, * * r=0,P=4 : R=4.5 * * r=1,P=4 : R=6.2 * * r=0,P=5 : R=6.0 * * r=1,P=5 : R=7.65 * * infile: * * mel cepstral coefficients * * stdout: * * mel-cepstrums satisfying stability condition * * notice: * * P = 4 or 5 * * * ************************************************************************/ static char *rcs_id = "$Id: mlsacheck.c,v 1.19 2015/12/14 01:14:20 uratec Exp $"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #include #include #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define ORDER 25 #define ALPHA 0.35 #define PADEORDER 4 #define FFTLENGTH 256 #define PADE4_THRESH1 4.5 #define PADE4_THRESH2 6.2 #define PADE5_THRESH1 6.0 #define PADE5_THRESH2 7.65 #define STABLE1 0 #define STABLE2 1 /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - check stability condition of MLSA filter coefficients \n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -m m : order of mel-cepstrum [%d]\n", ORDER); fprintf(stderr, " -a a : all-pass constant [%g]\n", ALPHA); fprintf(stderr, " -l L : FFT length [%d]\n", FFTLENGTH); fprintf(stderr, " -c C : stability check and modification [0]\n"); fprintf(stderr, " of MLSA filter coefficients \n"); fprintf(stderr, " 0 only check\n"); fprintf(stderr, " 1 only check (fast mode)\n"); fprintf(stderr, " 2 check and modification by clipping\n"); fprintf(stderr, " 3 check and modification by scaling\n"); fprintf(stderr, " 4 check and modification (fast mode)\n"); fprintf(stderr, " -r r : stability condition for MLSA [%d]\n", STABLE1); fprintf(stderr, " filter \n"); fprintf(stderr, " 0 keeping log approximation error\n"); fprintf(stderr, " not exceeding 0.24 dB (P=4)\n"); fprintf(stderr, " or 0.2735 dB (P=5) \n"); fprintf(stderr, " 1 keeping MLSA filter stable\n"); fprintf(stderr, " -P P : order of Pade approximation [%d]\n", PADEORDER); fprintf(stderr, " -R R : threshold value for modification [N/A]\n"); fprintf(stderr, " if this option wasn't specified, \n"); fprintf(stderr, " r=0,P=4 : R=4.5\n"); fprintf(stderr, " r=1,P=4 : R=6.2\n"); fprintf(stderr, " r=0,P=5 : R=6.0\n"); fprintf(stderr, " r=1,P=5 : R=7.65\n"); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " mel-cepstrums (%s) [stdin]\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " mel-cepstrums satisfying stability condition (%s)\n", FORMAT); fprintf(stderr, " stderr:\n"); fprintf(stderr, " ascii report of unstable frame\n"); fprintf(stderr, " notice:\n"); fprintf(stderr, " P = 4 or 5 \n"); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } void mlsacheck(double *mcep, int m, int fftlen, int frame, double a, double r, int c) { int i; double gain, *x, *y, *mag = NULL, max = 0.0; x = dgetmem(fftlen); y = dgetmem(fftlen); fillz(x, sizeof(*x), fftlen); fillz(y, sizeof(*y), fftlen); /* calculate gain factor */ for (i = 0, gain = 0.0; i <= m; i++) { x[i] = mcep[i]; gain += x[i] * pow(-a, i); } /* gain normalization */ x[0] -= gain; /* check stability */ if (c == 0 || c == 2 || c == 3) { /* usual mode */ mag = dgetmem(fftlen); fillz(mag, sizeof(*mag), fftlen); fftr(x, y, fftlen); for (i = 0; i < fftlen; i++) { mag[i] = sqrt(x[i] * x[i] + y[i] * y[i]); if (mag[i] > max) max = mag[i]; } } else { /* fast mode */ for (i = 0; i <= m; i++) max += x[i]; } /* modification MLSA filter coefficients */ if (max > r) { /* output ascii report */ fprintf(stderr, "[No. %d] is unstable frame (maximum = %f, threshold = %f)\n", frame, max, r); /* modification */ if (c == 2) { /* clipping */ for (i = 0; i < fftlen; i++) { if (mag[i] > r) { x[i] *= r / mag[i]; y[i] *= r / mag[i]; } } } else if (c == 3) { /* scaling */ for (i = 0; i < fftlen; i++) { x[i] *= r / max; y[i] *= r / max; } } else if (c == 4) { /* fast mode */ for (i = 0; i <= m; i++) x[i] *= r / max; } } /* output MLSA filter coefficients */ if (c == 0 || c == 1 || max <= r) { /* no modification */ fwritef(mcep, sizeof(*mcep), m + 1, stdout); } else { if (c == 2 || c == 3) ifft(x, y, fftlen); x[0] += gain; fwritef(x, sizeof(*x), m + 1, stdout); } free(x); free(y); if (c == 0 || c == 2 || c == 3) free(mag); } int main(int argc, char **argv) { int m = ORDER, pd = PADEORDER, fftlen = FFTLENGTH, stable_condition = STABLE1, frame = 0, c = 0; double *mcep, a = ALPHA, r = PADE4_THRESH1, R = 0.0; FILE *fp = stdin; if ((cmnd = strrchr(argv[0], '/')) == NULL) { cmnd = argv[0]; } else { cmnd++; } while (--argc) { if (**++argv == '-') { switch (*(*argv + 1)) { case 'm': m = atoi(*++argv); --argc; break; case 'a': a = atof(*++argv); --argc; break; case 'P': pd = atoi(*++argv); --argc; break; case 'l': fftlen = atoi(*++argv); --argc; break; case 'c': c = atoi(*++argv); if ((c != 0 && c != 1 && c != 2 && c != 3 && c != 4) || isdigit(**argv) == 0) { fprintf(stderr, "%s : '-c' option must be specified with 0, 1, 2, 3 or 4.\n", cmnd); usage(1); } --argc; break; case 'r': stable_condition = atoi(*++argv); if (stable_condition != STABLE1 && stable_condition != STABLE2) { fprintf(stderr, "%s : '-r' option must be specified with %d or %d.\n", cmnd, STABLE1, STABLE2); usage(1); } --argc; break; case 'R': R = atof(*++argv); if (isdigit(**argv) == 0) { fprintf(stderr, "%s : '-R' option must be specified by real number !\n", cmnd); usage(1); } --argc; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else { fp = getfp(*argv, "rb"); } } switch (pd) { case 4: if (stable_condition == STABLE1) r = PADE4_THRESH1; else r = PADE4_THRESH2; break; case 5: if (stable_condition == STABLE1) r = PADE5_THRESH1; else r = PADE5_THRESH2; break; default: fprintf(stderr, "%s : Order of Pade approximation should be 4 or 5!\n", cmnd); usage(1); } if (R != 0.0) r = R; mcep = dgetmem(m + 1); /* check stability of MLSA filter and output */ while (freadf(mcep, sizeof(*mcep), m + 1, fp) == m + 1) { mlsacheck(mcep, m, fftlen, frame, a, r, c); frame++; } return (0); } SPTK-3.9/bin/mlsadf/0000755001051300105040000000000012637167711011172 500000000000000SPTK-3.9/bin/mlsadf/Makefile.am0000644001051300105040000000021512442245102013125 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = mlsadf mlsadf_SOURCES = _mlsadf.c mlsadf.c mlsadf_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/mlsadf/Makefile.in0000644001051300105040000004262512637167416013172 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = mlsadf$(EXEEXT) subdir = bin/mlsadf ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_mlsadf_OBJECTS = _mlsadf.$(OBJEXT) mlsadf.$(OBJEXT) mlsadf_OBJECTS = $(am_mlsadf_OBJECTS) mlsadf_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(mlsadf_SOURCES) DIST_SOURCES = $(mlsadf_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include mlsadf_SOURCES = _mlsadf.c mlsadf.c mlsadf_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/mlsadf/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/mlsadf/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) mlsadf$(EXEEXT): $(mlsadf_OBJECTS) $(mlsadf_DEPENDENCIES) $(EXTRA_mlsadf_DEPENDENCIES) @rm -f mlsadf$(EXEEXT) $(AM_V_CCLD)$(LINK) $(mlsadf_OBJECTS) $(mlsadf_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_mlsadf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mlsadf.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/mlsadf/_mlsadf.c0000644001051300105040000001450412637156642012670 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /**************************************************************** $Id: _mlsadf.c,v 1.21 2015/12/14 05:34:35 uratec Exp $ MLSA Digital Filter double mlsadf(x, b, m, a, pd, d) double x : input double *c : MLSA filter coefficients int m : order of cepstrum double a : all-pass constant int pd : order of Pade approximation double *d : delay return value : filtered data *****************************************************************/ #include #if defined(WIN32) #include "SPTK.h" #else #include #endif static double pade[] = { 1.0, 1.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.4999273, 0.1067005, 0.01170221, 0.0005656279, 1.0, 0.4999391, 0.1107098, 0.01369984, 0.0009564853, 0.00003041721 }; double *ppade; static double mlsafir(double x, double *b, const int m, const double a, double *d) { double y = 0.0, aa; int i; aa = 1 - a * a; d[0] = x; d[1] = aa * d[0] + a * d[1]; for (i = 2; i <= m; i++) { d[i] = d[i] + a * (d[i + 1] - d[i - 1]); y += d[i] * b[i]; } for (i = m + 1; i > 1; i--) d[i] = d[i - 1]; return (y); } static double mlsadf1(double x, double *b, const double a, const int pd, double *d) { double v, out = 0.0, *pt, aa; int i; aa = 1 - a * a; pt = &d[pd + 1]; for (i = pd; i >= 1; i--) { d[i] = aa * pt[i - 1] + a * d[i]; pt[i] = d[i] * b[1]; v = pt[i] * ppade[i]; x += (1 & i) ? v : -v; out += v; } pt[0] = x; out += x; return (out); } static double mlsadf2(double x, double *b, const int m, const double a, const int pd, double *d) { double v, out = 0.0, *pt; int i; pt = &d[pd * (m + 2)]; for (i = pd; i >= 1; i--) { pt[i] = mlsafir(pt[i - 1], b, m, a, &d[(i - 1) * (m + 2)]); v = pt[i] * ppade[i]; x += (1 & i) ? v : -v; out += v; } pt[0] = x; out += x; return (out); } double mlsadf(double x, double *b, const int m, const double a, const int pd, double *d) { ppade = &pade[pd * (pd + 1) / 2]; x = mlsadf1(x, b, a, pd, d); x = mlsadf2(x, b, m, a, pd, &d[2 * (pd + 1)]); return (x); } static double mlsafirt(double x, double *b, const int m, const double a, double *d) { int i; double y = 0.0; y = (1.0 - a * a) * d[0]; d[m] = b[m] * x + a * d[m - 1]; for (i = m - 1; i > 1; i--) d[i] += b[i] * x + a * (d[i - 1] - d[i + 1]); d[1] += a * (d[0] - d[2]); for (i = 0; i < m; i++) d[i] = d[i + 1]; return (y); } static double mlsadf2t(double x, double *b, const int m, const double a, const int pd, double *d) { double v, out = 0.0, *pt; int i; pt = &d[pd * (m + 2)]; for (i = pd; i >= 1; i--) { pt[i] = mlsafirt(pt[i - 1], b, m, a, &d[(i - 1) * (m + 2)]); v = pt[i] * ppade[i]; x += (1 & i) ? v : -v; out += v; } pt[0] = x; out += x; return (out); } double mlsadft(double x, double *b, const int m, const double a, const int pd, double *d) { ppade = &pade[pd * (pd + 1) / 2]; x = mlsadf1(x, b, a, pd, d); x = mlsadf2t(x, b, m, a, pd, &d[2 * (pd + 1)]); return (x); } SPTK-3.9/bin/mlsadf/mlsadf.c0000644001051300105040000002565012637156643012536 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * MLSA Digital Filter for Speech Synthesis * * * * 1994.6 T.Kobayashi * * 1996.3 K.Koishida * * * * usage: * * mlsadf [ options ] mcfile [ infile ] > stdout * * options: * * -m m : order of mel-cepstrum [25] * * -a a : all-pass constant [0.35] * * -p p : frame period [100] * * -i i : interpolation period [1] * * -b : mcep is filter coefficient b [FALSE] * * -P P : order of Pade approximation [4] * * -k : filtering without gain [FALSE] * * -t : transpose filter [FALSE] * * -v : inverse filter [FALSE] * * infile: * * mel cepstral coefficients * * , c~(0), c~(1), ..., c~(M), * * excitation sequence * * , x(0), x(1), ..., * * stdout: * * filtered sequence * * , y(0), y(1), ..., * * notice: * * P = 4 or 5 * * require: * * mlsadf() * * * ************************************************************************/ static char *rcs_id = "$Id: mlsadf.c,v 1.34 2015/12/14 01:14:20 uratec Exp $"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #include #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define ORDER 25 #define ALPHA 0.35 #define FPERIOD 100 #define IPERIOD 1 #define BFLAG FA #define PADEORDER 4 #define NGAIN FA #define TRANSPOSE FA #define INVERSE FA char *BOOL[] = { "FALSE", "TRUE" }; /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - MLSA digital filter for speech synthesis\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] mcfile [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -m m : order of mel-cepstrum [%d]\n", ORDER); fprintf(stderr, " -a a : all-pass constant [%g]\n", ALPHA); fprintf(stderr, " -p p : frame period [%d]\n", FPERIOD); fprintf(stderr, " -i i : interpolation period [%d]\n", IPERIOD); fprintf(stderr, " -b : output filter coefficient b [%s]\n", BOOL[BFLAG]); fprintf(stderr, " -P P : order of Pade approximation [%d]\n", PADEORDER); fprintf(stderr, " -k : filtering without gain [%s]\n", BOOL[NGAIN]); fprintf(stderr, " -t : transpose filter [%s]\n", BOOL[TRANSPOSE]); fprintf(stderr, " -v : inverse filter [%s]\n", BOOL[INVERSE]); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " filter input (%s) [stdin]\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " filter output (%s)\n", FORMAT); fprintf(stderr, " mcfile:\n"); fprintf(stderr, " mel-cepstrum (%s)\n", FORMAT); fprintf(stderr, " notice:\n"); fprintf(stderr, " P = 4 or 5 \n"); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char **argv) { int m = ORDER, pd = PADEORDER, fprd = FPERIOD, iprd = IPERIOD, i, j; FILE *fp = stdin, *fpc = NULL; double *c, *inc, *cc, *d, x, a = ALPHA; Boolean bflag = BFLAG, ngain = NGAIN, transpose = TRANSPOSE, inverse = INVERSE; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) if (**++argv == '-') { switch (*(*argv + 1)) { case 'm': m = atoi(*++argv); --argc; break; case 'a': a = atof(*++argv); --argc; break; case 'p': fprd = atoi(*++argv); --argc; break; case 'i': iprd = atoi(*++argv); --argc; break; case 'P': pd = atoi(*++argv); --argc; break; case 't': transpose = 1 - transpose; break; case 'v': inverse = 1 - inverse; break; case 'b': bflag = 1 - bflag; break; case 'k': ngain = 1 - ngain; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else if (fpc == NULL) fpc = getfp(*argv, "rb"); else fp = getfp(*argv, "rb"); if ((pd < 4) || (pd > 5)) { fprintf(stderr, "%s : Order of Pade approximation should be 4 or 5!\n", cmnd); return (1); } if (fpc == NULL) { fprintf(stderr, "%s : Cannot open mel cepstrum file!\n", cmnd); return (1); } c = dgetmem(3 * (m + 1) + 3 * (pd + 1) + pd * (m + 2)); cc = c + m + 1; inc = cc + m + 1; d = inc + m + 1; if (freadf(c, sizeof(*c), m + 1, fpc) != m + 1) return (1); if (!bflag) mc2b(c, c, m, a); if (inverse) { if (!ngain) { for (i = 0; i <= m; i++) c[i] *= -1; } else { c[0] = 0; for (i = 1; i <= m; i++) c[i] *= -1; } } for (;;) { if (freadf(cc, sizeof(*cc), m + 1, fpc) != m + 1) return (0); if (!bflag) mc2b(cc, cc, m, a); if (inverse) { if (!ngain) { for (i = 0; i <= m; i++) cc[i] *= -1; } else { cc[0] = 0; for (i = 1; i <= m; i++) cc[i] *= -1; } } for (i = 0; i <= m; i++) inc[i] = (cc[i] - c[i]) * (double) iprd / (double) fprd; for (j = fprd, i = (iprd + 1) / 2; j--;) { if (freadf(&x, sizeof(x), 1, fp) != 1) return (0); if (!ngain) x *= exp(c[0]); if (transpose) x = mlsadft(x, c, m, a, pd, d); else x = mlsadf(x, c, m, a, pd, d); fwritef(&x, sizeof(x), 1, stdout); if (!--i) { for (i = 0; i <= m; i++) c[i] += inc[i]; i = iprd; } } movem(cc, c, sizeof(*cc), m + 1); } return (0); } SPTK-3.9/bin/msvq/0000755001051300105040000000000012637167711010712 500000000000000SPTK-3.9/bin/msvq/Makefile.am0000644001051300105040000000020312442245102012642 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = msvq msvq_SOURCES = _msvq.c msvq.c msvq_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/msvq/Makefile.in0000644001051300105040000004254312637167416012711 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = msvq$(EXEEXT) subdir = bin/msvq ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_msvq_OBJECTS = _msvq.$(OBJEXT) msvq.$(OBJEXT) msvq_OBJECTS = $(am_msvq_OBJECTS) msvq_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(msvq_SOURCES) DIST_SOURCES = $(msvq_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include msvq_SOURCES = _msvq.c msvq.c msvq_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/msvq/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/msvq/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) msvq$(EXEEXT): $(msvq_OBJECTS) $(msvq_DEPENDENCIES) $(EXTRA_msvq_DEPENDENCIES) @rm -f msvq$(EXEEXT) $(AM_V_CCLD)$(LINK) $(msvq_OBJECTS) $(msvq_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_msvq.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msvq.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/msvq/_msvq.c0000644001051300105040000001026512637156643012131 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /**************************************************************** $Id: _msvq.c,v 1.17 2015/12/14 01:14:20 uratec Exp $ Multi Stage Vector Quantization void msvq(x, cb, l, cbsize, stage, index) double *x : input vector double *cb : codebook vector int l : order of vector int *cbsize : size of codebook int stage : number of stage int *index : index of codebook *****************************************************************/ #include #include #if defined(WIN32) #include "SPTK.h" #else #include #endif void msvq(double *x, double *cb, const int l, int *cbsize, const int stage, int *index) { int i, j; double *p; static double *xx = NULL; static int size; if (xx == NULL) { xx = dgetmem(l); size = l; } if (size > l) { free(xx); xx = dgetmem(l); size = l; } movem(x, xx, sizeof(*x), l); for (i = 0; i < stage; i++) { index[i] = vq(xx, cb, l, cbsize[i]); p = cb + index[i] * l; for (j = 0; j < l; j++) xx[j] -= p[j]; cb += cbsize[i] * l; } } SPTK-3.9/bin/msvq/msvq.c0000644001051300105040000002204012637156643011764 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * Multi Stage Vector Quantization * * * * 1996.1 K.Koishida * * * * usage: * * msvq [options] < stdin > stdout * * options: * * -l l : length of vector [26] * * -n n : order of vector [25] * * -s s f : codebook [N/A N/A] * * s : codebook size * * f : codebook file * * -q : output quantized vector [FALSE] * * infile: * * input vector * * x(0), x(1), ..., x(l-1), * * stdout: * * index of codebook (int) * * index(1), index(2) ... index(n) * * index(i) is index of i-th stage * * quantized vector (if -q option is specified) * * x'(0), x'(1), ..., x'(l-1), * * notice: * * -s option are specified number of stages * * require: * * msvq() imsvq(), vq(), ivq() * * * ************************************************************************/ static char *rcs_id = "$Id: msvq.c,v 1.25 2015/12/14 01:14:20 uratec Exp $"; /* Standard C Libraries */ #include #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define LENG 26 #define QFLAG FA char *BOOL[] = { "FALSE", "TRUE" }; /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - multi stage vector quantization\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] < stdin > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -l l : length of vector [%d]\n", LENG); fprintf(stderr, " -n n : order of vector [%d]\n", LENG - 1); fprintf(stderr, " -s s f : codebook [N/A N/A]\n"); fprintf(stderr, " s: codebook size\n"); fprintf(stderr, " f: codebook file\n"); fprintf(stderr, " -q : output quantized vector [%s]\n", BOOL[QFLAG]); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " stdin:\n"); fprintf(stderr, " vectors (%s)\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " index (int) or\n"); fprintf(stderr, " quantized vectors (%s) if -q option is specified\n", FORMAT); fprintf(stderr, " cbfile:\n"); fprintf(stderr, " codebook (%s)\n", FORMAT); fprintf(stderr, " notice:\n"); fprintf(stderr, " -s option are specified number of stages\n"); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char **argv) { int l = LENG, *cbsize, *index, stage = 0, ss = 0, num, i; char **cbfile; FILE *fp = stdin, *fpcb; double *cb = NULL, *x, *qx, *p; Boolean qflag = QFLAG; cbsize = (int *) calloc(argc / 2, sizeof(*cbsize)); index = (int *) calloc(argc / 2, sizeof(*index)); cbfile = (char **) calloc(argc / 2, sizeof(**cbfile)); if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) if (**++argv == '-') { switch (*(*argv + 1)) { case 'l': l = atoi(*++argv); --argc; break; case 'n': l = atoi(*++argv) + 1; --argc; break; case 's': cbsize[stage] = atoi(*++argv); cbfile[stage++] = *++argv; argc -= 2; break; case 'q': qflag = 1 - qflag; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else fp = getfp(*argv, "rb"); for (i = 0, num = 0; i < stage; i++) num += cbsize[i]; cb = dgetmem(num * l); p = cb; for (i = 0; i < stage; i++) { fpcb = getfp(cbfile[i], "rb"); if (freadf(p, sizeof(*p), cbsize[i] * l, fpcb) != cbsize[i] * l) { fprintf(stderr, "%s : Codebook size error of %d stage!\n", cmnd, ss); return (1); } p += cbsize[i] * l; } x = dgetmem(l + l); qx = x + l; if (!qflag) while (freadf(x, sizeof(*x), l, fp) == l) { msvq(x, cb, l, cbsize, stage, index); fwritex(index, sizeof(*index), stage, stdout); } else while (freadf(x, sizeof(*x), l, fp) == l) { msvq(x, cb, l, cbsize, stage, index); imsvq(index, cb, l, cbsize, stage, qx); fwritef(qx, sizeof(*qx), l, stdout); } return (0); } SPTK-3.9/bin/nan/0000755001051300105040000000000012637167711010500 500000000000000SPTK-3.9/bin/nan/Makefile.am0000644001051300105040000000016712442245103012442 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = nan nan_SOURCES = nan.c nan_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/nan/Makefile.in0000644001051300105040000004236012637167416012474 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = nan$(EXEEXT) subdir = bin/nan ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_nan_OBJECTS = nan.$(OBJEXT) nan_OBJECTS = $(am_nan_OBJECTS) nan_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(nan_SOURCES) DIST_SOURCES = $(nan_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include nan_SOURCES = nan.c nan_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/nan/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/nan/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) nan$(EXEEXT): $(nan_OBJECTS) $(nan_DEPENDENCIES) $(EXTRA_nan_DEPENDENCIES) @rm -f nan$(EXEEXT) $(AM_V_CCLD)$(LINK) $(nan_OBJECTS) $(nan_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nan.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/nan/nan.c0000644001051300105040000001434112637156643011345 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * Find NaN and Infinity Values * * * * 1997.7 G.Hirabayashi * * * * usage: * * nan [ options ] [ infile ] > stdout * * options: * * infile: * * stdin for default * * * ************************************************************************/ static char *rcs_id = "$Id: nan.c,v 1.32 2015/12/14 01:14:20 uratec Exp $"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #include #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - find NaN and Infinity values\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " data sequence (%s) [stdin]\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " result messages\n"); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char *argv[]) { FILE *fp; char *s, *infile = NULL, c; void nan_tmp(FILE *); if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) { if (*(s = *++argv) == '-') { c = *++s; switch (c) { case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, c); usage(1); break; } } else infile = s; } if (infile) fp = getfp(infile, "rb"); else fp = stdin; nan_tmp(fp); return (0); } void nan_tmp(FILE * fp) { long count = 0; #ifdef DOUBLE double x; #else float x; #endif /* DOUBLE */ while (freadx(&x, sizeof(x), 1, fp)) { #ifdef WIN32 if (!_finite(x)) fprintf(stdout, "[No. %ld] is Infinity\n", count); if (_isnan(x)) fprintf(stdout, "[No. %ld] is NaN\n", count); #else if (isinf(x)) fprintf(stdout, "[No. %ld] is Infinity\n", count); if (isnan(x)) fprintf(stdout, "[No. %ld] is NaN\n", count); #endif ++count; } return; } SPTK-3.9/bin/ndps2c/0000755001051300105040000000000012637167711011115 500000000000000SPTK-3.9/bin/ndps2c/Makefile.am0000644001051300105040000000021512442245150013053 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = ndps2c ndps2c_SOURCES = _ndps2c.c ndps2c.c ndps2c_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/ndps2c/Makefile.in0000644001051300105040000004262512637167416013115 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = ndps2c$(EXEEXT) subdir = bin/ndps2c ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_ndps2c_OBJECTS = _ndps2c.$(OBJEXT) ndps2c.$(OBJEXT) ndps2c_OBJECTS = $(am_ndps2c_OBJECTS) ndps2c_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(ndps2c_SOURCES) DIST_SOURCES = $(ndps2c_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include ndps2c_SOURCES = _ndps2c.c ndps2c.c ndps2c_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/ndps2c/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/ndps2c/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) ndps2c$(EXEEXT): $(ndps2c_OBJECTS) $(ndps2c_DEPENDENCIES) $(EXTRA_ndps2c_DEPENDENCIES) @rm -f ndps2c$(EXEEXT) $(AM_V_CCLD)$(LINK) $(ndps2c_OBJECTS) $(ndps2c_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_ndps2c.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ndps2c.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/ndps2c/_ndps2c.c0000644001051300105040000001001212637156647012531 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /*************************************************************** $Id: _ndps2c.c,v 1.3 2015/12/14 01:14:20 uratec Exp $ Transform Negative Derivative of Phase Spectrum (NDPS) to Cepstrum void ndps2c(n, l, c, m, pz) double *n : NDPS int l : FFT length double *c : cepstrum int m : order of cepstrum ***************************************************************/ #include #include #include #if defined(WIN32) #include "SPTK.h" #else #include #endif void ndps2c(double *n, const int l, double *c, const int m) { int i, no; double *nx, *ny; no = l / 2; nx = dgetmem(l); ny = dgetmem(l); for (i = 0; i <= no; i++) { nx[i] = n[i]; } for (i = 1; i < no; i++) { nx[l - i] = nx[i]; } fftr(nx, ny, l); c[0] = 0.0; for (i = 1; i <= m; i++) c[i] = nx[i] / (i * l / 2.0); if (m == l / 2) c[m] = nx[m] / 2.0; free(nx); free(ny); } SPTK-3.9/bin/ndps2c/ndps2c.c0000644001051300105040000001647412637156647012414 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * Transform Negative Derivative of Phase Spectrum (NDPS) to Cepstrum * * * * 1986.9 K.Tokuda * * 2014.1 T.Aritake * * * * usage: * * ndps2c [ options ] [ infile ] > stdout * * options: * * -m M : order of cepstrum [25] * * -l L : FFT length [256] * * stdin: * * Negative Derivative of Phase Spectrum (NDPS) (real) * * , n(0), n(1), ..., n(L/2) * * stdout: * * minimum phase cepstrum (real) * * , c(0), c(1), ..., c(M), * * * ************************************************************************/ static char *rcs_id = ""; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #include #include #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define ORDER 25 #define FLENG 256 /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - transform Negative Derivative of Phase Spectrum (NDPS) to cepstrum\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -m M : order of cepstrum [%d]\n", ORDER); fprintf(stderr, " -l L : FFT length [%d]\n", FLENG); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " Negative Derivative of Phase Spectrum (NDPS) (%s) [stdin]\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " cepstrum (%s)\n", FORMAT); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char **argv) { int m = ORDER, l = FLENG; FILE *fp = stdin; double *c, *n; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) if (**++argv == '-') { switch (*(*argv + 1)) { case 'm': case 'l': if (isdigit(**(argv + 1)) == 0) { if ((**(argv + 1)) != '+') { fprintf(stderr, "%s : %s option need positive value !\n", cmnd, *argv); usage(1); } else if (isdigit(*(*(argv + 1) + 1)) == 0) { fprintf(stderr, "%s : %s option need positive value !\n", cmnd, *argv); usage(1); } } if ((*(*argv + 1)) == 'm') m = atoi(*++argv); else if ((*(*argv + 1)) == 'l') l = atoi(*++argv); --argc; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else fp = getfp(*argv, "rb"); c = dgetmem(m + 1); n = dgetmem(l); while (freadf(n, sizeof(*n), l / 2 + 1, fp) == l / 2 + 1) { ndps2c(n, l, c, m); fwritef(c, sizeof(*c), m + 1, stdout); } free(c); free(n); return (0); } SPTK-3.9/bin/norm0/0000755001051300105040000000000012637167711010757 500000000000000SPTK-3.9/bin/norm0/Makefile.am0000644001051300105040000000021012442245103012706 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = norm0 norm0_SOURCES = _norm0.c norm0.c norm0_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/norm0/Makefile.in0000644001051300105040000004257412637167417012763 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = norm0$(EXEEXT) subdir = bin/norm0 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_norm0_OBJECTS = _norm0.$(OBJEXT) norm0.$(OBJEXT) norm0_OBJECTS = $(am_norm0_OBJECTS) norm0_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(norm0_SOURCES) DIST_SOURCES = $(norm0_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include norm0_SOURCES = _norm0.c norm0.c norm0_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/norm0/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/norm0/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) norm0$(EXEEXT): $(norm0_OBJECTS) $(norm0_DEPENDENCIES) $(EXTRA_norm0_DEPENDENCIES) @rm -f norm0$(EXEEXT) $(AM_V_CCLD)$(LINK) $(norm0_OBJECTS) $(norm0_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_norm0.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/norm0.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/norm0/_norm0.c0000644001051300105040000000714712637156643012250 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /*************************************************************** $Id: _norm0.c,v 1.16 2015/12/14 01:14:20 uratec Exp $ Normalize coefficients void norm0(x, y, m) double *x : input coefficients double *y : normalized coefficients int m : order of coefficients ***************************************************************/ #include #if defined(WIN32) #include "SPTK.h" #else #include #endif void norm0(double *x, double *y, int m) { y[0] = 1 / x[0]; for (; m >= 1; m--) y[m] = x[m] * y[0]; return; } SPTK-3.9/bin/norm0/norm0.c0000644001051300105040000001442312637156643012104 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * Normalize coefficients * * * * 1996.4 K.Koishida * * * * usage: * * norm0 [options] [infile] > stdout * * options: * * -m m : order [25] * * infile: * * data sequence * * , x(0), x(1), ..., x(m), * * stdout: * * normalized data sequence * * , 1/x(0), x(1)/x(0), ..., x(m)/x(0) * * * ************************************************************************/ static char *rcs_id = "$Id: norm0.c,v 1.24 2015/12/14 01:14:20 uratec Exp $"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define ORDER 25 /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - normalize coefficients\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -m m : order [%d]\n", ORDER); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " coefficients (%s) [stdin]\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " normalized coefficients (%s)\n", FORMAT); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char **argv) { int m = ORDER; FILE *fp = stdin; double *x; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) if (**++argv == '-') { switch (*(*argv + 1)) { case 'm': m = atoi(*++argv); --argc; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else fp = getfp(*argv, "rb"); x = dgetmem(m + 1); while (freadf(x, sizeof(*x), m + 1, fp) == m + 1) { norm0(x, x, m); fwritef(x, sizeof(*x), m + 1, stdout); } return (0); } SPTK-3.9/bin/nrand/0000755001051300105040000000000012637167711011026 500000000000000SPTK-3.9/bin/nrand/Makefile.am0000644001051300105040000000021012442245105012757 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = nrand nrand_SOURCES = _nrand.c nrand.c nrand_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/nrand/Makefile.in0000644001051300105040000004257412637167417013032 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = nrand$(EXEEXT) subdir = bin/nrand ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_nrand_OBJECTS = _nrand.$(OBJEXT) nrand.$(OBJEXT) nrand_OBJECTS = $(am_nrand_OBJECTS) nrand_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(nrand_SOURCES) DIST_SOURCES = $(nrand_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include nrand_SOURCES = _nrand.c nrand.c nrand_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/nrand/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/nrand/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) nrand$(EXEEXT): $(nrand_OBJECTS) $(nrand_DEPENDENCIES) $(EXTRA_nrand_DEPENDENCIES) @rm -f nrand$(EXEEXT) $(AM_V_CCLD)$(LINK) $(nrand_OBJECTS) $(nrand_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_nrand.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nrand.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/nrand/_nrand.c0000644001051300105040000001060112637156643012353 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /**************************************************************** $Id: _nrand.c,v 1.17 2015/12/14 01:14:21 uratec Exp $ Generate Normal Distributed Random Value nrand(p, leng, seed) double *p : generated normal distributed random value int leng : length int seed : seed of random value ****************************************************************/ #include #include #if defined(WIN32) #include "SPTK.h" #else #include #endif #define RAND_MAX 32767 static double rnd(unsigned long *next) { double r; *next = *next * 1103515245L + 12345; r = (*next / 65536L) % 32768L; return (r / RAND_MAX); } int nrand(double *p, const int leng, const int seed) { int i; unsigned long next; if (seed != 1) next = srnd((unsigned int) seed); for (i = 0; i < leng; i++) p[i] = (double) nrandom(&next); return (0); } double nrandom(unsigned long *next) { static int sw = 0; static double r1, r2, s; if (sw == 0) { sw = 1; do { r1 = 2 * rnd(next) - 1; r2 = 2 * rnd(next) - 1; s = r1 * r1 + r2 * r2; } while (s > 1 || s == 0); s = sqrt(-2 * log(s) / s); return (r1 * s); } else { sw = 0; return (r2 * s); } } unsigned long srnd(const unsigned int seed) { return (seed); } SPTK-3.9/bin/nrand/nrand.c0000644001051300105040000001637212637156643012227 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * Generate Normal Distrubuted Random Value * * * * 1991.9 T.Kanno * * 1996.1 N.Miyazaki modified * * * * usage: * * nrand [ options ] > stdout * * options: * * -l l : output length [256] * * -s s : seed for nrand [1] * * -m m : mean [0.0] * * -v v : variance [1.0] * * -d d : standard deviation [1.0] * * stdout: * * random value (float) * * notice: * * if l<0, generate infinite sequence * * * ************************************************************************/ static char *rcs_id = "$Id: nrand.c,v 1.25 2015/12/14 01:14:21 uratec Exp $"; /* Standard C Libraries */ #include #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define LENG 256 #define SEED 1 #define MEAN 0.0 #define VAR 1.0 #define SDEV 1.0 /* Command Name */ char *cmnd; void usage(void) { fprintf(stderr, "\n"); fprintf(stderr, " %s - generate normal distributed random value\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -l l : output length [%d]\n", LENG); fprintf(stderr, " -s s : seed for nrand [%d]\n", SEED); fprintf(stderr, " -m m : mean [%g]\n", MEAN); fprintf(stderr, " -v v : variance [%g]\n", VAR); fprintf(stderr, " -d d : standard deviation [%g]\n", SDEV); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " stdout:\n"); fprintf(stderr, " random values (%s)\n", FORMAT); fprintf(stderr, " notice:\n"); fprintf(stderr, " if l<0, generate infinite sequence\n"); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(1); } int main(int argc, char *argv[]) { char *str, flg; int leng = LENG, seed = SEED, i; unsigned long next = SEED; double p, mean = MEAN, sdev = SDEV; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) { if (*(str = *++argv) == '-') { flg = *++str; if (*++str == '\0') { str = *++argv; argc--; } switch (flg) { case 'l': leng = atoi(str); break; case 's': seed = atoi(str); break; case 'm': mean = atof(str); break; case 'v': sdev = atof(str); sdev = sqrt(sdev); break; case 'd': sdev = atof(str); break; case 'h': default: usage(); } } else usage(); } if (seed != 1) next = srnd((unsigned int) seed); for (i = 0;; i++) { p = (double) nrandom(&next); p = mean + sdev * p; fwritef(&p, sizeof(p), 1, stdout); if (i == leng - 1) break; } return (0); } SPTK-3.9/bin/par2lpc/0000755001051300105040000000000012637167712011270 500000000000000SPTK-3.9/bin/par2lpc/Makefile.am0000644001051300105040000000022212442245105013223 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = par2lpc par2lpc_SOURCES = _par2lpc.c par2lpc.c par2lpc_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/par2lpc/Makefile.in0000644001051300105040000004265612637167417013274 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = par2lpc$(EXEEXT) subdir = bin/par2lpc ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_par2lpc_OBJECTS = _par2lpc.$(OBJEXT) par2lpc.$(OBJEXT) par2lpc_OBJECTS = $(am_par2lpc_OBJECTS) par2lpc_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(par2lpc_SOURCES) DIST_SOURCES = $(par2lpc_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include par2lpc_SOURCES = _par2lpc.c par2lpc.c par2lpc_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/par2lpc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/par2lpc/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) par2lpc$(EXEEXT): $(par2lpc_OBJECTS) $(par2lpc_DEPENDENCIES) $(EXTRA_par2lpc_DEPENDENCIES) @rm -f par2lpc$(EXEEXT) $(AM_V_CCLD)$(LINK) $(par2lpc_OBJECTS) $(par2lpc_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_par2lpc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/par2lpc.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/par2lpc/_par2lpc.c0000644001051300105040000000735512637156643013071 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /*************************************************************** $Id: _par2lpc.c,v 1.18 2015/12/14 01:14:21 uratec Exp $ Transformation PARCOR to LPC void par2lpc(k, a, m) double *k : PARCOR coefficients double *a : LP coefficients int m : order of LPC ****************************************************************/ #include #if defined(WIN32) #include "SPTK.h" #else #include #endif void par2lpc(double *k, double *a, const int m) { int i, n; a[0] = k[0]; for (n = 1; n <= m; n++) { for (i = 1; i < n; i++) a[i] = k[i] + k[n] * k[n - i]; movem(&a[1], &k[1], sizeof(*a), n - 1); } a[m] = k[m]; return; } SPTK-3.9/bin/par2lpc/par2lpc.c0000644001051300105040000001467512637156643012735 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * Transform PARCOR to LPC * * * * 1996.1 K.Koishida * * * * usage: * * par2lpc [ options ] [ infile ] > stdout * * options: * * -m m : order of LPC [25] * * infile: * * PARCOR * * , K, k(1), ..., k(m), * * stdout: * * LP Coefficeints * * , K, a(1), ..., a(m), * * require: * * par2lpc() * * * ************************************************************************/ static char *rcs_id = "$Id: par2lpc.c,v 1.25 2015/12/14 01:14:21 uratec Exp $"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define ORDER 25 /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - transform PARCOR to LPC\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -m m : order of LPC [%d]\n", ORDER); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " PARCOR (%s) [stdin]\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " LP coefficients (%s)\n", FORMAT); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char **argv) { int m = ORDER; FILE *fp = stdin; double *k, *a; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) if (**++argv == '-') { switch (*(*argv + 1)) { case 'm': m = atoi(*++argv); --argc; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else fp = getfp(*argv, "rb"); a = dgetmem(m + m + 2); k = a + m + 1; while (freadf(k, sizeof(*k), m + 1, fp) == m + 1) { par2lpc(k, a, m); fwritef(a, sizeof(*a), m + 1, stdout); } return 0; } SPTK-3.9/bin/pca/0000755001051300105040000000000012637167712010470 500000000000000SPTK-3.9/bin/pca/Makefile.am0000644001051300105040000000027512442245106012434 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = pca pcas pca_SOURCES = pca.c pca_LDADD = @top_builddir@/lib/libSPTK.a pcas_SOURCES = pcas.c pcas_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/pca/Makefile.in0000644001051300105040000004327112637167417012466 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = pca$(EXEEXT) pcas$(EXEEXT) subdir = bin/pca ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_pca_OBJECTS = pca.$(OBJEXT) pca_OBJECTS = $(am_pca_OBJECTS) pca_DEPENDENCIES = @top_builddir@/lib/libSPTK.a am_pcas_OBJECTS = pcas.$(OBJEXT) pcas_OBJECTS = $(am_pcas_OBJECTS) pcas_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(pca_SOURCES) $(pcas_SOURCES) DIST_SOURCES = $(pca_SOURCES) $(pcas_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include pca_SOURCES = pca.c pca_LDADD = @top_builddir@/lib/libSPTK.a pcas_SOURCES = pcas.c pcas_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/pca/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/pca/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) pca$(EXEEXT): $(pca_OBJECTS) $(pca_DEPENDENCIES) $(EXTRA_pca_DEPENDENCIES) @rm -f pca$(EXEEXT) $(AM_V_CCLD)$(LINK) $(pca_OBJECTS) $(pca_LDADD) $(LIBS) pcas$(EXEEXT): $(pcas_OBJECTS) $(pcas_DEPENDENCIES) $(EXTRA_pcas_DEPENDENCIES) @rm -f pcas$(EXEEXT) $(AM_V_CCLD)$(LINK) $(pcas_OBJECTS) $(pcas_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pca.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pcas.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/pca/pca.c0000644001051300105040000003717712637156643011337 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /********************************************************************************* * * * PCA : Principal Component Analysis * * * * 2009.8 A.Tamamori * * * * usage: * * pca [ options ] [ infile ] > stdout * * * * options: * * -l L : dimentionality of input/output vectors [3] * * -n N : number of output principal componets [2] * * -i I : number of iteration of Jacobi method [10000] * * -e e : threshold of convergence of Jacobi method [0.000001] * * -v : output eigenvectors and mean vector [FALSE] * * -V fn : output eigenvalues and contribution ratio * * (output filename = fn) [NULL] * * * * infile: * * training vectors * * X(0), X(1), X(2), ... * * where * * X(0)=[x(0), x(1), ..., x(L-1)], * * X(1)=[x(L), x(L+1), ..., x(2*L-1)], * * X(2)=[x(2*L), x(L+1), ..., x(3*L-1)], * * . * * . * * . * * * * stdout: * * eigenvectors and mean vector (if -v option is specified) * * mean_vec, evec(1), evec(2), ..., evec(N) * * * * notice: * * Calculation of PCA is based on jacobi method. * * The Order of Output eigen values and contribution ration is: * * eig_val-1, contri_ratio-1, ..., eig_val-N, contri_ratio-N * * * *********************************************************************************/ static char *rcs_id = "$Id: pca.c,v 1.22 2015/12/14 01:14:21 uratec Exp $"; #include #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Defalut Values */ #define LENG 24 #define PRICOMP_ORDER 2 #define EPS 0.000001 #define ITEMAX 10000 typedef enum { FALSE = -1, TRUE = 1 } BOOL; /* Command Name */ char *cmnd; typedef struct _float_list { float *f; struct _float_list *next; } float_list; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - Pricipal Component Analysis\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -l L : dimentionality of input vectors [%d]\n", LENG); fprintf(stderr, " -n N : dimentionality of output vectors [%d]\n", PRICOMP_ORDER); fprintf(stderr, " -i I : iteration of Jacobi method [%d]\n", ITEMAX); fprintf(stderr, " -e e : threshold of convergence of Jacobi method [%f]\n", EPS); fprintf(stderr, " -v : output eigen vectors and mean vector [FALSE]\n"); fprintf(stderr, " -V fn : output eigen values and contribution ratio \n"); fprintf(stderr, " (output filename = fn) [FALSE]\n"); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " training data set [stdin]\n"); fprintf(stderr, " stdout:\n"); fprintf(stderr, " mean vector and eigen vectors [stdin]\n"); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } double **malloc_matrix(int n) { double **m; double *mtmp; int i; mtmp = dgetmem(n * n); if ((m = (double **) malloc(sizeof(double *) * n)) == NULL) { fprintf(stderr, "Can't malloc in %s\n", cmnd); exit(EXIT_FAILURE); } for (i = 0; i < n; i++) { m[i] = &(mtmp[i * n]); } return m; } int jacobi(double **m, int n, double eps, double *e_val, double **e_vec, int itemax) { int i, j, k; int count; int ret; double **a; double max_e; int r = 0, c = 0; double a1, a2, a3; double co, si; double w1, w2; double t1, ta; double tmp; for (i = 0; i < n; i++) { for (j = i + 1; j < n; j++) { if (m[i][j] != m[j][i]) { return -1; } } } if ((a = malloc_matrix(n)) == NULL) { fprintf(stderr, "Error : Can't malloc at jacobi in %s\n", cmnd); exit(EXIT_FAILURE); } for (i = 0; i < n; i++) { for (j = 0; j < n; j++) { a[i][j] = m[i][j]; } } for (i = 0; i < n; i++) { for (j = 0; j < n; j++) { e_vec[i][j] = (i == j) ? 1.0 : 0.0; } } count = 0; while (1) { max_e = 0.0; for (i = 0; i < n; i++) { for (j = i + 1; j < n; j++) { if (max_e < fabs(a[i][j])) { max_e = fabs(a[i][j]); r = i; c = j; } } } if (max_e <= eps) { ret = count; break; } if (count >= itemax) { ret = -2; break; } a1 = a[r][r]; a2 = a[c][c]; a3 = a[r][c]; t1 = fabs(a1 - a2); ta = 2.0 * a3 / (t1 + sqrt(t1 * t1 + 4.0 * a3 * a3)); co = sqrt(1.0 / (ta * ta + 1.0)); si = ta * co; if (a1 < a2) si = -si; for (i = 0; i < n; i++) { w1 = e_vec[i][r]; w2 = e_vec[i][c]; e_vec[i][r] = w1 * co + w2 * si; e_vec[i][c] = -w1 * si + w2 * co; if (i == r || i == c) continue; w1 = a[i][r]; w2 = a[i][c]; a[i][r] = w1 * co + w2 * si; a[i][c] = -w1 * si + w2 * co; a[r][i] = a[i][r]; a[c][i] = a[i][c]; } a[r][r] = a1 * co * co + a2 * si * si + 2.0 * a3 * co * si; a[c][c] = a1 + a2 - a[r][r]; a[r][c] = 0.0; a[c][r] = 0.0; count++; } for (i = 0; i < n; i++) { e_val[i] = a[i][i]; } for (i = 0; i < n; i++) { for (j = i + 1; j < n; j++) { tmp = e_vec[i][j]; e_vec[i][j] = e_vec[j][i]; e_vec[j][i] = tmp; } } for (i = 0; i < n; i++) { for (j = n - 2; j >= i; j--) { if (e_val[j] < e_val[j + 1]) { tmp = e_val[j]; e_val[j] = e_val[j + 1]; e_val[j + 1] = tmp; for (k = 0; k < n; k++) { tmp = e_vec[j][k]; e_vec[j][k] = e_vec[j + 1][k]; e_vec[j + 1][k] = tmp; } } } } free(a[0]); free(a); return (ret); } int main(int argc, char *argv[]) { FILE *fp = stdin, *fp_eigen = NULL; int i, j, k, n = PRICOMP_ORDER, leng = LENG, total = -1; BOOL out_evecFlg = FALSE, out_evalFlg = FALSE; double sum; double *buf = NULL; double *mean = NULL, **var = NULL; double eps = EPS; int itemax = ITEMAX; double **e_vec = NULL, *e_val = NULL; /* eigenvector and eigenvalue */ double *cont_rate = NULL; /* contribution rate */ double jacobi_conv; float_list *top, *cur, *prev, *tmpf, *tmpff; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) if ((**++argv) == '-') { switch (*(*argv + 1)) { case 'l': leng = atoi(*++argv); --argc; break; case 'n': n = atoi(*++argv); --argc; break; case 'e': eps = atof(*++argv); --argc; break; case 'i': itemax = atoi(*++argv); --argc; break; case 'v': out_evecFlg = TRUE; break; case 'V': out_evalFlg = TRUE; fp_eigen = getfp(*++argv, "wb"); --argc; break; case 'h': usage(EXIT_SUCCESS); default: fprintf(stderr, "%s : Invalid option '%s'!\n", cmnd, *argv); usage(EXIT_FAILURE); } } else fp = getfp(*argv, "rb"); if (n > leng) { fprintf(stderr, "\n %s (Error) output number of pricipal component" " must be less than length of vector.\n", cmnd); usage(EXIT_FAILURE); } /* -- Count number of input vectors and read -- */ buf = dgetmem(leng); top = prev = (float_list *) malloc(sizeof(float_list)); top->f = fgetmem(leng); total = 0; prev->next = NULL; while (freadf(buf, sizeof(*buf), leng, fp) == leng) { cur = (float_list *) malloc(sizeof(float_list)); cur->f = fgetmem(leng); for (i = 0; i < leng; i++) { cur->f[i] = (float) buf[i]; } total++; prev->next = cur; cur->next = NULL; prev = cur; } free(buf); buf = dgetmem(total * leng); for (i = 0, tmpf = top->next; tmpf != NULL; i++, tmpf = tmpff) { for (j = 0; j < leng; j++) { buf[i * leng + j] = tmpf->f[j]; } tmpff = tmpf->next; free(tmpf->f); free(tmpf); } free(top); /* PCA */ /* allocate memory for mean vectors and covariance matrix */ mean = dgetmem(leng); var = malloc_matrix(leng); /* calculate mean vector */ for (i = 0; i < leng; i++) { for (j = 0, sum = 0.0; j < total; j++) sum += buf[i + j * leng]; mean[i] = sum / total; } /* calculate cov. mat. */ for (i = 0; i < leng; i++) { for (j = 0; j < leng; j++) { sum = 0.0; for (k = 0; k < total; k++) sum += (buf[i + k * leng] - mean[i]) * (buf[j + k * leng] - mean[j]); var[i][j] = sum / total; } } /* allocate memory for eigenvector and eigenvalue */ e_vec = malloc_matrix(leng); e_val = dgetmem(leng); /* calculate eig.vec. and eig.val. with jacobi method */ if ((jacobi_conv = jacobi(var, leng, eps, e_val, e_vec, itemax)) == -1) { fprintf(stderr, "Error : matrix is not symmetric.\n"); exit(EXIT_FAILURE); } else if (jacobi_conv == -2) { fprintf(stderr, "Error : loop in jacobi method reached %d times.\n", itemax); exit(EXIT_FAILURE); } /* allocate memory for contribution rate of each eigenvalue */ cont_rate = dgetmem(leng); /* calculate contribution rate of each eigenvalue */ for (j = 0; j < leng; j++) { sum = 0.0; for (i = 0; i < leng; i++) sum += e_val[i]; cont_rate[j] = e_val[j] / sum; } /* end of PCA */ /* output mean vector and eigen vectors */ if (out_evecFlg == TRUE) { fwritef(mean, sizeof(*mean), leng, stdout); for (i = 0; i < n; i++) fwritef(e_vec[i], sizeof(*(e_vec[i])), leng, stdout); } /* output eigen values and contribution ratio */ if (out_evalFlg == TRUE) { for (i = 0; i < n; i++) { fwritef(e_val + i, sizeof(*e_val), 1, fp_eigen); fwritef(cont_rate + i, sizeof(*cont_rate), 1, fp_eigen); } fclose(fp_eigen); } return EXIT_SUCCESS; } SPTK-3.9/bin/pca/pcas.c0000644001051300105040000002075512637156643011514 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /*************************************************************************** * * * Calculation of Principal Component Score * * * * 2009.9 A.Tamamori * * * * usage: * * pcas [ options ] pcafile [ infile ] > stdout * * options: * * -l : length of vector [3] * * -p n : order of pricipal component [2] * * infile: * * test data vectors [stdin] * * pcafile: * * eigen vectors and mean vector of training data * * stdout: * * principal component scores * * * ****************************************************************************/ static char *rcs_id = "$Id: pcas.c,v 1.13 2015/12/14 01:14:21 uratec Exp $"; #include #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Defalut Values */ #define LENG 3 #define PCA_ORDER 2 /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - Compute Pricipal Component Score\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] pcafile [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -l L : dimensionality of vectors [%d]\n", LENG); fprintf(stderr, " -n N : order of principal component [%d]\n", PCA_ORDER); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " test data vectors (float) [stdin]\n"); fprintf(stderr, " pcafile:\n"); fprintf(stderr, " eigen vectors and mean vector (float)\n"); fprintf(stderr, " stdout:\n"); fprintf(stderr, " Principal component score (flaot)\n"); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } double **malloc_matrix(int row, int col) { double **m; double *mtmp; int i; mtmp = dgetmem(row * col); if ((m = (double **) malloc(sizeof(double *) * row)) == NULL) { fprintf(stderr, "Can't malloc in %s\n", cmnd); exit(EXIT_FAILURE); } for (i = 0; i < row; i++) { m[i] = &(mtmp[i * col]); } return m; } int main(int argc, char *argv[]) { FILE *fp = stdin, *fpca = NULL; int i, j; int leng = LENG, total, order = PCA_ORDER; int eigen_num; double *mean = NULL; double *test_data = NULL; double **e_vec = NULL; double *z = NULL; /* principal component score */ if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) { if ((**++argv) == '-') { switch (*(*argv + 1)) { case 'l': leng = atoi(*++argv); --argc; break; case 'n': order = atoi(*++argv); --argc; break; case 'h': usage(EXIT_SUCCESS); default: fprintf(stderr, "%s : Invalid option '%s'!\n", cmnd, *argv); usage(EXIT_FAILURE); } } else if (fpca == NULL) fpca = getfp(*argv, "rb"); else fp = getfp(*argv, "rb"); } if (order > leng) { fprintf(stderr, "\n %s (Error) order of pricipal component" " must be less than dimentionality of vector.\n", cmnd); usage(EXIT_FAILURE); } if (fpca == NULL) { fprintf(stderr, "\n %s (Error) PCA file name required.\n", cmnd); usage(EXIT_FAILURE); } /* Read eigen vectors and mean vector */ fseek(fpca, 0L, SEEK_END); eigen_num = (int) (ftell(fpca) / (int) leng / (double) sizeof(float)); rewind(fpca); e_vec = malloc_matrix(eigen_num, leng); mean = dgetmem(leng); freadf(mean, sizeof(*mean), leng, fpca); for (i = 0; i < eigen_num - 1; i++) freadf(e_vec[i], sizeof(*(e_vec[i])), leng, fpca); total = 0; test_data = dgetmem(leng); z = dgetmem(order); while (freadf(test_data, sizeof(*test_data), leng, fp) == leng) { fillz(z, order, sizeof(*z)); /* calculate pricipal component score */ for (i = 0; i < order; i++) { for (j = 0; j < leng; j++) { z[i] += e_vec[i][j] * (test_data[j] - mean[j]); } } /* output principal component score */ fwritef(z, sizeof(*z), order, stdout); total++; } if (total == 0) { fprintf(stderr, "%s: No input data !\n", cmnd); usage(EXIT_FAILURE); } return (0); } SPTK-3.9/bin/phase/0000755001051300105040000000000012637167712011025 500000000000000SPTK-3.9/bin/phase/Makefile.am0000644001051300105040000000021012442245106012756 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = phase phase_SOURCES = _phase.c phase.c phase_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/phase/Makefile.in0000644001051300105040000004257412637167417013030 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = phase$(EXEEXT) subdir = bin/phase ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_phase_OBJECTS = _phase.$(OBJEXT) phase.$(OBJEXT) phase_OBJECTS = $(am_phase_OBJECTS) phase_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(phase_SOURCES) DIST_SOURCES = $(phase_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include phase_SOURCES = _phase.c phase.c phase_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/phase/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/phase/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) phase$(EXEEXT): $(phase_OBJECTS) $(phase_DEPENDENCIES) $(EXTRA_phase_DEPENDENCIES) @rm -f phase$(EXEEXT) $(AM_V_CCLD)$(LINK) $(phase_OBJECTS) $(phase_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_phase.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/phase.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/phase/_phase.c0000644001051300105040000001157612637156643012363 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /******************************************************************* $Id: _phase.c,v 1.17 2015/12/14 01:14:21 uratec Exp $ comupte phase of digital filter or real seaquence phase(p, mp, z, mz, ph, flng) double *p : numerator cofficients int mp : order of numerator polynomial double *z : denominator cofficients int mz : order of denominator polynomilal doble *ph : phase int flng : FFT size int unlap : unlapping Naohiro Isshiki Feb.1995 ********************************************************************/ #include #include #include #if defined(WIN32) #include "SPTK.h" #else #include #endif void phase(double *p, const int mp, double *z, const int mz, double *ph, const int flng, const int unlap) { static double *x; static int fsize = 0; double *y, *xx, *yy, *py; int no, i, offset; double pi; pi = atan(1.) * 4.; no = flng / 2 + 1; if (flng > fsize) { if (x != NULL) free(x); fsize = flng; x = dgetmem(4 * flng + no); } y = &x[flng]; xx = &y[flng]; yy = &xx[flng]; py = &yy[flng]; fillz(x, sizeof(*x), flng); fillz(xx, sizeof(*xx), flng); movem(z, x, mz + 1, sizeof(*z)); movem(p, xx, mp + 1, sizeof(*p)); fftr(x, y, flng); xx[0] = 1; fftr(xx, yy, flng); for (i = 0; i < no; i++) { ph[i] = x[i] * xx[i] + y[i] * yy[i]; py[i] = y[i] * xx[i] - x[i] * yy[i]; } offset = 0; i = 0; ph[i] = atan2(py[i], ph[i]) / pi; i++; for (; i < no; i++) { ph[i] = atan2(py[i], ph[i]) / pi; if (unlap) { if (ph[i - 1] - ph[i] - offset > 1) offset += 2; else if (ph[i] + offset - ph[i - 1] > 1) offset -= 2; ph[i] += offset; } } return; } SPTK-3.9/bin/phase/phase.c0000644001051300105040000002043512637156644012217 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * Transform real sequence to phase * * * * 1989.6 K.Tokuda * * 1996.2 N.Isshiki Modified * * * * usage: * * phase [ options ] [ infile ] > stdout * * options: * * -l l : frame length [256] * * -p p : numerator coefficients file [NULL] * * -z z : denominator coefficients file [NULL] * * -m m : order of denominator polynomial [L-1] * * -n n : order of numerator polynomial [L-1] * * -u : unlapping [TRUE] * * infile: * * input sequense (float) * * stdout: * * P0, P1, ..., PL/2 (float)(pi radian) * * * ************************************************************************/ static char *rcs_id = "$Id: phase.c,v 1.27 2015/12/14 01:14:21 uratec Exp $"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define FLMLNG 256 #define UNLAP TR char *BOOL[] = { "FALSE", "TRUE" }; /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - transform real sequence to phase\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -l l : frame length [%d]\n", FLMLNG); fprintf(stderr, " -p p : numerator coefficients file [NULL]\n"); fprintf(stderr, " -z z : denominator coefficients file [NULL]\n"); fprintf(stderr, " -m m : order of denominator polynomial [L-1]\n"); fprintf(stderr, " -n n : order of numerator polynomial [L-1]\n"); fprintf(stderr, " -u : unlapping [%s]\n", BOOL[UNLAP]); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " data sequence (%s) [stdin]\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " phase (%s) [pi rad]\n", FORMAT); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char *argv[]) { int flng = FLMLNG, m = -1, n = -1; int unlap = UNLAP; double *p, *z, *ph; char *file_z = "", *file_p = ""; FILE *fp_z = NULL, *fp_p = NULL; int no; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) if (**++argv == '-') { switch (*(*argv + 1)) { case 'm': m = atoi(*++argv); --argc; break; case 'n': n = atoi(*++argv); --argc; break; case 'l': flng = atoi(*++argv); --argc; break; case 'z': file_z = *++argv; --argc; break; case 'p': file_p = *++argv; --argc; break; case 'u': unlap = 1 - unlap; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else { fprintf(stderr, "%s : Input file is not available!\n", cmnd); usage(1); } if (m < 0) m = flng - 1; if (n < 0) n = flng - 1; no = flng / 2 + 1; p = dgetmem(2 * flng + n); z = &p[flng]; ph = &z[flng]; if (*file_z != '\0') fp_z = getfp(file_z, "rb"); if (*file_p != '\0') fp_p = getfp(file_p, "rb"); if (*file_z == '\0' && *file_p == '\0') fp_z = stdin; for (;;) { if (*file_z == '\0' && *file_p != '\0') { z[0] = 1; n = 0; } else { if (freadf(z, sizeof(*z), n + 1, fp_z) == 0) return (0); } if (*file_p == '\0') { p[0] = 1; m = 0; } else { if (freadf(p, sizeof(*p), m + 1, fp_p) == 0) return (0); } phase(p, m, z, n, ph, flng, unlap); fwritef(ph, sizeof(*ph), no, stdout); } return (0); } SPTK-3.9/bin/poledf/0000755001051300105040000000000012637167712011176 500000000000000SPTK-3.9/bin/poledf/Makefile.am0000644001051300105040000000021512442245113013132 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = poledf poledf_SOURCES = _poledf.c poledf.c poledf_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/poledf/Makefile.in0000644001051300105040000004262512637167417013176 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = poledf$(EXEEXT) subdir = bin/poledf ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_poledf_OBJECTS = _poledf.$(OBJEXT) poledf.$(OBJEXT) poledf_OBJECTS = $(am_poledf_OBJECTS) poledf_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(poledf_SOURCES) DIST_SOURCES = $(poledf_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include poledf_SOURCES = _poledf.c poledf.c poledf_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/poledf/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/poledf/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) poledf$(EXEEXT): $(poledf_OBJECTS) $(poledf_DEPENDENCIES) $(EXTRA_poledf_DEPENDENCIES) @rm -f poledf$(EXEEXT) $(AM_V_CCLD)$(LINK) $(poledf_OBJECTS) $(poledf_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_poledf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/poledf.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/poledf/_poledf.c0000644001051300105040000000751512637156644012704 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /**************************************************************** $Id: _poledf.c,v 1.15 2015/12/14 01:14:21 uratec Exp $ All Pole Digital Filter double poledf(x, a, m, d) double x : input double *a : AR coefficients int m : order of coefficients double *d : delay return value : filtered data *****************************************************************/ double poledf(double x, double *a, int m, double *d) { for (m--; m > 0; m--) { x -= a[m + 1] * d[m]; d[m] = d[m - 1]; } x -= a[1] * d[0]; d[0] = x; return (x); } double poledft(double x, double *a, int m, double *d) { int i; x -= d[0]; for (i = 1; i < m; i++) d[i - 1] = d[i] + a[i] * x; d[m - 1] = a[m] * x; return (x); } SPTK-3.9/bin/poledf/poledf.c0000644001051300105040000002155112637156644012541 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * All Pole Digital Filter for Speech Synthesis * * * * 1996.3 K.Koishida * * * * usage: * * poledf [ options ] [ infile ] > stdout * * options: * * -m m : order of coefficients [25] * * -p p : frame period [100] * * -i i : interpolation period [1] * * -t : transpose filter [FALSE] * * -k : filtering without gain [FALSE] * * infile: * * coefficients * * , K, a(1), ..., a(m), * * excitation sequence * * , x(0), x(1), ..., * * stdout: * * filtered sequence * * , y(0), y(1), ..., * * require: * * poledf(), poledft() * * * ************************************************************************/ static char *rcs_id = "$Id: poledf.c,v 1.25 2015/12/14 01:14:21 uratec Exp $"; /* Standard C Libralies */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define ORDER 25 #define FPERIOD 100 #define IPERIOD 1 #define TRANSPOSE FA #define NGAIN FA char *BOOL[] = { "FALSE", "TRUE" }; /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - all pole digital filter for speech synthesis\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] afile [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -m m : order of coefficients [%d]\n", ORDER); fprintf(stderr, " -p p : frame period [%d]\n", FPERIOD); fprintf(stderr, " -i i : interpolation period [%d]\n", IPERIOD); fprintf(stderr, " -t : transpose filter [%s]\n", BOOL[TRANSPOSE]); fprintf(stderr, " -k : filtering without gain [%s]\n", BOOL[NGAIN]); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " filter input (%s) [stdin]\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " filter output (%s)\n", FORMAT); fprintf(stderr, " afile:\n"); fprintf(stderr, " AR coefficients (%s)\n", FORMAT); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char **argv) { int m = ORDER, fprd = FPERIOD, iprd = IPERIOD, i, j; FILE *fp = stdin, *fpc = NULL; double *c, *inc, *cc, *d, x; Boolean tp = TRANSPOSE, ngain = NGAIN; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) if (**++argv == '-') { switch (*(*argv + 1)) { case 'm': m = atoi(*++argv); --argc; break; case 'p': fprd = atoi(*++argv); --argc; break; case 'i': iprd = atoi(*++argv); --argc; break; case 't': tp = 1 - tp; break; case 'k': ngain = 1 - ngain; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else if (fpc == NULL) fpc = getfp(*argv, "rb"); else fp = getfp(*argv, "rb"); if (fpc == NULL) { fprintf(stderr, "%s : Cannot open coefficients file!\n", cmnd); return (1); } if (m < 0) { fprintf(stderr, "%s : Order must be equal to or greater than zero!\n", cmnd); return (1); } c = dgetmem(m + m + m + 3 + m); cc = c + m + 1; inc = cc + m + 1; d = inc + m + 1; if (freadf(c, sizeof(*c), m + 1, fpc) != m + 1) return (1); for (;;) { if (freadf(cc, sizeof(*cc), m + 1, fpc) != m + 1) return (0); for (i = 0; i <= m; i++) inc[i] = (cc[i] - c[i]) * iprd / fprd; for (j = fprd, i = (iprd + 1) / 2; j--;) { if (freadf(&x, sizeof(x), 1, fp) != 1) return (0); if (!ngain) x *= c[0]; if (m > 0) { if (!tp) x = poledf(x, c, m, d); else x = poledft(x, c, m, d); } fwritef(&x, sizeof(x), 1, stdout); if (!--i) { for (i = 0; i <= m; i++) c[i] += inc[i]; i = iprd; } } movem(cc, c, sizeof(*cc), m + 1); } return (0); } SPTK-3.9/bin/psgr/0000755001051300105040000000000012637167712010700 500000000000000SPTK-3.9/bin/psgr/Makefile.am0000644001051300105040000000022612442245114012637 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = psgr psgr_SOURCES = dict.c eps.c plot.c psgr.c psgr.h psgr_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/psgr/Makefile.in0000644001051300105040000004303312637167417012672 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = psgr$(EXEEXT) subdir = bin/psgr ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_psgr_OBJECTS = dict.$(OBJEXT) eps.$(OBJEXT) plot.$(OBJEXT) \ psgr.$(OBJEXT) psgr_OBJECTS = $(am_psgr_OBJECTS) psgr_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(psgr_SOURCES) DIST_SOURCES = $(psgr_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include psgr_SOURCES = dict.c eps.c plot.c psgr.c psgr.h psgr_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/psgr/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/psgr/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) psgr$(EXEEXT): $(psgr_OBJECTS) $(psgr_DEPENDENCIES) $(EXTRA_psgr_DEPENDENCIES) @rm -f psgr$(EXEEXT) $(AM_V_CCLD)$(LINK) $(psgr_OBJECTS) $(psgr_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dict.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eps.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plot.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/psgr.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/psgr/dict.c0000644001051300105040000001143212637156644011712 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /* $Id: dict.c,v 1.13 2015/12/14 01:14:21 uratec Exp $ */ #include void dict(void) { puts("/BD{bind def}bind def"); puts("/MT{moveto}BD"); puts("/LT{lineto}BD"); puts("/RMT{rmoveto}BD"); puts("/RLT{rlineto}BD"); puts("/ST{stroke}BD"); puts("/FnC{/Courier}BD"); puts("/FnCO{/Courier-Oblique}BD"); puts("/FnCB{/Courier-Bold}BD"); puts("/FnCBO{/Courier-BoldOblique}BD"); puts("/FnS{/Symbol}BD"); puts("/SF{"); /* select font */ puts(" exch findfont exch"); puts(" dup type /arraytype eq{makefont}{scalefont}ifelse"); puts(" setfont"); puts("}BD"); puts("/MS{MT show}BD"); puts("/RMS{RMT show}BD"); puts("/GS{gsave}BD"); puts("/GR{grestore}BD"); puts("/NP{newpath}BD"); /* set rect path */ puts("/RP{"); puts("dup type dup /integertype eq exch /realtype eq or {"); puts(" 4 -2 roll MT"); puts(" dup 0 exch RLT exch 0 RLT"); puts(" neg 0 exch RLT closepath"); puts(" }{"); puts(" dup length 4 sub 0 exch 4 exch"); puts(" {"); puts(" 1 index exch 4 getinterval"); puts(" aload pop"); puts(" RP"); puts(" }for"); puts(" pop"); puts(" }ifelse"); puts("}BD"); puts("/RS{GS NP RP stroke GR}BD"); puts("/RF{GS NP RP fill GR}BD"); puts("/RC{NP RP clip NP}BD"); puts("/TR{translate}BD"); puts("/SL{setlinewidth}BD"); puts("/SG{setgray}BD"); /* fill pattern */ /* puts("/PM{32 32 1 [32 0 0 32 0 0]}BD"); puts("/P2{<0102040801020408>}def"); puts("/P3{<8040201008040201>}def"); puts("/P4{<8888888888888888>}def"); puts("/P5{<8142241812484281>}def"); puts("/P6{}def"); puts("/P7{}def"); puts("/IM{image}BD"); */ } SPTK-3.9/bin/psgr/eps.c0000644001051300105040000002522012637156644011556 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /******************************************************** * $Id: eps.c,v 1.22 2015/12/14 01:14:21 uratec Exp $ * * Setup Commands for EPSF * ********************************************************/ #include #include #include #include #include #include "psgr.h" #define plot_min(x, min, pmin) ((x=pmin)?(x):(pmin)) : (min)) #define plot_max(x, max, pmax) ((x>max) ? ((x<=pmax)?(x):(pmax)) : (max)) float loffset; static void epsf_init(int *xmin, int *ymin, int *xmax, int *ymax, int ncopy) { char *user_name; char creation_date[64]; long t; user_name = (char *) getenv("USER"); t = time(NULL); strcpy(creation_date, asctime(localtime(&t))); if (psmode) printf("%%!PS-Adobe-2.0\n"); else printf("%%!PS-Adobe-2.0 EPSF-1.2\n"); if (title != NULL) printf("%%%%Title: %s\n", title); else if (filename != NULL) printf("%%%%Title: %s\n", filename); else printf("%%%%Title: Figure(s) by %s(fig/fdrw).\n", progname); /* printf("%%%%Creator: %s (Version %s, %s)\n", progname, Version, Date); */ printf("%%%%For: %s\n", user_name); printf("%%%%CreationDate: %s", creation_date); if (!psmode) printf("%%%%BoundingBox: %d %d %d %d\n", *xmin, *ymin, *xmax, *ymax); printf("%%%%EndComments\n\n"); printf("%%%%BeginProlog\n"); dict(); printf("%%%%EndProlog\n\n"); printf("%%%%BeginSetup\n"); printf("%%%%PaperSize: %s\n", media); printf("%%%%PageOrientation: %s\n", orientation); printf("%%%%Feature: *ManualFeed False\n"); printf("%%%%Feature: *Resolution %d\n", resolution); if (ncopy > 1) printf("/#copies %d def\n", ncopy); printf("%%%%EndSetup\n\n"); if (psmode) printf("%%%%Page: 1\n"); return; } static void epsf_scale(float shrink, int xoffset, int yoffset) { float unit_length; unit_length = shrink * PU_PT; if (!landscape) { printf("%d %d translate\n", norm(xoffset * PU_PT + SHIFT), norm(yoffset * PU_PT + SHIFT)); printf("%f %f scale\n", unit_length, unit_length); } else { printf("%d %d translate\n", norm(xoffset * PU_PT + SHIFT), norm(yoffset * PU_PT + SHIFT)); printf("%f %f scale\n", unit_length, unit_length); loffset = 4 * SHIFT / unit_length; printf("%d 0 translate\n", norm(yleng * PU_PT + loffset)); /* printf("%d 0 translate\n", norm((yleng+LAND_OFFSET)*PU_PT)); */ printf("90 rotate\n"); } return; } static int getd(FILE * fp, int *x, int *y) { static int c; while ((c = getc(fp)) == '\n' || c == ' '); if (isdigit(c)) { ungetc(c, fp); fscanf(fp, "%d %d", x, y); return (1); } else return (0); } static int getstrlength(FILE * fp) { int n; int c; n = 0; while (isprint(c = getc(fp)) || (c & 0xff) > 0) n++; return (n); } static void bbox(FILE * fp, int *xmin, int *ymin, int *xmax, int *ymax, float shrink, int xoffset, int yoffset, struct bbmargin bbm) { char c; int n, x, y; int temp_xmin, temp_ymin, temp_xmax, temp_ymax; int temp_plot_xmin, temp_plot_ymin = 0, temp_plot_xmax, temp_plot_ymax; int plot_xmin, plot_ymin, plot_xmax, plot_ymax; double unit_length; int rotate = 0; int ch = 30, cw = 30; float mag = 0.875; /* 7/8 */ temp_xmin = temp_ymin = 9999; temp_xmax = temp_ymax = 0; plot_xmin = xleng; plot_ymin = yleng; plot_xmax = plot_ymax = 0; while ((c = getc(fp)) != (char) EOF) { switch (c) { case 'M': fscanf(fp, "%d %d", &x, &y); temp_xmin = (temp_xmin < x ? temp_xmin : x); temp_ymin = (temp_ymin < y ? temp_ymin : y); temp_xmax = (temp_xmax > x ? temp_xmax : x); temp_ymax = (temp_ymax > y ? temp_ymax : y); break; case 'D': while (getd(fp, &x, &y)) { temp_xmin = (temp_xmin < x ? temp_xmin : x); temp_ymin = (temp_ymin < y ? temp_ymin : y); temp_xmax = (temp_xmax > x ? temp_xmax : x); temp_ymax = (temp_ymax > y ? temp_ymax : y); } break; case '%': fscanf(fp, "%d %d %d", &n, &x, &y); while (getd(fp, &x, &y)) { temp_xmin = (temp_xmin < x ? temp_xmin : x); temp_ymin = (temp_ymin < y ? temp_ymin : y); temp_xmax = (temp_xmax > x ? temp_xmax : x); temp_ymax = (temp_ymax > y ? temp_ymax : y); } break; case 'S': fscanf(fp, "%d", &ch); ch += 3; break; case 'Q': fscanf(fp, "%d", &cw); cw += 3; break; case 'R': fscanf(fp, "%d", &rotate); break; case 'P': n = getstrlength(fp); if (!rotate) { x += n * cw * mag; temp_xmax = (temp_xmax > x ? temp_xmax : x); y -= ch * mag; temp_ymin = (temp_ymin < y ? temp_ymin : y); } else { y += n * cw * mag; temp_ymax = (temp_ymax > y ? temp_ymax : y); x -= ch * mag; temp_xmin = (temp_xmin < x ? temp_xmin : x); } rotate = 0; break; case '\\': fscanf(fp, "%d %d", &temp_plot_xmin, &temp_plot_xmin); if (plot_xmin > temp_plot_xmin) plot_xmin = temp_plot_xmin; if (plot_ymin > temp_plot_ymin) plot_ymin = temp_plot_ymin; if (plot_xmin < 0) plot_xmin = 0; if (plot_ymin < 0) plot_ymin = 0; break; case 'Z': fscanf(fp, "%d %d", &temp_plot_xmax, &temp_plot_ymax); if (plot_xmax < temp_plot_xmax) plot_xmax = temp_plot_xmax; if (plot_ymax < temp_plot_ymax) plot_ymax = temp_plot_ymax; if (plot_xmax > xleng) plot_xmax = xleng; if (plot_ymax > yleng) plot_ymax = yleng; break; default: break; } } *xmin = plot_min(temp_xmin, *xmin, plot_xmin); *xmax = plot_max(temp_xmax, *xmax, plot_xmax); *ymin = plot_min(temp_ymin, *ymin, plot_ymin); *ymax = plot_max(temp_ymax, *ymax, plot_ymax); unit_length = shrink * PU_PT; if (!landscape) { *xmin = norm((*xmin + xoffset - bbm.left) * unit_length + MIN_OFFSET); *ymin = norm((*ymin + yoffset - bbm.bottom) * unit_length + MIN_OFFSET); *xmax = norm((*xmax + xoffset + bbm.right) * unit_length + MAX_OFFSET); *ymax = norm((*ymax + yoffset + bbm.top) * unit_length + MAX_OFFSET); } else { x = *xmin; y = *xmax; loffset += yoffset; *xmin = norm((yleng * unit_length - *ymax + loffset - bbm.bottom) * unit_length + MIN_OFFSET); *xmax = norm((yleng * unit_length - *ymin + loffset + bbm.top) * unit_length + MAX_OFFSET); loffset = (loffset - yoffset) / 4 + xoffset; *ymin = norm((x + loffset - bbm.left) * unit_length + MIN_OFFSET); *ymax = norm((y + loffset + bbm.right) * unit_length + MAX_OFFSET); } rewind(fp); return; } /* epsf_setup: setup epsf */ void epsf_setup(FILE * fp, float shrink, int xoffset, int yoffset, struct bbmargin bbm, int ncopy) { int xmin = 9999, ymin = 9999, xmax = 0, ymax = 0; if (!psmode) bbox(fp, &xmin, &ymin, &xmax, &ymax, shrink, xoffset, yoffset, bbm); epsf_init(&xmin, &ymin, &xmax, &ymax, ncopy); epsf_scale(shrink, xoffset, yoffset); return; } /* epsf_end: terminate epsf */ void epsf_end(void) { if (clip_mode) printf("GR\n"); printf("%%Trailer\n"); if (psmode) printf("%%%%Pages: 1\n"); printf("showpage\n"); printf("%%%%EOF\n"); return; } SPTK-3.9/bin/psgr/plot.c0000644001051300105040000004041212637156644011745 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /******************************************************** * $Id: plot.c,v 1.23 2015/12/14 01:14:21 uratec Exp $ * * Interpret X-Y Plotter Commands * ********************************************************/ #include #include #include "psgr.h" #define BUFSIZE 2048 #define MADJ 0.275 #define PU_PT (72.0/254.0) #define norm(x) (int)(x) #define moveto(x, y) printf("%d %d MT\n", (x), (y)) #define lineto(x, y) printf("%d %d LT\n", (x), (y)) #define rmoveto(x, y) printf("%d %d RMT\n", (x), (y)) #define rlineto(x, y) printf("%d %d RLT\n", (x), (y)) #define clip_on() printf("GS\n") #define clip_off() printf("GR\n") #define circle(x, y, r1, r2, ang1, ang2)\ arc((x), (y), (r1), (ang1), (ang2), 0) static char *lmode[] = { "[] 0", /* Line 0: Solid */ "[1 16] 0", /* Line 6: Dotted2 */ "[1 7] 0", /* Line 2: Dotted */ "[8 8] 0", /* Line 4: Dashed */ "[16 14] 0", /* Line 5: Long_Dashed */ "[20 8 3 8] 0", "[18 7 2 7] 0", /* Line 3: Dot_Dashed */ "[16 6 2 6 2 6] 0", "[20 8 3 8 3 8] 0" }; static float lwidth[] = { 0.05, 2.00, 0.05, 2.00, 4.00, 6.00, 0.01, 1.00, 0.10, 0.20, 0.40, 0.60 }; static char *fillpattern[] = { "0", "0.875", "P2", "P3", "P4", "P5", "P6", "P7", "0.75", "1", }; static char *symbol_up = "ABGDEZHQIKLMNXOPRSTUFCYW"; static char *symbol_lw = "abgdezhqiklmnxoprstufcyw"; #define INFTY 165 #define SPACE 32 static char *font[] = { "FnS", "FnC", "FnCO", "FnCB", "FnCBO" }; static float fnmag[] = { 1.375, 1.50, 1.50, 1.50, 1.50 }; Cord pb; static int xb[BUFSIZE], yb[BUFSIZE]; static int sp = 1; static int ch = 30, cw = 30, th = 0, rotate = 0, mfg = 0; static int init_str_flag = 0; /* Initial string segment flag for text rotation. */ static int _getcord(FILE * fp, struct cord *buf) { int c; while ((c = getc(fp)) == '\n' || c == ' '); if (c) { ungetc(c, fp); fscanf(fp, "%d %d", &(buf->x), &(buf->y)); return (1); } else return (0); } void polylines(int *x, int *y, int n) { moveto(*x++, *y++); while (--n > 0) lineto(*x++, *y++); printf("ST\n"); } static void _flush(void) { if (sp > 1) { polylines(xb, yb, sp--); xb[0] = xb[sp]; yb[0] = yb[sp]; sp = 1; } return; } static void _send(struct cord *buf) { if (sp == BUFSIZE) _flush(); xb[sp] = norm(buf->x); yb[sp++] = norm(buf->y); return; } static void rectangle(int x0, int y0, int x1, int y1, int frame, int fill) { static char gray[16][8] = { "0", "0.875", "0.7", "0.6", "0.5", "0.4", "0.3", "0.2", "0.75", "1", }; fill %= 10; if (fill >= 2 && fill <= 7) { printf("%s SG\n", gray[fill]); /* printf("PM {%s} IM\n", fillpattern[fill]); */ printf("%d %d %d %d RP\n", (x0), (y0), (x1 - x0), (y1 - y0)); } else printf("%s SG\n", fillpattern[fill]); printf("%d %d %d %d RF\n", (x0), (y0), (x1 - x0), (y1 - y0)); if (fill != 0) printf("0 SG\n"); if (frame) printf("%d %d %d %d RS\n", (x0), (y0), (x1 - x0), (y1 - y0)); } static void text(char *s, int n, int fn) { int fn_w, fn_h; static int cfn = -1, ccw = -1, cch = -1; if (n <= 0) return; if (cfn != fn || ccw != cw || cch != ch || mfg) { fn_w = (int) (cw * fnmag[fn]); fn_h = (int) (ch * fnmag[fn]); if (cw == ch) if (fn != 0) /* not Symbol */ printf("%s %d SF\n", font[fn], fn_w); else printf("%s [%d 0 %d %d 0 0] SF\n", font[fn], fn_w, fn_h / 4, fn_h); else if (fn != 0) printf("%s [%d 0 0 %d 0 0] SF\n", font[fn], fn_w, fn_h); else printf("%s [%d 0 %d %d 0 0] SF\n", font[fn], fn_w, fn_h / 4, fn_h); cfn = fn; ccw = cw; cch = ch; mfg = 0; } if (th == 0) printf("(%s) %d %d MS\n", s, xb[0], yb[0]); else { if (init_str_flag) { printf("%d %d MT\n", xb[0], yb[0]); printf("%d rotate\n", rotate); printf("(%s) show\n", s); printf("%d rotate\n", -rotate); init_str_flag = 0; } else { printf("%d %d TR\n", xb[0], yb[0]); printf("%d rotate\n", rotate); printf("(%s) show\n", s); printf("%d rotate\n", -rotate); printf("%d %d TR\n", -xb[0], -yb[0]); } } } static void rect(int x, int y, int w, int h, int fill) { if (!fill) printf("%d %d %d %d RS\n", x, y, w, h); else printf("%d %d %d %d RF\n", x, y, w, h); } static void tangle(int size, int fill) { int bsize; bsize = (int) (0.8 * size); rmoveto(0, bsize); rlineto(size, -2 * bsize); rlineto(-2 * size, 0); printf("closepath\n"); if (fill) printf("fill\n"); printf("ST\n"); } static void arc(int x, int y, int r, int ang1, int ang2, int fill) { printf("newpath\n"); printf("%d %d %d %d %d arc\n", x, y, r, ang1, ang2); printf("closepath\n"); if (fill) printf("fill\n"); printf("ST\n"); } static void symbol(char *code, int size, int xoffset, int yoffset) { static char prev[16]; if (!mfg || strcmp(prev, code)) { printf("FnS %d SF\n", size); mfg = 1; strcpy(prev, code); } printf("(%s) %d %d RMS\n", code, xoffset, yoffset); } static void _move(int x, int y) { xb[0] = norm(x); yb[0] = norm(y); } static void _line(FILE * fp) { while (_getcord(fp, &pb)) _send(&pb); _flush(); } /*static void intstyle(int type) { int is_frame = 1, style = 2; switch (type -= 20) { case 1: style = 0; break; case 2: is_frame = 0; break; case 3: break; default: if (type < 0) is_frame = 0; else type = -type; if ((style = type + 10) == 0) style = 1; } }*/ /*static void polyg(FILE * fp, int type) { int n; int d, angle; intstyle(type); fscanf(fp, "%d %d", &d, &angle); for (n = 1; _getcord(fp, &pb); n++) { xb[n] = norm(pb.x); yb[n] = norm(pb.y); } xb[n] = xb[1]; yb[n] = yb[1]; polylines(xb + 1, yb + 1, n); return; }*/ static void hatching(FILE * fp, int type) { int n; int frame; int d, angle; fscanf(fp, "%d %d", &d, &angle); for (n = 1; _getcord(fp, &pb); n++) { xb[n] = norm(pb.x); yb[n] = norm(pb.y); } xb[n] = xb[1]; yb[n] = yb[1]; switch (type -= 20) { case 1: frame = 1; type = -1; break; case 2: frame = 0; type = -1; break; case 3: frame = 1; type = -1; break; default: if (type < 0) { frame = 0; type = -type; } else frame = 1; break; } if (type == -1) polylines(xb + 1, yb + 1, n); else rectangle(xb[1], yb[1], xb[2], yb[3], frame, type); } /* #define box(x0, y0, x1, y1)\ printf("%d %d %d %d RS\n",(x0),(y0),(x1-x0),(y1-y0)) #define fillbox(x0, y0, x1, y1)\ printf("%d %d %d %d RF\n",(x0),(y0),(x1-x0),(y1-y0)) #define setfill(x) printf("%3.1f SG\n", (x)) #define unsetfill() printf("0 SG\n") rectangle(x0, y0, x1, y1, frame, fill) int x0, y0, x1, y1; int frame, fill; { if ((fill %= 10)!=9) { if (fill) { setfill(gray[fill]); fillbox(x0, y0, x1, y1); unsetfill(); } else fillbox(x0, y0, x1, y1); } if (frame) box(x0, y0, x1, y1); } */ /* hatching(fp, type) FILE *fp; int type; { int n; int style; int x, y, d, ang, r1, r2, ang1, ang2; style = type % 10; type /= 10; switch (type) { case 0: fscanf(fp, "%d %d %d %d", &x, &y, &d, &ang); box(x, y); break; case 1: fscanf(fp, "%d %d %d %d %d %d", &r1, &r2, &ang1, &ang2, &d, &ang); circle(norm(pb.x), norm(pb.y), r1, r2, ang1, ang2); break; case 2: for (n=1; _getcord(fp, &pb); n++) { xb[n] = norm(pb.x); yb[n] = norm(pb.y); } xb[n] = xb[1]; yb[n] = yb[1]; polylines(xb+1, yb+1, n); break; default: break; } } */ static void get_str(FILE * fp) { int c; /* charactor code */ int i; /* outputs strings length */ int j; /* previus strings length of same fonts */ int k; /* current strings length of same fonts */ int sfg = 0; /* Symbol fonts' flag */ char s[512]; static float mag = 0.875; /* 7/8 */ init_str_flag = 1; for (i = j = k = 0; (c = getc(fp)); i++, j++) { if ((c &= 0xff) <= 192) { /* not Symbol */ if (sfg) { /* flush buffer */ s[i] = '\0'; xb[0] += (int) (cw * k * mag); text(s, i, 0); k = j; i = j = 0; sfg = 0; } if (c != '(' && c != ')') s[i] = c; else { sprintf(s + i, "\\%c", c); i++; } } else { /* Symbol */ if (!sfg) { /* flush buffer */ s[i] = '\0'; xb[0] += (int) (cw * k * mag); text(s, i, font_no); k = j; i = j = 0; sfg = 1; } if (c <= 216) sprintf(s + i, "%c", symbol_up[c - 193]); else if (c >= 225 && c <= 248) sprintf(s + i, "%c", symbol_lw[c - 225]); else if (c == 254) sprintf(s + i, "%c", INFTY); else sprintf(s + i, "%c", SPACE); } } s[i] = '\0'; xb[0] += (int) (cw * k * mag); if (!sfg) text(s, i, font_no); else text(s, i, 0); } static void line_type(int type) { if (type < 0 || type > 8) type = 0; printf("%s setdash\n", lmode[type]); } static void join_type(int type) { if (type < 0 || type > 2) type = 0; printf("%d setlinejoin\n", type); } static void newpen(int width) { if (width < 0 || width > 10) width = 1; printf("%4.2f SL\n", lwidth[width]); } static void mark(int no) { int size, dsize, qsize, hsize; /* size = (int)(ch * MADJ); */ size = (int) (ch * MADJ * 0.75); dsize = 2 * size; qsize = 4 * size; hsize = size / 2; moveto(*xb, *yb); switch (no) { case 1: arc(*xb, *yb, hsize, 0, 360, 1); break; case 2: symbol("\264", dsize, -hsize, -hsize); break; case 3: rect(*xb - size, *yb - size, dsize, dsize, 0); break; case 4: tangle(size, 0); break; case 5: arc(*xb, *yb, size, 0, 360, 0); break; case 6: symbol("\340", qsize, -size, -size - hsize); break; case 7: symbol("\264", qsize, -size, -size); break; case 8: symbol("\053", qsize, -size, -size); break; case 9: symbol("\304", qsize, -size * 8 / 5, -size * 7 / 5); break; case 10: symbol("\305", qsize, -size * 8 / 5, -size * 7 / 5); break; case 11: rect(*xb - size, *yb - size, dsize, dsize, 1); break; case 12: tangle(size, 1); break; case 13: arc(*xb, *yb, size, 0, 360, 1); break; case 14: symbol("\250", qsize, -size - hsize, -size); break; case 15: symbol("\052", qsize, -size, -size - hsize); break; default: break; } } static void clipping(int x0, int y0, int x1, int y1) { if (clip_mode) { clip_off(); clip_mode = 0; } if ((x0 != 0) && (y0 != 0) && (x1 != xleng) && (y1 != yleng)) { clip_on(); clip_mode = 1; printf("%d %d %d %d RC\n", x0, y0, x1 - x0, y1 - y0); } } void plot(FILE * fp) { int c; int n, xmin, xmax, ymin, ymax; int r1, r2, ang1, ang2; while ((c = getc(fp)) != EOF) { switch (c) { case 'M': fscanf(fp, "%d %d", &pb.x, &pb.y); _move(pb.x, pb.y); break; case 'D': _line(fp); break; /* case '%': fscanf(fp, "%d", &n); polyg(fp, n); break; */ case '%': fscanf(fp, "%d", &n); hatching(fp, n); break; /**/ case 'P': get_str(fp); break; case 'S': fscanf(fp, "%d", &ch); ch += 3; break; case 'Q': fscanf(fp, "%d", &cw); cw += 3; break; case 'R': fscanf(fp, "%d", &th); rotate = th / 10; th = (th == 0) ? 0 : 1; break; case 'L': fscanf(fp, "%d", &n); line_type(n); break; case 'K': fscanf(fp, "%d", &n); join_type(n); break; case 'W': fscanf(fp, "%d %d %d %d %d %d", &pb.x, &pb.y, &r1, &r2, &ang1, &ang2); circle(norm(pb.x), norm(pb.y), r1, r2, ang1, ang2); break; case 'N': fscanf(fp, "%d", &n); mark(n); break; case 'J': fscanf(fp, "%d", &n); newpen(n); break; case '\\': fscanf(fp, "%d %d", &xmin, &ymin); if (xmin < 0) xmin = 0; if (ymin < 0) ymin = 0; break; case 'Z': fscanf(fp, "%d %d", &xmax, &ymax); if (xmax > xleng) xmax = xleng; if (ymax > yleng) ymax = yleng; clipping(norm(xmin), norm(ymin), norm(xmax), norm(ymax)); break; case ';': case ':': break; default: break; } } } SPTK-3.9/bin/psgr/psgr.c0000644001051300105040000002350612637156644011747 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /******************************************************** * * * psgr: xy-plotter simulator for EPSF * * * * Ver. 0.95 '92.3 T.Kanno * * Ver. 0.96 '92.8 * * Ver. 0.97 '92.10 * * Ver. 0.98 '93.2 * * Ver. 0.99 '93.8 * ********************************************************/ static char *rcs_id = "$Id: psgr.c,v 1.26 2015/12/14 01:14:21 uratec Exp $"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #if defined(WIN32) #include "SPTK.h" #else #include #endif #include "psgr.h" char *BOOL[] = { "FALSE", "TRUE" }; #define MaxPaperTypes 14 /* Paper Media */ struct page_media paper[] = { {"FALSE", 9999, 9999}, {"Letter", 612, 792}, {"A0", 2378, 3362}, {"A1", 1682, 2378}, {"A2", 1190, 1682}, {"A3", 842, 1190}, {"A4", 842, 842}, /* {"A4", 595, 842}, */ {"A5", 420, 595}, {"B0", 2917, 4124}, {"B1", 2063, 2917}, {"B2", 1459, 2063}, {"B3", 1032, 1459}, {"B4", 729, 1032}, {"B5", 516, 729}, }; char *orientations[] = { /* Orientation */ "Portrait", "Landscape", }; /* Default Values */ #define MEDIA "FALSE" #define ORIENTATION "Portrait" #define PSMODE FA #define PAPERNUM 2 #define XLENG 595 #define YLENG 842 #define LANDSCAPE FA #define RESOLUTION 600 #define FONTNO 1 #define CLIPMODE FA #define NCOPY 1 #define XOFFSET 0 #define YOFFSET 0 #define SHRINK 1.0 #define SCALE 10 void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - XY-plotter simulator for EPSF\n\n", progname); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile ] > stdout\n", progname); fprintf(stderr, " options:\n"); fprintf(stderr, " -t t : title of figure [NULL]\n"); fprintf(stderr, " -s s : shrink [%g]\n", SHRINK); fprintf(stderr, " -c c : number of copy [%d]\n", NCOPY); fprintf(stderr, " -x x : x offset [%d]\n", XOFFSET); fprintf(stderr, " -y y : y offset [%d]\n", YOFFSET); fprintf(stderr, " -p p : paper [%s]\n", MEDIA); fprintf(stderr, " (Letter,A0,A1,A2,A3,A4,A5,B0,B1,B2,B3,B4,B5)\n"); fprintf(stderr, " -l : landscape [%s]\n", BOOL[LANDSCAPE]); fprintf(stderr, " -r r : resolution [%d dpi]\n", RESOLUTION); fprintf(stderr, " -b : bold mode [FALSE]\n"); fprintf(stderr, " -T T : top margin [%d]\n", bbm.top); fprintf(stderr, " -B B : bottom margin [%d]\n", bbm.bottom); fprintf(stderr, " -L L : left margin [%d]\n", bbm.left); fprintf(stderr, " -R R : right margin [%d]\n", bbm.right); fprintf(stderr, " -P : output PS [%s]\n", BOOL[PSMODE]); fprintf(stderr, " -h : print this message \n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " plotter commands [stdin]\n"); fprintf(stderr, " stdout:\n"); fprintf(stderr, " PostScript codes (EPSF)\n"); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } char *progname, *filename = NULL, *title = NULL; char *media = MEDIA, *orientation = ORIENTATION; int paper_num = PAPERNUM, xleng = XLENG, yleng = YLENG, resolution = RESOLUTION; int font_no = FONTNO, psmode = PSMODE, landscape = LANDSCAPE, clip_mode = CLIPMODE; int main(int argc, char *argv[]) { char *str, flg, c; FILE *fp = NULL; int i; int ncopy = NCOPY, xoffset = XOFFSET, yoffset = YOFFSET; float shrink = SHRINK; progname = *argv; if (strrchr(progname, '/')) progname = (char *) (strrchr(progname, '/') + 1); while (--argc) { if (*(str = *++argv) == '-') { flg = *++str; if ((flg != 'P' && flg != 'l' && flg != 'b') && *++str == '\0') { str = *++argv; argc--; } switch (flg) { case 'P': psmode = 1 - psmode; break; case 't': title = str; break; case 'c': ncopy = atoi(str); break; case 's': shrink = atof(str); break; case 'x': xoffset = atoi(str) * SCALE; break; case 'y': yoffset = atoi(str) * SCALE; break; case 'p': media = str; break; case 'l': landscape = 1 - landscape; break; case 'r': resolution = atoi(str); break; case 'T': bbm.top = atoi(str) * 10; break; case 'B': bbm.bottom = atoi(str) * 10; break; case 'L': bbm.left = atoi(str) * 10; break; case 'R': bbm.right = atoi(str) * 10; break; case 'b': font_no += 2; break; case 'h': usage(0); break; default: fprintf(stderr, "%s : Invalid option '%c'!\n", progname, flg); usage(1); break; } } else filename = str; } for (i = 0; i < MaxPaperTypes; i++) { if (strcmp(media, paper[i].size) == 0) { paper_num = i; break; } } if (!landscape) { /* Portrait */ xleng = paper[paper_num].width; yleng = paper[paper_num].height; } else { /* Landscape */ xleng = paper[paper_num].height; yleng = paper[paper_num].width; } xleng = xleng * (double) SCALE / shrink; yleng = yleng * (double) SCALE / shrink; orientation = orientations[landscape]; if (filename != NULL) { fp = getfp(filename, "rt"); } else { fp = tmpfile(); while ((c = getchar()) != (char) EOF) fputc(c, fp); rewind(fp); } ungetc(flg = fgetc(fp), fp); if (flg == (char) EOF) { fprintf(stderr, "%s : Input file is empty!\n", progname); return (-1); } else if (flg != '=') { fprintf(stderr, "%s : Unexpected data format!\n", progname); return (-1); } epsf_setup(fp, shrink, xoffset, yoffset, bbm, ncopy); plot(fp); epsf_end(); fclose(fp); return (0); } SPTK-3.9/bin/psgr/psgr.h0000644001051300105040000000773012637156651011753 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ #include struct bbmargin { /* Bounding Box Margin */ int top; int bottom; int left; int right; } bbm; struct page_media { char *size; int width; int height; }; #define PU_PT (72.0/254.0) #define SHIFT 15 #define LAND_OFFSET 254 #define SCALE 10 #define MIN_OFFSET 12 #define MAX_OFFSET 22 #define CHAR_HEIGHT 10 #define norm(x) (int)(x) typedef struct cord { int x; int y; } Cord; extern char *filename; extern char *title; extern char *progname; extern struct page_media paper[]; extern char *orientations[]; extern char *media; extern int xleng; extern int yleng; extern int resolution; extern int paper_num; extern char *orientation; extern int psmode; extern int landscape; extern int font_no; extern int clip_mode; void epsf_setup(FILE * fp, float shrink, int xoffset, int yoffset, struct bbmargin bbm, int ncopy); void epsf_end(void); void plot(FILE * fp); void dict(void); SPTK-3.9/bin/ramp/0000755001051300105040000000000012637167712010664 500000000000000SPTK-3.9/bin/ramp/Makefile.am0000644001051300105040000000017312442245115012625 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = ramp ramp_SOURCES = ramp.c ramp_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/ramp/Makefile.in0000644001051300105040000004240612637167420012653 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = ramp$(EXEEXT) subdir = bin/ramp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_ramp_OBJECTS = ramp.$(OBJEXT) ramp_OBJECTS = $(am_ramp_OBJECTS) ramp_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(ramp_SOURCES) DIST_SOURCES = $(ramp_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include ramp_SOURCES = ramp.c ramp_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/ramp/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/ramp/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) ramp$(EXEEXT): $(ramp_OBJECTS) $(ramp_DEPENDENCIES) $(EXTRA_ramp_DEPENDENCIES) @rm -f ramp$(EXEEXT) $(AM_V_CCLD)$(LINK) $(ramp_OBJECTS) $(ramp_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ramp.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/ramp/ramp.c0000644001051300105040000001706112637156644011716 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * Generate Ramp Sequence * * * * 1996.4 K.Koishida * * * * usage: * * ramp [options] > stdout * * options: * * -l l : length [256] * * -n n : order [l-1] * * -s s : start value [0] * * -e e : end value [N/A] * * -t t : step size [1] * * stdout: * * ramp sequence * * , s, s+t, s+2t, ..., s+(l-1)t * * notice: * * If l<0, generate infinite sequence * * When -l and -n and -e are specified 2 or more, * * latter argument is adopted. * * * ************************************************************************/ static char *rcs_id = "$Id: ramp.c,v 1.25 2015/12/14 01:14:21 uratec Exp $"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define LENG 256 #define START 0.0 #define STEP 1.0 #define EFLAG FA /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - generate ramp sequence\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -l l : length [%d]\n", LENG); fprintf(stderr, " -n n : order [l-1]\n"); fprintf(stderr, " -s s : start value [%g]\n", START); fprintf(stderr, " -e e : end value [N/A]\n"); fprintf(stderr, " -t t : step size [%g]\n", STEP); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " stdout:\n"); fprintf(stderr, " ramp sequence (%s)\n", FORMAT); fprintf(stderr, " notice:\n"); fprintf(stderr, " if l<0, generate infinite sequence\n"); fprintf(stderr, " When -l and -n and -e are specified 2 or more,\n"); fprintf(stderr, " latter argument is adopted.\n"); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char **argv) { int l = LENG, i; double start = START, step = STEP, end = START, x; Boolean eflag = EFLAG; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) if (**++argv == '-') { switch (*(*argv + 1)) { case 'l': l = atoi(*++argv); --argc; eflag = FA; break; case 'n': l = atoi(*++argv) + 1; --argc; eflag = FA; break; case 's': start = atof(*++argv); --argc; break; case 'e': end = atoi(*++argv); --argc; eflag = TR; break; case 't': step = atof(*++argv); --argc; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } x = start; if (eflag) l = (end - start) / step + 1; for (i = 0;; i++) { fwritef(&x, sizeof(x), 1, stdout); x += step; if (i == l - 1) break; } return (0); } SPTK-3.9/bin/rawtowav/0000755001051300105040000000000012637167712011577 500000000000000SPTK-3.9/bin/rawtowav/Makefile.am0000644001051300105040000000021312442245116013534 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = rawtowav rawtowav_SOURCES = rawtowav.c rawtowav_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/rawtowav/Makefile.in0000644001051300105040000004253612637167420013572 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = rawtowav$(EXEEXT) subdir = bin/rawtowav ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_rawtowav_OBJECTS = rawtowav.$(OBJEXT) rawtowav_OBJECTS = $(am_rawtowav_OBJECTS) rawtowav_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(rawtowav_SOURCES) DIST_SOURCES = $(rawtowav_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include rawtowav_SOURCES = rawtowav.c rawtowav_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/rawtowav/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/rawtowav/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) rawtowav$(EXEEXT): $(rawtowav_OBJECTS) $(rawtowav_DEPENDENCIES) $(EXTRA_rawtowav_DEPENDENCIES) @rm -f rawtowav$(EXEEXT) $(AM_V_CCLD)$(LINK) $(rawtowav_OBJECTS) $(rawtowav_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rawtowav.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/rawtowav/rawtowav.c0000644001051300105040000001427112637156644013544 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * convert raw file format to wav file format * * * * 2009.9 A.Saito modified * * usage: * * rawtowav [ fs(Hz) ] [ bit ] [ infile ] [ outfile ] * * infile: * * raw file format * * outfile: * * wav file format * * * ************************************************************************/ #include #include #if defined(WIN32) #include "SPTK.h" #else #include #endif void write_file(long fs, char BIT, char *rawfile, char *wavfile) { FILE *fpi, *fpo; char RIFF[] = "RIFF"; char WAVE[] = "WAVE"; char fmt_chunk[] = "fmt "; char data_chunk[] = "data"; int file_size, rawfile_size; int chunk_size = 16; int data_speed; short formatID = 1; short channel = 1; /* mono:1¡¤stereo:2 */ short block_size; /* 16bit, mono => 16bit*1=2byte */ short bit; int c, buf[2] = { 0, 0 }; fpi = getfp(rawfile, "rb"); fpo = getfp(wavfile, "wb"); fseek(fpi, 0, SEEK_END); rawfile_size = ftell(fpi); file_size = rawfile_size + 36; fseek(fpi, 0, SEEK_SET); /* RIFF header */ fwritex(RIFF, sizeof(char), 4, fpo); /* file size */ buf[0] = file_size; fwrite_little_endian(buf, 4, 1, fpo); /* WAVE header */ fwritex(WAVE, sizeof(char), 4, fpo); /* fmt chunk */ fwritex(fmt_chunk, sizeof(char), 4, fpo); /* chunk size */ buf[0] = chunk_size; fwrite_little_endian(buf, 4, 1, fpo); /* formatID */ fwritex(&formatID, sizeof(short), 1, fpo); /* channel (mono:1¡¤stereo:2) */ fwritex(&channel, sizeof(short), 1, fpo); /* sampling frequency */ buf[0] = fs; fwrite_little_endian(buf, 4, 1, fpo); /* data speed */ data_speed = fs * BIT / 8 * formatID; buf[0] = data_speed; fwrite_little_endian(buf, 4, 1, fpo); /* block size */ block_size = BIT / 8 * formatID; fwritex(&block_size, sizeof(short), 1, fpo); /* bit number */ bit = BIT; fwritex(&bit, sizeof(short), 1, fpo); /* data chunk */ fwritex(data_chunk, sizeof(char), 4, fpo); /* file size of data */ buf[0] = rawfile_size; fwrite_little_endian(buf, 4, 1, fpo); while ((c = fgetc(fpi)) != EOF) fputc(c, fpo); fclose(fpi); fclose(fpo); } int main(int argc, char **argv) { if (argc != 5) { printf("error : failed to convert raw to wav\n\n"); printf("rawtowav : convert raw to wav\n"); printf("usage:\n"); printf(" rawtowav [ fs(Hz) ] [ bit ] [ infile ] [ outfile ]\n"); exit(0); } write_file(atol(argv[1]), (char) atoi(argv[2]), argv[3], argv[4]); return (0); } SPTK-3.9/bin/reverse/0000755001051300105040000000000012637167712011400 500000000000000SPTK-3.9/bin/reverse/Makefile.am0000644001051300105040000000022212442245116013335 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = reverse reverse_SOURCES = _reverse.c reverse.c reverse_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/reverse/Makefile.in0000644001051300105040000004265612637167420013376 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = reverse$(EXEEXT) subdir = bin/reverse ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_reverse_OBJECTS = _reverse.$(OBJEXT) reverse.$(OBJEXT) reverse_OBJECTS = $(am_reverse_OBJECTS) reverse_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(reverse_SOURCES) DIST_SOURCES = $(reverse_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include reverse_SOURCES = _reverse.c reverse.c reverse_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/reverse/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/reverse/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) reverse$(EXEEXT): $(reverse_OBJECTS) $(reverse_DEPENDENCIES) $(EXTRA_reverse_DEPENDENCIES) @rm -f reverse$(EXEEXT) $(AM_V_CCLD)$(LINK) $(reverse_OBJECTS) $(reverse_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_reverse.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/reverse.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/reverse/_reverse.c0000644001051300105040000000723012637156644013302 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ $Id: _reverse.c,v 1.16 2015/12/14 01:14:22 uratec Exp $ Reverse the order of data in sequence reverse(real* p, int l) double* p : data seqence (Overwrite) int l : length of sequence ************************************************************************/ #include #if defined(WIN32) #include "SPTK.h" #else #include #endif void reverse(double *x, const int l) { int i = 0; double d; while (i < l - i - 1) { d = x[i]; x[i] = x[l - i - 1]; x[l - i - 1] = d; i++; } return; } SPTK-3.9/bin/reverse/reverse.c0000644001051300105040000001703112637156644013143 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * Reverse the order of Data in Each Block * * * * 1993.7 K.Tokuda * * 1996.1 N.miyazaki modified * * * * usage: * * reverse [ options ] [ infile ] > stdout * * options: * * -l l : length of block [EOF] * * -n n : order of block [EOF-1] * * infile: * * x0, x1, ..., xN, (real) * * stdout: * * xN, ..., x1, x0, (real) * * * ************************************************************************/ static char *rcs_id = "$Id: reverse.c,v 1.28 2015/12/14 01:14:22 uratec Exp $"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define BLOCK 1 /* Command Name */ char *cmnd; typedef struct _float_list { float *f; struct _float_list *next; } float_list; void usage(void) { fprintf(stderr, "\n"); fprintf(stderr, " %s - reverse the order of data in each block\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -l l : length of block [EOF]\n"); fprintf(stderr, " -n n : order of block [EOF-1]\n"); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " data sequence (%s) [stdin]\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " reversed data sequence (%s)\n", FORMAT); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(1); } int main(int argc, char *argv[]) { char *s, c; int l = -1, length, block_size, i, j; double *x; FILE *fp = stdin; float_list *top, *cur, *prev, *tmpf; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) { if (*(s = *++argv) == '-') { c = *++s; if (*++s == '\0') { s = *++argv; --argc; } switch (c) { case 'l': l = atoi(s); break; case 'n': l = atoi(s) + 1; break; case 'h': usage(); default: usage(); } } else fp = getfp(*argv, "rb"); } block_size = (l < 0) ? BLOCK : l; x = dgetmem(block_size); top = prev = (float_list *) malloc(sizeof(float_list)); length = 0; prev->next = NULL; while (freadf(x, sizeof(*x), block_size, fp) == block_size) { cur = (float_list *) malloc(sizeof(float_list)); cur->f = fgetmem(block_size); for (i = 0; i < block_size; i++) { cur->f[i] = (float) x[i]; } length++; prev->next = cur; cur->next = NULL; prev = cur; } free(x); if (l < 0) { x = dgetmem(length * block_size); for (i = 0, tmpf = top->next; tmpf != NULL; i++, tmpf = tmpf->next) { for (j = 0; j < block_size; j++) { x[i * block_size + j] = tmpf->f[j]; } } reverse(x, length * block_size); fwritef(x, sizeof(*x), length * block_size, stdout); } else { x = dgetmem(block_size); for (tmpf = top->next; tmpf != NULL; tmpf = tmpf->next) { for (j = 0; j < block_size; j++) { x[j] = tmpf->f[j]; } reverse(x, block_size); fwritef(x, sizeof(*x), block_size, stdout); } } return (0); } SPTK-3.9/bin/rmse/0000755001051300105040000000000012637167713010674 500000000000000SPTK-3.9/bin/rmse/Makefile.am0000644001051300105040000000020312442245116012627 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = rmse rmse_SOURCES = _rmse.c rmse.c rmse_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/rmse/Makefile.in0000644001051300105040000004254312637167420012664 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = rmse$(EXEEXT) subdir = bin/rmse ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_rmse_OBJECTS = _rmse.$(OBJEXT) rmse.$(OBJEXT) rmse_OBJECTS = $(am_rmse_OBJECTS) rmse_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(rmse_SOURCES) DIST_SOURCES = $(rmse_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include rmse_SOURCES = _rmse.c rmse.c rmse_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/rmse/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/rmse/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) rmse$(EXEEXT): $(rmse_OBJECTS) $(rmse_DEPENDENCIES) $(EXTRA_rmse_DEPENDENCIES) @rm -f rmse$(EXEEXT) $(AM_V_CCLD)$(LINK) $(rmse_OBJECTS) $(rmse_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_rmse.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rmse.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/rmse/_rmse.c0000644001051300105040000000735512637156644012100 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /*************************************************************** $Id: _rmse.c,v 1.18 2015/12/14 01:14:22 uratec Exp $ Calculation of Root Mean Squared Error double rmse(x, y, n) double *x : data sequence double *y : data sequence int n : data length return value : RMSE of data ***************************************************************/ #include #include #if defined(WIN32) #include "SPTK.h" #else #include #endif double rmse(double *x, double *y, const int n) { int i; double sub, sum; sum = 0.0; for (i = 0; i < n; i++) { sub = x[i] - y[i]; sum += sub * sub; } return (sqrt(sum / n)); } SPTK-3.9/bin/rmse/rmse.c0000644001051300105040000003000612637156644011726 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * Calculation of Root Mean Squared Error * * * * 1996.3 K.Koishida * * 2013.7 T.Aritake * * * * usage: * * rmse [ options ] file1 [ infile ] > stdout * * options: * * -l l : length of vector [0] * * -n n : order of vector [l-1] * * -t t : number of vector [EOD] * * -magic magic : remove magic number * * -MAGIC MAGIC : replace magic number by MAGIC * * if -magic option is not given, * * return error * * if -magic or -MAGIC option * * is given multiple times, return error * * infile: * * data sequence * * , x(0), x(1), ..., x(l-1), * * stdout: * * rmse * * , x(0)+x(1)...+x(l-1)/l * * notice: * * if l>0, calculate rmse frame by frame * * require: * * rmse() * * * ************************************************************************/ static char *rcs_id = "$Id: rmse.c,v 1.29 2015/12/14 01:14:22 uratec Exp $"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #include #include #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define LENG 0 #define MAGIC 0 #define REP 0 /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - calculation of root mean squared error\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] file1 [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -l l : length of vector [%d]\n", LENG); fprintf(stderr, " -n n : order of vector [l-1]\n"); fprintf(stderr, " -t t : number of vector [EOD]\n"); fprintf(stderr, " -magic magic : remove magic number\n"); fprintf(stderr, " -MAGIC MAGIC : replace magic number by MAGIC\n"); fprintf(stderr, " if -magic option is not given\n"); fprintf(stderr, " return error\n"); fprintf(stderr, " if -magic or -MAGIC option\n"); fprintf(stderr, " is given multiple times, return error\n"); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " data sequence (%s) [stdin]\n", FORMAT); fprintf(stderr, " file1:\n"); fprintf(stderr, " data sequence (%s)\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " root mean squared error (%s)\n", FORMAT); fprintf(stderr, " notice:\n"); fprintf(stderr, " if l>0, calculate rmse frame by frame\n"); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char **argv) { int l = LENG, num = 0, i = 0, break_flag = 0, tv = -1; FILE *fp = stdin, *fp1 = NULL; double *x, *y, x1, y1, sub, z = 0.0; double magic = 0.0, rep = 0.0; int magic_flag = 0, magic_count = MAGIC, rep_count = REP; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) if (**++argv == '-') { switch (*(*argv + 1)) { case 'l': l = atoi(*++argv); --argc; break; case 'n': l = atoi(*++argv) + 1; --argc; break; case 't': tv = atoi(*++argv); --argc; break; case 'h': usage(0); case 'm': if (magic_count > 0) { fprintf(stderr, "%s : Cannot specify -magic option multiple times!\n", cmnd); usage(1); } if ((*(argv + 1)) == NULL) { /* No magic number */ fprintf(stderr, "%s : -magic option need magic number !\n", cmnd); usage(1); } if (isdigit(**(argv + 1)) == 0) { /* Check the magic number is correct */ if (**(argv + 1) != '+' && **(argv + 1) != '-') { fprintf(stderr, "%s : -magic option need numerical number !\n", cmnd); usage(1); } else if (isdigit(*(*(argv + 1) + 1)) == 0) { fprintf(stderr, "%s : -magic option need numerical number !\n", cmnd); usage(1); } } magic = atof(*++argv); magic_flag = 1; magic_count++; --argc; break; case 'M': if (rep_count > 0) { fprintf(stderr, "%s : Cannot specify -MAGIC option multiple times!\n", cmnd); usage(1); } if (magic_flag == 0) { fprintf(stderr, "%s : Cannot find -magic option before -MAGIC option!\n", cmnd); usage(1); } if ((*(argv + 1)) == NULL) { /* No magic number */ fprintf(stderr, "%s : -MAGIC option need magic number !\n", cmnd); usage(1); } if (isdigit(**(argv + 1)) == 0) { /* Check the MAGIC number is correct */ if (**(argv + 1) != '+' && **(argv + 1) != '-') { fprintf(stderr, "%s : -MAGIC option need numerical number !\n", cmnd); usage(1); } else if (isdigit(*(*(argv + 1) + 1)) == 0) { fprintf(stderr, "%s : -MAGIC option need numerical number !\n", cmnd); usage(1); } } rep = atof(*++argv); rep_count++; --argc; break; default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else if (fp1 == NULL) fp1 = getfp(*argv, "rb"); else fp = getfp(*argv, "rb"); if (l > 0) { x = dgetmem(l + l); y = x + l; while (freadf(x, sizeof(*x), l, fp) == l && freadf(y, sizeof(*y), l, fp1) == l) { break_flag = 0; if (magic_count) for (i = 0; i < l; i++) { if (rep_count == 0) { if (x[i] == magic || y[i] == magic) break_flag = 1; } else { if (x[i] == magic) x[i] = rep; if (y[i] == magic) y[i] = rep; } } if (break_flag == 1) continue; z = rmse(x, y, l); fwritef(&z, sizeof(z), 1, stdout); tv--; if (tv == 0) break; } } else { while (freadf(&x1, sizeof(x1), 1, fp) == 1 && freadf(&y1, sizeof(y1), 1, fp1) == 1) { if (magic_count) if (x1 == magic || y1 == magic) { if (rep_count) { if (x1 == magic) x1 = rep; if (y1 == magic) y1 = rep; } else { return (0); } } sub = x1 - y1; z += sub * sub; num++; } z = sqrt(z /= num); fwritef(&z, sizeof(z), 1, stdout); } return (0); } SPTK-3.9/bin/root_pol/0000755001051300105040000000000012637167713011563 500000000000000SPTK-3.9/bin/root_pol/Makefile.am0000644001051300105040000000022712442245117013525 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = root_pol root_pol_SOURCES = _root_pol.c root_pol.c root_pol_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/root_pol/Makefile.in0000644001051300105040000004270712637167420013555 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = root_pol$(EXEEXT) subdir = bin/root_pol ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_root_pol_OBJECTS = _root_pol.$(OBJEXT) root_pol.$(OBJEXT) root_pol_OBJECTS = $(am_root_pol_OBJECTS) root_pol_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(root_pol_SOURCES) DIST_SOURCES = $(root_pol_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include root_pol_SOURCES = _root_pol.c root_pol.c root_pol_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/root_pol/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/root_pol/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) root_pol$(EXEEXT): $(root_pol_OBJECTS) $(root_pol_DEPENDENCIES) $(EXTRA_root_pol_DEPENDENCIES) @rm -f root_pol$(EXEEXT) $(AM_V_CCLD)$(LINK) $(root_pol_OBJECTS) $(root_pol_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_root_pol.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/root_pol.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/root_pol/_root_pol.c0000644001051300105040000002065512637156645013655 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * $Id: _root_pol.c,v 1.19 2015/12/14 01:14:22 uratec Exp $ * * * * Durand-Kerner-Aberth for Higher Order Equation * * * * 1988.12 K.Fukushi * * 1989.3 T.Kobayashi modified * * 1999.12 T.Yoshimura modified * * * * Usage: root_pol(a, odr, x, a_zero, eps, itrat) * * * * Description: * * * * real* a[2*odr]; * * int odr, a_zero, itrat; * * double eps; * * * * Pn(x) = a[0]x^n + a[1]x^(n-1) + a[2]x^(n-2) + ... + a[n] * * * * Output: * * * * x[0].re,x[0].im,...,x[n-1].re,x[n-1].im * * * * * ************************************************************************/ /* Standard C Libraries */ #include #include #include #if defined(WIN32) #include "SPTK.h" #else #include #endif typedef enum { plus, minus, multiply, divide } opt; static double rad_root(const double x, const int i) { if (x == 0.0) return -1.0; else return exp(log(x) / i); } static complex c_math(complex c1, opt op, complex c2) { double p; complex t; switch (op) { case plus: t.re = c1.re + c2.re; t.im = c1.im + c2.im; break; case minus: t.re = c1.re - c2.re; t.im = c1.im - c2.im; break; case multiply: t.re = c1.re * c2.re - c1.im * c2.im; t.im = c1.re * c2.im + c1.im * c2.re; break; case divide: p = c2.re * c2.re + c2.im * c2.im; t.re = (c1.re * c2.re + c1.im * c2.im) / p; t.im = (c1.im * c2.re - c1.re * c2.im) / p; break; default: t.re = c1.re; t.im = c1.im; break; } return t; } static double c_mag(complex x) { return sqrt(x.re * x.re + x.im * x.im); } static double c_arg(complex x) { return atan2(x.im, x.re); } void output_root_pol(complex * x, int odr, int form) { int i, k; double mag, arg, *a; a = dgetmem(2 * odr); switch (form) { case 1: for (k = i = 0; i < odr; i++) { a[k++] = c_mag(x[i + 1]); a[k++] = c_arg(x[i + 1]); } break; case 2: case 3: for (k = i = 0; i < odr; i++) { mag = 1 / c_mag(x[i + 1]); arg = -c_arg(x[i + 1]); if (form == 3) { a[k++] = mag; a[k++] = arg; } else { a[k++] = mag * cos(arg); a[k++] = mag * sin(arg); } } break; case 0: default: for (k = i = 0; i < odr; i++) { a[k++] = x[i + 1].re; a[k++] = x[i + 1].im; } break; } fwritef(a, sizeof(*a), odr * 2, stdout); return; } complex *cplx_getmem(const int leng) { int i; complex *p = NULL; if ((p = (complex *) malloc(sizeof(complex) * leng)) == NULL) { fprintf(stderr, "root_pol : Cannot allocate memory!\n"); exit(3); } for (i = 0; i < leng; i++) p[i].re = p[i].im = 0; return p; } void root_pol(double *a, const int odr, complex * x, const int a_zero, const double eps, const int itrat) { int i, j, k, l; double th, th1, th2, cm, cmax; complex cden, cnum, c1, *deltx; deltx = cplx_getmem(odr + 1); if (!a_zero) for (i = 1; i <= odr; i++) a[i] /= a[0]; cmax = 0; for (i = 2; i <= odr; i++) { cm = odr * rad_root(fabs(a[i]), i); if (cm > cmax) cmax = cm; } th1 = PI * 2.0 / odr; th2 = th1 / 4.0; for (i = 1; i <= odr; i++) { th = th1 * (i - 1) + th2; x[i].re = cmax * cos(th); x[i].im = cmax * sin(th); } l = 1; do { for (i = 1; i <= odr; i++) { cden.re = 1.0; cden.im = 0.0; cnum.re = 1.0; cnum.im = 0.0; c1 = x[i]; for (j = 1; j <= odr; j++) { cnum = c_math(cnum, multiply, c1); cnum.re += a[j]; if (j != i) cden = c_math(cden, multiply, c_math(c1, minus, x[j])); } deltx[i] = c_math(cnum, divide, cden); x[i] = c_math(c1, minus, deltx[i]); } k = 1; while ((k <= odr) && (c_mag(deltx[k++]) <= eps)); l++; } while ((l <= itrat) && (k <= odr)); if (l > itrat) { fprintf(stderr, "root_pol : No convergence!\n"); exit(1); } return; } SPTK-3.9/bin/root_pol/root_pol.c0000644001051300105040000001772212637156645013517 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * Durand-Kerner-Aberth for Higher Order Equation * * * * 1988.12 K.Fukushi * * 1989.3 T.Kobayashi modified * * 1999.12 T.Yoshimura modified * * * * usage : * * root_pol [ options ] [ infile ] > stdout * * options: * * -m : order of equation [32] * * -n : number of maximum iteration [1000] * * -e : eps [1.0e-14] * * -i : a[0] = 1 [FALSE] * * -s : revert the coefficient [FALSE] * * -r : ( magnitude, arg ) output [(Real,Imag)] * * Pn(x) = a[0]x^n + a[1]x^n-1 + ... + a[n-1]x + a[n] * * infile: * * stdin for default * * a[0],...,a[n] * * outfile: * * x[0].re, x[1].re,...,x[n-1].re, * * x[0].im, x[1].im,...,x[n-1].im * * * ************************************************************************/ static char *rcs_id = "$Id: root_pol.c,v 1.27 2015/12/14 01:14:22 uratec Exp $"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define ORDER 32 #define ITER 1000 #define EPS 1.0e-14 /* Command Name */ char *cmnd; int usage(void) { fprintf(stderr, "\n"); fprintf(stderr, " %s - Durand-Kerner-Aberth for higher order equation \n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -m : order of equation [%d]\n", ORDER); fprintf(stderr, " -n : number of maximum iteration [%d]\n", ITER); fprintf(stderr, " -e : error margin for roots [%g]\n", EPS); fprintf(stderr, " -i : a[0] = 1 [FALSE]\n"); fprintf(stderr, " -s : revert the coefficient [FALSE]\n"); fprintf(stderr, " -r : (magnitude, arg) output [(Real,Imag)]\n"); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " coefficients of polynomial (%s) [stdin]\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " root of polynomial (%s)\n", FORMAT); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(1); } int main(int argc, char *argv[]) { char *s; int c, k, odr = ORDER, itrat = ITER, form = 0, a_zero = 0; double *a, *d, eps = EPS; FILE *fp = stdin; complex *x; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc > 0) { if (*(s = *++argv) == '-') { c = *++s; switch (c) { case 'i': a_zero = 1; break; case 'r': form |= 1; break; case 's': form |= 2; break; case 'e': if (*++s == '\0') { s = *++argv; --argc; } eps = atof(s); break; case 'm': if (*++s == '\0') { s = *++argv; --argc; } odr = atoi(s); break; case 'n': if (*++s == '\0') { s = *++argv; --argc; } itrat = atoi(s); break; default: usage(); } } else fp = getfp(*argv, "rb"); } a = dgetmem(odr + 1); odr = freadf(a, sizeof(*a), odr, fp) - 1; d = dgetmem(odr + 1); x = cplx_getmem(odr + 1); for (k = 0; k <= odr; ++k) d[k] = a[k]; root_pol(d, odr, x, a_zero, eps, itrat); output_root_pol(x, odr, form); return (0); } SPTK-3.9/bin/sin/0000755001051300105040000000000012637167713010517 500000000000000SPTK-3.9/bin/sin/Makefile.am0000644001051300105040000000016712442245117012464 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = sin sin_SOURCES = sin.c sin_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/sin/Makefile.in0000644001051300105040000004236012637167420012504 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = sin$(EXEEXT) subdir = bin/sin ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_sin_OBJECTS = sin.$(OBJEXT) sin_OBJECTS = $(am_sin_OBJECTS) sin_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(sin_SOURCES) DIST_SOURCES = $(sin_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include sin_SOURCES = sin.c sin_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/sin/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/sin/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) sin$(EXEEXT): $(sin_OBJECTS) $(sin_DEPENDENCIES) $(EXTRA_sin_DEPENDENCIES) @rm -f sin$(EXEEXT) $(AM_V_CCLD)$(LINK) $(sin_OBJECTS) $(sin_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sin.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/sin/sin.c0000644001051300105040000001542112637156645011401 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * Generate Sinusoidal Sequence * * * * 1989.7 K.Tokuda * * 1996.4 K.Koishida * * * * usage: * * sin [options] > stdout * * options: * * -l l : length [256] * * -p p : period [10] * * -m m : magnitude [1] * * stdout: * * sinusoidal sequence * * , sin(2pi*0/p), sin(2pi*1/p), ..., sin(2pi*(l-1)/p * * notice: * * if l<0, generate infinite sequence * * * ************************************************************************/ static char *rcs_id = "$Id: sin.c,v 1.25 2015/12/14 01:14:22 uratec Exp $"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #include #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define LENG 256 #define PERIOD 10.0 #define MAGNITUDE 1.0 /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - generate sinusoidal sequence\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -l l : length [%d]\n", LENG); fprintf(stderr, " -p p : period [%g]\n", PERIOD); fprintf(stderr, " -m m : magnitude [%g]\n", MAGNITUDE); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " stdout:\n"); fprintf(stderr, " sinusoidal sequence (%s)\n", FORMAT); fprintf(stderr, " notice:\n"); fprintf(stderr, " if l<0, generate infinite sequence\n"); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char **argv) { int l = LENG, i; double x, mag = MAGNITUDE, period = PERIOD; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) if (**++argv == '-') { switch (*(*argv + 1)) { case 'l': l = atoi(*++argv); --argc; break; case 'p': period = atof(*++argv); --argc; break; case 'm': mag = atof(*++argv); --argc; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } for (i = 0;; i++) { x = mag * sin(PI2 * (double) i / period); fwritef(&x, sizeof(x), 1, stdout); if (i == l - 1) break; } return (0); } SPTK-3.9/bin/smcep/0000755001051300105040000000000012637167713011035 500000000000000SPTK-3.9/bin/smcep/Makefile.am0000644001051300105040000000021012442245120012761 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = smcep smcep_SOURCES = _smcep.c smcep.c smcep_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/smcep/Makefile.in0000644001051300105040000004257412637167420013031 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = smcep$(EXEEXT) subdir = bin/smcep ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_smcep_OBJECTS = _smcep.$(OBJEXT) smcep.$(OBJEXT) smcep_OBJECTS = $(am_smcep_OBJECTS) smcep_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(smcep_SOURCES) DIST_SOURCES = $(smcep_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include smcep_SOURCES = _smcep.c smcep.c smcep_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/smcep/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/smcep/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) smcep$(EXEEXT): $(smcep_OBJECTS) $(smcep_DEPENDENCIES) $(EXTRA_smcep_DEPENDENCIES) @rm -f smcep$(EXEEXT) $(AM_V_CCLD)$(LINK) $(smcep_OBJECTS) $(smcep_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_smcep.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/smcep.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/smcep/_smcep.c0000644001051300105040000004576212637156645012407 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /**************************************************************** $Id: _smcep.c,v 1.29 2015/12/14 05:34:35 uratec Exp $ Mel-Cepstral Analysis (2nd order all-pass filter) int smcep(xw, flng, mc, m, fftsz, a, t, itr1, itr2, dd, etype, e, f, itype); double *xw : input sequence int flng : frame length double *mc : mel cepstrum int m : order of mel cepstrum double a : alpha double t : theta int itr1 : minimum number of iteration int itr2 : maximum number of iteration double dd : end condition int etype : 0 -> e is not used 1 -> e is initial value for log-periodogram 2 -> e is floor periodogram in db double e : initial value for log-periodogram or floor periodogram in db double f : mimimum value of the determinant of the normal matrix int itype : input data type return value : 0 -> completed by end condition -1-> completed by maximum iteration *****************************************************************/ #include #include #include #if defined(WIN32) #include "SPTK.h" #else #include #endif /*************************************************************** Warping Function and Its Derivative double warp(w, a, t) & derivw(w, a, t) double w : frequency double a : all-pass constant double t : emphasized frequency ***************************************************************/ static double warp(const double w, const double a, const double t) { double ww, x, y; x = w - t; y = w + t; ww = w + atan2((a * sin(x)), (1.0 - a * cos(x))) + atan2((a * sin(y)), (1.0 - a * cos(y))); return (ww); } /*============================================================*/ static double derivw(const double w, const double a, const double t) { double dw, x, y, a2, aa; x = w - t; y = w + t; a2 = a + a; aa = a * a; dw = 1.0 + (a * cos(x) - aa) / (1.0 - a2 * cos(x) + aa) + (a * cos(y) - aa) / (1.0 - a2 * cos(y) + aa); return (dw); } /*************************************************************** No.1 frqt_a static : *l, size1 Frequency Transformation of "al" (second term of dE/dc) void frqt_a(al, m, fftsz, a, t) double *al : sequence which will be warped int m : order of warped sequence int fftsz : ifft size double a : all-pass constant double t : emphasized frequency (t * pi) ***************************************************************/ static void frqt_a(double *al, const int m, const int fftsz, const double a, const double t) { int i, j; double w, b, *ww, *f, *re, *im, *pf, *pl, *next; int size_l, size_f, fftsz2; static double *l = NULL; static int size1, flag_l = 1; b = M_2PI / (double) fftsz; size_l = m + 1; if (l == NULL) { flag_l = 0; size1 = size_l; l = dgetmem(size1); } else if (size_l != size1) { free(l); flag_l = 0; size1 = size_l; l = dgetmem(size1); } /*------- if "l" is not defined ----------*/ if (flag_l == 0) { ww = dgetmem(fftsz); for (j = 0, w = 0.0; j < fftsz; j++, w += b) ww[j] = warp(w, a, t); fftsz2 = fftsz + fftsz; /* size of (re + im) */ size_f = (m + 1) * fftsz2; /* size of array "f" */ f = dgetmem(size_f); for (i = 0, re = f, im = f + fftsz; i <= m; i++) { for (j = 0; j < fftsz; j++) *(re++) = cos(ww[j] * i); for (j = 0; j < fftsz; j++) *(im++) = -sin(ww[j] * i); re -= fftsz; im -= fftsz; ifft(re, im, fftsz); re += fftsz2; im += fftsz2; } free(ww); /*------- copy "f" to "l" ----------*/ for (i = 0, next = f, pf = f, pl = l; i <= m; i++) { *(pl++) = *pf; next += fftsz2; pf = next; } free(f); flag_l = 1; } movem(l, al, sizeof(*al), m + 1); return; } /*************************************************************** No.2 freqt2 static : *g, size2 Frequency Transformation void freqt2(c1, m1, c2, m2, fftsz, a, t) double *c1 : minimum phase sequence int m1 : order of minimum phase sequence double *c2 : warped sequence int m2 : order of warped sequence int fftsz : ifft size double a : all-pass constant double t : emphasized frequency (t * pi) ***************************************************************/ static void freqt2(double *c1, const int m1, double *c2, const int m2, const int fftsz, const double a, const double t) { int i, j; double w, b, *ww, *dw, *f, *re, *im, *pf, *pg, *next; int size_g, size_f, fftsz2; static double *g = NULL; static int size2, flag_g = 1; b = M_2PI / (double) fftsz; size_g = (m2 + 1) * (m1 + 1); if (g == NULL) { flag_g = 0; size2 = size_g; g = dgetmem(size2); } else if (size_g != size2) { free(g); flag_g = 0; size2 = size_g; g = dgetmem(size2); } /*------- if "g" is not defined ----------*/ if (flag_g == 0) { ww = dgetmem(fftsz); dw = dgetmem(fftsz); for (j = 0, w = 0.0; j < fftsz; j++, w += b) ww[j] = warp(w, a, t); for (j = 0, w = 0.0; j < fftsz; j++, w += b) dw[j] = derivw(w, a, t); fftsz2 = fftsz + fftsz; /* size of (re + im) */ size_f = (m2 + 1) * fftsz2; /* size of array "f" */ f = dgetmem(size_f); for (i = 0, re = f, im = f + fftsz; i <= m2; i++) { for (j = 0; j < fftsz; j++) *(re++) = cos(ww[j] * i) * dw[j]; for (j = 0; j < fftsz; j++) *(im++) = -sin(ww[j] * i) * dw[j]; re -= fftsz; im -= fftsz; ifft(re, im, fftsz); for (j = 1; j <= m1; j++) re[j] += re[fftsz - j]; re += fftsz2; im += fftsz2; } free(ww); free(dw); /*------- copy "f" to "g" ----------*/ for (i = 0, next = f, pf = f, pg = g; i <= m2; i++) { for (j = 0; j <= m1; j++) *(pg++) = *(pf++); next += fftsz2; pf = next; } free(f); flag_g = 1; for (j = 1; j <= m1; j++) g[j] *= 0.5; for (i = 1; i <= m2; i++) g[i * (m1 + 1)] *= 2.0; } for (i = 0, pg = g; i <= m2; i++) for (j = 0, c2[i] = 0.0; j <= m1; j++) c2[i] += *(pg++) * c1[j]; return; } /*************************************************************** No.3 ifreqt2 static : *h, size3 Inverse Frequency Transformation void ifreqt2(c1, m1, c2, m2, fftsz, a, t) double *c1 : minimum phase sequence int m1 : order of minimum phase sequence double *c2 : warped sequence int m2 : order of warped sequence int fftsz : ifft size double a : all-pass constant double t : emphasized frequency t * pi(rad) ***************************************************************/ static void ifreqt2(double *c1, int m1, double *c2, int m2, int fftsz, double a, double t) { int i, j; double w, b, *ww, *f, *re, *im, *pl, *pr, *plnxt, *prnxt, *pf, *ph, *next; int size_h, size_f, fftsz2, m12, m11; static double *h = NULL; static int size3, flag_h = 1; b = M_2PI / (double) fftsz; size_h = (m2 + 1) * (m1 + 1); if (h == NULL) { flag_h = 0; size3 = size_h; h = dgetmem(size3); } else if (size_h != size3) { free(h); flag_h = 0; size3 = size_h; h = dgetmem(size3); } /*------- if "h" is not defined ----------*/ if (flag_h == 0) { ww = dgetmem(fftsz); for (j = 0, w = 0.0; j < fftsz; j++, w += b) ww[j] = warp(w, a, t); fftsz2 = fftsz + fftsz; /* size of (re + im) */ m12 = m1 + m1 + 1; size_f = m12 * fftsz2; /* size of array "f" */ f = dgetmem(size_f); for (i = -m1, re = f, im = f + fftsz; i <= m1; i++) { for (j = 0; j < fftsz; j++) *(re++) = cos(ww[j] * i); for (j = 0; j < fftsz; j++) *(im++) = -sin(ww[j] * i); re -= fftsz; im -= fftsz; ifft(re, im, fftsz); re += fftsz2; im += fftsz2; } free(ww); /*------- b'(n,m)=b(n,m)+b(n,-m) ----------*/ pl = f; pr = f + (m12 - 1) * fftsz2; for (i = 0, plnxt = pl, prnxt = pr; i < m1; i++) { plnxt += fftsz2; prnxt -= fftsz2; for (j = 0; j <= m2; j++) *(pr++) += *(pl++); pl = plnxt; pr = prnxt; } /*------- copy "f" to "h" ----------*/ m11 = m1 + 1; pf = f + m1 * fftsz2; for (j = 0, next = pf; j <= m1; j++) { next += fftsz2; for (i = 0; i <= m2; i++) h[m11 * i + j] = *(pf++); pf = next; } free(f); flag_h = 1; for (j = 1; j <= m1; j++) h[j] *= 0.5; for (i = 1; i <= m2; i++) h[i * m11] *= 2.0; } for (i = 0, ph = h; i <= m2; i++) for (j = 0, c2[i] = 0.0; j <= m1; j++) c2[i] += *(ph++) * c1[j]; return; } /*************************************************************** No.4 frqtr2 static : *k, size4 Frequency Transformation for Calculating Coefficients void frqtr2(c1, m1, c2, m2, fftsz, a, t) double *c1 : minimum phase sequence int m1 : order of minimum phase sequence double *c2 : warped sequence int m2 : order of warped sequence int fftsz : frame length (fft size) double a : all-pass constant double t : emphasized frequency ***************************************************************/ static void frqtr2(double *c1, int m1, double *c2, int m2, int fftsz, double a, double t) { int i, j; double w, b, *ww, *f, *tc2, *re, *im, *pf, *pk, *next; int size_k, size_f, fftsz2; static double *k = NULL; static int size4, flag_k = 1; b = M_2PI / (double) fftsz; size_k = (m2 + 1) * (m1 + 1); if (k == NULL) { flag_k = 0; size4 = size_k; k = dgetmem(size4); } else if (size_k != size4) { free(k); flag_k = 0; size4 = size_k; k = dgetmem(size4); } /*------- if "k" is not defined ----------*/ if (flag_k == 0) { ww = dgetmem(fftsz); for (j = 0, w = 0.0; j < fftsz; j++, w += b) ww[j] = warp(w, a, t); fftsz2 = fftsz + fftsz; /* size of (re + im) */ size_f = (m2 + 1) * fftsz2; /* size of array "f" */ f = dgetmem(size_f); for (i = 0, re = f, im = f + fftsz; i <= m2; i++) { for (j = 0; j < fftsz; j++) *(re++) = cos(ww[j] * i); for (j = 0; j < fftsz; j++) *(im++) = -sin(ww[j] * i); re -= fftsz; im -= fftsz; ifft(re, im, fftsz); for (j = 1; j <= m1; j++) re[j] += re[fftsz - j]; re += fftsz2; im += fftsz2; } free(ww); /*------- copy "f" to "k" ----------*/ for (i = 0, next = f, pf = f, pk = k; i <= m2; i++) { for (j = 0; j <= m1; j++) *(pk++) = *(pf++); next += fftsz2; pf = next; } free(f); flag_k = 1; } tc2 = dgetmem(m2 + 1); /* tmp of c2 */ for (i = 0, pk = k; i <= m2; i++) for (j = 0, tc2[i] = 0.0; j <= m1; j++) tc2[i] += *(pk++) * c1[j]; movem(tc2, c2, sizeof(*c2), m2 + 1); free(tc2); return; } int smcep(double *xw, const int flng, double *mc, const int m, const int fftsz, const double a, const double t, const int itr1, const int itr2, const double dd, const int etype, const double e, const double f, const int itype) { int i, j; int flag = 0, f2, m2; double u, s, eps = 0.0, min, max; static double *x = NULL, *y, *c, *d, *al, *b; static int size_x, size_d; if (etype == 1 && e < 0.0) { fprintf(stderr, "smcep : value of e must be e>=0!\n"); exit(1); } if (etype == 2 && e >= 0.0) { fprintf(stderr, "smcep : value of E must be E<0!\n"); exit(1); } if (etype == 1) { eps = e; } if (x == NULL) { x = dgetmem(3 * flng); y = x + flng; c = y + flng; size_x = flng; d = dgetmem(3 * m + 3); al = d + (m + 1); b = al + (m + 1); size_d = m; } if (flng > size_x) { free(x); x = dgetmem(3 * flng); y = x + flng; c = y + flng; size_x = flng; } if (m > size_d) { free(d); d = dgetmem(3 * m + 3); al = d + (m + 1); b = al + (m + 1); size_d = m; } f2 = flng / 2.; m2 = m + m; movem(xw, x, sizeof(*x), flng); switch (itype) { case 0: /* windowed data sequence */ fftr(x, y, flng); for (i = 0; i < flng; i++) { x[i] = x[i] * x[i] + y[i] * y[i] + eps; /* periodogram */ } break; case 1: /* dB */ for (i = 0; i <= flng / 2; i++) { x[i] = exp((x[i] / 20.0) * log(10.0)); /* dB -> amplitude spectrum */ x[i] = x[i] * x[i] + eps; /* amplitude -> periodogram */ } break; case 2: /* log */ for (i = 0; i <= flng / 2; i++) { x[i] = exp(x[i]); /* log -> amplitude spectrum */ x[i] = x[i] * x[i] + eps; /* amplitude -> periodogram */ } break; case 3: /* amplitude */ for (i = 0; i <= flng / 2; i++) { x[i] = x[i] * x[i] + eps; /* amplitude -> periodogram */ } break; case 4: /* periodogram */ for (i = 0; i <= flng / 2; i++) { x[i] = x[i] + eps; } break; default: fprintf(stderr, "smcep : Input type %d is not supported!\n", itype); exit(1); } if (itype > 0) { for (i = 1; i < flng / 2; i++) x[flng - i] = x[i]; } if (etype == 2 && e < 0.0) { max = x[0]; for (i = 1; i < flng; i++) { if (max < x[i]) max = x[i]; } max = sqrt(max); min = max * pow(10.0, e / 20.0); /* floor is 20*log10(min/max) */ min = min * min; for (i = 0; i < flng; i++) { if (x[i] < min) x[i] = min; } } for (i = 0; i < flng; i++) c[i] = log(x[i]); /* 1, (-a), (-a)^2, ..., (-a)^M */ al[0] = 1.0; for (i = 1; i <= m; i++) al[i] = 0.0; frqt_a(al, m, fftsz, a, t); /* initial value of cepstrum */ ifftr(c, y, flng); /* c : IFFT[x] */ c[0] /= 2.0; c[flng / 2] /= 2.0; freqt2(c, f2, mc, m, fftsz, a, t); /* mc : mel cep. */ s = c[0]; /* Newton Raphson method */ for (j = 1; j <= itr2; j++) { fillz(c, sizeof(*c), flng); ifreqt2(mc, m, c, f2, fftsz, a, t); /* mc : mel cep. */ fftr(c, y, flng); /* c, y : FFT[mc] */ for (i = 0; i < flng; i++) c[i] = x[i] / exp(c[i] + c[i]); ifftr(c, y, flng); frqtr2(c, f2, c, m2, fftsz, a, t); /* c : r(k) */ u = c[0]; if (j >= itr1) { if (fabs((u - s) / u) < dd) { flag = 1; break; } s = u; } for (i = 0; i <= m; i++) b[i] = c[i] - al[i]; for (i = 0; i <= m2; i++) y[i] = c[i]; for (i = 0; i <= m2; i += 2) y[i] -= c[0]; for (i = 2; i <= m; i += 2) c[i] += c[0]; c[0] += c[0]; if (theq(c, y, d, b, m + 1, f)) { fprintf(stderr, "smcep : Error in theq() at %dth iteration!\n", j); exit(1); } for (i = 0; i <= m; i++) mc[i] += d[i]; } if (flag) return (0); else return (-1); } SPTK-3.9/bin/smcep/smcep.c0000644001051300105040000003052212637156645012234 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * Mel-cepstral analysis using 2nd order all-pass filter * * * * 1998.1 C.Miyajima * * * * usage: * * smcep [ options ] [infile] > stdout * * options: * * -a a : all-pass constant [0.35] * * -t t : emphasized frequency t*pi(rad) [0] * * -T T : emphasized frequency(Hz) [0] * * -m m : order of mel cepstrum [25] * * -l l : frame length [256] * * -s s : sampling frequency(kHz) [10.0] * * -L L : ifft size for making matrices [1024] * * -q q : Input format [0] * * 0 (windowed data sequence) * * 1 (20*log|f(w)|) * * 2 (ln|f(w)|) * * 3 (|f(w)|) * * 4 (|f(w)|^2) * * (level 2) * * -i i : minimum iteration [2] * * -j j : maximum iteration [30] * * -d d : end condition [0.001] * * -e e : initial value for log-periodogram [0] * * -E E : floor in db calculated per frame [N/A] * * -f f : mimimum value of the determinant * * of the normal matrix [0.000001] * * infile: * * data sequence * * , x(0), x(1), ..., x(L-1), * * stdout: * * mel cepstrum * * , c~(0), c~(1), ..., c~(M), * * notice: * * value of e must be e>=0 * * value of E must be E<0 * * option T is used with option s * * value of T must be T <= 1000*s/2 * * require: * * smcep() * * * ************************************************************************/ static char *rcs_id = "$Id: smcep.c,v 1.37 2015/12/14 05:34:35 uratec Exp $"; /* Standard C Libralies */ #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #include #include #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define ALPHA 0.35 #define THETA 0.00 #define ORDER 25 #define FLENG 256 #define FFTSZ 256 * 4 #define ITYPE 0 #define ETYPE 0 #define MINITR 2 #define MAXITR 30 #define END 0.001 #define EPS 0.0 #define MINDET 0.000001 #define SAMPLEF 10.0 #define EMPHHZ 0.00 /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - mel-cepstral analysis using 2nd order all-pass filter\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -a a : all-pass constant [%g]\n", ALPHA); fprintf(stderr, " -t t : emphasized frequency t*pi(rad) [%g]\n", THETA); fprintf(stderr, " -T T : emphasized frequency (Hz) [%g]\n", EMPHHZ); fprintf(stderr, " -m m : order of mel cepstrum [%d]\n", ORDER); fprintf(stderr, " -l l : frame length [%d]\n", FLENG); fprintf(stderr, " -s s : sampling frequency (kHz) [%g]\n", SAMPLEF); fprintf(stderr, " -L L : ifft size for making matrices [%d]\n", FFTSZ); fprintf(stderr, " -q q : input format [%d]\n", ITYPE); fprintf(stderr, " 0 (windowed sequence\n"); fprintf(stderr, " 1 (20*log|f(w)|)\n"); fprintf(stderr, " 2 (ln|f(w)|)\n"); fprintf(stderr, " 3 (|f(w)|)\n"); fprintf(stderr, " 4 (|f(w)|)^2\n"); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " (level 2)\n"); fprintf(stderr, " -i i : minimum iteration [%d]\n", MINITR); fprintf(stderr, " -j j : maximum iteration [%d]\n", MAXITR); fprintf(stderr, " -d d : end condition [%g]\n", END); fprintf(stderr, " -e e : initial value for log-periodogram [%g]\n", EPS); fprintf(stderr, " -E E : floor in db calculated per frame [N/A]\n"); fprintf(stderr, " -f f : mimimum value of the determinant [%g]\n", MINDET); fprintf(stderr, " of the normal matrix\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " windowed sequences (%s) [stdin]\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " mel-cepstrum (%s)\n", FORMAT); fprintf(stderr, " notice:\n"); fprintf(stderr, " value of e must be e>=0\n"); fprintf(stderr, " value of E must be E<0\n"); fprintf(stderr, " option T is used with option s\n"); fprintf(stderr, " value of T must be T <= 1000*s/2\n"); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char **argv) { int m = ORDER, flng = FLENG, ilng = FLENG, itype = ITYPE, etype = ETYPE, fftsz = FFTSZ, itr1 = MINITR, itr2 = MAXITR; FILE *fp = stdin; double *mc, *x, a = ALPHA, t = THETA, end = END, e = EPS, f = MINDET, s = SAMPLEF, T = EMPHHZ; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) if (**++argv == '-') { switch (*(*argv + 1)) { case 'a': a = atof(*++argv); --argc; break; case 't': t = atof(*++argv); --argc; break; case 'T': T = atof(*++argv); --argc; break; case 'm': m = atoi(*++argv); --argc; break; case 'l': flng = atoi(*++argv); --argc; break; case 's': s = atof(*++argv); --argc; break; case 'L': fftsz = atoi(*++argv); --argc; break; case 'q': itype = atoi(*++argv); --argc; break; case 'i': itr1 = atoi(*++argv); --argc; break; case 'j': itr2 = atoi(*++argv); --argc; break; case 'd': end = atof(*++argv); --argc; break; case 'e': etype = 1; e = atof(*++argv); --argc; break; case 'E': etype = 2; e = atof(*++argv); --argc; break; case 'f': f = atof(*++argv); --argc; break; case 'h': usage(0); default: fprintf(stderr, "%s : invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else fp = getfp(*argv, "rb"); if (T != 0.00 && t != 0.00) { fprintf(stderr, "%s : option t and T can't be used at the same time!\n", cmnd); usage(1); } else if (T > 1000 * (s / 2)) { fprintf(stderr, "%s : value of T must be T <= 1000*s/2 !\n", cmnd); usage(1); } else if (T > 0.00) { T /= 1000; t = (T / (s / 2)); } t *= M_PI; if (itype == 0) ilng = flng; else ilng = flng / 2 + 1; x = dgetmem(flng + m + 1); mc = x + flng; while (freadf(x, sizeof(*x), ilng, fp) == ilng) { smcep(x, flng, mc, m, fftsz, a, t, itr1, itr2, end, etype, e, f, itype); fwritef(mc, sizeof(*mc), m + 1, stdout); } return (0); } SPTK-3.9/bin/snr/0000755001051300105040000000000012637167713010530 500000000000000SPTK-3.9/bin/snr/Makefile.am0000644001051300105040000000016712442245120012467 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = snr snr_SOURCES = snr.c snr_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/snr/Makefile.in0000644001051300105040000004236012637167420012515 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = snr$(EXEEXT) subdir = bin/snr ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_snr_OBJECTS = snr.$(OBJEXT) snr_OBJECTS = $(am_snr_OBJECTS) snr_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(snr_SOURCES) DIST_SOURCES = $(snr_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include snr_SOURCES = snr.c snr_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/snr/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/snr/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) snr$(EXEEXT): $(snr_OBJECTS) $(snr_DEPENDENCIES) $(EXTRA_snr_DEPENDENCIES) @rm -f snr$(EXEEXT) $(AM_V_CCLD)$(LINK) $(snr_OBJECTS) $(snr_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/snr.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/snr/snr.c0000644001051300105040000002120612637156645011421 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * evaluate SNR and segmental SNR * * * * 1990.11 T.Kanno * * 1996.3 K.Koishida * * * * usage: * * snr [ options ] file1 [ infile ] > stdout * * options: * * -l l : frame length [256] * * -o o : output type [0] * * 0 SNR and SNRseg (ascii) * * 1 SNR and SNRseg in detail (ascii) * * 2 SNR (float) * * 3 SNRseg (float) * * infile: * * data sequence * * , x(0), x(1), ..., * * , y(0), y(1), ..., * * stdout: * * SNR, SNRseg * ************************************************************************/ static char *rcs_id = "$Id: snr.c,v 1.30 2015/12/14 01:14:22 uratec Exp $"; /* Standard C Libraries */ #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #include #include #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define LENG 256 #define OTYPE 0 /* Command Name */ char *cmnd; #ifdef DOUBLE char *FORMAT1 = "double"; #else char *FORMAT1 = "float"; #endif /* DOUBLE */ void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - evaluate SNR and segmental SNR\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] file1 [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -l l : frame length [%d]\n", LENG); fprintf(stderr, " -o o : output type [%d]\n", OTYPE); fprintf(stderr, " 0 SNR and SNRseg (ascii)\n"); fprintf(stderr, " 1 SNR and SNRseg in detail (ascii)\n"); fprintf(stderr, " 2 SNR (float)\n"); fprintf(stderr, " 3 SNRseg (float)\n"); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " data sequence (%s) [stdin]\n", FORMAT1); fprintf(stderr, " file1:\n"); fprintf(stderr, " data sequence\n"); fprintf(stderr, " stdout:\n"); fprintf(stderr, " SNR, SNRseg\n"); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char **argv) { int l = LENG, otype = OTYPE, count, countold, countseg, xn, yn, size, i; FILE *fp2 = stdin, *fp1 = NULL; double *x, *y, snr, snrseg, pw1, pw2, pw1snr, pw2snr, sub; char *s, c; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) if (*(s = *++argv) == '-') { c = *++s; switch (c) { case 'l': l = atoi(*++argv); --argc; break; case 'o': otype = atoi(*++argv); --argc; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else if (fp1 == NULL) fp1 = getfp(*argv, "rb"); else fp2 = getfp(*argv, "rb"); x = dgetmem(l + l); y = x + l; pw1 = pw2 = snrseg = 0.0; count = countold = countseg = 0; if (otype == 1) printf("\n"); while (!feof(fp1) && !feof(fp2)) { xn = freadf(x, sizeof(*x), l, fp1); yn = freadf(y, sizeof(*y), l, fp2); size = (xn > yn) ? yn : xn; pw1snr = pw2snr = 0.0; for (i = 0; i < size; i++) { pw1snr += x[i] * x[i]; sub = x[i] - y[i]; pw2snr += sub * sub; } count += size; if (size) { snr = 10.0 * log10(pw1snr / pw2snr); if (otype == 1) printf("\t %8d ~ %8d : %f [dB]\n", countold, count, snr); } if (size == l) { countseg++; snrseg += snr; } pw1 += pw1snr; pw2 += pw2snr; countold = count; } snr = 10.0 * log10(pw1 / pw2); snrseg /= (double) countseg; if (otype == 0 || otype == 1) { printf("\n"); printf("%d samples\n", count); printf(" SNR : %f [dB]\n", snr); printf(" SNRseg : %f [dB]\n", snrseg); printf("\n"); } if (otype == 2) fwritef(&snr, sizeof(snr), 1, stdout); if (otype == 3) fwritef(&snrseg, sizeof(snrseg), 1, stdout); return (0); } SPTK-3.9/bin/sopr/0000755001051300105040000000000012637167713010711 500000000000000SPTK-3.9/bin/sopr/Makefile.am0000644001051300105040000000017312442245120012645 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = sopr sopr_SOURCES = sopr.c sopr_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/sopr/Makefile.in0000644001051300105040000004240612637167420012677 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = sopr$(EXEEXT) subdir = bin/sopr ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_sopr_OBJECTS = sopr.$(OBJEXT) sopr_OBJECTS = $(am_sopr_OBJECTS) sopr_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(sopr_SOURCES) DIST_SOURCES = $(sopr_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include sopr_SOURCES = sopr.c sopr_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/sopr/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/sopr/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) sopr$(EXEEXT): $(sopr_OBJECTS) $(sopr_DEPENDENCIES) $(EXTRA_sopr_DEPENDENCIES) @rm -f sopr$(EXEEXT) $(AM_V_CCLD)$(LINK) $(sopr_OBJECTS) $(sopr_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sopr.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/sopr/sopr.c0000644001051300105040000005501412637156645011767 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /******************************************************************************* * * * Execute Scalar Operations * * * * 1990.11 T.Kobayashi * * 1996.5 K.Koishida * * 2000.5 T.Kobayashi * * 2010.6 A.Tamamori * * 2010.12 T.Sawada * * 2013.3 T.Okada * * usage: * * sopr [ options ] [ infile ] > stdout * * options: * * -a a : addition (in + a) * * -s s : subtraction (in - s) * * -m m : multiplication (in * m) * * -d d : division (in / d) * * -p p : power (in ^ p) * * -f f : flooring (in < f -> f) * * -c c : ceiling (in > f -> f) * * -ABS : absolute (abs(in)) * * -INV : inverse (1 / in) * * -P : square (in * in) * * -R : root (sqrt(in)) * * -SQRT : root (sqrt(in)) * * -LN : logarithm natural (log(in)) * * -LOG2 : logarithm to base 2 (log2(in)) * * -LOG10 : logarithm to base 10 (log10(in)) * * -LOGX X : logarithm to base X (logX(in)) * * -EXP : exponential (exp(in)) * * -POW2 : power of 2 (2^(in)) * * -POW10 : power of 10 (10^(in)) * * -POWX X : power of X (X^(in)) * * -FIX : round ((int)in) * * -UNIT : unit step (u(in)) * * -CLIP : clipping (in * u(in) * * -SIN : sin (sin(in)) * * -COS : cos (cos(in)) * * -TAN : tan (tan(in)) * * -ATAN : atan (atan(in)) * * * * -magic magic : remove magic number * * -MAGIC MAGIC : replace magic number by MAGIC * * if -magic option is not given, * * return error * * if -magic or -MAGIC option * * is given multiple times, return error * * -r mn : read from memory register n * * -w mn : write to memory register n * * * * infile: * * data sequences (float) * * stdout: * * data sequences after operations * * * *******************************************************************************/ static char *rcs_id = "$Id: sopr.c,v 1.45 2015/12/14 01:14:22 uratec Exp $"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #include #include #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Command Name */ char *cmnd; /* Default Value */ #define MEMSIZE 10 #define MAGIC FA #define REP FA void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - execute scalar operations\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -a a : addition (in + a)\n"); fprintf(stderr, " -s s : subtraction (in - s)\n"); fprintf(stderr, " -m m : multiplication (in * m)\n"); fprintf(stderr, " -d d : division (in / d)\n"); fprintf(stderr, " -p p : power (in ^ p)\n"); fprintf(stderr, " -f f : flooring (f if in < f)\n"); fprintf(stderr, " -c c : ceiling (c if in > c)\n"); fprintf(stderr, " -magic magic : remove magic number \n"); fprintf(stderr, " -MAGIC MAGIC : replace magic number by MAGIC\n"); fprintf(stderr, " if -magic option is not given,\n"); fprintf(stderr, " return error\n"); fprintf(stderr, " if -magic or -MAGIC option is given multiple times,\n"); fprintf(stderr, " return error\n"); fprintf(stderr, "\n"); fprintf(stderr, " if the argument of the above operation option is `dB', `cent',\n"); fprintf(stderr, " `semitone' or `octave', then the value 20/log_e(10), 1200/log_e(2),\n"); fprintf(stderr, " 12/log_e(2) or 1/log_e(2) is assigned, respectively. Also if `pi' or\n"); fprintf(stderr, " `ln(x)',`exp(x)',`sqrt(x)' such as `ln2',`exp10',`sqrt30' \n"); fprintf(stderr, " is written after the operation option, then its value\n"); fprintf(stderr, " will be used\n"); fprintf(stderr, "\n"); fprintf(stderr, " -ABS : absolute (abs(in))\n"); fprintf(stderr, " -INV : inverse (1 / in)\n"); fprintf(stderr, " -P : square (in * in)\n"); fprintf(stderr, " -R : root (sqrt(in))\n"); fprintf(stderr, " -SQRT : root (sqrt(in))\n"); fprintf(stderr, " -LN : logarithm natural (log(in))\n"); fprintf(stderr, " -LOG2 : logarithm to base 2 (log2(in))\n"); fprintf(stderr, " -LOG10 : logarithm to base 10 (log10(in))\n"); fprintf(stderr, " -LOGX X : logarithm to base X (logX(in))\n"); fprintf(stderr, " -EXP : exponential (exp(in))\n"); fprintf(stderr, " -POW2 : power of 2 (2^(in))\n"); fprintf(stderr, " -POW10 : power of 10 (10^(in))\n"); fprintf(stderr, " -POWX X : power of X (X^(in))\n"); fprintf(stderr, " -FIX : round ((int)in)\n"); fprintf(stderr, " -UNIT : unit step (u(in))\n"); fprintf(stderr, " -CLIP : clipping (in * u(in))\n"); fprintf(stderr, " -SIN : sin (sin(in))\n"); fprintf(stderr, " -COS : cos (cos(in))\n"); fprintf(stderr, " -TAN : tan (tan(in))\n"); fprintf(stderr, " -ATAN : atan (atan(in))\n"); fprintf(stderr, "\n"); fprintf(stderr, " -r mn : read from memory register n\n"); fprintf(stderr, " -w mn : write to memory register n\n"); fprintf(stderr, "\n"); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " data sequence (%s) [stdin]\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " data sequence after operations (%s)\n", FORMAT); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } #define LOG2(x) (log(x)/log(2)) struct operation { char op[4]; double d; Boolean magic; Boolean ifrep; } *optbl; int nopr = 0; int mopr = 0; int ropr = 0; static double mem[MEMSIZE]; int main(int argc, char *argv[]) { int magic_count = 0, rep_count = 0; FILE *fp; char *s, c; char *infile = NULL; int sopr(FILE *); if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; optbl = (struct operation *) calloc(sizeof(struct operation), argc); for (; --argc;) { if (*(s = *++argv) == '-') { c = *++s; if (islower(c) && *++s == '\0') { s = *++argv; if ((s == NULL) && (c != 'h')) { fprintf(stderr, "%s : numerical argument is also needed !\n", cmnd); usage(1); } --argc; } switch (c) { case 'a': case 'c': case 'd': case 'f': case 'p': case 'P': case 'm': case 's': case 'r': case 'w': case 'M': case 'L': if (c == 'P') { if (strncmp("POWX\0", s, 5) == 0) { strncpy(optbl[nopr].op, "POWX", 4); s = *++argv; if (s == NULL) { fprintf(stderr, "%s : numerical argument is also needed !\n", cmnd); usage(1); } --argc; } else { strncpy(optbl[nopr].op, s, 4); } } if (c == 'L') { if (strncmp("LOGX\0", s, 5) == 0) { strncpy(optbl[nopr].op, "LOGX", 4); s = *++argv; if (s == NULL) { fprintf(stderr, "%s : numerical argument is also needed !\n", cmnd); usage(1); } if (atof(s) <= 0) { fprintf(stderr, "%s : base of a logarithm must be positive number !\n", cmnd); usage(1); } --argc; } else { strncpy(optbl[nopr].op, s, 4); } } if ((c == 'm') && strncmp("agic", s, 4) == 0) { if (magic_count > 0) { fprintf(stderr, "%s : Cannot specify -magic option multiple times!\n", cmnd); usage(1); } optbl[nopr].magic = 1 - MAGIC; mopr = nopr; magic_count++; s = *++argv; if (s == NULL) { /* No magic number */ fprintf(stderr, "%s : -magic option need magic number !\n", cmnd); usage(1); } --argc; } if (c == 'M') { if (rep_count > 0) { fprintf(stderr, "%s : Cannot specify -MAGIC option multiple times!\n", cmnd); usage(1); } if (!optbl[mopr].magic) { fprintf(stderr, "%s : Cannot find -magic option befor -MAGIC option!\n", cmnd); usage(1); } else { optbl[nopr].magic = 1 - MAGIC; optbl[nopr].ifrep = 1 - REP; rep_count++; s = *++argv; if (s == NULL) { /* No magic number */ fprintf(stderr, "%s : -MAGIC option need magic number !\n", cmnd); usage(1); } --argc; } } if (strncmp("dB", s, 2) == 0) optbl[nopr].d = 20 / log(10.0); else if (strncmp("cent", s, 4) == 0) optbl[nopr].d = 1200 / log(2.0); else if (strncmp("octave", s, 6) == 0) optbl[nopr].d = 1.0 / log(2.0); else if (strncmp("semitone", s, 8) == 0) optbl[nopr].d = 12.0 / log(2.0); else if (strncmp("pi", s, 2) == 0) optbl[nopr].d = PI; else if (strncmp("ln", s, 2) == 0) optbl[nopr].d = log(atof(s + 2)); else if (strncmp("exp", s, 3) == 0) optbl[nopr].d = exp(atof(s + 3)); else if (strncmp("sqrt", s, 4) == 0) optbl[nopr].d = sqrt(atof(s + 4)); else if (*s == 'm') { s = *(argv + 1); if (s == NULL) { fprintf(stderr, "%s : next operation must be specified !\n", cmnd); usage(1); } optbl[nopr].d = atoi(s + 1); if (c == 'a') c = '+'; else if (c == 'd') c = '/'; else if (c == 'm') c = '*'; else if (c == 's') c = '-'; else if (c == 'p') c = '^'; } else { if (isdigit(*s) == 0 && strncmp(optbl[nopr].op, s, 4) != 0) { /* Check the value is correct */ if ((*s) != '+' && (*s) != '-') { fprintf(stderr, "%s : %s option need numerical number !\n", cmnd, *(argv - 1)); usage(1); } else if (isdigit(*(s + 1)) == 0) { fprintf(stderr, "%s : %s option need numerical number !\n", cmnd, *(argv - 1)); usage(1); } } optbl[nopr].d = atof(s); } case 'A': case 'C': case 'E': case 'F': case 'I': case 'R': case 'S': case 'T': case 'U': if ((c == 'A') || (c == 'C') || (c == 'S')) strncpy(optbl[nopr].op, s, 4); else optbl[nopr].op[0] = c; ++nopr; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, c); usage(1); } } else infile = s; } if (infile) { fp = getfp(infile, "rb"); sopr(fp); infile = NULL; } else sopr(stdin); return (0); } int sopr(FILE * fp) { double x, y; int k, i; Boolean skipflg = FA; while (freadf(&x, sizeof(x), 1, fp) == 1) { for (k = 0; k < MEMSIZE; ++k) mem[k] = 0; for (k = 0; k < nopr; ++k) { y = optbl[k].d; if (optbl[k].magic) { /* -magic or -MAGIC */ if (optbl[k].ifrep) { /* -MAGIC */ if (x == optbl[mopr].d) { /* still remains magic number */ x = y; /* substitute by new magic number */ skipflg = FA; } } else if (x == y) { /* -magic */ skipflg = TR; } } else if (skipflg == FA) { switch (optbl[k].op[0]) { case 'r': x = mem[(int) y]; break; case 'w': mem[(int) y] = x; break; case '+': x += mem[(int) y]; break; case '-': x -= mem[(int) y]; break; case '*': x *= mem[(int) y]; break; case '/': x /= mem[(int) y]; break; case '^': x = pow(x, mem[(int) y]); break; case 'a': x += y; break; case 's': x -= y; break; case 'm': x *= y; break; case 'd': x /= y; break; case 'p': x = pow(x, y); break; case 'f': x = (x < y) ? y : x; break; case 'c': x = (x > y) ? y : x; break; case 'A': if (optbl[k].op[1] == 'T') x = atan(x); else if (x < 0) x = -x; break; case 'C': if (optbl[k].op[1] == 'L') { if (x < 0) x = 0; } else x = cos(x); break; case 'I': x = 1 / x; break; case 'P': if (optbl[k].op[1] == 'O' && optbl[k].op[3] == '1') x = pow(10.0, x); else if (optbl[k].op[1] == 'O' && optbl[k].op[3] == '2') x = pow(2.0, x); else if (optbl[k].op[1] == 'O' && optbl[k].op[3] == 'X') x = pow(y, x); else x *= x; break; case 'R': x = sqrt(x); break; case 'S': if (optbl[k].op[1] == 'Q') x = sqrt(x); else x = sin(x); break; case 'E': x = exp(x); break; case 'L': if (x <= 0) fprintf(stderr, "WARNING: LOG of zero or negative value !\n"); if (optbl[k].op[3] == 'X') x = log(x) / log(y); else if (optbl[k].op[3] == '1') x = log10(x); else if (optbl[k].op[3] == '2') x = LOG2(x); else x = log(x); break; case 'F': if (x < 0) i = x - 0.5; else i = x + 0.5; x = i; break; case 'T': x = tan(x); break; case 'U': if (x < 0) x = 0; else x = 1; case 'M': default: break; } } } if (skipflg == FA) fwritef(&x, sizeof(x), 1, stdout); skipflg = FA; } return (0); } SPTK-3.9/bin/spec/0000755001051300105040000000000012637167713010660 500000000000000SPTK-3.9/bin/spec/Makefile.am0000644001051300105040000000017312442245123012617 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = spec spec_SOURCES = spec.c spec_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/spec/Makefile.in0000644001051300105040000004240612637167420012646 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = spec$(EXEEXT) subdir = bin/spec ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_spec_OBJECTS = spec.$(OBJEXT) spec_OBJECTS = $(am_spec_OBJECTS) spec_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(spec_SOURCES) DIST_SOURCES = $(spec_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include spec_SOURCES = spec.c spec_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/spec/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/spec/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) spec$(EXEEXT): $(spec_OBJECTS) $(spec_DEPENDENCIES) $(EXTRA_spec_DEPENDENCIES) @rm -f spec$(EXEEXT) $(AM_V_CCLD)$(LINK) $(spec_OBJECTS) $(spec_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spec.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/spec/spec.c0000644001051300105040000002747012637156645011712 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * Transform Real Sequence to Spectrum * * * * 1985.11 K.Tokuda * * 1996. 5 K.Koishida * * 2010. 5 A.Tamamori * * * * usage: * * spec [options] [infile] > stdout * * options: * * -l l : frame length [256] * * -m m : order of MA part [0] * * -n n : order of AR part [0] * * -z z : MA coefficients filename [NULL] * * -p p : AR coefficients filename [NULL] * * -e e : small value for calculating log() [0] * * -E E : floor in db calculated per frame [N/A] * * -o o : output format [0] * * 0 (20 * log|H(z)|) * * 1 (ln|H(z)|) * * 2 (|H(z)|) * * 3 (|H(z)|^2) * * infile: * * real sequence * * , c(0), c(1), ..., c(l-1), * * stdout: * * spectrum * * , s(0), s(1), ..., s(L/2), * * notice: * * value of e must be e>=0 * * value of E must be E<0 * * * ************************************************************************/ static char *rcs_id = "$Id: spec.c,v 1.32 2015/12/14 01:14:22 uratec Exp $"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #include #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define LENG 256 #define ORDERMA 0 #define ORDERAR 0 #define ETYPE 0 #define EPS 0.0 #define OTYPE 0 /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - transform real sequence to spectrum\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -l l : frame length [%d]\n", LENG); fprintf(stderr, " -m m : order of MA part [%d]\n", ORDERMA); fprintf(stderr, " -n n : order of AR part [%d]\n", ORDERAR); fprintf(stderr, " -z z : MA coefficients filename [NULL]\n"); fprintf(stderr, " -p p : AR coefficients filename [NULL]\n"); fprintf(stderr, " -e e : small value for calculating log() [%g]\n", EPS); fprintf(stderr, " -E E : floor in db calculated per frame [N/A]\n"); fprintf(stderr, " -o o : output format [%d]\n", OTYPE); fprintf(stderr, " 0 (20 * log|H(z)|)\n"); fprintf(stderr, " 1 (ln|H(z)|)\n"); fprintf(stderr, " 2 (|H(z)|)\n"); fprintf(stderr, " 3 (|H(z)|^2)\n"); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " real sequences (%s) [stdin]\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " spectrum (%s)\n", FORMAT); fprintf(stderr, " notice:\n"); fprintf(stderr, " value of e must be e>=0\n"); fprintf(stderr, " value of E must be E<0\n"); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char **argv) { int leng = LENG, otype = OTYPE, etype = ETYPE, orderma = ORDERMA, orderar = ORDERAR, no, i; char *filema = "", *filear = ""; FILE *fp = stdin, *fpma = NULL, *fpar = NULL; double eps = EPS, eps2 = 1, k, *x, *y, *mag; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) if (**++argv == '-') { switch (*(*argv + 1)) { case 'l': leng = atoi(*++argv); --argc; break; case 'm': orderma = atoi(*++argv); --argc; break; case 'n': orderar = atoi(*++argv); --argc; break; case 'z': filema = *++argv; --argc; break; case 'p': filear = *++argv; --argc; break; case 'e': etype = 1; eps = atof(*++argv); --argc; break; case 'E': etype = 2; eps2 = atof(*++argv); --argc; break; case 'o': otype = atoi(*++argv); --argc; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else fp = getfp(*argv, "rb"); if (etype == 1 && eps < 0.0) { fprintf(stderr, "%s : value of e must be e >= 0!\n", cmnd); usage(1); } if (etype == 2 && eps2 >= 0.0) { fprintf(stderr, "%s : value of E must be E < 0!\n", cmnd); usage(1); } no = leng / 2 + 1; x = dgetmem(leng + leng + no); y = x + leng; mag = y + leng; if ((*filema == '\0') && (*filear == '\0')) { if (orderar > 0) fpar = fp; else fpma = fp; if (orderma <= 0) orderma = leng - 1; } if (*filema != '\0') fpma = getfp(filema, "rb"); if (*filear != '\0') fpar = getfp(filear, "rb"); for (;;) { if ((fpma == NULL) && (fpar != NULL)) for (i = 0; i < no; i++) mag[i] = 1.0; else { fillz(x, sizeof(*x), leng); if (freadf(x, sizeof(*x), orderma + 1, fpma) == 0) return (0); fftr(x, y, leng); for (i = 0; i < no; i++) mag[i] = x[i] * x[i] + y[i] * y[i]; } if (fpar != NULL) { fillz(x, sizeof(*x), leng); if (freadf(x, sizeof(*x), orderar + 1, fpar) == 0) return (0); k = x[0] * x[0]; x[0] = 1.0; fftr(x, y, leng); for (i = 0; i < no; i++) mag[i] *= k / (x[i] * x[i] + y[i] * y[i]); } if (otype == 0 || otype == 1) { double max, min; if (etype == 1 && eps >= 0.0) { for (i = 0; i < no; i++) { mag[i] = mag[i] + eps; } } else if (etype == 2 && eps2 < 0) { max = mag[0]; for (i = 1; i < no; i++) { if (max < mag[i]) max = mag[i]; } max = sqrt(max); min = max * pow(10.0, eps2 / 20.0); /* floor is 20*log10(min/max) */ min = min * min; for (i = 0; i < no; i++) { if (mag[i] < min) mag[i] = min; } } } switch (otype) { case 1: for (i = 0; i < no; i++) x[i] = 0.5 * log(mag[i]); fwritef(x, sizeof(*x), no, stdout); break; case 2: for (i = 0; i < no; i++) x[i] = sqrt(mag[i]); fwritef(x, sizeof(*x), no, stdout); break; case 3: for (i = 0; i < no; i++) x[i] = mag[i]; fwritef(x, sizeof(*x), no, stdout); break; default: for (i = 0; i < no; i++) x[i] = 10 * log10(mag[i]); fwritef(x, sizeof(*x), no, stdout); break; } } return (0); } SPTK-3.9/bin/step/0000755001051300105040000000000012637167713010701 500000000000000SPTK-3.9/bin/step/Makefile.am0000644001051300105040000000017312442245123012640 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = step step_SOURCES = step.c step_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/step/Makefile.in0000644001051300105040000004240612637167421012670 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = step$(EXEEXT) subdir = bin/step ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_step_OBJECTS = step.$(OBJEXT) step_OBJECTS = $(am_step_OBJECTS) step_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(step_SOURCES) DIST_SOURCES = $(step_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include step_SOURCES = step.c step_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/step/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/step/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) step$(EXEEXT): $(step_OBJECTS) $(step_DEPENDENCIES) $(EXTRA_step_DEPENDENCIES) @rm -f step$(EXEEXT) $(AM_V_CCLD)$(LINK) $(step_OBJECTS) $(step_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/step.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/step/step.c0000644001051300105040000001520612637156645011746 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * Generate Step Sequence * * * * 1989.7 K.Tokuda * * 1996.4 K.Koishida * * * * usage: * * step [options] > stdout * * options: * * -l l : length [256] * * -n n : order [255] * * -v v : step value [1] * * stdout: * * impulse sequence * * , v, v, v, ... * * notice: * * if l<0, generate infinite sequence * * * ************************************************************************/ static char *rcs_id = "$Id: step.c,v 1.25 2015/12/14 01:14:23 uratec Exp $"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define LENG 256 #define VALUE 1.0 /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - generate step sequence \n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -l l : length [%d]\n", LENG); fprintf(stderr, " -n n : order [%d]\n", LENG - 1); fprintf(stderr, " -v v : step value [%g]\n", VALUE); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " stdout:\n"); fprintf(stderr, " step sequence (%s)\n", FORMAT); fprintf(stderr, " notice:\n"); fprintf(stderr, " if l<0, generate infinite sequence\n"); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char **argv) { int l = LENG, i; double x = VALUE; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) if (**++argv == '-') { switch (*(*argv + 1)) { case 'l': l = atoi(*++argv); --argc; break; case 'n': l = atoi(*++argv) + 1; --argc; break; case 'v': x = atof(*++argv); --argc; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } for (i = 0;; i++) { fwritef(&x, sizeof(x), 1, stdout); if (i == l - 1) break; } return (0); } SPTK-3.9/bin/swab/0000755001051300105040000000000012637167713010662 500000000000000SPTK-3.9/bin/swab/Makefile.am0000644001051300105040000000017312442245124012622 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = swab swab_SOURCES = swab.c swab_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/swab/Makefile.in0000644001051300105040000004240612637167421012651 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = swab$(EXEEXT) subdir = bin/swab ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_swab_OBJECTS = swab.$(OBJEXT) swab_OBJECTS = $(am_swab_OBJECTS) swab_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(swab_SOURCES) DIST_SOURCES = $(swab_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include swab_SOURCES = swab.c swab_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/swab/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/swab/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) swab$(EXEEXT): $(swab_OBJECTS) $(swab_DEPENDENCIES) $(EXTRA_swab_DEPENDENCIES) @rm -f swab$(EXEEXT) $(AM_V_CCLD)$(LINK) $(swab_OBJECTS) $(swab_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/swab.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/swab/swab.c0000644001051300105040000002563512637156645011717 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * Swap Bytes * * * * 1996 T.Kobayashi * * 1997.3 G.Hirabayashi * * 2010.3 A.Tamamori * * * * usage: * * swab [ options ] [ infile ] > stdout * * options: * * -S S : start address [0] * * -s s : start offset number [0] * * -E E : end address [EOF] * * -e e : end offset number [0] * * +type : input and output data type [s] * * c (char) C (unsigned char) * * s (short) S (unsigned short) * * i (int) I (unsigned int) * * i3 (int, 3byte) I3 (unsigned int, 3byte) * * l (long) L (unsigned long) * * le (long long) LE (unsigned long long) * * f (float) d (double) * * de (long double) * * infile: * * data sequence [stdin] * * stdout: * * swapped data sequence * * * ************************************************************************/ static char *rcs_id = "$Id: swab.c,v 1.31 2015/12/14 01:14:23 uratec Exp $"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Command Name */ char *cmnd; /* Default Values */ #define START 0 #define SNO 0 #define END 0x7fffffff #define ENO 0x7fffffff #define BUFSIZE 12 #define SIGNED_INT3 FA #define UNSIGNED_INT3 FA void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - Swap Bytes\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -S S : start address [%d]\n", START); fprintf(stderr, " -s s : start offset number [%d]\n", SNO); fprintf(stderr, " -E E : end address [EOF]\n"); fprintf(stderr, " -e e : end offset number [0]\n"); fprintf(stderr, " +type : input and output data format [s]\n"); fprintf(stderr, " s (short, %lubyte) S (unsigned short, %lubyte)\n", (unsigned long) sizeof(short), (unsigned long) sizeof(unsigned short)); fprintf(stderr, " i3 (int, 3byte) I3 (unsigned int, 3byte)\n"); fprintf(stderr, " i (int, %lubyte) I (unsigned int, %lubyte)\n", (unsigned long) sizeof(int), (unsigned long) sizeof(unsigned int)); fprintf(stderr, " l (long, %lubyte) L (unsigned long, %lubyte)\n", (unsigned long) sizeof(long), (unsigned long) sizeof(unsigned long)); fprintf(stderr, " le (long long, %lubyte) LE (unsigned long long, %lubyte)\n", (unsigned long) sizeof(long long), (unsigned long) sizeof(unsigned long long)); fprintf(stderr, " f (float, %lubyte) d (double, %lubyte)\n", (unsigned long) sizeof(float), (unsigned long) sizeof(double)); fprintf(stderr, " de (long double, %lubyte)\n", (unsigned long) sizeof(long double)); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " data sequence [stdin]\n"); fprintf(stderr, " stdout:\n"); fprintf(stderr, " swapped data sequence\n"); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } static long start = START, _end = END, sno = SNO, eno = ENO; int main(int argc, char *argv[]) { FILE *fp = stdin; char *s; int c; size_t iosize = sizeof(short); void conv(FILE * fp, size_t iosize); if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) if (*(s = *++argv) == '-') { c = *++s; switch (c) { case 'S': start = atol(*++argv); --argc; break; case 's': sno = atol(*++argv); --argc; break; case 'E': _end = atol(*++argv); --argc; break; case 'e': eno = atol(*++argv); --argc; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else if (*s == '+') { c = *++s; switch (c) { case 's': iosize = sizeof(short); break; case 'i': if (*(s + 1) == '3') iosize = 3; else iosize = sizeof(int); break; case 'l': if (*(s + 1) == 'e') iosize = sizeof(long long); else iosize = sizeof(long); break; case 'S': iosize = sizeof(unsigned short); break; case 'I': if (*(s + 1) == '3') iosize = 3; else iosize = sizeof(unsigned int); break; case 'L': if (*(s + 1) == 'E') iosize = sizeof(unsigned long long); else iosize = sizeof(unsigned long); break; case 'f': iosize = sizeof(float); break; case 'd': if (*(s + 1) == 'e') iosize = sizeof(long double); else iosize = sizeof(double); break; default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else fp = getfp(*argv, "rb"); conv(fp, iosize); return (0); } void conv(FILE * fp, size_t iosize) { long adrs, n; int i; char ibuf[BUFSIZE], obuf[BUFSIZE]; int ffseek(FILE * fp, long off); if (ffseek(fp, adrs = start + iosize * sno)) return; for (n = sno; (adrs <= _end) && (n <= eno); adrs += iosize, ++n) { freadx(ibuf, iosize, 1, fp); if (feof(fp)) break; for (i = 0; i < (int) iosize; ++i) obuf[i] = ibuf[iosize - 1 - i]; fwritex(obuf, iosize, 1, stdout); } return; } int ffseek(FILE * fp, long off) { int n; if (fp != stdin) fseek(fp, off, 0); else { for (n = off; n; --n) if (getc(fp) == EOF) return (1); } return (0); } SPTK-3.9/bin/symmetrize/0000755001051300105040000000000012637167714012137 500000000000000SPTK-3.9/bin/symmetrize/Makefile.am0000644001051300105040000000022312442245150014071 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = symmetrize symmetrize_SOURCES = symmetrize.c symmetrize_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/symmetrize/Makefile.in0000644001051300105040000004261212637167421014124 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = symmetrize$(EXEEXT) subdir = bin/symmetrize ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_symmetrize_OBJECTS = symmetrize.$(OBJEXT) symmetrize_OBJECTS = $(am_symmetrize_OBJECTS) symmetrize_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(symmetrize_SOURCES) DIST_SOURCES = $(symmetrize_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include symmetrize_SOURCES = symmetrize.c symmetrize_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/symmetrize/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/symmetrize/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) symmetrize$(EXEEXT): $(symmetrize_OBJECTS) $(symmetrize_DEPENDENCIES) $(EXTRA_symmetrize_DEPENDENCIES) @rm -f symmetrize$(EXEEXT) $(AM_V_CCLD)$(LINK) $(symmetrize_OBJECTS) $(symmetrize_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/symmetrize.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/symmetrize/symmetrize.c0000644001051300105040000002155512637156647014446 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************************* * * * Symmetrize the sequence of data * * * * 2012.8 T.Okada * * * * usage: * * symmetrize [ options ] [ infile ] > stdout * * options: * * -l L : frame length [256] * * -o o : output format [0] * * infile: * * x(0), x(1), ..., x(L/2-1) * * stdout: * * x(0), x(1), ..., x(L/2-1), x(L/2-2), ..., x(2), x(1) (if o==0) * * x(L/2-1), x(L/2-2), ..., x(1), x(0), x(1), ..., x(L/2-1) (if o==1) * * x(L/2-1)/2, x(L/2-2), ..., x(1), x(0), x(1), ..., x(L/2-1)/2 (if o==2) * * notice: * * value of L must be even number * * value of L must be L>=4 * * value of L must be L>=6 (if o==0) * * * **************************************************************************************/ static char *rcs_id = "$Id: symmetrize.c,v 1.10 2015/12/14 01:14:23 uratec Exp $"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define OTYPE 0 #define FLENG 256 /* Command Name */ char *cmnd; void usage(void) { fprintf(stderr, "\n"); fprintf(stderr, " %s - symmetrize the sequence of data\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -l L : frame length [%d]\n", FLENG); fprintf(stderr, " -o o : output format [%d]\n", OTYPE); fprintf(stderr, " 0 x(0), x(1), ..., x(L/2-1), x(L/2-2), ..., x(2), x(1)\n"); fprintf(stderr, " 1 x(L/2-1), x(L/2-2), ..., x(1), x(0), x(1), ..., x(L/2-1)\n"); fprintf(stderr, " 2 x(L/2-1)/2, x(L/2-2), ..., x(1), x(0), x(1), ..., x(L/2-1)/2\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " data sequence (%s) [stdin]\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " symmetrized data sequence (%s)\n", FORMAT); fprintf(stderr, " notice:\n"); fprintf(stderr, " value of L must be even number\n"); fprintf(stderr, " value of L must be L>=4\n"); fprintf(stderr, " value of L must be L>=6 (if o==0)\n"); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(1); } int main(int argc, char *argv[]) { int i, o = OTYPE, L = FLENG; char *s, c; FILE *fp = stdin; double *buf, tmp; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) { if (*(s = *++argv) == '-') { c = *++s; if (*++s == '\0') { s = *++argv; --argc; } switch (c) { case 'l': L = atoi(s); break; case 'o': o = atoi(s); break; case 'h': usage(); default: usage(); } } else fp = getfp(*argv, "rb"); } if (L % 2 != 0) { fprintf(stderr, "%s : value of L must be even number!\n", cmnd); usage(); } L /= 2; buf = dgetmem(L); if ((o != 0) && (o != 1) && (o != 2)) { fprintf(stderr, "%s : invalid output type %d\n", cmnd, o); usage(); } if (L <= 1) { fprintf(stderr, "%s : value of L must be L>=4!\n", cmnd); usage(); } while (freadf(buf, sizeof(*buf), L, fp) == L) { if (o == 0) { if (L <= 2) { fprintf(stderr, "%s : value of L must be L>=6! (if o==0)\n", cmnd); usage(); } for (i = 0; i < L; i++) { fwritef(&buf[i], sizeof(*buf), 1, stdout); } for (i = L - 2; i > 0; i--) { fwritef(&buf[i], sizeof(*buf), 1, stdout); } } else if (o == 1) { for (i = L - 1; i > 0; i--) { fwritef(&buf[i], sizeof(*buf), 1, stdout); } for (i = 0; i < L; i++) { fwritef(&buf[i], sizeof(*buf), 1, stdout); } } else if (o == 2) { tmp = buf[L - 1] / 2; fwritef(&tmp, sizeof(*buf), 1, stdout); for (i = L - 2; i > 0; i--) { fwritef(&buf[i], sizeof(*buf), 1, stdout); } for (i = 0; i < L - 1; i++) { fwritef(&buf[i], sizeof(*buf), 1, stdout); } fwritef(&tmp, sizeof(tmp), 1, stdout); } } free(buf); fclose(fp); return (0); } SPTK-3.9/bin/train/0000755001051300105040000000000012637167714011044 500000000000000SPTK-3.9/bin/train/Makefile.am0000644001051300105040000000017712442245125013010 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = train train_SOURCES = train.c train_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/train/Makefile.in0000644001051300105040000004243412637167421013033 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = train$(EXEEXT) subdir = bin/train ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_train_OBJECTS = train.$(OBJEXT) train_OBJECTS = $(am_train_OBJECTS) train_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(train_SOURCES) DIST_SOURCES = $(train_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include train_SOURCES = train.c train_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/train/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/train/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) train$(EXEEXT): $(train_OBJECTS) $(train_DEPENDENCIES) $(EXTRA_train_DEPENDENCIES) @rm -f train$(EXEEXT) $(AM_V_CCLD)$(LINK) $(train_OBJECTS) $(train_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/train.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/train/train.c0000644001051300105040000001674012637156645012256 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * Generate Pulse Sequence * * * * 1989.6 K.Tokuda * * 1996.4 K.Koishida * * 2010.4 T.Sawada * * * * usage: * * train [options] > stdout * * options: * * -l l : sequence length [256] * * -p p : frame period [0.0] * * -n n : type of normalization [1] * * 0 none * * 1 normalize by power * * 2 normalize by magnitude * * stdout: * * p >= 1.0 pulse sequence with pitch p * * p = 0.0 M-sequence * * * ************************************************************************/ static char *rcs_id = "$Id: train.c,v 1.26 2015/12/14 01:14:23 uratec Exp $"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #include #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define LENG 256 #define PERIOD 0.0 #define NORMAL 1 /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - generate pulse sequence\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -l l : sequence length [%d]\n", LENG); fprintf(stderr, " -p p : frame period [%.1lf]\n", PERIOD); fprintf(stderr, " -n n : type of normalization [%d]\n", NORMAL); fprintf(stderr, " 0 none\n"); fprintf(stderr, " 1 normalize by power\n"); fprintf(stderr, " 2 normalize by magnitude\n"); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " stdout:\n"); fprintf(stderr, " pulse sequence (%s)\n", FORMAT); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char **argv) { int l = LENG, normal = NORMAL; double zero, pulse, period = PERIOD, i; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) if (**++argv == '-') { switch (*(*argv + 1)) { case 'l': l = atoi(*++argv); --argc; break; case 'p': period = atof(*++argv); --argc; break; case 'n': normal = atoi(*++argv); --argc; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } switch (normal) { case 0: pulse = 1; break; case 1: pulse = sqrt(period); break; case 2: pulse = period; break; } zero = 0.0; i = 0.5; if (period >= 1.0) while (l--) if (--i >= 0.0) fwritef(&zero, sizeof(zero), 1, stdout); else { i += period; fwritef(&pulse, sizeof(pulse), 1, stdout); } else if (period != 0.0) { fprintf(stderr, "-p : frame period must be 0.0 or more than 1.0!\n"); usage(1); } else while (l--) { pulse = mseq(); fwritef(&pulse, sizeof(pulse), 1, stdout); } return (0); } SPTK-3.9/bin/transpose/0000755001051300105040000000000012637167714011745 500000000000000SPTK-3.9/bin/transpose/Makefile.am0000644001051300105040000000023412442245125013703 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = transpose transpose_SOURCES = _transpose.c transpose.c transpose_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/transpose/Makefile.in0000644001051300105040000004274012637167421013734 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = transpose$(EXEEXT) subdir = bin/transpose ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_transpose_OBJECTS = _transpose.$(OBJEXT) transpose.$(OBJEXT) transpose_OBJECTS = $(am_transpose_OBJECTS) transpose_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(transpose_SOURCES) DIST_SOURCES = $(transpose_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include transpose_SOURCES = _transpose.c transpose.c transpose_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/transpose/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/transpose/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) transpose$(EXEEXT): $(transpose_OBJECTS) $(transpose_DEPENDENCIES) $(EXTRA_transpose_DEPENDENCIES) @rm -f transpose$(EXEEXT) $(AM_V_CCLD)$(LINK) $(transpose_OBJECTS) $(transpose_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_transpose.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/transpose.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/transpose/_transpose.c0000644001051300105040000000727712637156645014224 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ $Id: _transpose.c,v 1.7 2015/12/14 01:14:23 uratec Exp $ Transpose a matrix transpose(float* buf, int m, int n) float* buf : data seqence (Overwrite) int m : number of rows int n : number of columns ************************************************************************/ #include #if defined(WIN32) #include "SPTK.h" #else #include #endif void transpose(double *buf, const int m, const int n) { int i, j; for (i = 0; i < n; i++) { for (j = 0; j < m; j++) { fwritef(&buf[i + j * n], *buf, 1, stdout); } } } SPTK-3.9/bin/transpose/transpose.c0000644001051300105040000001757612637156645014070 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * Transpose a matrix * * * * 2012.8 T.Okada * * * * usage: * * transpose [ options ] [ infile ] > stdout * * options: * * -m m : number of rows [N/A] * * -n n : number of columns [N/A] * * infile: * * x(0,0) , x(0,1) , ..., x(0,n-1) , * * x(1,0) , x(1,1) , ..., x(1,n-1) , * * . * * . * * . * * x(m-1,0), x(m-1,1), ..., x(m-1,n-1) * * stdout: * * x(0,0) , x(1,0) , ..., x(m-1,0) , * * x(0,1) , x(1,1) , ..., x(m-1,1) , * * . * * . * * . * * x(0,n-1), x(1,n-1), ..., x(m-1,n-1) * * * ************************************************************************/ static char *rcs_id = "$Id: transpose.c,v 1.8 2015/12/14 01:14:23 uratec Exp $"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Command Name */ char *cmnd; typedef struct _float_list { float *f; struct _float_list *next; } float_list; void usage(void) { fprintf(stderr, "\n"); fprintf(stderr, " %s - transpose a matrix\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -m m : number of rows [N/A]\n"); fprintf(stderr, " -n n : number of columns [N/A]\n"); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " data sequence (%s) [stdin]\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " transposed data sequence (%s)\n", FORMAT); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(1); } int main(int argc, char *argv[]) { int i = 0, m = 0, n = 0, elnum = 0, count = 0; char *s, c; double *buf, *dat; FILE *fp = stdin; void transpose(double *, int, int); float_list *top = NULL, *prev = NULL, *cur = NULL; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) { if (*(s = *++argv) == '-') { c = *++s; if (*++s == '\0') { s = *++argv; --argc; } switch (c) { case 'm': m = atoi(s); break; case 'n': n = atoi(s); break; case 'h': usage(); default: usage(); } } else fp = getfp(*argv, "rb"); } if (m == 0 || n == 0) { fprintf(stderr, "%s : the number of rows or columns is not defined!!\n", cmnd); usage(); } elnum = m * n; top = prev = (float_list *) getmem(1, sizeof(float_list)); prev->next = NULL; dat = dgetmem(1); count = 0; while (freadf(dat, sizeof(*dat), 1, fp) == 1) { cur = (float_list *) getmem(1, sizeof(float_list)); cur->f = fgetmem(1); cur->f[0] = (float) dat[0]; count++; prev->next = cur; cur->next = NULL; prev = cur; } if (count < elnum) { fprintf(stderr, "%s : input data is smaller than defined!!\n", cmnd); usage(); } buf = dgetmem(count); for (i = 0, cur = top->next; i < count; i++, cur = cur->next) { buf[i] = (double) cur->f[0]; } transpose(buf, m, n); return (0); } SPTK-3.9/bin/uels/0000755001051300105040000000000012637167714010677 500000000000000SPTK-3.9/bin/uels/Makefile.am0000644001051300105040000000020312442245126012632 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = uels uels_SOURCES = _uels.c uels.c uels_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/uels/Makefile.in0000644001051300105040000004254312637167421012667 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = uels$(EXEEXT) subdir = bin/uels ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_uels_OBJECTS = _uels.$(OBJEXT) uels.$(OBJEXT) uels_OBJECTS = $(am_uels_OBJECTS) uels_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(uels_SOURCES) DIST_SOURCES = $(uels_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include uels_SOURCES = _uels.c uels.c uels_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/uels/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/uels/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) uels$(EXEEXT): $(uels_OBJECTS) $(uels_DEPENDENCIES) $(EXTRA_uels_DEPENDENCIES) @rm -f uels$(EXEEXT) $(AM_V_CCLD)$(LINK) $(uels_OBJECTS) $(uels_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_uels.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uels.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/uels/_uels.c0000644001051300105040000002223112637156646012074 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /**************************************************************** $Id: _uels.c,v 1.29 2015/12/14 01:14:23 uratec Exp $ Unbiased Estimation of Log Spectrum int uels(xw, flng, c, m, itr1, itr2, dd, etype, e, itype); double *xw : input sequence int flng : frame length double *c : cepstrum int m : order of cepstrum int itr1 : minimum number of iteration int itr2 : maximum number of iteration double dd : end condition int etype : 0 -> e is not used 1 -> e is initial value for log-periodogram 2 -> e is floor periodogram in db double e : initial value for log-periodogram or floor periodogram in db int itype : input data type return value : 0 -> completed by end condition -1-> completed by maximum iteration *****************************************************************/ #include #include #include #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Fast Algorithm for Linear Prediction with Linear Phase */ static void lplp(double *r, double *c, const int m) { int k, n; double pn, alpha, beta, gamma, tz = r[0] / 2, rtz = 1 / tz, to = r[1], rttz = 0, tto = 1; static double *p = NULL, *pp; static int size; if (p == NULL) { p = dgetmem(m + m + 4); pp = p + m + 2; size = m; } if (m > size) { free(p); p = dgetmem(m + m + 2); pp = p + m + 1; size = m; } c[0] = 1.0 / r[0]; p[0] = 1.0; p[1] = 0.0; pp[0] = 0.0; for (k = 1; k <= m; k++) { p[k + 1] = 0.0; pp[k] = 0.0; beta = -tz * rttz; alpha = tto * rttz; alpha -= (tto = to) * (rttz = rtz); pn = p[1] + p[1] + alpha * p[0] + beta * pp[0]; pp[0] = p[0]; p[0] = pn; for (n = 1; n <= k; n++) { pn = p[n + 1] + pp[n - 1] + alpha * p[n] + beta * pp[n]; pp[n] = p[n]; p[n] = pn; } for (n = 1, tz = p[0] * r[k]; n <= k; n++) tz += p[n] * (r[k - n] + r[k + n]); for (n = 1, to = p[0] * r[1 + k]; n <= k; n++) to += p[n] * (r[1 + k - n] + r[1 + k + n]); gamma = 0.5 * p[0] * (rtz = 1 / tz); for (n = 0; n < k; n++) c[n] = c[n] + gamma * p[n]; c[k] = gamma * p[k]; } for (c[0] = 1.0 / c[0], n = 1; n <= m; n++) c[n] *= c[0]; return; } int uels(double *xw, const int flng, double *c, const int m, const int itr1, const int itr2, const double dd, const int etype, const double e, const int itype) { int i, j, flag = 0; double k, eps = 0.0, min, max; static double *x = NULL, *r, *cr, *y, *a; static int size_x, size_a; if (etype == 1 && e < 0.0) { fprintf(stderr, "uels : value of e must be e>=0!\n"); exit(1); } if (etype == 2 && e >= 0.0) { fprintf(stderr, "uels : value of E must be E<0!\n"); exit(1); } if (etype == 1) { eps = e; } if (x == NULL) { x = dgetmem(4 * flng); a = dgetmem(m + 1); r = x + flng; cr = r + flng; y = cr + flng; size_x = flng; size_a = m; } if (flng > size_x) { free(x); x = dgetmem(4 * flng); r = x + flng; cr = r + flng; y = cr + flng; size_x = flng; } if (m > size_a) { free(a); a = dgetmem(m + 1); size_a = m; } movem(xw, x, sizeof(*xw), flng); switch (itype) { case 0: /* windowed data sequence */ fftr(x, y, flng); for (i = 0; i < flng; i++) { x[i] = x[i] * x[i] + y[i] * y[i] + eps; /* periodogram */ } break; case 1: /* dB */ for (i = 0; i <= flng / 2; i++) { x[i] = exp((x[i] / 20.0) * log(10.0)); /* dB -> amplitude spectrum */ x[i] = x[i] * x[i] + eps; /* amplitude -> periodogram */ } break; case 2: /* log */ for (i = 0; i <= flng / 2; i++) { x[i] = exp(x[i]); /* log -> amplitude spectrum */ x[i] = x[i] * x[i] + eps; /* amplitude -> periodogram */ } break; case 3: /* amplitude */ for (i = 0; i <= flng / 2; i++) { x[i] = x[i] * x[i] + eps; /* amplitude -> periodogram */ } break; case 4: /* periodogram */ for (i = 0; i <= flng / 2; i++) { x[i] = x[i] + eps; } break; default: fprintf(stderr, "uels : Input type %d is not supported!\n", itype); exit(1); } if (itype > 0) { for (i = 1; i < flng / 2; i++) x[flng - i] = x[i]; } if (etype == 2 && e < 0.0) { max = x[0]; for (i = 1; i < flng; i++) { if (max < x[i]) max = x[i]; } max = sqrt(max); min = max * pow(10.0, e / 20.0); /* floor is 20*log10(min/max) */ min = min * min; for (i = 0; i < flng; i++) { if (x[i] < min) x[i] = min; } } for (i = 0; i < flng; i++) { if (x[i] <= 0) { fprintf(stderr, "uels : The log periodogram has '0', use '-e' option!\n"); exit(1); } x[i] = cr[i] = log(x[i]); } ifftr(cr, y, flng); /* cr : c(m) */ /* initial value */ k = exp(cr[0]); for (i = 1; i <= m; i++) c[i] = cr[i]; for (j = 1; j <= itr2; j++) { cr[0] = 0.0; for (i = 1; i <= m; i++) cr[i] = c[i]; for (; i < flng; i++) cr[i] = 0.0; fftr(cr, y, flng); /* cr+jy : log D(z) */ for (i = 0; i < flng; i++) r[i] = exp(x[i] - cr[i] - cr[i]); ifftr(r, y, flng); /* r : autocorr */ c[0] = k; k = r[0]; if (j >= itr1) { if (fabs((k - c[0]) / c[0]) < dd) { flag = 1; break; } k = c[0]; } lplp(r, a, m); for (i = 1; i <= m; i++) c[i] -= a[i]; } c[0] = 0.5 * log(k); if (flag) return (0); else return (-1); } SPTK-3.9/bin/uels/uels.c0000644001051300105040000002351712637156646011745 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * Unbiased Estimation of Log Spectrum * * * * 1993.3 K.Tokuda * * 1996.3 K.Koishida * * * * usage: * * uels [ options ] [ infile ] > stdout * * options: * * -m m : order of cepstrum [25] * * -l l : frame length [256] * * -q q : Input format [0] * * 0 (windowed data sequence) * * 1 (20*log|f(w)|) * * 2 (ln|f(w)|) * * 3 (|f(w)|) * * 4 (|f(w)|^2) * * (level 2) * * -i i : minimum iteration [2] * * -j j : maximum iteration [30] * * -d d : end condition [0.001] * * -e e : small value added to periodogram [0] * * -E E : floor in db calculated per frame [N/A] * * infile: * * data sequence * * , x(0), x(1), ..., x(L-1), * * stdout: * * cepstrum * * , c~(0), c~(1), ..., c~(M), * * notice: * * value of e must be e>=0 * * value of E must be E<0 * * require: * * uels() * * * ************************************************************************/ static char *rcs_id = "$Id: uels.c,v 1.33 2015/12/14 05:34:35 uratec Exp $"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define ORDER 25 #define FLENG 256 #define ITYPE 0 #define ETYPE 0 #define MINITR 2 #define MAXITR 30 #define END 0.001 #define EPS 0.0 /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - unbiased estimation of log spectrum\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -m m : order of cepstrum [%d]\n", ORDER); fprintf(stderr, " -l l : frame length [%d]\n", FLENG); fprintf(stderr, " -q q : input format [%d]\n", ITYPE); fprintf(stderr, " 0 (windowed sequence)\n"); fprintf(stderr, " 1 (20*log|f(w)|)\n"); fprintf(stderr, " 2 (ln|f(w)|)\n"); fprintf(stderr, " 3 (|f(w)|)\n"); fprintf(stderr, " 4 (|f(w)|)^2\n"); fprintf(stderr, " (level 2)\n"); fprintf(stderr, " -i i : minimum iteration [%d]\n", MINITR); fprintf(stderr, " -j j : maximum iteration [%d]\n", MAXITR); fprintf(stderr, " -d d : end condition [%g]\n", END); fprintf(stderr, " -e e : small value added to periodogram [%g]\n", EPS); fprintf(stderr, " -E E : floor in db calculated per frame [N/A]\n"); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " windowed sequence (%s) [stdin]\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " cepstrum (%s)\n", FORMAT); fprintf(stderr, " notice:\n"); fprintf(stderr, " value of e must be e>=0\n"); fprintf(stderr, " value of E must be E<0\n"); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char **argv) { int m = ORDER, flng = FLENG, ilng = FLENG, itype = ITYPE, etype = ETYPE, itr1 = MINITR, itr2 = MAXITR; FILE *fp = stdin; double *c, *x, end = END, e = EPS; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) if (**++argv == '-') { switch (*(*argv + 1)) { case 'm': m = atoi(*++argv); --argc; break; case 'l': flng = atoi(*++argv); --argc; break; case 'q': itype = atoi(*++argv); --argc; break; case 'i': itr1 = atoi(*++argv); --argc; break; case 'j': itr2 = atoi(*++argv); --argc; break; case 'd': end = atof(*++argv); --argc; break; case 'e': etype = 1; e = atof(*++argv); --argc; break; case 'E': etype = 2; e = atof(*++argv); --argc; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else fp = getfp(*argv, "rb"); if (itype == 0) ilng = flng; else ilng = flng / 2 + 1; x = dgetmem(flng + m + 1); c = x + flng; while (freadf(x, sizeof(*x), ilng, fp) == ilng) { uels(x, flng, c, m, itr1, itr2, end, etype, e, itype); fwritef(c, sizeof(*c), m + 1, stdout); } return (0); } SPTK-3.9/bin/ulaw/0000755001051300105040000000000012637167714010677 500000000000000SPTK-3.9/bin/ulaw/Makefile.am0000644001051300105040000000020312442245130012625 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = ulaw ulaw_SOURCES = _ulaw.c ulaw.c ulaw_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/ulaw/Makefile.in0000644001051300105040000004254312637167421012667 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = ulaw$(EXEEXT) subdir = bin/ulaw ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_ulaw_OBJECTS = _ulaw.$(OBJEXT) ulaw.$(OBJEXT) ulaw_OBJECTS = $(am_ulaw_OBJECTS) ulaw_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(ulaw_SOURCES) DIST_SOURCES = $(ulaw_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include ulaw_SOURCES = _ulaw.c ulaw.c ulaw_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/ulaw/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/ulaw/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) ulaw$(EXEEXT): $(ulaw_OBJECTS) $(ulaw_DEPENDENCIES) $(EXTRA_ulaw_DEPENDENCIES) @rm -f ulaw$(EXEEXT) $(AM_V_CCLD)$(LINK) $(ulaw_OBJECTS) $(ulaw_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_ulaw.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ulaw.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/ulaw/_ulaw.c0000644001051300105040000001021712637156646012075 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ $Id: _ulaw.c,v 1.17 2015/12/14 01:14:23 uratec Exp $ u-law coder double ulaw_c(x, max, mu) double x : data double max : max value double mu : compression ratio return value : compressed data u-law decoder double ulaw_d(x, max, mu) double x : compressed data double max : max value double mu : compression ratio return value : uncompressed data ************************************************************************/ #include #include #if defined(WIN32) #include "SPTK.h" #else #include #endif #define abs(x) ((x>=0) ? (x) : (-(x))) #define sign(x) ((x>=0) ? 1 : (-1)) double ulaw_c(const double x, const double max, const double mu) { double y; y = sign(x) * max * log(1 + mu * abs(x) / max) / log(1 + mu); return (y); } double ulaw_d(const double x, const double max, const double mu) { double y; y = sign(x) * max * (pow(1 + mu, abs(x) / max) - 1) / mu; return (y); } SPTK-3.9/bin/ulaw/ulaw.c0000644001051300105040000001664412637156646011750 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * u-law PCM * * * * 1991.3 T.Kanno * * 1996.11 K.Koishida * * * * usage: * * ulaw [ options ] [ infile ] > stdout * * options: * * -v v : maximum of input [32768] * * -u u : compression ratio [256] * * -c : coder mode [TRUE] * * -d : decoder mode [FALSE] * * infile: * * input sequence * * , x(0), x(1), ..., * * stdout: * * compressed sequence * * , x'(0), x'(1), ..., * * require: * * ulaw_e(), ulaw_d() * * * ************************************************************************/ static char *rcs_id = "$Id: ulaw.c,v 1.25 2015/12/14 01:14:24 uratec Exp $"; /* Standard C Libraries */ #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #include #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define MAXVALUE 32768.0 #define MU 256.0 #define CODER TR #define DECODER FA char *BOOL[] = { "FALSE", "TRUE" }; /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - u-law PCM\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -v v : maximum of input [%g]\n", MAXVALUE); fprintf(stderr, " -u u : compression ratio [%g]\n", MU); fprintf(stderr, " -c : coder mode [%s]\n", BOOL[CODER]); fprintf(stderr, " -d : decoder mode [%s]\n", BOOL[DECODER]); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " input sequence (%s) [stdin]\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " compressed sequence (%s)\n", FORMAT); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char **argv) { double x, y, max = MAXVALUE, mu = MU, atof(); Boolean decoder = DECODER; FILE *fp = stdin; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) if (**++argv == '-') { switch (*(*argv + 1)) { case 'v': max = atof(*++argv); --argc; break; case 'u': mu = atof(*++argv); --argc; break; case 'c': decoder = FA; break; case 'd': decoder = TR; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else fp = getfp(*argv, "rb"); if (!decoder) while (freadf(&x, sizeof(x), 1, fp) == 1) { y = ulaw_c(x, max, mu); fwritef(&y, sizeof(y), 1, stdout); } else while (freadf(&x, sizeof(x), 1, fp) == 1) { y = ulaw_d(x, max, mu); fwritef(&y, sizeof(y), 1, stdout); } return (0); } SPTK-3.9/bin/vopr/0000755001051300105040000000000012637167715010716 500000000000000SPTK-3.9/bin/vopr/Makefile.am0000644001051300105040000000017312442245132012653 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = vopr vopr_SOURCES = vopr.c vopr_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/vopr/Makefile.in0000644001051300105040000004240612637167422012704 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = vopr$(EXEEXT) subdir = bin/vopr ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_vopr_OBJECTS = vopr.$(OBJEXT) vopr_OBJECTS = $(am_vopr_OBJECTS) vopr_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(vopr_SOURCES) DIST_SOURCES = $(vopr_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include vopr_SOURCES = vopr.c vopr_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/vopr/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/vopr/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) vopr$(EXEEXT): $(vopr_OBJECTS) $(vopr_DEPENDENCIES) $(EXTRA_vopr_DEPENDENCIES) @rm -f vopr$(EXEEXT) $(AM_V_CCLD)$(LINK) $(vopr_OBJECTS) $(vopr_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vopr.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/vopr/vopr.c0000644001051300105040000003503112637156646011773 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************** * * * Execute Vector Operations * * * * 1988.6 T.Kobayashi * * 1996.5 K.Koishida * * usage: * * vopr [ options ] [ [ file1 ] [ infile ] > stdout * * options: * * -l l : length of vector [1] * * -n n : order of vector [l-1] * * -i : specified file contains a and b [FALSE] * * -a : addition (a + b) [FALSE] * * -s : subtraction (a - b) [FALSE] * * -m : multiplication (a * b) [FALSE] * * -d : division (a / b) [FALSE] * * -ATAN2 : atan2 atan2(b,a) [FALSE] * * -AM : arithmetic mean ((a + b) / 2) [FALSE] * * -GM : geometric mean (sqrt(a * b)) [FALSE] * * -c : choose smaller value [FALSE] * * -f : choose larger value [FALSE] * * -gt : decide 'greater than' [FALSE] * * -ge : decide 'greater than or equal' [FALSE] * * -lt : decide 'less than' [FALSE] * * -le : decide 'less than or equal' [FALSE] * * -eq : decide 'equal to' [FALSE] * * -ne : decide 'not equal to' [FALSE] * * notice: * * When both -l and -n are specified, * * latter argument is adopted. * * When -gt, -ge, -le, -lt, -eq or -ne is specified, * * each element of output vec. is 1.0 (true) or 0.0 (false). * * * ***************************************************************************/ static char *rcs_id = "$Id: vopr.c,v 1.29 2015/12/14 01:14:24 uratec Exp $"; /* Standard C Libraries */ #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #include #include #include #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define LENG 1 #define INV FA char *BOOL[] = { "FALSE", "TRUE" }; /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - execute vector operations\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ file1 ] [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -l l : length of vector [%d]\n", LENG); fprintf(stderr, " -n n : order of vector [l-1]\n"); fprintf(stderr, " -i : specified file contains a and b [%s]\n", BOOL[INV]); fprintf(stderr, " -a : addition (a + b) [FALSE]\n"); fprintf(stderr, " -s : subtraction (a - b) [FALSE]\n"); fprintf(stderr, " -m : multiplication (a * b) [FALSE]\n"); fprintf(stderr, " -d : division (a / b) [FALSE]\n"); fprintf(stderr, " -ATAN : atan2 atan(b, a) [FALSE]\n"); fprintf(stderr, " -AM : arithmetic mean ((a + b) / 2) [FALSE]\n"); fprintf(stderr, " -GM : geometric mean (sqrt(a * b)) [FALSE]\n"); fprintf(stderr, " -c : choose smaller value [FALSE]\n"); fprintf(stderr, " -f : choose larger value [FALSE]\n"); fprintf(stderr, " -gt : decide 'greater than' (a > b) [FALSE]\n"); fprintf(stderr, " -ge : decide 'greater than or equal' (a >= b) [FALSE]\n"); fprintf(stderr, " -lt : decide 'less than' (a < b) [FALSE]\n"); fprintf(stderr, " -le : decide 'less than or equal' (a <= b) [FALSE]\n"); fprintf(stderr, " -eq : decide 'equal to' (a == b) [FALSE]\n"); fprintf(stderr, " -ne : decide 'not equal to' (a != b) [FALSE]\n"); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " data vectors (%s) [stdin]\n", FORMAT); fprintf(stderr, " file1:\n"); fprintf(stderr, " data vectors (%s)\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " data vectors after operations (float)\n"); fprintf(stderr, " notice:\n"); fprintf(stderr, " When both -l and -n are specified,\n"); fprintf(stderr, " latter argument is adopted.\n"); fprintf(stderr, "\n"); fprintf(stderr, " When -gt, -ge, -le, -lt, -eq or -ne is specified,\n"); fprintf(stderr, " each element of output vectors is 1.0 (true) or 0.0 (false).\n"); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int opr = ' ', leng = LENG; Boolean inv = INV; int main(int argc, char **argv) { int nfiles = 0; FILE *fp1, *fp2; char *s, c, *infile[4]; int vopr(FILE * fp1, FILE * fp2); if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) { if (*(s = *++argv) == '-') { c = *++s; if (*++s == '\0' && (c == 'l' || c == 'n')) { s = *++argv; --argc; } switch (c) { case 'l': if ((c == 'l') && strncmp("e", s, 1) == 0) { opr = 'r'; } else if ((c == 'l') && strncmp("t", s, 1) == 0) { opr = 'R'; } else { leng = atoi(s); } break; case 'n': if ((c == 'n') && strncmp("e", s, 1) == 0) { opr = 'E'; } else { leng = atoi(s) + 1; } break; case 'i': inv = 1 - inv; break; case 'a': case 'd': case 'm': case 's': case 'A': case 'c': case 'f': case 'g': case 'G': case 'e': opr = c; if ((c == 'A') && strncmp("M", s, 1) == 0) { opr = 'p'; } else if ((c == 'G') && strncmp("M", s, 1) == 0) { opr = 'P'; } else if ((c == 'g') && strncmp("e", s, 1) == 0) { opr = 'q'; } else if ((c == 'g') && strncmp("t", s, 1) == 0) { opr = 'Q'; } break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else infile[nfiles++] = s; } if (nfiles == 0) vopr(stdin, stdin); else { fp1 = getfp(infile[0], "rb"); if (nfiles == 1) { if (inv) vopr(fp1, fp1); else vopr(stdin, fp1); } else { fp2 = getfp(infile[1], "rb"); vopr(fp1, fp2); } } return (0); } int vopr(FILE * fp1, FILE * fp2) { double *a, *b; int k; a = dgetmem(leng + leng); b = a + leng; if (fp1 != fp2 && leng > 1) { if (freadf(b, sizeof(*b), leng, fp2) != leng) return (1); } while (freadf(a, sizeof(*a), leng, fp1) == leng) { if (fp1 == fp2 || leng == 1) { if (freadf(b, sizeof(*b), leng, fp2) != leng) return (1); } switch (opr) { case 'a': for (k = 0; k < leng; ++k) a[k] += b[k]; break; case 's': for (k = 0; k < leng; ++k) a[k] -= b[k]; break; case 'm': for (k = 0; k < leng; ++k) a[k] *= b[k]; break; case 'd': for (k = 0; k < leng; ++k) a[k] /= b[k]; break; case 'A': for (k = 0; k < leng; ++k) a[k] = atan2(b[k], a[k]); break; case 'c': /* choose smaller one */ for (k = 0; k < leng; ++k) { if (a[k] > b[k]) { a[k] = b[k]; } } break; case 'f': /* choose larger one */ for (k = 0; k < leng; ++k) { if (a[k] < b[k]) { a[k] = b[k]; } } break; case 'p': /* arithmetic mean */ for (k = 0; k < leng; ++k) a[k] = (a[k] + b[k]) / 2; break; case 'P': /* geometric mean */ for (k = 0; k < leng; ++k) { double tmp = a[k] * b[k]; if (tmp < 0.0) { fprintf(stderr, "%s : Can't calculate geometric mean !\n", cmnd); usage(1); } a[k] = sqrt(tmp); } break; case 'q': /* greater than or equal */ for (k = 0; k < leng; ++k) { if (a[k] >= b[k]) { a[k] = 1.0; } else { a[k] = 0.0; } } break; case 'Q': /* greater than */ for (k = 0; k < leng; ++k) { if (a[k] > b[k]) { a[k] = 1.0; } else { a[k] = 0.0; } } break; case 'r': /* less than or equal */ for (k = 0; k < leng; ++k) { if (a[k] <= b[k]) { a[k] = 1.0; } else { a[k] = 0.0; } } break; case 'R': /* less than */ for (k = 0; k < leng; ++k) { if (a[k] < b[k]) { a[k] = 1.0; } else { a[k] = 0.0; } } break; case 'e': /* equal to */ for (k = 0; k < leng; ++k) { if (a[k] == b[k]) { a[k] = 1.0; } else { a[k] = 0.0; } } break; case 'E': /* not equal to */ for (k = 0; k < leng; ++k) { if (a[k] != b[k]) { a[k] = 1.0; } else { a[k] = 0.0; } } break; default: break; } fwritef(a, sizeof(*a), leng, stdout); } return (0); } SPTK-3.9/bin/vq/0000755001051300105040000000000012637167715010356 500000000000000SPTK-3.9/bin/vq/Makefile.am0000644001051300105040000000017112442245133012312 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = vq vq_SOURCES = _vq.c vq.c vq_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/vq/Makefile.in0000644001051300105040000004246112637167422012345 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = vq$(EXEEXT) subdir = bin/vq ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_vq_OBJECTS = _vq.$(OBJEXT) vq.$(OBJEXT) vq_OBJECTS = $(am_vq_OBJECTS) vq_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(vq_SOURCES) DIST_SOURCES = $(vq_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include vq_SOURCES = _vq.c vq.c vq_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/vq/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/vq/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) vq$(EXEEXT): $(vq_OBJECTS) $(vq_DEPENDENCIES) $(EXTRA_vq_DEPENDENCIES) @rm -f vq$(EXEEXT) $(AM_V_CCLD)$(LINK) $(vq_OBJECTS) $(vq_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_vq.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vq.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/vq/_vq.c0000644001051300105040000001002612637156646011227 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /**************************************************************** $Id: _vq.c,v 1.18 2015/12/16 07:18:02 shikano Exp $ Vector Quantization int vq(x, cb, l, cbsize) double *x : input vector double *cb : codebook vector int l : vector order int cbsize : size of codebook return value : codebook index *****************************************************************/ #include #if defined(WIN32) #include "SPTK.h" #else #include #endif int vq(double *x, double *cb, const int l, const int cbsize) { int i, index = 0; double min = 1e23, dist; for (i = 0; i < cbsize; i++) { dist = edist(x, cb, l); if (dist < min) { index = i; min = dist; } cb += l; } return (index); } double edist(double *x, double *y, const int m) { int i; double sub, dist = 0.0; for (i = 0; i < m; i++) { sub = x[i] - y[i]; dist += sub * sub; } return (dist); } SPTK-3.9/bin/vq/vq.c0000644001051300105040000002036212637156646011074 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * Vector Quantization * * * * 1995.12 K.Koishida * * * * usage: * * vq [ options ] cbfile [ infile ] > stdout * * options: * * -l l : length of vector [26] * * -n n : order of vector [25] * * -q : output quantized vector [FALSE] * * infile: * * input vector * * x(0), x(1), ... * * codebook vector * * cb(0), cb(1), ... cb(l*c-1) * * stdout: * * index of codebook (int) * * index(0), index(1), ..., * * quantized vector (if -q option is specified) * * x'(0), x'(1), ... * * require: * * vq() * * * ************************************************************************/ static char *rcs_id = "$Id: vq.c,v 1.24 2015/12/14 01:14:24 uratec Exp $"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define LENG 26 #define CBSIZE 256 #define QFLAG FA char *BOOL[] = { "FALSE", "TRUE" }; /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - vector quantization\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] cbfile [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -l l : length of vector [%d]\n", LENG); fprintf(stderr, " -n n : order of vector [%d]\n", LENG - 1); fprintf(stderr, " -q : output quantized vector [%s]\n", BOOL[QFLAG]); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " vectors (%s) [stdin]\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " index (int) or\n"); fprintf(stderr, " quantized vectors (%s) if -q option is specified\n", FORMAT); fprintf(stderr, " cbfile:\n"); fprintf(stderr, " codebook (%s)\n", FORMAT); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char **argv) { int l = LENG, cbsize = CBSIZE, index; Boolean qflag = QFLAG; FILE *fp = stdin, *fpcb = NULL; double *x, *qx, *cb; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) if (**++argv == '-') { switch (*(*argv + 1)) { case 'l': l = atoi(*++argv); --argc; break; case 'n': l = atoi(*++argv) + 1; --argc; break; case 's': cbsize = atoi(*++argv); --argc; break; case 'q': qflag = 1 - qflag; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else if (fpcb == NULL) fpcb = getfp(*argv, "rb"); else fp = getfp(*argv, "rb"); fseek(fpcb, 0, 2); #ifdef DOUBLE cbsize = ftell(fpcb) / sizeof(double) / l; #else cbsize = ftell(fpcb) / sizeof(float) / l; #endif /* DOUBLE */ rewind(fpcb); x = dgetmem(l + l + cbsize * l); qx = x + l; cb = qx + l; if (freadf(cb, sizeof(*cb), cbsize * l, fpcb) != cbsize * l) { fprintf(stderr, "%s : Codebook size error!\n", cmnd); return (1); } if (!qflag) while (freadf(x, sizeof(*x), l, fp) == l) { index = vq(x, cb, l, cbsize); fwritex(&index, sizeof(index), 1, stdout); } else while (freadf(x, sizeof(*x), l, fp) == l) { index = vq(x, cb, l, cbsize); ivq(index, cb, l, qx); fwritef(qx, sizeof(*qx), l, stdout); } return (0); } SPTK-3.9/bin/vstat/0000755001051300105040000000000012637167715011071 500000000000000SPTK-3.9/bin/vstat/Makefile.am0000644001051300105040000000017612442245134013033 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = vstat vstat_SOURCES = vstat.c vstat_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/vstat/Makefile.in0000644001051300105040000004243312637167422013057 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = vstat$(EXEEXT) subdir = bin/vstat ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_vstat_OBJECTS = vstat.$(OBJEXT) vstat_OBJECTS = $(am_vstat_OBJECTS) vstat_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(vstat_SOURCES) DIST_SOURCES = $(vstat_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include vstat_SOURCES = vstat.c vstat_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/vstat/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/vstat/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) vstat$(EXEEXT): $(vstat_OBJECTS) $(vstat_DEPENDENCIES) $(EXTRA_vstat_DEPENDENCIES) @rm -f vstat$(EXEEXT) $(AM_V_CCLD)$(LINK) $(vstat_OBJECTS) $(vstat_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vstat.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/vstat/vstat.c0000644001051300105040000004700512637156646012325 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * Vector Statistics Calculation * * * * 1998.12 T.Masuko * * 2010.8 A.Tamamori * * 2012.11 T.Okada * * usage: * * vstat [ options ] [ infile ] > stdout * * options: * * -l l : length of vector [1] * * -n n : order of vector [l-1] * * -t t : number of vector [all] * * -o o : output format [0] * * 0 mean & covariance * * 1 mean * * 2 covariance * * 3 mean and upper / lower bound of * * confidence interval via t-dist. * * 4 median * * -c c : conf. level of conf. interval [0.95] * * -d : diagonal covariance [FALSE] * * -i : output inverse cov. instead of cov.[FALSE] * * -r : output correlation instead of cov. [FALSE] * * infile: * * data sequence * * x_1(1), ..., x_1(L), x_2(1) ... * * stdout: * * mean vector * * m(1), ..., m(L), * * covariance matrix * * U(11), ..., m(1L), * * ..............., * * U(L1), ..., m(LL), ... * * upper/lower bound of confidence interval * * upper(1), ..., upper(L), * * lower(1), ..., lower(L) * * notice: * * if '-d' is specified, * * off-diagonal elements are suppressed. * * '-d' and '-r' are exclusive * * ('-r' has priority over '-d'). * * require: * * * ************************************************************************/ static char *rcs_id = "$Id: vstat.c,v 1.38 2015/12/14 01:14:24 uratec Exp $"; /* Standard C Libralies */ #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #include #include #include #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define LENG 1 #define OUTMEAN TR #define OUTCOV TR #define OUTCONF FA #define OUTMED FA #define CONFLEV 0.9500E2 #define DIAGC FA #define INV FA #define CORR FA char *BOOL[] = { "FALSE", "TRUE" }; /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - vector statistics calculation\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -l l : length of vector [%d]\n", LENG); fprintf(stderr, " -n n : order of vector [l-1]\n"); fprintf(stderr, " -t t : number of vector [N/A]\n"); fprintf(stderr, " -o o : output format [0]\n"); fprintf(stderr, " 0 mean & covariance\n"); fprintf(stderr, " 1 mean\n"); fprintf(stderr, " 2 covariance\n"); fprintf(stderr, " 3 mean and upper / lower bound of\n"); fprintf(stderr, " confidence interval via t-dist.\n"); fprintf(stderr, " 4 median\n"); fprintf(stderr, " -c c : conf. level of conf. interval (%%) [%g]\n", CONFLEV); fprintf(stderr, " -d : diagonal covariance [%s]\n", BOOL[DIAGC]); fprintf(stderr, " -i : output inverse cov. instead of cov. [%s]\n", BOOL[INV]); fprintf(stderr, " -r : output correlation instead of cov. [%s]\n", BOOL[CORR]); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " vectors (%s) [stdin]\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " mean(s) and covariance(s) of input vectors (%s)\n", FORMAT); fprintf(stderr, " notice:\n"); fprintf(stderr, " if '-d' is specified, off-diagonal elements are suppressed.\n"); fprintf(stderr, " '-d' and '-r' are exclusive ('-r' has priority over '-d').\n"); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } double norm_percent(const double alpha) { int i; double a, x, u; static double b[11] = { 1.570796288, 0.03706987906, -0.8364353589e-3, -0.2250947176e-3, 0.6841218299e-5, 0.5824238515e-5, -0.104527497e-5, 0.8360937017e-7, -0.3231081277e-8, 0.3657763036e-10, 0.6936233982e-12 }; if (alpha == 0.5) { return 0.0; } a = alpha; if (a > 0.5) { a = 1.0 - a; } x = -log(4.0 * a * (1.0 - a)); u = b[0]; for (i = 1; i < 11; i++) { u += (b[i] * pow(x, (double) i)); } if (alpha > 0.5) { return -sqrt(u * x); } else { return sqrt(u * x); } } double t_lower(const double t, const int df) { int i; double c2, p, s; c2 = df / (df + t * t); s = sqrt(1 - c2); if (t < 0) { s = -s; } p = 0; for (i = df % 2 + 2; i <= df; i += 2) { p += s; s *= (i - 1) * c2 / i; } if (df & 1) { return (0.5 + (p * sqrt(c2) + atan(t / sqrt(df))) / PI); } else { return ((1 + p) / 2); } } double t_percent(const double p, const int df) { double f, y1, y2, y3, y4, y5, q, r, u, u2, x, delta; int n; q = (1.0 - p) / 2; f = (double) df; u = norm_percent(q); u2 = u * u; y1 = (u2 + 1) / 4; y2 = ((5 * u2 + 16) * u2 + 3) / 96; y3 = (((3 * u2 + 19) * u2 + 17) * u2 - 15) / 384; y4 = ((((79 * u2 + 776) * u2 + 1482) * u2 - 1920) * u2 - 945) / 92160; y5 = (((((27 * u2 + 339) * u2 + 930) * u2 - 1782) * u2 - 765) * u2 + 17955) / 368640; x = u * (1 + (y1 + (y2 + (y3 + (y4 + y5 / f) / f) / f) / f) / f); if (df <= pow(log10(1 - q), 2) + 3) { r = t_lower(x, df); n = df + 1; delta = (r - (1 - q)) / exp((n * log((double) n / (df + x * x)) + log((double) df / n / 2 / PI) - 1 + (1.0 / n - 1.0 / df) / 6.0) / 2.0); x -= delta; } return (x); } void quicksort(double *x, int left, int right) { int i, j; int pivot; int tmp; i = left; j = right; pivot = x[(left + right) / 2]; while (1) { while (x[i] < pivot) i++; while (pivot < x[j]) j--; if (i >= j) break; tmp = x[i]; x[i] = x[j]; x[j] = tmp; i++; j--; } if (left < i - 1) quicksort(x, left, i - 1); if (j + 1 < right) quicksort(x, j + 1, right); } int main(int argc, char *argv[]) { FILE *fp = stdin; double *x, *mean, *med = NULL, **mtmp = NULL, **cov = NULL, **invcov = NULL, *var = NULL, conf = CONFLEV, *upper = NULL, *lower = NULL, t, err; int leng = LENG, nv = -1, i, j, k = 0, lp = 0, m, outtype = 0, count = 0; Boolean outmean = OUTMEAN, outcov = OUTCOV, outconf = OUTCONF, outmed = OUTMED, diagc = DIAGC, inv = INV, corr = CORR; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) if (**++argv == '-') { switch (*(*argv + 1)) { case 'l': leng = atoi(*++argv); --argc; break; case 'n': leng = atoi(*++argv) + 1; --argc; break; case 't': nv = atoi(*++argv); --argc; break; case 'o': outtype = atoi(*++argv); --argc; break; case 'c': conf = atof(*++argv); --argc; break; case 'd': diagc = 1 - diagc; break; case 'i': inv = 1 - inv; break; case 'r': corr = 1 - corr; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else fp = getfp(*argv, "rb"); if (conf < 0 || conf > 100) { fprintf(stderr, "%s : Confidence level must be greater than 0 and less than 1.0!\n", cmnd); } switch (outtype) { case 1: outcov = FA; break; case 2: outmean = FA; break; case 3: outcov = FA; outconf = TR; break; case 4: outcov = FA; outmean = FA; outmed = TR; break; } if (diagc && corr) diagc = FA; if (diagc && inv) diagc = FA; if (corr && inv) corr = FA; mean = dgetmem(leng + leng); x = mean + leng; if (outmed) { if (nv == -1) { typedef struct _float_list { float *f; struct _float_list *next; } float_list; float_list *top = NULL, *prev = NULL, *cur = NULL; top = prev = (float_list *) getmem(1, sizeof(float_list)); prev->next = NULL; while (freadf(x, sizeof(*x), leng, fp) == leng) { cur = (float_list *) getmem(1, sizeof(float_list)); cur->f = fgetmem(leng); for (i = 0; i < leng; i++) { cur->f[i] = (float) x[i]; } count++; prev->next = cur; cur->next = NULL; prev = cur; } k = count; mtmp = (double **) getmem(leng, sizeof(*mtmp)); mtmp[0] = dgetmem(leng * k); for (i = 1; i < leng; i++) mtmp[i] = mtmp[i - 1] + k; med = dgetmem(leng); for (j = 0, cur = top->next; j < k; j++, cur = cur->next) { for (i = 0; i < leng; i++) { mtmp[i][j] = (double) cur->f[i]; } } } else { k = nv; mtmp = (double **) getmem(leng, sizeof(*mtmp)); mtmp[0] = dgetmem(leng * k); for (i = 1; i < leng; i++) mtmp[i] = mtmp[i - 1] + k; med = dgetmem(leng); for (j = 0; j < k; j++) { for (i = 0; i < leng; i++) { freadf(&mtmp[i][j], sizeof(**mtmp), 1, fp); } } } if (k % 2 == 0) { fprintf(stderr, "%s : warning: the number of vectors is even!\n", cmnd); } for (i = 0; i < leng; i++) { quicksort(mtmp[i], 0, k - 1); if (k % 2 == 1) { med[i] = mtmp[i][k / 2]; } else { med[i] = ((mtmp[i][k / 2] + mtmp[i][k / 2 - 1]) / 2); } } fwritef(med, sizeof(*med), leng, stdout); return (0); } if (outcov) { if (!diagc) { cov = (double **) getmem(leng, sizeof(*cov)); cov[0] = dgetmem(leng * leng); for (i = 1; i < leng; i++) cov[i] = cov[i - 1] + leng; if (inv) { invcov = (double **) getmem(leng, sizeof(*invcov)); invcov[0] = dgetmem(leng * leng); for (i = 1; i < leng; i++) invcov[i] = invcov[i - 1] + leng; } } else var = dgetmem(leng); } if (outconf) { var = dgetmem(leng); upper = dgetmem(leng); lower = dgetmem(leng); } while (!feof(fp)) { for (i = 0; i < leng; i++) { mean[i] = 0.0; if (outcov) { if (!diagc) for (j = 0; j < leng; j++) cov[i][j] = 0.0; else var[i] = 0.0; } if (outconf) { var[i] = 0.0; } } for (lp = nv; lp;) { if (freadf(x, sizeof(*x), leng, fp) != leng) break; for (i = 0; i < leng; i++) { mean[i] += x[i]; if (outcov) { if (!diagc) for (j = i; j < leng; j++) cov[i][j] += x[i] * x[j]; else var[i] += x[i] * x[i]; } if (outconf) { var[i] += x[i] * x[i]; } } --lp; } if (lp == 0 || nv == -1) { if (nv > 0) k = nv; else k = -lp - 1; for (i = 0; i < leng; i++) mean[i] /= k; if (outcov) { if (!diagc) for (i = 0; i < leng; i++) for (j = i; j < leng; j++) cov[j][i] = cov[i][j] = cov[i][j] / k - mean[i] * mean[j]; else for (i = 0; i < leng; i++) var[i] = var[i] / k - mean[i] * mean[i]; } if (outconf) { for (i = 0; i < leng; i++) { var[i] = (var[i] - k * mean[i] * mean[i]) / (k - 1); } t = t_percent(conf / 100, k - 1); for (i = 0; i < leng; i++) { err = t * sqrt(var[i] / k); upper[i] = mean[i] + err; lower[i] = mean[i] - err; } } if (corr) { for (i = 0; i < leng; i++) for (j = i + 1; j < leng; j++) cov[j][i] = cov[i][j] = cov[i][j] / sqrt(cov[i][i] * cov[j][j]); for (i = 0; i < leng; i++) cov[i][i] = 1.0; } if (outmean) fwritef(mean, sizeof(*mean), leng, stdout); if (outcov) { if (!diagc) { if (inv) { for (i = 0; i < leng; i++) { for (j = i + 1; j < leng; j++) { cov[j][i] /= cov[i][i]; for (m = i + 1; m < leng; m++) cov[j][m] -= cov[i][m] * cov[j][i]; } } for (m = 0; m < leng; m++) { for (i = 0; i < leng; i++) { if (i == m) invcov[i][m] = 1.0; else invcov[i][m] = 0.0; } for (i = 0; i < leng; i++) { for (j = i + 1; j < leng; j++) invcov[j][m] -= invcov[i][m] * cov[j][i]; } for (i = leng - 1; i >= 0; i--) { for (j = i + 1; j < leng; j++) invcov[i][m] -= cov[i][j] * invcov[j][m]; invcov[i][m] /= cov[i][i]; } } fwritef(invcov[0], sizeof(*invcov[0]), leng * leng, stdout); } else fwritef(cov[0], sizeof(*cov[0]), leng * leng, stdout); } else fwritef(var, sizeof(*var), leng, stdout); } if (outconf) { fwritef(upper, sizeof(*upper), leng, stdout); fwritef(lower, sizeof(*lower), leng, stdout); } } } return (0); } SPTK-3.9/bin/vsum/0000755001051300105040000000000012637167716010723 500000000000000SPTK-3.9/bin/vsum/Makefile.am0000644001051300105040000000017312442245135012662 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = vsum vsum_SOURCES = vsum.c vsum_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/vsum/Makefile.in0000644001051300105040000004240612637167422012710 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = vsum$(EXEEXT) subdir = bin/vsum ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_vsum_OBJECTS = vsum.$(OBJEXT) vsum_OBJECTS = $(am_vsum_OBJECTS) vsum_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(vsum_SOURCES) DIST_SOURCES = $(vsum_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include vsum_SOURCES = vsum.c vsum_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/vsum/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/vsum/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) vsum$(EXEEXT): $(vsum_OBJECTS) $(vsum_DEPENDENCIES) $(EXTRA_vsum_DEPENDENCIES) @rm -f vsum$(EXEEXT) $(AM_V_CCLD)$(LINK) $(vsum_OBJECTS) $(vsum_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vsum.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/vsum/vsum.c0000644001051300105040000001513212637156646012003 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * Summation of Vectors * * * * 1988.7 T.Kobayashi * * 1996.5 K.Koishida * * usage: * * vsum [ options ] [ infile ] > stdout * * options: * * -l l : length of vector [1] * * -n n : order of vector [l-1] * * -t t : number of vector [EOD] * * * ************************************************************************/ static char *rcs_id = "$Id: vsum.c,v 1.26 2015/12/14 01:14:24 uratec Exp $"; /* Standard C Libraries */ #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #include #include #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define LENG 1 /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - summation of vector\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -l l : length of vector [%d]\n", LENG); fprintf(stderr, " -n n : order of vector [l-1]\n"); fprintf(stderr, " -t t : number of vector [EOD]\n"); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " vectors (%s) [stdin]\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " summation of vector (%s)\n", FORMAT); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char *argv[]) { FILE *fp = stdin; double *x, *s; int leng = LENG, nv = -1, k, lp; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) if (**++argv == '-') { switch (*(*argv + 1)) { case 'l': leng = atoi(*++argv); --argc; break; case 'n': leng = atoi(*++argv) + 1; --argc; break; case 't': nv = atoi(*++argv); --argc; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else fp = getfp(*argv, "rb"); s = dgetmem(leng + leng); x = s + leng; while (!feof(fp)) { for (k = 0; k < leng; ++k) s[k] = 0.0; for (lp = nv; lp;) { if (freadf(x, sizeof(*x), leng, fp) != leng) break; for (k = 0; k < leng; ++k) s[k] += x[k]; if (nv != -1) --lp; } if (lp == 0 || nv == -1) fwritef(s, sizeof(*s), leng, stdout); } return (0); } SPTK-3.9/bin/wavjoin/0000755001051300105040000000000012637167716011406 500000000000000SPTK-3.9/bin/wavjoin/Makefile.am0000644001051300105040000000022212442245152013337 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = wavjoin wavjoin_SOURCES = _wavjoin.c wavjoin.c wavjoin_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/wavjoin/Makefile.in0000644001051300105040000004265612637167422013402 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = wavjoin$(EXEEXT) subdir = bin/wavjoin ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_wavjoin_OBJECTS = _wavjoin.$(OBJEXT) wavjoin.$(OBJEXT) wavjoin_OBJECTS = $(am_wavjoin_OBJECTS) wavjoin_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(wavjoin_SOURCES) DIST_SOURCES = $(wavjoin_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include wavjoin_SOURCES = _wavjoin.c wavjoin.c wavjoin_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/wavjoin/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/wavjoin/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) wavjoin$(EXEEXT): $(wavjoin_OBJECTS) $(wavjoin_DEPENDENCIES) $(EXTRA_wavjoin_DEPENDENCIES) @rm -f wavjoin$(EXEEXT) $(AM_V_CCLD)$(LINK) $(wavjoin_OBJECTS) $(wavjoin_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_wavjoin.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wavjoin.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/wavjoin/_wavjoin.c0000644001051300105040000001227012637156647013311 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /*************************************************************** $Id: _wavjoin.c,v 1.3 2015/12/14 01:14:24 uratec Exp $ Split stereo WAV file in two monaural WAV files void wavjoin(*wavout, *wavin) Wavfile wavout : split wav files Wavfile wavin : input wav file ***************************************************************/ #include #include #include #include #if defined(WIN32) #include "SPTK.h" #else #include #endif #define STRLEN 512 int search_wav_list(Filelist * filelist, char *key) { int i; char *tmp; char strtmp0[STRLEN], strtmp1[STRLEN]; strcpy(strtmp1, key); *(strrchr(strtmp1, '.')) = '\0'; for (i = 0; i < filelist->num; i++) { strcpy(strtmp0, filelist->name[i]); tmp = strrchr(strtmp0, '.'); if (tmp != NULL) { *tmp = '\0'; } if (strcmp(strtmp0, strtmp1) == 0) { return i; } } return -1; } void wavjoin(Wavfile * wavout, const Wavfile * wavin) { int i, j, len, byte_per_sample, data_num; if (wavin[0].data_chunk_size >= wavin[1].data_chunk_size) { len = wavin[0].data_chunk_size; } else { len = wavin[1].data_chunk_size; } /* WAV header */ copy_wav_header(wavout, &wavin[0]); wavout->channel_num = 2; wavout->byte_per_sec = wavin->byte_per_sec * wavout->channel_num; wavout->block_size = wavin->block_size * wavout->channel_num; wavout->data_chunk_size = len * wavout->channel_num; wavout->file_size = 4 * 3 + (4 * 2 + wavout->fmt_chunk_size) + (4 * 2 + wavout->data_chunk_size) - 8; /* WAV waveform */ byte_per_sample = wavout->bit_per_sample / 8; data_num = wavout->data_chunk_size / byte_per_sample; wavout->data = (char *) getmem(data_num * 2, byte_per_sample); for (i = 0; i < 2; i++) { byte_per_sample = wavin[i].bit_per_sample / 8; data_num = wavin[i].data_chunk_size / byte_per_sample; for (j = 0; j < data_num; j++) { memcpy(wavout->data + (2 * j + i) * byte_per_sample, wavin[i].data + j * byte_per_sample, byte_per_sample); } } } SPTK-3.9/bin/wavjoin/wavjoin.c0000644001051300105040000002523012637156647013152 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * Make stereo WAV file by joining two monaural WAV files * * * * 2013.3 Akira Tamamori * * 2014.8 Takashi Aritake * * * * usage: * * wavjoin [ options ] * * options: * * -i I_LEFT I_RIGHT : Input WAV files or directories * * -o O : Output WAV file or directory * * infile: * * wav file format * * outfile: * * wav file format * * * ************************************************************************/ static char *rcs_id = ""; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #if defined(WIN32) #include "SPTK.h" #else #include #endif #define STRLEN 512 /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - Make stereo WAV file by joining two monaural WAV files \n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] \n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -i I : Input WAV files or directories\n"); fprintf(stderr, " -o O : Output WAV file or directory \n"); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " wav file format \n"); fprintf(stderr, " outfile:\n"); fprintf(stderr, " wav file format \n"); fprintf(stderr, " notice:\n"); fprintf(stderr, " wavjoin does not distinguish between\n"); fprintf(stderr, " small and capital letters of the file extension.\n"); fprintf(stderr, " The first input WAV file or directory is related to \n"); fprintf(stderr, " channel 0, and the other is related to channel 1.\n"); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char **argv) { int i, j, idx; char *indir[2], *inname[2]; for (i = 0; i < 2; i++) { indir[i] = NULL; inname[i] = NULL; } char *outdir = NULL, *outname = NULL; char strtmp[2][STRLEN]; Filelist filelist[2]; Wavfile wavin[2], wavout; if ((cmnd = strrchr(argv[0], '/')) == NULL) { cmnd = argv[0]; } else { cmnd++; } while (--argc) { if (**++argv == '-') { switch (*(*argv + 1)) { case 'i': /* input */ separate_path(&indir[0], &inname[0], *++argv); --argc; if (argc > 1) { if (**(argv + 1) != '-') { separate_path(&indir[1], &inname[1], *++argv); --argc; } } break; case 'o': /* output directory */ /* single output */ separate_path(&outdir, &outname, *++argv); --argc; break; case 'h': usage(EXIT_SUCCESS); break; default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(EXIT_FAILURE); } } } if (indir[0] == NULL || indir[1] == NULL) { fprintf(stderr, "%s : The pair of inputs must be specified!\n", cmnd); usage(EXIT_FAILURE); } if (outdir == NULL) { fprintf(stderr, "%s : The output wav file or directory must be specified!\n", cmnd); usage(EXIT_FAILURE); } if ((inname[0] == NULL) ^ (inname[1] == NULL)) { fprintf(stderr, "%s : The inputs must be either wavfile or directory!\n", cmnd); usage(EXIT_FAILURE); } if (inname[0] == NULL && outname != NULL) { fprintf(stderr, "%s : The output must be directory, if the inputs are directories!\n", cmnd); usage(EXIT_FAILURE); } if (inname[0] != NULL) { /* inputs are pair of wav files */ for (i = 0; i < 2; i++) { filelist[i].num = 1; filelist[i].name = (char **) getmem(1, sizeof(char *)); filelist[i].name[0] = (char *) getmem(STRLEN, sizeof(char)); strcpy(filelist[i].name[0], inname[i]); } } else { /* inputs are pair of directories */ for (i = 0; i < 2; i++) { if (!get_wav_list(&filelist[i], indir[i])) { fprintf(stderr, "%s : Can't open directory %s!\n", cmnd, indir[i]); usage(EXIT_FAILURE); } } } for (i = 0; i < filelist[0].num; i++) { idx = 0; if (inname[0] != NULL) { for (j = 0; j < 2; j++) { sprintf(strtmp[j], "%s/%s", indir[j], filelist[j].name[i]); } } else { idx = search_wav_list(&filelist[1], filelist[0].name[i]); if (idx == -1) { fprintf(stderr, "%s wasn't matched to wav files in directory %s!\n", filelist[0].name[i], indir[1]); continue; } sprintf(strtmp[0], "%s/%s", indir[0], filelist[0].name[i]); sprintf(strtmp[1], "%s/%s", indir[1], filelist[1].name[idx]); } /* Read WAV file */ for (j = 0; j < 2; j++) { if (!wavread(&wavin[j], strtmp[j])) { fprintf(stderr, "%s : Can't open %s!\n", cmnd, strtmp[j]); usage(EXIT_FAILURE); } if (wavin[j].channel_num != 1) { fprintf(stderr, "%s isn't the monaural WAV file!\n", strtmp[j]); } } if (wavin[0].format_id != wavin[1].format_id) { fprintf(stderr, "%s : Inputs wav file format are mismatched!\n", cmnd); usage(EXIT_FAILURE); } if (wavin[0].sample_freq != wavin[1].sample_freq) { fprintf(stderr, "%s : Inputs wav file sampling frequencies are mismatched!\n", cmnd); usage(EXIT_FAILURE); } wavjoin(&wavout, wavin); if (outname == NULL) { if (inname[0] == NULL) { *(strrchr(filelist[0].name[i], '.')) = '\0'; sprintf(strtmp[0], "%s/%s.wav", outdir, filelist[0].name[i]); } else { *(strrchr(filelist[0].name[i], '.')) = '\0'; *(strrchr(filelist[1].name[i], '.')) = '\0'; sprintf(strtmp[0], "%s/%s_%s.wav", outdir, filelist[0].name[i], filelist[1].name[i]); } } else { sprintf(strtmp[0], "%s/%s", outdir, outname); } if (!wavwrite(&wavout, strtmp[0])) { fprintf(stderr, "%s : Can't open %s! \n", cmnd, strtmp[0]); usage(EXIT_FAILURE); } for (j = 0; j < 2; j++) { free_wav_data(&(wavin[j])); } free_wav_data(&wavout); } for (i = 0; i < 2; i++) { free_wav_list(&(filelist[i])); } return 0; } SPTK-3.9/bin/wavsplit/0000755001051300105040000000000012637167716011602 500000000000000SPTK-3.9/bin/wavsplit/Makefile.am0000644001051300105040000000022712442245153013541 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = wavsplit wavsplit_SOURCES = _wavsplit.c wavsplit.c wavsplit_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/wavsplit/Makefile.in0000644001051300105040000004270712637167422013573 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = wavsplit$(EXEEXT) subdir = bin/wavsplit ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_wavsplit_OBJECTS = _wavsplit.$(OBJEXT) wavsplit.$(OBJEXT) wavsplit_OBJECTS = $(am_wavsplit_OBJECTS) wavsplit_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(wavsplit_SOURCES) DIST_SOURCES = $(wavsplit_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include wavsplit_SOURCES = _wavsplit.c wavsplit.c wavsplit_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/wavsplit/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/wavsplit/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) wavsplit$(EXEEXT): $(wavsplit_OBJECTS) $(wavsplit_DEPENDENCIES) $(EXTRA_wavsplit_DEPENDENCIES) @rm -f wavsplit$(EXEEXT) $(AM_V_CCLD)$(LINK) $(wavsplit_OBJECTS) $(wavsplit_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_wavsplit.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wavsplit.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/wavsplit/_wavsplit.c0000644001051300105040000003316312637156647013705 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /*************************************************************** $Id: _wavsplit.c,v 1.3 2015/12/14 01:14:24 uratec Exp $ Split stereo WAV file into two monaural WAV files void wavsplit(*wavout, *wavin) Wavfile wavout : split wav files Wavfile wavin : input wav file ***************************************************************/ #include #include #include #include #include #if defined(WIN32) #include "SPTK.h" #else #include #endif #define STRLEN 512 void copy_wav_header(Wavfile * dest_wav, const Wavfile * source_wav); void capital2small(char *s) { char *p; for (p = s; *p; p++) { *p = tolower(*p); } } void separate_path(char **dir, char **name, char *path) { char *tmp; tmp = strrchr(path, '.'); if (tmp != NULL && *(tmp + 1) != '/' && *(tmp + 1) != '\0') { /* input a file */ tmp = strrchr(path, '/'); if (tmp == NULL) { /* WAV file name only */ *dir = "./"; *name = path; } else { /* directory and Wav file name */ *name = tmp + 1; *tmp = '\0'; *dir = path; } } else { /* input a directory */ tmp = strrchr(path, '\0'); if (*(tmp - 1) == '/') { *(tmp - 1) = '\0'; } *dir = path; *name = NULL; } } Boolean get_wav_list(Filelist * filelist, const char *dirname) { int idx = 0; char *tmp; char ctmp[STRLEN]; DIR *pdir = NULL; struct dirent *ptr = NULL; filelist->num = 0; /* Open Directory */ pdir = opendir(dirname); if (pdir == NULL) { filelist->num = -1; return 0; } /* Count WAV files */ while ((ptr = readdir(pdir)) != NULL) { strcpy(ctmp, ptr->d_name); tmp = strrchr(ctmp, '.'); if (tmp != NULL) { capital2small(tmp); if (strcmp(tmp, ".wav") == 0) { filelist->num++; } } } rewinddir(pdir); /* Making WAV files list */ filelist->name = (char **) getmem(filelist->num, sizeof(char *)); while ((ptr = readdir(pdir)) != NULL) { strcpy(ctmp, ptr->d_name); tmp = strrchr(ctmp, '.'); if (tmp != NULL) { capital2small(tmp); if (strcmp(tmp, ".wav") == 0) { filelist->name[idx] = (char *) getmem(strlen(ptr->d_name) + 1, sizeof(char)); strcpy(filelist->name[idx], ptr->d_name); idx++; } } } closedir(pdir); return 1; } Boolean wavread(Wavfile * wavfile, const char *fullpath) { FILE *fp = NULL; char fmt_buf[STRLEN] = { '\0' }; int rest_size = 0, current_position = 0, chunk_size = 0; /* Read WAV file */ fp = fopen(fullpath, "rb"); if (fp == NULL) { fprintf(stderr, "WARNING : Can't open wav file %s! \n", fullpath); return 0; } /* Read WAV header */ if (freadx(fmt_buf, sizeof(char), 4, fp) < 4) { fprintf(stderr, "WARNING : RIFF is corrupted! \n"); return 0; } if (strcmp(fmt_buf, "RIFF") != 0) { fprintf(stderr, "WARNING : Invalid WAV file! \n"); return 0; } if (freadx(&(wavfile->file_size), 4, 1, fp) < 1) { fprintf(stderr, "WARNING : RIFF is corrupted! \n"); return 0; } wavfile->file_size += 8; if (freadx(fmt_buf, sizeof(char), 4, fp) < 4) { fprintf(stderr, "WARNING : RIFF is corrupted! \n"); return 0; } if (strcmp(fmt_buf, "WAVE") != 0) { fprintf(stderr, "WARNING : Invalid WAV file! \n"); return 0; } rest_size = wavfile->file_size - 12; current_position = 12; while (rest_size > 0) { /* read chunk ID (4 byte) */ if (freadx(fmt_buf, sizeof(char), 4, fp) < 4) { fprintf(stderr, "WARNING : Invalid chunk ID!\n"); return 0; } current_position += 4; if (strcmp(fmt_buf, "fmt ") == 0) { /* read chunk size (4 byte) */ if (freadx(&(wavfile->fmt_chunk_size), 4, 1, fp) < 1) { fprintf(stderr, "WARNING : Invalid fmt chunk size!\n"); return 0; } current_position += 4; if (freadx(&(wavfile->format_id), 2, 1, fp) < 1) { fprintf(stderr, "WARNING : Invalid format chunk!\n"); return 0; } if (freadx(&(wavfile->channel_num), 2, 1, fp) < 1) { fprintf(stderr, "WARNING : Invalid channel number!\n"); return 0; } if (freadx(&(wavfile->sample_freq), 4, 1, fp) < 1) { fprintf(stderr, "WARNING : Invalid sampling frequency!\n"); return 0; } if (freadx(&(wavfile->byte_per_sec), 4, 1, fp) < 1) { fprintf(stderr, "WARNING : Invalid Byte/sec value!\n"); return 0; } if (freadx(&(wavfile->block_size), 2, 1, fp) < 1) { fprintf(stderr, "WARNING : Invalid block size!\n"); return 0; } if (freadx(&(wavfile->bit_per_sample), 2, 1, fp) < 1) { fprintf(stderr, "WARNING : Invalid Bit/sample value!\n"); return 0; } if (wavfile->bit_per_sample == 8) { wavfile->input_data_type = 'c'; } else if (wavfile->bit_per_sample == 16) { wavfile->input_data_type = 's'; } else if (wavfile->bit_per_sample == 24) { wavfile->input_data_type = 'i'; } else if (wavfile->bit_per_sample == 32) { if (wavfile->format_id == 1) { /* PCM */ wavfile->format_type = 0; wavfile->input_data_type = 'I'; } else if (wavfile->format_id == 3) { /* IEEE float */ wavfile->format_type = 1; wavfile->input_data_type = 'f'; } } current_position += wavfile->fmt_chunk_size; if (wavfile->fmt_chunk_size != 16) { if (freadx(&(wavfile->extended_size), 2, 1, fp) < 1) { fprintf(stderr, "WARNING : RIFF is corrupted.\n"); return 0; } fseek(fp, current_position, wavfile->extended_size); current_position += wavfile->extended_size; } } else if (strcmp(fmt_buf, "data") == 0) { /* read data chunk */ if (freadx(&(wavfile->data_chunk_size), 4, 1, fp) < 1) { fprintf(stderr, "WARNING : Invalid data chunk size!\n"); return 0; } current_position += 4; wavfile->data = (char *) getmem(wavfile->data_chunk_size, 1); if (freadx(wavfile->data, 1, wavfile->data_chunk_size, fp) < wavfile->data_chunk_size) { fprintf(stderr, "WARNING : Invalid waveform data!\n"); return 0; } current_position += wavfile->data_chunk_size; } else { /* skip other chunks */ if (freadx(&chunk_size, 4, 1, fp) < 1) { fprintf(stderr, "WARNING : Invalid chunk!\n"); return 0; } current_position += 4; fseek(fp, current_position, chunk_size); current_position += chunk_size; } rest_size = wavfile->file_size - current_position; } fclose(fp); return 1; } Boolean wavwrite(Wavfile * wavfile, const char *outpath) { FILE *fp = NULL; char tmp[STRLEN]; int buf[2] = { 0, 0 }; /* File Open */ fp = fopen(outpath, "wb"); if (fp == NULL) { return 0; } /* RIFF header */ strcpy(tmp, "RIFF"); fwritex(tmp, sizeof(char), 4, fp); /* file size */ buf[0] = wavfile->file_size; fwrite_little_endian(buf, 4, 1, fp); /* WAVE format */ strcpy(tmp, "WAVE"); fwritex(tmp, 4, 1, fp); /* fmt chunk */ strcpy(tmp, "fmt "); fwritex(tmp, 4, 1, fp); /* chunk size */ buf[0] = wavfile->fmt_chunk_size; fwrite_little_endian(buf, 4, 1, fp); /* format_id */ fwritex(&(wavfile->format_id), 2, 1, fp); /* channel_num (mono:1, stereo:2) */ fwritex(&(wavfile->channel_num), 2, 1, fp); /* sampling frequency */ buf[0] = wavfile->sample_freq; fwrite_little_endian(buf, 4, 1, fp); /* Byte/sec */ buf[0] = wavfile->byte_per_sec; fwrite_little_endian(buf, 4, 1, fp); /* block size */ fwritex(&(wavfile->block_size), 2, 1, fp); /* Bit/sample */ fwritex(&(wavfile->bit_per_sample), 2, 1, fp); /* extension */ if (wavfile->fmt_chunk_size != 16) { fwritex(&(wavfile->extended_size), 2, 1, fp); } /* 'data' chunk */ strcpy(tmp, "data"); fwritex(tmp, 4, 1, fp); /* data chunk size */ buf[0] = wavfile->data_chunk_size; fwritex(buf, 4, 1, fp); /* waveform data */ fwritex(wavfile->data, sizeof(char), wavfile->data_chunk_size, fp); fclose(fp); return 1; } void wavsplit(Wavfile * wavout, const Wavfile * wavin) { int i, j, data_num, byte_per_sample; Wavfile *head = wavout; for (i = 0; i < wavin->channel_num; i++) { /* WAV header */ copy_wav_header(wavout, wavin); wavout->channel_num = 1; wavout->byte_per_sec = wavin->byte_per_sec / wavin->channel_num; wavout->block_size = wavin->block_size / wavin->channel_num; wavout->data_chunk_size = wavin->data_chunk_size / wavin->channel_num; wavout->file_size = 4 * 3 + (4 * 2 + wavout->fmt_chunk_size) + (4 * 2 + wavout->data_chunk_size) - 8; /* WAV waveform */ byte_per_sample = wavout->bit_per_sample / 8; data_num = wavout->data_chunk_size / byte_per_sample; wavout->data = (char *) getmem(data_num, byte_per_sample); for (j = 0; j < data_num; j++) { memcpy(wavout->data + (j * byte_per_sample), wavin->data + (wavin->channel_num * j + i) * byte_per_sample, byte_per_sample); } wavout++; } wavout = head; } void copy_wav_header(Wavfile * dest_wav, const Wavfile * source_wav) { dest_wav->file_size = source_wav->file_size; dest_wav->fmt_chunk_size = source_wav->fmt_chunk_size; dest_wav->data_chunk_size = source_wav->data_chunk_size; dest_wav->format_id = source_wav->format_id; dest_wav->channel_num = source_wav->channel_num; dest_wav->sample_freq = source_wav->sample_freq; dest_wav->byte_per_sec = source_wav->byte_per_sec; dest_wav->block_size = source_wav->block_size; dest_wav->bit_per_sample = source_wav->bit_per_sample; dest_wav->extended_size = source_wav->extended_size; dest_wav->input_data_type = source_wav->input_data_type; dest_wav->format_type = source_wav->format_type; } void free_wav_list(Filelist * filelist) { int i; for (i = 0; i < filelist->num; i++) { free(filelist->name[i]); } free(filelist->name); } void free_wav_data(Wavfile * wavfile) { free(wavfile->data); } SPTK-3.9/bin/wavsplit/wavsplit.c0000644001051300105040000002346412637156647013551 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * Split stereo WAV file into two monaural WAV files * * * * 2013.3 Akira Tamamori * * 2014.8 Takashi Aritake * * * * usage: * * wavsplit [ options ] * * options: * * -i I : Input WAV file or directory * * -o O : Output WAV files or directories * * infile: * * wav file format * * outfile: * * wav file format * * * ************************************************************************/ static char *rcs_id = ""; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #if defined(WIN32) #include "SPTK.h" #else #include #endif #define STRLEN 512 /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - Split stereo WAV file into two monaural WAV files \n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] \n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -i I : Input WAV file or directory\n"); fprintf(stderr, " -o O : Output WAV files or directories\n"); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " wav file format \n"); fprintf(stderr, " outfile:\n"); fprintf(stderr, " wav file format \n"); fprintf(stderr, " notice:\n"); fprintf(stderr, " wavsplit does not distinguish between\n"); fprintf(stderr, " small and capital letters of the file extension.\n"); fprintf(stderr, " The first output WAV file or directory is related \n"); fprintf(stderr, " to channel 0, and the other is related to channel 1.\n"); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char **argv) { int i, j; char *indir = NULL, *inname = NULL, *tmp; char *outdir[2], *outname[2]; for (i = 0; i < 2; i++) { outdir[i] = NULL; outname[i] = NULL; } char strtmp[STRLEN]; Filelist filelist; Wavfile wavin, wavout[2]; if ((cmnd = strrchr(argv[0], '/')) == NULL) { cmnd = argv[0]; } else { cmnd++; } while (--argc) { if (**++argv == '-') { switch (*(*argv + 1)) { case 'i': /* input */ separate_path(&indir, &inname, *++argv); --argc; break; case 'o': /* output directory */ /* single output */ separate_path(&outdir[0], &outname[0], *++argv); --argc; /* double output */ if (argc > 1) { if (**(argv + 1) != '-') { separate_path(&outdir[1], &outname[1], *++argv); if ((outname[0] == NULL) ^ (outname[1] == NULL)) { fprintf(stderr, "%s : The outputs must be either wavfile or directory!\n", cmnd); usage(EXIT_FAILURE); } --argc; } } break; case 'h': usage(EXIT_SUCCESS); break; default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(EXIT_FAILURE); } } } if (outname[0] != NULL && outname[1] == NULL) { fprintf(stderr, "%s : Output wav files must be pair! \n", cmnd); usage(EXIT_FAILURE); } if (indir == NULL) { fprintf(stderr, "%s : Input directory or wav file must be specified! \n", cmnd); usage(EXIT_FAILURE); } if (outdir[0] == NULL) { fprintf(stderr, "%s : The output wav file or directory must be specified! \n", cmnd); usage(EXIT_FAILURE); } if (inname == NULL) { if (!get_wav_list(&filelist, indir)) { fprintf(stderr, "%s : Can't open directory %s!\n", cmnd, indir); usage(EXIT_FAILURE); } if (outname[0] != NULL) { fprintf(stderr, "%s : The outputs must be directory, if the input is directory!\n", cmnd); usage(EXIT_FAILURE); } } else { filelist.num = 1; filelist.name = (char **) getmem(1, sizeof(char *)); filelist.name[0] = (char *) getmem(STRLEN, sizeof(char)); strcpy(filelist.name[0], inname); } for (i = 0; i < filelist.num; i++) { /* Read WAV file */ sprintf(strtmp, "%s/%s", indir, filelist.name[i]); if (!wavread(&wavin, strtmp)) { fprintf(stderr, "%s : Can't open %s!\n", cmnd, strtmp); usage(EXIT_FAILURE); } if (wavin.channel_num != 2) { fprintf(stderr, "%s isn't the stereo WAV file! \n", strtmp); continue; } wavsplit(wavout, &wavin); for (j = 0; j < wavin.channel_num; j++) { if (outdir[1] == NULL) { /* single output */ tmp = strrchr(filelist.name[i], '.'); if (j == 0 && tmp != NULL) { *tmp = '\0'; } sprintf(strtmp, "%s/%s_%d.wav", outdir[0], filelist.name[i], j); } else { /* double output */ if (outname[0] == NULL && outname[1] == NULL) { sprintf(strtmp, "%s/%s", outdir[j], filelist.name[i]); } else { sprintf(strtmp, "%s/%s", outdir[j], outname[j]); } } if (!wavwrite(&(wavout[j]), strtmp)) { fprintf(stderr, "%s : Can't open %s! \n", cmnd, strtmp); usage(EXIT_FAILURE); } } free_wav_data(&wavin); for (j = 0; j < wavin.channel_num; j++) { free_wav_data(&(wavout[j])); } } free_wav_list(&filelist); return 0; } SPTK-3.9/bin/window/0000755001051300105040000000000012637167716011240 500000000000000SPTK-3.9/bin/window/Makefile.am0000644001051300105040000000021412442245135013173 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = window window_SOURCES = window.c _window.c window_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/window/Makefile.in0000644001051300105040000004262412637167422013227 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = window$(EXEEXT) subdir = bin/window ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_window_OBJECTS = window.$(OBJEXT) _window.$(OBJEXT) window_OBJECTS = $(am_window_OBJECTS) window_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(window_SOURCES) DIST_SOURCES = $(window_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include window_SOURCES = window.c _window.c window_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/window/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/window/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) window$(EXEEXT): $(window_OBJECTS) $(window_DEPENDENCIES) $(EXTRA_window_DEPENDENCIES) @rm -f window$(EXEEXT) $(AM_V_CCLD)$(LINK) $(window_OBJECTS) $(window_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_window.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/window.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/window/window.c0000644001051300105040000002021012637156646012626 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * Data Windowing * * * * 1996.1 N.Miyazaki * * 1998.11 T.Masuko * * * * usage: * * window [ options ] [ infile ] > outfile * * options: * * -l l : frame length of input [256] * * -L L : frane length of output [l] * * -n n : type of normalization [1] * * 0 none * * 1 normalize by power * * 2 normalize by magnitude * * -w w : type of window [0] * * 0 (Blackman) * * 1 (Hamming) * * 2 (Hanning) * * 3 (Bartlett) * * 4 (trapezoid) * * 5 (rectangul) * * infile: * * stdin for default * * input is assumed to be double * * * ************************************************************************/ static char *rcs_id = "$Id: window.c,v 1.26 2015/12/14 01:14:25 uratec Exp $"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define FLENG 256 #define WINTYPE BLACKMAN #define NORMFLG 1 /* Command Name */ char *cmnd; int usage(void) { fprintf(stderr, "\n"); fprintf(stderr, " %s - data windowing\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile ] > outfile\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -l l : frame length of input [%d]\n", FLENG); fprintf(stderr, " -L L : frame length of output [l]\n"); fprintf(stderr, " -n n : type of normalization [%d]\n", NORMFLG); fprintf(stderr, " 0 none\n"); fprintf(stderr, " 1 normalize by power\n"); fprintf(stderr, " 2 normalize by magnitude\n"); fprintf(stderr, " -w w : type of window [%d]\n", WINTYPE); fprintf(stderr, " 0 (Blackman)\n"); fprintf(stderr, " 1 (Hamming)\n"); fprintf(stderr, " 2 (Hanning)\n"); fprintf(stderr, " 3 (Bartlett)\n"); fprintf(stderr, " 4 (trapezoid)\n"); fprintf(stderr, " 5 (rectangular)\n"); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " data sequence (%s) [stdin]\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " windowed data sequence (%s)\n", FORMAT); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(1); } int main(int argc, char *argv[]) { FILE *fp = stdin; char *s, c; int fleng = FLENG, outl = -1, normflg = NORMFLG; Window wintype = WINTYPE; double *x; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) { if (*(s = *++argv) == '-') { c = *++s; if (*++s == '\0' && (c == 'n' || c == 'l' || c == 'w' || c == 'L')) { s = *++argv; --argc; } switch (c) { case 'w': wintype = (Window) atoi(s); break; case 'l': fleng = atoi(s); break; case 'L': outl = atoi(s); break; case 'n': normflg = atoi(s); break; case 'h': default: usage(); } } else fp = getfp(*argv, "rb"); } if (outl < 0) outl = fleng; x = dgetmem(fleng > outl ? fleng : outl); while (freadf(x, sizeof(*x), fleng, fp) == fleng) { window(wintype, x, fleng, normflg); fwritef(x, sizeof(*x), outl, stdout); } return (0); } SPTK-3.9/bin/window/_window.c0000644001051300105040000002007412637156646012775 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /**************************************************************** $Id: _window.c,v 1.22 2015/12/14 01:14:25 uratec Exp $ Window function --------------- double window( name, x, size, pnflg ); char *name : window name blackman, hamming, hanning, bartlett, trapezoid real *x : 1 frame data int size : window(frame) size int nflg : normalizing flag nflg = 0 : don't normalize 1 : normalize by power 2 : normalize by magnitude set windowed value to "*x" and return "normalizing gain". *****************************************************************/ #include #include #include #if defined(WIN32) #include "SPTK.h" #else #include #endif /************************************************ Blackman window double *blackman(w, leng) double *w : window values int leng : window length ************************************************/ static double *blackman(double *w, const int leng) { int i; double arg, x; double *p; arg = M_2PI / (leng - 1); for (p = w, i = 0; i < leng; i++) { x = arg * i; *p++ = 0.42 - 0.50 * cos(x) + 0.08 * cos(x + x); } return (w); } /************************************************ Hamming window double *hamming(w, leng) double *w : window values int leng : window length ************************************************/ static double *hamming(double *w, const int leng) { int i; double arg; double *p; arg = M_2PI / (leng - 1); for (p = w, i = 0; i < leng; i++) *p++ = 0.54 - 0.46 * cos(i * arg); return (w); } /************************************************ Hanning window double *hanning(w, leng) double *w : window values int leng : window length ************************************************/ static double *hanning(double *w, const int leng) { int i; double arg; double *p; arg = M_2PI / (leng - 1); for (p = w, i = 0; i < leng; i++) *p++ = 0.5 * (1 - cos(i * arg)); return (w); } /************************************************ Bartlett window double *bartlett(w, leng) double *w : window values int leng : window length ************************************************/ static double *bartlett(double *w, const int leng) { int k, m; double *p, slope; m = leng / 2; slope = 2.0 / (double) (leng - 1); for (k = 0, p = w; k < m; k++) *p++ = slope * k; for (; k < leng; k++) *p++ = 2.0 - slope * k; return (w); } /************************************************ trapezoid window double *trapezoid(w, leng) double *w : window values int leng : window length ************************************************/ static double *trapezoid(double *w, const int leng) { int k, m1, m2; double *p, slope; m1 = leng / 4; m2 = (leng * 3) / 4; slope = 4.0 / (double) (leng - 1); for (k = 0, p = w; k < m1; k++) *p++ = slope * k; for (; k < m2; k++) *p++ = 1.0; for (; k < leng; k++) *p++ = 4.0 - slope * k; return (w); } /************************************************ rectangular window double *rectangular(w, leng) double *w : window values int leng : window length ************************************************/ static double *rectangular(double *w, const int leng) { int k; double *p; for (k = 0, p = w; k < leng; k++) *p++ = 1.0; return (w); } double window(Window type, double *x, const int size, const int nflg) { int i; static double g; static double *w = NULL; static Window ptype = (Window) - 1; static int psize = -1, pnflg = -1; if ((type != ptype) || (size != psize) || (nflg != pnflg)) { if (size > psize) { if (w != NULL) free(w); w = dgetmem(size); } switch (type) { case BLACKMAN: blackman(w, size); break; case HAMMING: hamming(w, size); break; case HANNING: hanning(w, size); break; case BARTLETT: bartlett(w, size); break; case TRAPEZOID: trapezoid(w, size); break; case RECTANGULAR: rectangular(w, size); break; default: fprintf(stderr, "window : Unknown window type %d!\n", (int) type); exit(1); } switch (nflg) { case 1: for (i = 0, g = 0.0; i < size; i++) g += w[i] * w[i]; g = sqrt(g); for (i = 0; i < size; i++) w[i] /= g; break; case 2: for (i = 0, g = 0.0; i < size; i++) g += w[i]; for (i = 0; i < size; i++) w[i] /= g; break; case 0: default: g = 1.0; } ptype = type; psize = size; pnflg = nflg; } for (i = 0; i < size; i++) x[i] = x[i] * w[i]; return (g); } SPTK-3.9/bin/x2x/0000755001051300105040000000000012637167716010452 500000000000000SPTK-3.9/bin/x2x/Makefile.am0000644001051300105040000000016712442245137012416 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = x2x x2x_SOURCES = x2x.c x2x_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/x2x/Makefile.in0000644001051300105040000004236012637167422012436 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = x2x$(EXEEXT) subdir = bin/x2x ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_x2x_OBJECTS = x2x.$(OBJEXT) x2x_OBJECTS = $(am_x2x_OBJECTS) x2x_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(x2x_SOURCES) DIST_SOURCES = $(x2x_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include x2x_SOURCES = x2x.c x2x_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/x2x/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/x2x/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) x2x$(EXEEXT): $(x2x_OBJECTS) $(x2x_DEPENDENCIES) $(EXTRA_x2x_DEPENDENCIES) @rm -f x2x$(EXEEXT) $(AM_V_CCLD)$(LINK) $(x2x_OBJECTS) $(x2x_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/x2x.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/x2x/x2x.c0000644001051300105040000011661012637156646011264 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************* * * * Data Type Transformation * * * * 1985.12 K.Tokuda * * 1996.5 K.Koishida * * 2010.3 A.Tamamori * * 2010.10 T.Sawada * * * * usage: * * x2x [options] [infile] > stdout * * options: * * +type1 : input data type [f] * * +type2 : output data type [type1] * * c (char) C (unsigned char) * * s (short) S (unsigned short) * * i (int) I (unsigned int) * * i3 (int, 3byte) I3 (unsigned int, 3byte) * * l (long) L (unsigned long) * * le (long long) LE (unsigned long long) * * f (float) d (double) * * de (long double) a (ascii) * * aN (ascii w/ column number N;N=1 by default) * * -r : specify rounding off when a real number * * is substituted for a integer [FALSE] * * -o : clip by minimum and maximum of * * output data type if input data is over * * the range of output data type [FALSE] * * %format : specify output format similar to [%Lg] * * "printf()". * * if type2 is ascii. * * * *************************************************************************/ static char *rcs_id = "$Id: x2x.c,v 1.48 2015/12/14 01:14:25 uratec Exp $"; /* Standard C Libraries */ #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #include #include #if defined(WIN32) #include "SPTK.h" #else #include #endif #include #include /* Default Values */ #define ROUND FA #define CLIP FA #define COL 1 #define FORM_LONG "%d" #define FORM_ULONG "%u" #define FORM_LLONG "%lld" #define FORM_ULLONG "%llu" #define FORM_FLOAT "%g" #define FORM_LDBL "%Lg" #define INT3_MAX 8388607 #define INT3_MIN (-8388608) #define UINT3_MAX 16777215 #ifndef LLONG_MAX #define LLONG_MAX __LONG_LONG_MAX__ #define LLONG_MIN (-__LONG_LONG_MAX__-1) #define ULLONG_MAX (__LONG_LONG_MAX__*2ULL+1) #endif char *BOOL[] = { "FALSE", "TRUE" }; /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - data type transformation\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " +type1 : input data type [f]\n"); fprintf(stderr, " +type2 : output data type [type1]\n"); fprintf(stderr, " c (char, %lubyte) C (unsigned char, %lubyte)\n", (unsigned long) sizeof(char), (unsigned long) sizeof(unsigned char)); fprintf(stderr, " s (short, %lubyte) S (unsigned short, %lubyte)\n", (unsigned long) sizeof(short), (unsigned long) sizeof(unsigned short)); fprintf(stderr, " i (int, %lubyte) I (unsigned int, %lubyte)\n", (unsigned long) sizeof(int), (unsigned long) sizeof(unsigned int)); fprintf(stderr, " i3 (int, 3byte) I3 (unsigned int, 3byte)\n"); fprintf(stderr, " l (long, %lubyte) L (unsigned long, %lubyte)\n", (unsigned long) sizeof(long), (unsigned long) sizeof(unsigned long)); fprintf(stderr, " le (long long, %lubyte) LE (unsigned long long, %lubyte)\n", (unsigned long) sizeof(long long), (unsigned long) sizeof(unsigned long long)); fprintf(stderr, " f (float, %lubyte) d (double, %lubyte)\n", (unsigned long) sizeof(float), (unsigned long) sizeof(double)); fprintf(stderr, " de (long double, %lubyte) a (ascii)\n", (unsigned long) sizeof(long double)); fprintf(stderr, " aN (ascii with column number N, defalut is N=%d)\n", COL); fprintf(stderr, " -r : specify rounding off when a real number\n"); fprintf(stderr, " is substituted for a integer [%s]\n", BOOL[ROUND]); fprintf(stderr, " -o : clip by minimum and maximum of output data \n"); fprintf(stderr, " type if input data is over the range of \n"); fprintf(stderr, " output data type. if -o option is not given, \n"); fprintf(stderr, " process is aborted in the above case [%s]\n", BOOL[CLIP]); fprintf(stderr, " %%format : specify output format similar to 'printf()', \n"); fprintf(stderr, " if type2 is ascii. [%%Lg]\n"); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " data sequence [stdin]\n"); fprintf(stderr, " stdout:\n"); fprintf(stderr, " transformed data sequence\n"); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } double r = 0.0; int main(int argc, char **argv) { char c1 = 'f', c2 = 'f', *form = NULL; long double x; size_t size1 = 0, size2 = 0; int i = 1, col = COL, n; FILE *fp = stdin; Boolean round = ROUND, clip = CLIP, form_fix = 0; void x2x(void *x1, void *x2, char c1, char c2, int clip); if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) if (**++argv == '+') { (*argv)++; while (**argv != '\0') { switch (**argv) { case 's': if (size1 == 0) { c1 = 's'; size1 = sizeof(short); } else { c2 = 's'; size2 = sizeof(short); } break; case 'S': if (size1 == 0) { c1 = 'S'; size1 = sizeof(unsigned short); } else { c2 = 'S'; size2 = sizeof(unsigned short); } break; case 'i': if (*(*argv + 1) == '3') { if (size1 == 0) { c1 = 't'; size1 = 3; } else { c2 = 't'; size2 = 3; } (*argv)++; } else { if (size1 == 0) { c1 = 'i'; size1 = sizeof(int); } else { c2 = 'i'; size2 = sizeof(int); } } break; case 'I': if (*(*argv + 1) == '3') { if (size1 == 0) { c1 = 'T'; size1 = 3; } else { c2 = 'T'; size2 = 3; } (*argv)++; } else { if (size1 == 0) { c1 = 'I'; size1 = sizeof(unsigned int); } else { c2 = 'I'; size2 = sizeof(unsigned int); } } break; case 'l': if (*(*argv + 1) == 'e') { if (size1 == 0) { c1 = 'u'; size1 = sizeof(long long); } else { c2 = 'u'; size2 = sizeof(long long); } (*argv)++; } else { if (size1 == 0) { c1 = 'l'; size1 = sizeof(long); } else { c2 = 'l'; size2 = sizeof(long); } } break; case 'L': if (*(*argv + 1) == 'E') { if (size1 == 0) { c1 = 'U'; size1 = sizeof(unsigned long long); } else { c2 = 'U'; size2 = sizeof(unsigned long long); } (*argv)++; } else { if (size1 == 0) { c1 = 'L'; size1 = sizeof(unsigned long); } else { c2 = 'L'; size2 = sizeof(unsigned long); } } break; case 'f': if (size1 == 0) { c1 = 'f'; size1 = sizeof(float); } else { c2 = 'f'; size2 = sizeof(float); } break; case 'd': if (*(*argv + 1) == 'e') { if (size1 == 0) { c1 = 'v'; size1 = sizeof(long double); } else { c2 = 'v'; size2 = sizeof(long double); } (*argv)++; } else { if (size1 == 0) { c1 = 'd'; size1 = sizeof(double); } else { c2 = 'd'; size2 = sizeof(double); } } break; case 'c': if (size1 == 0) { c1 = 'c'; size1 = sizeof(char); } else { c2 = 'c'; size2 = sizeof(char); } break; case 'C': if (size1 == 0) { c1 = 'C'; size1 = sizeof(unsigned char); } else { c2 = 'C'; size2 = sizeof(unsigned char); } break; case 'a': if (size1 == 0) { c1 = 'a'; size1 = -1; } else { c2 = 'a'; size2 = -1; if (*(*argv + 1) != '\0') { /* ex. +fa... */ if (isdigit(*(*argv + 1))) { /* ex. +fa5... */ char *ptr; char *subst = NULL; ptr = strchr(*argv + 2, '%'); /* search '%' */ if (ptr == NULL) { /* ex. +fa5 ('%' is not found) */ if (sscanf(*argv + 1, "%d", &col) == 0) { col = COL; } } else { /* ex. +fa5%.10f ('%' is found) */ subst = getmem(strlen(*argv + 1) - strlen(ptr) + 1, sizeof(char)); form = getmem(strlen(ptr) + 1, sizeof(char)); strncpy(subst, *argv + 1, strlen(*argv + 1) - strlen(ptr)); /* 5 (column num.) */ strncpy(form, ptr, strlen(ptr)); /* %.10f */ if (sscanf(subst, "%d", &col) == 0) { col = COL; } form_fix = 1; /* format is fixed */ } if (subst != NULL) { free(subst); } } else if (*(*argv + 1) == '%') { /* ex. +fa%.10f (no column num.) */ form_fix = 1; /* format is fixed */ form = getmem((strlen(*argv + 1) + 1), sizeof(char)); strcpy(form, *argv + 1); /* %.10f */ } while (*(*argv + 1) != '\0') { (*argv)++; } } if (form_fix != 1) { switch (c1) { case 'U': form = getmem((strlen(FORM_ULLONG) + 1), sizeof(char)); strcpy(form, FORM_ULLONG); break; case 'u': form = getmem((strlen(FORM_LLONG) + 1), sizeof(char)); strcpy(form, FORM_LLONG); break; case 'S': case 'I': case 'L': case 'C': case 'T': form = getmem((strlen(FORM_ULONG) + 1), sizeof(char)); strcpy(form, FORM_ULONG); break; case 's': case 'i': case 'l': case 'c': case 't': form = getmem((strlen(FORM_LONG) + 1), sizeof(char)); strcpy(form, FORM_LONG); break; case 'f': case 'd': form = getmem((strlen(FORM_FLOAT) + 1), sizeof(char)); strcpy(form, FORM_FLOAT); break; default: form = getmem((strlen(FORM_LDBL) + 1), sizeof(char)); strcpy(form, FORM_LDBL); } } } break; default: fprintf(stderr, "%s : Invalid option '+%c'!\n", cmnd, *(*argv + 1)); usage(1); } (*argv)++; } } else if (**argv == '-') { switch (*(*argv + 1)) { case 'r': round = 1 - round; break; case 'o': clip = 1 - clip; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '-%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else if (**argv == '%') form = *argv; else if (c1 == 'a') fp = getfp(*argv, "rt"); else fp = getfp(*argv, "rb"); if (round) r = 0.5; if (size1 == 0) { size1 = sizeof(float); c1 = 'f'; } if (size2 == 0) { size2 = size1; c2 = c1; } if (c1 == 'a') { if (c2 == 'a') while ((n = fscanf(fp, "%Le", &x)) != EOF) { if (n == 1) { printf(form, x); if (i == col) { i = 1; printf("\n"); } else { i++; printf("\t"); } } else { fprintf(stderr, "%s : error : Invalid non-numerical data is input !\n", cmnd); usage(1); } } else while ((n = fscanf(fp, "%Le", &x)) != EOF) { if (n == 1) { x2x(&x, &x, 'v', c2, clip); fwritex(&x, size2, 1, stdout); } else { fprintf(stderr, "%s : error : Invalid non-numerical data is input !\n", cmnd); usage(1); } } } else { if (c2 == 'a') { while (freadx(&x, size1, 1, fp) == 1) { x2x(&x, &x, c1, 'v', clip); switch (c1) { case 'v': printf(form, (long double) x); break; case 'd': printf(form, (double) x); break; case 'f': printf(form, (float) x); break; case 'U': printf(form, (unsigned long long) x); break; case 'u': printf(form, (long long) x); break; case 'S': case 'I': case 'L': case 'C': case 'T': printf(form, (unsigned long) x); break; default: printf(form, (long) x); } if (i == col) { i = 1; printf("\n"); } else { i++; printf("\t"); } } } else while (freadx(&x, size1, 1, fp) == 1) { x2x(&x, &x, c1, c2, clip); fwritex(&x, size2, 1, stdout); } } return (0); } void x2x(void *x1, void *x2, char c1, char c2, int clip) { long long xl = 0; unsigned long long xul = 0; long double xd = 0.0; int y = 0; switch (c1) { case 's': xl = *(short *) x1; break; case 'i': xl = *(int *) x1; break; case 'l': xl = *(long *) x1; break; case 'u': xl = *(long long *) x1; break; case 'S': xul = *(unsigned short *) x1; break; case 'I': xul = *(unsigned int *) x1; break; case 'L': xul = *(unsigned long *) x1; break; case 'U': xul = *(unsigned long long *) x1; break; case 'f': xd = *(float *) x1; break; case 'd': xd = *(double *) x1; break; case 'v': xd = *(long double *) x1; break; case 'c': xl = *(char *) x1; break; case 'C': xul = *(unsigned char *) x1; break; case 't': /* 3byte, signed */ y = *(int *) x1 & 0x00FFFFFF; if (y >> 23 == 1) y = y | 0xFF000000; xl = y; break; case 'T': /* 3byte, unsigned */ xul = *(unsigned int *) x1 & 0x00FFFFFF; break; } if (clip) { switch (c2) { case 's': if (xl > SHRT_MAX || xl < SHRT_MIN || xul > SHRT_MAX || xd > SHRT_MAX || xd < SHRT_MIN) fprintf(stderr, "%s : warning: input data is over the range of type 'short'!\n", cmnd); xl = ((xl < SHRT_MIN) ? SHRT_MIN : ((xl > SHRT_MAX) ? SHRT_MAX : xl)); xul = ((xul > SHRT_MAX) ? SHRT_MAX : xul); xd = ((xd < SHRT_MIN) ? SHRT_MIN : ((xd > SHRT_MAX) ? SHRT_MAX : xd)); break; case 'i': if (xl > INT_MAX || xl < INT_MIN || xul > INT_MAX || xd > INT_MAX || xd < INT_MIN) fprintf(stderr, "%s : warning: input data is over the range of type 'int'!\n", cmnd); xl = ((xl < INT_MIN) ? INT_MIN : ((xl > INT_MAX) ? INT_MAX : xl)); xul = ((xul > INT_MAX) ? INT_MAX : xul); xd = ((xd < INT_MIN) ? INT_MIN : ((xd > INT_MAX) ? INT_MAX : xd)); break; case 'l': if (xl > LONG_MAX || xl < LONG_MIN || xul > LONG_MAX || xd > LONG_MAX || xd < LONG_MIN) fprintf(stderr, "%s : warning: input data is over the range of type 'long'!\n", cmnd); xl = ((xl < LONG_MIN) ? LONG_MIN : ((xl > LONG_MAX) ? LONG_MAX : xl)); xul = ((xul > LONG_MAX) ? LONG_MAX : xul); xd = ((xd < LONG_MIN) ? LONG_MIN : ((xd > LONG_MAX) ? LONG_MAX : xd)); break; case 'u': if (xul > LLONG_MAX || xd > LLONG_MAX || xd < LLONG_MIN) fprintf(stderr, "%s : warning: input data is over the range of type 'long long'!\n", cmnd); xul = ((xul > LLONG_MAX) ? LLONG_MAX : xul); xd = ((xd < LLONG_MIN) ? LLONG_MIN : ((xd > LLONG_MAX) ? LLONG_MAX : xd)); break; case 'S': if (xl > USHRT_MAX || xl < 0 || xul > USHRT_MAX || xd > USHRT_MAX || xd < 0.0) fprintf(stderr, "%s : warning: input data is over the range of type 'unsigned short'!\n", cmnd); xl = ((xl < 0) ? 0 : ((xl > USHRT_MAX) ? USHRT_MAX : xl)); xul = ((xul > USHRT_MAX) ? USHRT_MAX : xul); xd = ((xd < 0.0) ? 0.0 : ((xd > USHRT_MAX) ? USHRT_MAX : xd)); break; case 'I': if (xl > UINT_MAX || xl < 0 || xul > UINT_MAX || xd > UINT_MAX || xd < 0.0) fprintf(stderr, "%s : warning: input data is over the range of type 'unsigned int'!\n", cmnd); xl = ((xl < 0) ? 0 : ((xl > UINT_MAX) ? UINT_MAX : xl)); xul = ((xul > UINT_MAX) ? UINT_MAX : xul); xd = ((xd < 0.0) ? 0.0 : ((xd > UINT_MAX) ? UINT_MAX : xd)); break; case 'L': if (xl > ULONG_MAX || xl < 0 || xul > ULONG_MAX || xd > ULONG_MAX || xd < 0.0) fprintf(stderr, "%s : warning: input data is over the range of type 'unsigned long'!\n", cmnd); xl = ((xl < 0) ? 0 : ((xl > ULONG_MAX) ? ULONG_MAX : xl)); xul = ((xul > ULONG_MAX) ? ULONG_MAX : xul); xd = ((xd < 0.0) ? 0.0 : ((xd > ULONG_MAX) ? ULONG_MAX : xd)); break; case 'U': if (xl < 0 || xd > ULLONG_MAX || xd < 0.0) fprintf(stderr, "%s : warning: input data is over the range of type 'unsigned long long'!\n", cmnd); xl = ((xl < 0) ? 0 : xl); xd = ((xd < 0.0) ? 0.0 : ((xd > ULLONG_MAX) ? ULLONG_MAX : xd)); break; case 'f': if (xd > FLT_MAX || xd < (FLT_MAX * (-1))) fprintf(stderr, "%s : warning: input data is over the range of type 'float'!\n", cmnd); xd = ((xd < (FLT_MAX * (-1))) ? (FLT_MAX * (-1)) : ((xd > FLT_MAX) ? FLT_MAX : xd)); break; case 'd': if (xd > DBL_MAX || xd < (DBL_MAX * (-1))) fprintf(stderr, "%s : warning: input data is over the range of type 'double'!\n", cmnd); xd = ((xd < (DBL_MAX * (-1))) ? (DBL_MAX * (-1)) : ((xd > DBL_MAX) ? DBL_MAX : xd)); break; case 'v': if (xd > LDBL_MAX || xd < (LDBL_MAX * (-1))) fprintf(stderr, "%s : warning: input data is over the range of type 'long double'!\n", cmnd); break; case 'c': if (xl > CHAR_MAX || xl < CHAR_MIN || xul > CHAR_MAX || xd > CHAR_MAX || xd < CHAR_MIN) fprintf(stderr, "%s : warning: input data is over the range of type 'char'!\n", cmnd); xl = ((xl < CHAR_MIN) ? CHAR_MIN : ((xl > CHAR_MAX) ? CHAR_MAX : xl)); xul = ((xul > CHAR_MAX) ? CHAR_MAX : xul); xd = ((xd < CHAR_MIN) ? CHAR_MIN : ((xd > CHAR_MAX) ? CHAR_MAX : xd)); break; case 'C': if (xl > UCHAR_MAX || xl < 0.0 || xul > UCHAR_MAX || xd > UCHAR_MAX || xd < 0.0) fprintf(stderr, "%s : warning: input data is over the range of type 'unsigned char'!\n", cmnd); xl = ((xl < 0) ? 0 : ((xl > UCHAR_MAX) ? UCHAR_MAX : xl)); xul = ((xul > UCHAR_MAX) ? UCHAR_MAX : xul); xd = ((xd < 0.0) ? 0.0 : ((xd > UCHAR_MAX) ? UCHAR_MAX : xd)); break; case 't': if (xl > INT3_MAX || xl < INT3_MIN || xul > INT3_MAX || xd > INT3_MAX || xd < INT3_MIN) fprintf(stderr, "%s : warning: input data is over the range of type 'int(3byte)'!\n", cmnd); xl = ((xl < INT3_MIN) ? INT3_MIN : ((xl > INT3_MAX) ? INT3_MAX : xl)); xul = ((xul > INT3_MAX) ? INT3_MAX : xul); xd = ((xd < INT3_MIN) ? INT3_MIN : ((xd > INT3_MAX) ? INT3_MAX : xd)); break; case 'T': if (xl > UINT3_MAX || xl < 0 || xul > UINT3_MAX || xd > UINT3_MAX || xd < 0.0) fprintf(stderr, "%s : warning: input data is over the range of type 'unsigned int(3byte)'!\n", cmnd); xl = ((xl < 0) ? 0 : ((xl > UINT3_MAX) ? UINT3_MAX : xl)); xul = ((xul > UINT3_MAX) ? UINT3_MAX : xul); xd = ((xd < 0.0) ? 0.0 : ((xd > UINT3_MAX) ? UINT3_MAX : xd)); break; } } else { switch (c2) { case 's': if (xl > SHRT_MAX || xl < SHRT_MIN || xul > SHRT_MAX || xd > SHRT_MAX || xd < SHRT_MIN) { fprintf(stderr, "%s : error: input data is over the range of type 'short'!\n", cmnd); exit(1); } break; case 'i': if (xl > INT_MAX || xl < INT_MIN || xul > INT_MAX || xd > INT_MAX || xd < INT_MIN) { fprintf(stderr, "%s : error: input data is over the range of type 'int'!\n", cmnd); exit(1); } break; case 'l': if (xl > LONG_MAX || xl < LONG_MIN || xul > LONG_MAX || xd > LONG_MAX || xd < LONG_MIN) { fprintf(stderr, "%s : error: input data is over the range of type 'long'!\n", cmnd); exit(1); } break; case 'u': if (xul > LLONG_MAX || xd > LLONG_MAX || xd < LLONG_MIN) { fprintf(stderr, "%s : error: input data is over the range of type 'long long'!\n", cmnd); exit(1); } break; case 'S': if (xl > USHRT_MAX || xl < 0 || xul > USHRT_MAX || xd > USHRT_MAX || xd < 0.0) { fprintf(stderr, "%s : error: input data is over the range of type 'unsigned short'!\n", cmnd); exit(1); } break; case 'I': if (xl > UINT_MAX || xl < 0 || xul > UINT_MAX || xd > UINT_MAX || xd < 0.0) { fprintf(stderr, "%s : error: input data is over the range of type 'unsigned int'!\n", cmnd); exit(1); } break; case 'L': if (xl > ULONG_MAX || xl < 0 || xul > ULONG_MAX || xd > ULONG_MAX || xd < 0.0) { fprintf(stderr, "%s : error: input data is over the range of type 'unsigned long'!\n", cmnd); exit(1); } break; case 'U': if (xl < 0 || xd > ULLONG_MAX || xd < 0.0) { fprintf(stderr, "%s : error: input data is over the range of type 'unsigned long long'!\n", cmnd); exit(1); } break; case 'f': if (xd > FLT_MAX || xd < (FLT_MAX * (-1))) { fprintf(stderr, "%s : error: input data is over the range of type 'float'!\n", cmnd); exit(1); } break; case 'd': if (xd > DBL_MAX || xd < (DBL_MAX * (-1))) { fprintf(stderr, "%s : error: input data is over the range of type 'double'!\n", cmnd); exit(1); } break; case 'v': if (xd > LDBL_MAX || xd < (LDBL_MAX * (-1))) { fprintf(stderr, "%s : error: input data is over the range of type 'long double'!\n", cmnd); exit(1); } break; case 'c': if (xl > CHAR_MAX || xl < CHAR_MIN || xul > CHAR_MAX || xd > CHAR_MAX || xd < CHAR_MIN) { fprintf(stderr, "%s : error: input data is over the range of type 'char'!\n", cmnd); exit(1); } break; case 'C': if (xl > UCHAR_MAX || xl < 0.0 || xul > UCHAR_MAX || xd > UCHAR_MAX || xd < 0.0) { fprintf(stderr, "%s : error: input data is over the range of type 'unsigned char'!\n", cmnd); exit(1); } break; case 't': if (xl > INT3_MAX || xl < INT3_MIN || xul > INT3_MAX || xd > INT3_MAX || xd < INT3_MIN) { fprintf(stderr, "%s : error: input data is over the range of type 'int(3byte)'!\n", cmnd); exit(1); } break; case 'T': if (xl > UINT3_MAX || xl < 0 || xul > UINT3_MAX || xd > UINT3_MAX || xd < 0.0) { fprintf(stderr, "%s : error: input data is over the range of type 'unsigned int(3byte)'!\n", cmnd); exit(1); } break; } } switch (c2) { case 's': if (c1 == 's' || c1 == 'i' || c1 == 'l' || c1 == 'u' || c1 == 'c' || c1 == 't') *(short *) x2 = xl; else if (c1 == 'S' || c1 == 'I' || c1 == 'L' || c1 == 'U' || c1 == 'C' || c1 == 'T') *(short *) x2 = xul; else { if (xd > 0) *(short *) x2 = xd + r; else *(short *) x2 = xd - r; } break; case 'i': if (c1 == 's' || c1 == 'i' || c1 == 'l' || c1 == 'u' || c1 == 'c' || c1 == 't') *(int *) x2 = xl; else if (c1 == 'S' || c1 == 'I' || c1 == 'L' || c1 == 'U' || c1 == 'C' || c1 == 'T') *(int *) x2 = xul; else { if (xd > 0) *(int *) x2 = xd + r; else *(int *) x2 = xd - r; } break; case 'l': if (c1 == 's' || c1 == 'i' || c1 == 'l' || c1 == 'u' || c1 == 'c' || c1 == 't') *(long *) x2 = xl; else if (c1 == 'S' || c1 == 'I' || c1 == 'L' || c1 == 'U' || c1 == 'C' || c1 == 'T') *(long *) x2 = xul; else { if (xd > 0) *(long *) x2 = xd + r; else *(long *) x2 = xd - r; } break; case 'u': if (c1 == 's' || c1 == 'i' || c1 == 'l' || c1 == 'u' || c1 == 'c' || c1 == 't') *(long long *) x2 = xl; else if (c1 == 'S' || c1 == 'I' || c1 == 'L' || c1 == 'U' || c1 == 'C' || c1 == 'T') *(long long *) x2 = xul; else { if (xd > 0) *(long long *) x2 = xd + r; else *(long long *) x2 = xd - r; } break; case 'S': if (c1 == 's' || c1 == 'i' || c1 == 'l' || c1 == 'u' || c1 == 'c' || c1 == 't') *(unsigned short *) x2 = xl; else if (c1 == 'S' || c1 == 'I' || c1 == 'L' || c1 == 'U' || c1 == 'C' || c1 == 'T') *(unsigned short *) x2 = xul; else { if (xd > 0) *(unsigned short *) x2 = xd + r; else *(unsigned short *) x2 = xd - r; } break; case 'I': if (c1 == 's' || c1 == 'i' || c1 == 'l' || c1 == 'u' || c1 == 'c' || c1 == 't') *(unsigned int *) x2 = xl; else if (c1 == 'S' || c1 == 'I' || c1 == 'L' || c1 == 'U' || c1 == 'C' || c1 == 'T') *(unsigned int *) x2 = xul; else { if (xd > 0) *(unsigned int *) x2 = xd + r; else *(unsigned int *) x2 = xd - r; } break; case 'L': if (c1 == 's' || c1 == 'i' || c1 == 'l' || c1 == 'u' || c1 == 'c' || c1 == 't') *(unsigned long *) x2 = xl; else if (c1 == 'S' || c1 == 'I' || c1 == 'L' || c1 == 'U' || c1 == 'C' || c1 == 'T') *(unsigned long *) x2 = xul; else { if (xd > 0) *(unsigned long *) x2 = xd + r; else *(unsigned long *) x2 = xd - r; } break; case 'U': if (c1 == 's' || c1 == 'i' || c1 == 'l' || c1 == 'u' || c1 == 'c' || c1 == 't') *(unsigned long long *) x2 = xl; else if (c1 == 'S' || c1 == 'I' || c1 == 'L' || c1 == 'U' || c1 == 'C' || c1 == 'T') *(unsigned long long *) x2 = xul; else { if (xd > 0) *(unsigned long long *) x2 = xd + r; else *(unsigned long long *) x2 = xd - r; } break; case 'f': if (c1 == 's' || c1 == 'i' || c1 == 'l' || c1 == 'u' || c1 == 'c' || c1 == 't') *(float *) x2 = xl; else if (c1 == 'S' || c1 == 'I' || c1 == 'L' || c1 == 'U' || c1 == 'C' || c1 == 'T') *(float *) x2 = xul; else { if (xd > 0) *(float *) x2 = xd; else *(float *) x2 = xd; } break; case 'd': if (c1 == 's' || c1 == 'i' || c1 == 'l' || c1 == 'u' || c1 == 'c' || c1 == 't') *(double *) x2 = xl; else if (c1 == 'S' || c1 == 'I' || c1 == 'L' || c1 == 'U' || c1 == 'C' || c1 == 'T') *(double *) x2 = xul; else { if (xd > 0) *(double *) x2 = xd; else *(double *) x2 = xd; } break; case 'v': if (c1 == 's' || c1 == 'i' || c1 == 'l' || c1 == 'u' || c1 == 'c' || c1 == 't') *(long double *) x2 = xl; else if (c1 == 'S' || c1 == 'I' || c1 == 'L' || c1 == 'U' || c1 == 'C' || c1 == 'T') *(long double *) x2 = xul; else { if (xd > 0) *(long double *) x2 = xd; else *(long double *) x2 = xd; } break; case 'c': if (c1 == 's' || c1 == 'i' || c1 == 'l' || c1 == 'u' || c1 == 'c' || c1 == 't') *(char *) x2 = xl; else if (c1 == 'S' || c1 == 'I' || c1 == 'L' || c1 == 'U' || c1 == 'C' || c1 == 'T') *(char *) x2 = xul; else { if (xd > 0) *(char *) x2 = xd + r; else *(char *) x2 = xd - r; } break; case 'C': if (c1 == 's' || c1 == 'i' || c1 == 'l' || c1 == 'u' || c1 == 'c' || c1 == 't') *(unsigned char *) x2 = xl; else if (c1 == 'S' || c1 == 'I' || c1 == 'L' || c1 == 'U' || c1 == 'C' || c1 == 'T') *(unsigned char *) x2 = xul; else { if (xd > 0) *(unsigned char *) x2 = xd + r; else *(unsigned char *) x2 = xd - r; } break; case 't': if (c1 == 's' || c1 == 'i' || c1 == 'l' || c1 == 'u' || c1 == 'c' || c1 == 't') *(int *) x2 = xl; else if (c1 == 'S' || c1 == 'I' || c1 == 'L' || c1 == 'U' || c1 == 'C' || c1 == 'T') *(int *) x2 = xul; else { if (xd > 0) *(int *) x2 = xd + r; else *(int *) x2 = xd - r; } break; case 'T': if (c1 == 's' || c1 == 'i' || c1 == 'l' || c1 == 'u' || c1 == 'c' || c1 == 't') *(unsigned int *) x2 = xl; else if (c1 == 'S' || c1 == 'I' || c1 == 'L' || c1 == 'U' || c1 == 'C' || c1 == 'T') *(unsigned int *) x2 = xul; else { if (xd > 0) *(unsigned int *) x2 = xd + r; else *(unsigned int *) x2 = xd - r; } break; } return; } SPTK-3.9/bin/xgr/0000755001051300105040000000000012637167717010532 500000000000000SPTK-3.9/bin/xgr/marks/0000755001051300105040000000000012637167717011647 500000000000000SPTK-3.9/bin/xgr/marks/mark0.dat0000644001051300105040000000632612637167210013266 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ #define mark0_width 9 #define mark0_height 9 static char mark0_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; SPTK-3.9/bin/xgr/marks/mark1.dat0000644001051300105040000000632612637167210013267 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ #define mark1_width 9 #define mark1_height 9 static char mark1_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x7c, 0x00, 0x7c, 0x00, 0x7c, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00}; SPTK-3.9/bin/xgr/marks/mark10.dat0000644001051300105040000000633112637167210013343 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ #define mark10_width 9 #define mark10_height 9 static char mark10_bits[] = { 0x38, 0x00, 0x54, 0x00, 0x92, 0x00, 0x11, 0x01, 0xff, 0x01, 0x11, 0x01, 0x92, 0x00, 0x54, 0x00, 0x38, 0x00}; SPTK-3.9/bin/xgr/marks/mark11.dat0000644001051300105040000000633112637167210013344 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ #define mark11_width 9 #define mark11_height 9 static char mark11_bits[] = { 0xff, 0x01, 0xff, 0x01, 0xff, 0x01, 0xff, 0x01, 0xff, 0x01, 0xff, 0x01, 0xff, 0x01, 0xff, 0x01, 0xff, 0x01}; SPTK-3.9/bin/xgr/marks/mark12.dat0000644001051300105040000000633112637167210013345 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ #define mark12_width 9 #define mark12_height 9 static char mark12_bits[] = { 0x00, 0x00, 0x10, 0x00, 0x38, 0x00, 0x7c, 0x00, 0xfe, 0x00, 0xff, 0x01, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00}; SPTK-3.9/bin/xgr/marks/mark13.dat0000644001051300105040000000633112637167210013346 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ #define mark13_width 9 #define mark13_height 9 static char mark13_bits[] = { 0x38, 0x00, 0x7c, 0x00, 0xfe, 0x00, 0xff, 0x01, 0xff, 0x01, 0xff, 0x01, 0xfe, 0x00, 0x7c, 0x00, 0x38, 0x00}; SPTK-3.9/bin/xgr/marks/mark14.dat0000644001051300105040000000633112637167210013347 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ #define mark14_width 9 #define mark14_height 9 static char mark14_bits[] = { 0x10, 0x00, 0xbb, 0x01, 0xbb, 0x01, 0xd6, 0x00, 0x38, 0x00, 0xd6, 0x00, 0xbb, 0x01, 0xbb, 0x01, 0x10, 0x00}; SPTK-3.9/bin/xgr/marks/mark15.dat0000644001051300105040000000633112637167210013350 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ #define mark15_width 9 #define mark15_height 9 static char mark15_bits[] = { 0x10, 0x00, 0x38, 0x00, 0x7c, 0x00, 0xfe, 0x00, 0xff, 0x01, 0xfe, 0x00, 0x7c, 0x00, 0x38, 0x00, 0x10, 0x00}; SPTK-3.9/bin/xgr/marks/mark2.dat0000644001051300105040000000632612637167210013270 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ #define mark2_width 9 #define mark2_height 9 static char mark2_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x44, 0x00, 0x28, 0x00, 0x10, 0x00, 0x28, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00}; SPTK-3.9/bin/xgr/marks/mark3.dat0000644001051300105040000000632612637167210013271 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ #define mark3_width 9 #define mark3_height 9 static char mark3_bits[] = { 0xff, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0xff, 0x01}; SPTK-3.9/bin/xgr/marks/mark4.dat0000644001051300105040000000632612637167210013272 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ #define mark4_width 9 #define mark4_height 9 static char mark4_bits[] = { 0x00, 0x00, 0x10, 0x00, 0x28, 0x00, 0x44, 0x00, 0x82, 0x00, 0x01, 0x01, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00}; SPTK-3.9/bin/xgr/marks/mark5.dat0000644001051300105040000000632612637167210013273 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ #define mark5_width 9 #define mark5_height 9 static char mark5_bits[] = { 0x38, 0x00, 0x44, 0x00, 0x82, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x82, 0x00, 0x44, 0x00, 0x38, 0x00}; SPTK-3.9/bin/xgr/marks/mark6.dat0000644001051300105040000000632612637167210013274 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ #define mark6_width 9 #define mark6_height 9 static char mark6_bits[] = { 0x10, 0x00, 0x28, 0x00, 0x44, 0x00, 0x82, 0x00, 0x01, 0x01, 0x82, 0x00, 0x44, 0x00, 0x28, 0x00, 0x10, 0x00}; SPTK-3.9/bin/xgr/marks/mark7.dat0000644001051300105040000000632612637167210013275 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ #define mark7_width 9 #define mark7_height 9 static char mark7_bits[] = { 0x01, 0x01, 0x82, 0x00, 0x44, 0x00, 0x28, 0x00, 0x10, 0x00, 0x28, 0x00, 0x44, 0x00, 0x82, 0x00, 0x01, 0x01}; SPTK-3.9/bin/xgr/marks/mark8.dat0000644001051300105040000000632612637167211013277 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ #define mark8_width 9 #define mark8_height 9 static char mark8_bits[] = { 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0xff, 0x01, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00}; SPTK-3.9/bin/xgr/marks/mark9.dat0000644001051300105040000000632612637167211013300 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ #define mark9_width 9 #define mark9_height 9 static char mark9_bits[] = { 0x38, 0x00, 0x44, 0x00, 0xc6, 0x00, 0x29, 0x01, 0x11, 0x01, 0x29, 0x01, 0xc6, 0x00, 0x44, 0x00, 0x38, 0x00}; SPTK-3.9/bin/xgr/tills/0000755001051300105040000000000012637167720011653 500000000000000SPTK-3.9/bin/xgr/tills/till0.dat0000644001051300105040000000617712637167175013330 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ #define till0_width 4 #define till0_height 4 static char till0_bits[] = { 0x00, 0x00, 0x00, 0x00}; SPTK-3.9/bin/xgr/tills/till1.dat0000644001051300105040000000617712637167175013331 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ #define till1_width 4 #define till1_height 4 static char till1_bits[] = { 0x01, 0x00, 0x00, 0x00}; SPTK-3.9/bin/xgr/tills/till10.dat0000644001051300105040000000620212637167175013376 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ #define till10_width 4 #define till10_height 4 static char till10_bits[] = { 0x0b, 0x06, 0x06, 0x0d}; SPTK-3.9/bin/xgr/tills/till11.dat0000644001051300105040000000620212637167175013377 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ #define till11_width 4 #define till11_height 4 static char till11_bits[] = { 0x0b, 0x0e, 0x06, 0x0d}; SPTK-3.9/bin/xgr/tills/till12.dat0000644001051300105040000000620212637167175013400 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ #define till12_width 4 #define till12_height 4 static char till12_bits[] = { 0x0b, 0x0e, 0x07, 0x0d}; SPTK-3.9/bin/xgr/tills/till13.dat0000644001051300105040000000620212637167175013401 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ #define till13_width 4 #define till13_height 4 static char till13_bits[] = { 0x0f, 0x0e, 0x07, 0x0d}; SPTK-3.9/bin/xgr/tills/till14.dat0000644001051300105040000000620212637167175013402 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ #define till14_width 4 #define till14_height 4 static char till14_bits[] = { 0x0f, 0x0e, 0x07, 0x0f}; SPTK-3.9/bin/xgr/tills/till15.dat0000644001051300105040000000620212637167175013403 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ #define till15_width 4 #define till15_height 4 static char till15_bits[] = { 0x0f, 0x0e, 0x0f, 0x0f}; SPTK-3.9/bin/xgr/tills/till16.dat0000644001051300105040000000620212637167175013404 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ #define till16_width 4 #define till16_height 4 static char till16_bits[] = { 0x0f, 0x0f, 0x0f, 0x0f}; SPTK-3.9/bin/xgr/tills/till2.dat0000644001051300105040000000617712637167175013332 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ #define till2_width 4 #define till2_height 4 static char till2_bits[] = { 0x01, 0x00, 0x00, 0x08}; SPTK-3.9/bin/xgr/tills/till3.dat0000644001051300105040000000617712637167175013333 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ #define till3_width 4 #define till3_height 4 static char till3_bits[] = { 0x09, 0x00, 0x00, 0x08}; SPTK-3.9/bin/xgr/tills/till4.dat0000644001051300105040000000617712637167175013334 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ #define till4_width 4 #define till4_height 4 static char till4_bits[] = { 0x09, 0x00, 0x00, 0x09}; SPTK-3.9/bin/xgr/tills/till5.dat0000644001051300105040000000617712637167175013335 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ #define till5_width 4 #define till5_height 4 static char till5_bits[] = { 0x09, 0x02, 0x00, 0x09}; SPTK-3.9/bin/xgr/tills/till6.dat0000644001051300105040000000617712637167175013336 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ #define till6_width 4 #define till6_height 4 static char till6_bits[] = { 0x09, 0x02, 0x04, 0x09}; SPTK-3.9/bin/xgr/tills/till7.dat0000644001051300105040000000617712637167175013337 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ #define till7_width 4 #define till7_height 4 static char till7_bits[] = { 0x09, 0x06, 0x04, 0x09}; SPTK-3.9/bin/xgr/tills/till8.dat0000644001051300105040000000617712637167175013340 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ #define till8_width 4 #define till8_height 4 static char till8_bits[] = { 0x09, 0x06, 0x06, 0x09}; SPTK-3.9/bin/xgr/tills/till9.dat0000644001051300105040000000617712637167175013341 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ #define till9_width 4 #define till9_height 4 static char till9_bits[] = { 0x0b, 0x06, 0x06, 0x09}; SPTK-3.9/bin/xgr/Makefile.am0000644001051300105040000000156612442245143012476 00000000000000if USEXGR bin_PROGRAMS = xgr endif AM_CPPFLAGS = -I @top_srcdir@/include xgr_SOURCES = config.h \ gcdata.h \ plot.c \ window.c \ xgr.c \ xgr.h \ marks/mark0.dat \ marks/mark1.dat \ marks/mark10.dat \ marks/mark11.dat \ marks/mark12.dat \ marks/mark13.dat \ marks/mark14.dat \ marks/mark15.dat \ marks/mark2.dat \ marks/mark3.dat \ marks/mark4.dat \ marks/mark5.dat \ marks/mark6.dat \ marks/mark7.dat \ marks/mark8.dat \ marks/mark9.dat \ tills/till0.dat \ tills/till1.dat \ tills/till10.dat \ tills/till11.dat \ tills/till12.dat \ tills/till13.dat \ tills/till14.dat \ tills/till15.dat \ tills/till16.dat \ tills/till2.dat \ tills/till3.dat \ tills/till4.dat \ tills/till5.dat \ tills/till6.dat \ tills/till7.dat \ tills/till8.dat \ tills/till9.dat xgr_CFLAGS = $(X_CFLAGS) xgr_LDFLAGS = $(X_LIBS) xgr_LDADD = @top_builddir@/lib/libSPTK.a -lX11 SPTK-3.9/bin/xgr/Makefile.in0000644001051300105040000005611612637167422012521 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @USEXGR_TRUE@bin_PROGRAMS = xgr$(EXEEXT) subdir = bin/xgr ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_xgr_OBJECTS = xgr-plot.$(OBJEXT) xgr-window.$(OBJEXT) \ xgr-xgr.$(OBJEXT) xgr_OBJECTS = $(am_xgr_OBJECTS) xgr_DEPENDENCIES = @top_builddir@/lib/libSPTK.a xgr_LINK = $(CCLD) $(xgr_CFLAGS) $(CFLAGS) $(xgr_LDFLAGS) $(LDFLAGS) \ -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(xgr_SOURCES) DIST_SOURCES = $(xgr_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include xgr_SOURCES = config.h \ gcdata.h \ plot.c \ window.c \ xgr.c \ xgr.h \ marks/mark0.dat \ marks/mark1.dat \ marks/mark10.dat \ marks/mark11.dat \ marks/mark12.dat \ marks/mark13.dat \ marks/mark14.dat \ marks/mark15.dat \ marks/mark2.dat \ marks/mark3.dat \ marks/mark4.dat \ marks/mark5.dat \ marks/mark6.dat \ marks/mark7.dat \ marks/mark8.dat \ marks/mark9.dat \ tills/till0.dat \ tills/till1.dat \ tills/till10.dat \ tills/till11.dat \ tills/till12.dat \ tills/till13.dat \ tills/till14.dat \ tills/till15.dat \ tills/till16.dat \ tills/till2.dat \ tills/till3.dat \ tills/till4.dat \ tills/till5.dat \ tills/till6.dat \ tills/till7.dat \ tills/till8.dat \ tills/till9.dat xgr_CFLAGS = $(X_CFLAGS) xgr_LDFLAGS = $(X_LIBS) xgr_LDADD = @top_builddir@/lib/libSPTK.a -lX11 all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/xgr/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/xgr/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) xgr$(EXEEXT): $(xgr_OBJECTS) $(xgr_DEPENDENCIES) $(EXTRA_xgr_DEPENDENCIES) @rm -f xgr$(EXEEXT) $(AM_V_CCLD)$(xgr_LINK) $(xgr_OBJECTS) $(xgr_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xgr-plot.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xgr-window.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xgr-xgr.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` xgr-plot.o: plot.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xgr_CFLAGS) $(CFLAGS) -MT xgr-plot.o -MD -MP -MF $(DEPDIR)/xgr-plot.Tpo -c -o xgr-plot.o `test -f 'plot.c' || echo '$(srcdir)/'`plot.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xgr-plot.Tpo $(DEPDIR)/xgr-plot.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='plot.c' object='xgr-plot.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xgr_CFLAGS) $(CFLAGS) -c -o xgr-plot.o `test -f 'plot.c' || echo '$(srcdir)/'`plot.c xgr-plot.obj: plot.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xgr_CFLAGS) $(CFLAGS) -MT xgr-plot.obj -MD -MP -MF $(DEPDIR)/xgr-plot.Tpo -c -o xgr-plot.obj `if test -f 'plot.c'; then $(CYGPATH_W) 'plot.c'; else $(CYGPATH_W) '$(srcdir)/plot.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xgr-plot.Tpo $(DEPDIR)/xgr-plot.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='plot.c' object='xgr-plot.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xgr_CFLAGS) $(CFLAGS) -c -o xgr-plot.obj `if test -f 'plot.c'; then $(CYGPATH_W) 'plot.c'; else $(CYGPATH_W) '$(srcdir)/plot.c'; fi` xgr-window.o: window.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xgr_CFLAGS) $(CFLAGS) -MT xgr-window.o -MD -MP -MF $(DEPDIR)/xgr-window.Tpo -c -o xgr-window.o `test -f 'window.c' || echo '$(srcdir)/'`window.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xgr-window.Tpo $(DEPDIR)/xgr-window.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='window.c' object='xgr-window.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xgr_CFLAGS) $(CFLAGS) -c -o xgr-window.o `test -f 'window.c' || echo '$(srcdir)/'`window.c xgr-window.obj: window.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xgr_CFLAGS) $(CFLAGS) -MT xgr-window.obj -MD -MP -MF $(DEPDIR)/xgr-window.Tpo -c -o xgr-window.obj `if test -f 'window.c'; then $(CYGPATH_W) 'window.c'; else $(CYGPATH_W) '$(srcdir)/window.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xgr-window.Tpo $(DEPDIR)/xgr-window.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='window.c' object='xgr-window.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xgr_CFLAGS) $(CFLAGS) -c -o xgr-window.obj `if test -f 'window.c'; then $(CYGPATH_W) 'window.c'; else $(CYGPATH_W) '$(srcdir)/window.c'; fi` xgr-xgr.o: xgr.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xgr_CFLAGS) $(CFLAGS) -MT xgr-xgr.o -MD -MP -MF $(DEPDIR)/xgr-xgr.Tpo -c -o xgr-xgr.o `test -f 'xgr.c' || echo '$(srcdir)/'`xgr.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xgr-xgr.Tpo $(DEPDIR)/xgr-xgr.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xgr.c' object='xgr-xgr.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xgr_CFLAGS) $(CFLAGS) -c -o xgr-xgr.o `test -f 'xgr.c' || echo '$(srcdir)/'`xgr.c xgr-xgr.obj: xgr.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xgr_CFLAGS) $(CFLAGS) -MT xgr-xgr.obj -MD -MP -MF $(DEPDIR)/xgr-xgr.Tpo -c -o xgr-xgr.obj `if test -f 'xgr.c'; then $(CYGPATH_W) 'xgr.c'; else $(CYGPATH_W) '$(srcdir)/xgr.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xgr-xgr.Tpo $(DEPDIR)/xgr-xgr.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xgr.c' object='xgr-xgr.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xgr_CFLAGS) $(CFLAGS) -c -o xgr-xgr.obj `if test -f 'xgr.c'; then $(CYGPATH_W) 'xgr.c'; else $(CYGPATH_W) '$(srcdir)/xgr.c'; fi` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/xgr/config.h0000644001051300105040000000633212637156651012067 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /* * $Id: config.h,v 1.12 2015/12/14 01:14:25 uratec Exp $ * Configuration. */ /* Define arch type in this file. */ #define SUN 1 /* #define DGAV 1 #define NeXT 1 */ /* #define X11R3 */ SPTK-3.9/bin/xgr/gcdata.h0000644001051300105040000001042112637156651012037 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /* * $Id: gcdata.h,v 1.16 2015/12/14 01:14:25 uratec Exp $ * Hedder for setup plotting parts */ #include "config.h" #ifndef X11R3 #define SIZE 512 /* buffer size */ #else #define SIZE 2 /* buffer size for X11R3's BUG */ #endif #define FCW 22 #define FCH 25 #define LFCH 50 /* Large font height */ /* * Fonts name */ #define FSymbol 9 static char *f_name[] = { "-adobe-courier-medium-r-normal-*-*-100-*-*-m-*-iso8859-1", "-adobe-courier-medium-r-normal-*-*-120-*-*-m-*-iso8859-1", "-adobe-courier-medium-r-normal-*-*-140-*-*-m-*-iso8859-1", "-adobe-courier-medium-r-normal-*-*-160-*-*-m-*-iso8859-1", "-adobe-courier-bold-r-normal-*-*-100-*-*-m-*-iso8859-1", "-adobe-courier-bold-r-normal-*-*-120-*-*-m-*-iso8859-1", "-adobe-courier-bold-r-normal-*-*-140-*-*-m-*-iso8859-1", "-adobe-courier-bold-r-normal-*-*-160-*-*-m-*-iso8859-1", "-adobe-symbol-medium-r-normal-*-*-80-*-*-p-*-adobe-fontspecific", "-adobe-symbol-medium-r-normal-*-*-100-*-*-p-*-adobe-fontspecific", "-adobe-symbol-medium-r-normal-*-*-120-*-*-p-*-adobe-fontspecific", "-adobe-symbol-medium-r-normal-*-*-140-*-*-p-*-adobe-fontspecific", "-adobe-symbol-medium-r-normal-*-*-160-*-*-p-*-adobe-fontspecific" }; SPTK-3.9/bin/xgr/plot.c0000644001051300105040000004140712637156647011602 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /**************************************************************** * $Id: plot.c,v 1.26 2015/12/14 01:14:25 uratec Exp $ * * Interpret X-Y Ploter Commands * ****************************************************************/ #include #include #include #include #include #include #include "xgr.h" #include "gcdata.h" #define abs(x) ((x) >= 0 ? (x) : (-x)) #define norm(x) ((short)((x)/shrink+0.5)) #define normx(x) ((short)((x)/shrink+0.5)) /* #define normy(y) ((short)((YLENG-(y))/shrink+0.5)) */ #define direction(x) {} Cord pb; static int sp = 1; static int cw = FCW, ch = FCH, th = 0; extern Display *display; extern Window main_window; extern int screen; extern GC gc; extern unsigned long forepix, backpix; extern float shrink; extern int landscape; extern int c_flg, mono_flg; extern int fno; static XPoint points[SIZE]; static int line_width = 1; static int line_style = LineSolid; static int join_style = JoinMiter; static XRectangle rect; static char *symbol_upper = "ABGDEZHQIKLMNXOPRSTUFCYW"; static char *symbol_lower = "abgdezhqiklmnxoprstufcyw"; #define INFTY 165 #define SPACE 32 static void line(XPoint * points, int n); static void fillpoly(XPoint * points, int type, int n); static void reset_fill(void); /*static void dplot(int density, short x, short y, short w, short h);*/ static void fillbox(int type, short x, short y, short w, short h); static int text(char *s, int n, int fn); /* * Color name data */ static char *c_name[] = { "black", "black", "blue", "red", "medium sea green", "violet", "orange", "turquoise" }; /* * Line width data */ static int l_width[] = { 0, 1, 1, 2, 3, 4, 1, 2, 3, 4 }; /* * Line style data */ static struct line_style_info { char list[8]; int no; } l_style[] = { { { 1, 1}, 2}, /* Dummy for Solid */ { { 1, 5}, 2}, /* dotted2 */ { { 1, 3}, 2}, /* dotted */ { { 4, 2}, 2}, /* dashed */ { { 7, 3}, 2}, /* long_dashed */ { { 1, 1}, 2}, /* Dummy for Solid */ { { 8, 2, 2, 2}, 4}, /* dot_dashed */ { { 10, 2, 2, 2}, 4}, /* dot_dashed2 */ { { 8, 2, 1, 2, 1, 2}, 6}, /* double_dot_dashed */ { { 6, 2, 2, 2, 2, 2}, 6} /* double_dot_dashed2 */ }; /* * Mark bitmap data */ #define mark_width 9 #define mark_height 9 #include "marks/mark0.dat" #include "marks/mark1.dat" #include "marks/mark2.dat" #include "marks/mark3.dat" #include "marks/mark4.dat" #include "marks/mark5.dat" #include "marks/mark6.dat" #include "marks/mark7.dat" #include "marks/mark8.dat" #include "marks/mark9.dat" #include "marks/mark10.dat" #include "marks/mark11.dat" #include "marks/mark12.dat" #include "marks/mark13.dat" #include "marks/mark14.dat" #include "marks/mark15.dat" static char *mark_bits[] = { mark0_bits, mark1_bits, mark2_bits, mark3_bits, mark4_bits, mark5_bits, mark6_bits, mark7_bits, mark8_bits, mark9_bits, mark10_bits, mark11_bits, mark12_bits, mark13_bits, mark14_bits, mark15_bits }; /* * Till Pattern */ #define till_width 4 #define till_height 4 #include "tills/till0.dat" #include "tills/till1.dat" #include "tills/till2.dat" #include "tills/till3.dat" #include "tills/till4.dat" #include "tills/till5.dat" #include "tills/till6.dat" #include "tills/till7.dat" #include "tills/till8.dat" #include "tills/till9.dat" #include "tills/till10.dat" #include "tills/till11.dat" #include "tills/till12.dat" #include "tills/till13.dat" #include "tills/till14.dat" #include "tills/till15.dat" #include "tills/till16.dat" static char *till_bits[] = { till0_bits, till1_bits, till2_bits, till3_bits, till4_bits, till5_bits, till6_bits, till7_bits, till8_bits, till9_bits, till10_bits, till11_bits, till12_bits, till13_bits, till14_bits, till15_bits, till16_bits }; static short normy(int y) { if (!landscape) return ((short) ((YLENG - (y)) / shrink + 0.5)); else return ((short) ((XLENG - (y)) / shrink + 0.5)); } static void _flush(void) { if (sp > 1) { /* polylines(sp); */ line(points, sp); points[0].x = points[sp - 1].x; points[0].y = points[sp - 1].y; sp = 1; } } static void _send(Cord * buf) { if (sp == SIZE) _flush(); points[sp].x = normx(buf->x); points[sp++].y = normy(buf->y); } static int _getcord(Cord * buf) { int c; while ((c = getchar()) == '\n' || c == ' '); if (c) { ungetc(c, stdin); scanf("%d %d", &(buf->x), &(buf->y)); return (1); } else return (0); } static void _line(void) { while (_getcord(&pb)) _send(&pb); _flush(); } static void _move(int x, int y) { points[0].x = normx(x); points[0].y = normy(y); } static void line(XPoint * points, int n) { XDrawLines(display, main_window, gc, points, n, CoordModeOrigin); } static void polyline(XPoint * points, int frame, int fill, int n) { if (fill != -1 && (fill %= 10) != 9) { fillpoly(points, fill + 6, n + 1); reset_fill(); } if (frame) line(points, n + 1); } /*static int polyg(int type) { int x, y, w, h; scanf("%d %d %d %d", &x, &y, &w, &h); dplot(type, normx(x), normy(y + h), norm(w), norm(h)); return (0); }*/ #define LEVEL 256 #define POINTS 1024 /*static void dplot(int density, short x, short y, short w, short h) { int n; int n_max, n_plot, flg[POINTS]; int p; XPoint pos[POINTS]; n_max = ++w * ++h; n_plot = (density * n_max) / LEVEL; #if defined(HAVE_MEMSET) memset(flg, 0, sizeof(*flg) * POINTS); #elif defined(HAVE_BZERO) bzero((char *) flg, sizeof(*flg) * POINTS); #endif for (n = 0; n < n_plot; n++) { p = (int) (n_max * (double) rand() / (double) INT_MAX); if (flg[p] == 0) { flg[p] = 1; pos[n].x = x + (short) p % w; pos[n].y = y - (short) p / w; } } XDrawPoints(display, main_window, gc, pos, n_plot, CoordModeOrigin); } */ static void hatching(int type) { int n; int frame; int d, angle; scanf("%d %d", &d, &angle); for (n = 0; _getcord(&pb); n++) { points[n].x = normx(pb.x); points[n].y = normy(pb.y); } points[n].x = points[0].x; points[n].y = points[0].y; switch (type -= 20) { case 1: frame = 1; type = -1; break; case 2: frame = 0; type = -1; break; case 3: frame = 1; type = -1; break; default: if (type < 0) { frame = 0; type = -type; } else frame = 1; break; } polyline(points, frame, type, n); } static void reset_fill(void) { fillbox(15, 0, 0, 0, 0); } /*static void box(short x, short y, short w, short h) { XDrawRectangle(display, main_window, gc, x, y, w, h); }*/ static void fillbox(int type, short x, short y, short w, short h) { Pixmap till_pmap; till_pmap = XCreatePixmapFromBitmapData(display, main_window, till_bits[type], till_width, till_height, forepix, backpix, DefaultDepth(display, 0)); XSetTile(display, gc, till_pmap); XSetFillStyle(display, gc, FillTiled); XFillRectangle(display, main_window, gc, x, y, w, h); XFreePixmap(display, till_pmap); } static void fillpoly(XPoint * points, int type, int n) { Pixmap till_pmap; till_pmap = XCreatePixmapFromBitmapData(display, main_window, till_bits[type], till_width, till_height, forepix, backpix, DefaultDepth(display, 0)); XSetTile(display, gc, till_pmap); XSetFillStyle(display, gc, FillTiled); XFillPolygon(display, main_window, gc, points, n, Convex, CoordModeOrigin); XFreePixmap(display, till_pmap); } static void get_str(void) { int c, i, j, k, sfg = 0; char s[512]; float adj = 0.29; for (i = j = k = 0; (c = getchar()); i++, j++) { if ((c &= 0xff) <= 192) { /* not Symbol */ if (sfg) { /* flush buffer */ s[i] = '\0'; points[0].x += (int) (cw * k * adj); text(s, i, FSymbol); k = j; i = j = 0; sfg = 0; } s[i] = c; } else { /* Symbol */ if (!sfg) { /* flush buffer */ s[i] = '\0'; points[0].x += (int) (cw * k * adj); text(s, i, fno); k = j; i = j = 0; sfg = 1; } if (c <= 216) sprintf(s + i, "%c", symbol_upper[c - 193]); else if (c >= 225 && c <= 248) sprintf(s + i, "%c", symbol_lower[c - 225]); else if (c == 254) sprintf(s + i, "%c", INFTY); else sprintf(s + i, "%c", SPACE); } } s[i] = '\0'; points[0].x += (int) (cw * k * adj); if (!sfg) text(s, i, fno); else text(s, i, FSymbol); } static int text(char *s, int n, int fn) { int cx, cy; static int flg = 0, cfn = -1, ccw = -1, cch = -1; float xadj, yadj; if (n <= 0) return (0); if (fn != cfn) { ccw = cw; cch = ch; if (ch == LFCH) cfn = fn + 1; else cfn = fn; flg = 1; } if (flg || cw != ccw || ch != cch) { if (cw < ccw || ch < cch) cfn = fn - 1; else if (cw > ccw || ch > cch) cfn = fn + 1; XSetFont(display, gc, XLoadFont(display, f_name[cfn])); ccw = cw; cch = ch; flg = 0; } if (th == 0) XDrawString(display, main_window, gc, points[0].x, points[0].y, s, n); else { xadj = ccw / shrink; yadj = ((cch > FCH) ? 0.75 : 1.25) * cch / shrink; while (n) { cx = points[0].x - xadj; cy = points[0].y - yadj * --n; XDrawString(display, main_window, gc, cx, cy, s, 1); s++; } } return 0; } static void newpen(int w) { if (w < 0 || w > 10) w = 1; if (!c_flg || mono_flg) { line_width = l_width[w]; XSetLineAttributes(display, gc, line_width, line_style, CapButt, join_style); } else XSetForeground(display, gc, get_color_pix(c_name[w])); } static void join_type(int w) { switch (w) { case 0: join_style = JoinMiter; break; case 1: join_style = JoinRound; break; case 2: join_style = JoinBevel; break; default: join_style = JoinMiter; } } static int line_type(int w) { int dash_offset = 0; if (w == 0) line_style = LineSolid; else if (w > 0 && w < 12) line_style = LineOnOffDash; else return (0); XSetLineAttributes(display, gc, line_width, line_style, CapButt, join_style); if (w > 0) { XSetDashes(display, gc, dash_offset, l_style[w].list, l_style[w].no); } return (0); } static void clip(int xmin, int ymin, int xmax, int ymax) { rect.x = xmin; rect.y = ymin; rect.width = xmax - xmin; rect.height = ymax - ymin; XSetClipRectangles(display, gc, 0, 0, &rect, 1, Unsorted); } static void mark(int w) { Pixmap mark_pmap; mark_pmap = XCreatePixmapFromBitmapData(display, main_window, mark_bits[w], mark_width, mark_height, forepix, backpix, DefaultDepth(display, 0)); XCopyArea(display, mark_pmap, main_window, gc, 0, 0, mark_width, mark_height, points[0].x - mark_width / 2, points[0].y - mark_height / 2); XFreePixmap(display, mark_pmap); } static void circle(int x0, int y0, int r1, int r2, int arg1, int arg2) { int x, y; unsigned int width, height; arg1 /= 10; arg2 /= 10; width = normx(abs(r1 * cos((double) arg1))); height = normx(abs(r2 * sin((double) arg2))); x = normx(x0) - width; y = normy(y0) - height; width *= 2; height *= 2; XDrawArc(display, main_window, gc, x, y, width, height, arg1 * 64, arg2 * 64); } void plot(void) { int c; int w, n, xmin, ymin, xmax, ymax; int x0, y0, r1, r2, arg1, arg2; while ((c = getchar()) != EOF) { switch (c) { case 'M': scanf("%d %d", &pb.x, &pb.y); _move(pb.x, pb.y); break; case 'D': _line(); break; case '%': scanf("%d", &n); hatching(n); break; /* polyg(n); break; */ case 'P': get_str(); break; case 'S': scanf("%d", &ch); break; case 'Q': scanf("%d", &cw); break; case 'R': scanf("%d", &th); th = (th == 0) ? 0 : 1; break; case 'L': scanf("%d", &w); line_type(w); break; case 'K': scanf("%d", &w); join_type(w); break; case 'W': scanf("%d %d %d %d %d %d", &x0, &y0, &r1, &r2, &arg1, &arg2); circle(x0, y0, r1, r2, arg1, arg2); break; case 'N': scanf("%d", &w); mark(w); break; case 'J': scanf("%d", &w); newpen(w); break; case '\\': scanf("%d %d", &xmin, &ymin); break; case 'Z': scanf("%d %d", &xmax, &ymax); if (!landscape) { if (xmax > XLENG) xmax = XLENG; if (ymax > YLENG) ymax = YLENG; } else { if (xmax > YLENG) xmax = YLENG; if (ymax > XLENG) ymax = XLENG; } clip(normx(xmin), normy(ymax), normx(xmax), normy(ymin)); break; case ';': case ':': break; default: break; } } } SPTK-3.9/bin/xgr/window.c0000644001051300105040000003162512637156647012134 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /**************************************************************** * Setup Window for xgr. * ****************************************************************/ #include #include #include #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #include "gcdata.h" #include "xgr.h" Display *display; Window main_window; int screen; GC gc, pixmapGC; unsigned long forepix, backpix, highpix, brdrpix, mouspix; static XSizeHints xsh; /* static Atom property; */ static Pixmap pixmap; static Cursor watch_cur; static XGCValues gcval; static Font font; static XEvent ev; static XSetWindowAttributes winatt; static XWindowAttributes wa; long pixmap_w, pixmap_h; long origin_x = 0, origin_y = 0; long window_x, window_y, window_w, window_h; int bwidth = 2; extern float shrink; extern int landscape; extern int reverse, c_flg; extern int fno; extern char *fore_color, *back_color; extern char *high_color, *brdr_color, *mous_color; extern char *geometry; extern char *dpy; extern char *cmnd, *windowtitle; void open_display(char *display_name) { if ((display = XOpenDisplay(display_name)) == NULL) { fprintf(stderr, "%s: Can't open display '%s'\n", cmnd, XDisplayName(display_name)); exit(2); } } void init_window(int argc, char *argv[]) { unsigned long get_color_pix(char *color_name); screen = DefaultScreen(display); #if defined(HAVE_BZERO) && !defined(HAVE_MEMSET) bzero(&xsh, sizeof(xsh)); #else memset(&xsh, 0, sizeof(xsh)); #endif if (geometry) { int bitmask; bitmask = XGeometry(display, screen, geometry, NULL, bwidth, 1, 1, 1, 1, &(xsh.x), &(xsh.y), &(xsh.width), &(xsh.height)); if (bitmask & (XValue | YValue)) { xsh.flags |= USPosition; } if (bitmask & (WidthValue | HeightValue)) { xsh.flags |= USSize; } } else { xsh.flags = USPosition | PSize; if (!landscape) { xsh.width = XLENG / shrink; xsh.height = YLENG / shrink; xsh.x = X0; xsh.y = Y0; } else { xsh.width = YLENG / shrink; xsh.height = XLENG / shrink; xsh.x = X0_LAND; xsh.y = Y0; } } /** Color **/ #ifdef COLOR_BUG reverse = 1; #endif if (DisplayPlanes(display, screen) >= 3) { c_flg = 1; if (!reverse) { forepix = get_color_pix(fore_color); backpix = get_color_pix(back_color); highpix = get_color_pix(high_color); brdrpix = get_color_pix(brdr_color); mouspix = get_color_pix(mous_color); } else { forepix = get_color_pix(back_color); backpix = get_color_pix(fore_color); highpix = get_color_pix(high_color); brdrpix = get_color_pix(brdr_color); mouspix = get_color_pix(mous_color); } } else { if (!reverse) { forepix = BlackPixel(display, screen); highpix = BlackPixel(display, screen); backpix = WhitePixel(display, screen); brdrpix = BlackPixel(display, screen); mouspix = BlackPixel(display, screen); } else { forepix = WhitePixel(display, screen); highpix = WhitePixel(display, screen); backpix = BlackPixel(display, screen); brdrpix = WhitePixel(display, screen); mouspix = WhitePixel(display, screen); } } /** Generate Window **/ main_window = XCreateSimpleWindow(display, DefaultRootWindow(display), xsh.x, xsh.y, xsh.width, xsh.height, bwidth, brdrpix, backpix); XSetStandardProperties(display, main_window, windowtitle, windowtitle, None, argv, argc, &xsh); /* winatt.bit_gravity = SouthWestGravity; */ XChangeWindowAttributes(display, main_window, CWBitGravity, &winatt); /** Map Window **/ XSelectInput(display, main_window, StructureNotifyMask); XMapWindow(display, main_window); for (;;) { XNextEvent(display, &ev); if (ev.type == MapNotify) break; } XSelectInput(display, main_window, ButtonPressMask | PointerMotionMask | KeyPressMask | ExposureMask); /* KeyReleaseMask|ExposureMask|StructureNotifyMask); */ /** Cursor **/ watch_cur = XCreateFontCursor(display, XC_watch); XDefineCursor(display, main_window, watch_cur); /** GC **/ gcval.line_width = 1; gc = XCreateGC(display, main_window, GCLineWidth, &gcval); XSetFunction(display, gc, GXcopy); XSetGraphicsExposures(display, gc, False); XSetForeground(display, gc, forepix); XSetBackground(display, gc, backpix); font = XLoadFont(display, f_name[fno]); XSetFont(display, gc, font); } void init_pixmap(void) { if (!landscape) { pixmap_w = XLENG / shrink; pixmap_h = YLENG / shrink; } else { pixmap_w = YLENG / shrink; pixmap_h = XLENG / shrink; } pixmap = XCreatePixmap(display, main_window, pixmap_w, pixmap_h, DefaultDepth(display, screen)); pixmapGC = XCreateGC(display, pixmap, 0L, &gcval); XFillRectangle(display, pixmap, pixmapGC, 0, 0, pixmap_w, pixmap_h); XSetFunction(display, pixmapGC, GXcopy); XSetFillStyle(display, pixmapGC, FillSolid); XSetForeground(display, pixmapGC, forepix); XSetBackground(display, pixmapGC, backpix); } void close_window(void) { XFreeCursor(display, watch_cur); XFreeGC(display, gc); XFreeGC(display, pixmapGC); XFreePixmap(display, pixmap); XDestroyWindow(display, main_window); /**/ exit(0); /**/ XCloseDisplay(display); /* this function case an error !! */ } void main_loop(void) { char key; int paper_w, paper_h; long diff; if (!landscape) { paper_w = XLENG / shrink; paper_h = YLENG / shrink; } else { paper_w = YLENG / shrink; paper_h = XLENG / shrink; } set_all(); XUndefineCursor(display, main_window); for (;;) { XNextEvent(display, &ev); switch (ev.type) { case Expose: if (ev.xexpose.count == 0) get_window_size(); realize_part(ev.xexpose.x, ev.xexpose.y, ev.xexpose.width, ev.xexpose.height, ev.xexpose.x, ev.xexpose.y); break; case MappingNotify: /* XRefreshKeyboardMapping(&ev); */ XRefreshKeyboardMapping((XMappingEvent *) & ev); break; /* case ConfigureNotify: get_window_size(); shr_w = paper_w / window_w; shr_h = paper_h / window_h; shrink = (shr_w >= shr_h) ? shr_w :shr_h; rewind(stdin); plot(); main_loop(); origin_x += window_x; origin_y += window_y; realize(); realize_part(origin_x, origin_y, window_w, window_h, origin_x, origin_y); origin_x = paper_w - xsh.width; origin_y = paper_h - xsh.height; origin_x += xsh.x; origin_y += xsh.y; break; */ case MotionNotify: break; case ButtonPress: break; case KeyPress: get_window_size(); XLookupString(&ev.xkey, &key, 1, NULL, NULL); switch (key) { case 'j': diff = paper_h - window_h; if (origin_y >= diff) { beep(); break; } origin_y += window_h / 4; if (origin_y > diff) origin_y = diff; if (origin_y < 0) origin_y = 0; realize(); continue; break; case 'k': if (origin_y <= 0) { beep(); break; } origin_y -= window_h / 4; if (origin_y < 0) origin_y = 0; realize(); continue; break; case 'l': diff = paper_w - window_w; if (origin_x >= diff) { beep(); break; } origin_x += window_w / 4; if (origin_x > diff) origin_x = diff; if (origin_x < 0) origin_x = 0; realize(); continue; break; case 'h': if (origin_x <= 0) { beep(); break; } origin_x -= window_w / 4; if (origin_x < 0) origin_x = 0; realize(); continue; break; case 'q': case '\003': /* control-C */ case '\004': /* control-D */ close_window(); break; default: beep(); break; } break; default: break; } } } void realize(void) { realize_part(origin_x, origin_y, xsh.width, xsh.height, 0, 0); } void realize_part(int src_x, int src_y, int width, int height, int dest_x, int dest_y) { XDefineCursor(display, main_window, watch_cur); XCopyArea(display, pixmap, main_window, gc, src_x, src_y, width, height, dest_x, dest_y); XUndefineCursor(display, main_window); } void set_all(void) { XCopyArea(display, main_window, pixmap, pixmapGC, 0, 0, xsh.width, xsh.height, 0, 0); } void beep(void) { XBell(display, 100); } void get_window_size(void) { XGetWindowAttributes(display, main_window, &wa); window_x = wa.x; window_y = wa.y; window_w = wa.width; window_h = wa.height; } unsigned long get_color_pix(char *color_name) { Colormap cmap; XColor color, exact; cmap = DefaultColormap(display, screen); XAllocNamedColor(display, cmap, color_name, &color, &exact); return (color.pixel); } SPTK-3.9/bin/xgr/xgr.c0000644001051300105040000002310112637156647011413 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /**************************************************************** * * * XY-Plotter simulator for X Window System * * * * 1992.03 T. KANNO * * * * usage: * * xgr [ options ] [ infile ] > stdout * * options: * * -s s : shrink [3.38667] * * -l : landscape [FALSE] * * -rv : reverse mode [FALSE] * * -m : monochrome display mode [FALSE] * * -bg bg : background color [white] * * -hl hl : highlight color [blue] * * -bd bd : border color [blue] * * -ms ms : mouse color [red] * * -g g : geometry [NULL] * * -d d : display [NULL] * * -t t : window title [xgr] * * infile: * * plotter commands * * * ****************************************************************/ static char *rcs_id = "$Id: xgr.c,v 1.24 2015/12/14 01:14:25 uratec Exp $"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #include "xgr.h" /* Defalut Value */ #define LANDSCAPE FA #define REVERSE FA #define C_FLG FA #define MONO_FLG FA #define FNO 1 #define FORECOLOR "black" #define BACKCOLOR "white" #define HIGHCOLOR "blue" #define BRDRCOLOR "blue" #define MOUSCOLOR "red" #define GEOMETRY NULL #define DISPLAY NULL typedef enum _Boolean { FA, TR } Boolean; char *BOOL[] = { "FALSE", "TRUE" }; /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - XY-plotter simulator for X-window system\n\n", cmnd); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -s s : shrink [%g]\n", DEFAULT_SHRINK); fprintf(stderr, " -l : landscape [%s]\n", BOOL[LANDSCAPE]); fprintf(stderr, " -rv : reverse mode [%s]\n", BOOL[REVERSE]); fprintf(stderr, " -m : monochrome display mode [%s]\n", BOOL[MONO_FLG]); fprintf(stderr, " -bg bg : background color [%s]\n", BACKCOLOR); fprintf(stderr, " -hl hl : highlight color [%s]\n", HIGHCOLOR); fprintf(stderr, " -bd bd : border color [%s]\n", BRDRCOLOR); fprintf(stderr, " -ms ms : mouse color [%s]\n", MOUSCOLOR); fprintf(stderr, " -g g : geometry [NULL]\n"); fprintf(stderr, " -d d : display [NULL]\n"); fprintf(stderr, " -t t : window title [%s]\n", cmnd); fprintf(stderr, " -h : print this message \n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " plotter commands [stdin]\n"); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } float shrink = DEFAULT_SHRINK; int landscape = LANDSCAPE; int reverse = REVERSE, c_flg = C_FLG, mono_flg = MONO_FLG; int fno = FNO; char *fore_color = FORECOLOR, *back_color = BACKCOLOR, *high_color = HIGHCOLOR, *brdr_color = BRDRCOLOR, *mous_color = MOUSCOLOR; char *geometry = GEOMETRY, *dpy = DISPLAY, *windowtitle; int main(int argc, char *argv[]) { char c; cmnd = windowtitle = *argv; if (strrchr(cmnd, '/')) cmnd = windowtitle = (char *) (strrchr(cmnd, '/') + 1); while (--argc) { if ((strcmp(*++argv, "-s") == 0) && argc > 1) { shrink = atof(*++argv); if (shrink <= 0) usage(0); argc--; } else if (strcmp(*argv, "-landscape") == 0 || strcmp(*argv, "-land") == 0 || strcmp(*argv, "-l") == 0) { landscape = 1 - landscape; } else if (strcmp(*argv, "-reverse") == 0 || strcmp(*argv, "-rv") == 0) { reverse = 1 - reverse; } else if (strcmp(*argv, "-color") == 0 || strcmp(*argv, "-c") == 0) { c_flg = 1 - c_flg; } else if (strcmp(*argv, "-mono") == 0 || strcmp(*argv, "-m") == 0) { mono_flg = 1 - mono_flg; } else if (strcmp(*argv, "-fno") == 0 && argc > 1) { fno = atoi(*++argv); argc--; } else if (strcmp(*argv, "-bold") == 0 || strcmp(*argv, "-b") == 0) { fno += 4; } else if (strcmp(*argv, "-fg") == 0 && argc > 1) { fore_color = *++argv; argc--; } else if (strcmp(*argv, "-bg") == 0 && argc > 1) { back_color = *++argv; argc--; } else if (strcmp(*argv, "-hl") == 0 && argc > 1) { high_color = *++argv; argc--; } else if (strcmp(*argv, "-bd") == 0 && argc > 1) { brdr_color = *++argv; argc--; } else if (strcmp(*argv, "-ms") == 0 && argc > 1) { mous_color = *++argv; argc--; } else if ((strcmp(*argv, "-geometry") == 0 || strcmp(*argv, "-g") == 0) && argc > 1) { geometry = *++argv; argc--; } else if ((strcmp(*argv, "-display") == 0 || strcmp(*argv, "-d") == 0) && argc > 1) { dpy = *++argv; argc--; } else if ((strcmp(*argv, "-title") == 0 || strcmp(*argv, "-t") == 0) && argc > 1) { windowtitle = *++argv; argc--; } else if (strcmp(*argv, "-h") == 0 || strcmp(*argv, "--") == 0 || strcmp(*argv, "-?") == 0) { usage(0); } else usage(1); } ungetc(c = getchar(), stdin); if (c == EOF) return (-1); else if (c != '=') { fprintf(stderr, "%s : Unexpected data format!\n", cmnd); return (-1); } open_display(dpy); init_window(argc, argv); init_pixmap(); plot(); main_loop(); close_window(); return (0); } SPTK-3.9/bin/xgr/xgr.h0000644001051300105040000001022212637156651011413 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /* * $Id: xgr.h,v 1.15 2015/12/14 01:14:25 uratec Exp $ * Headder for xgr */ /* for SUN */ #define DEFAULT_SHRINK (254.0/75.0) #define X0 558 /* max -> 530 */ #define Y0 1 /* max -> 23 */ #define X0_LAND 300 #if NeXT #define DEFAULT_SHRINK 3.6 #define X0 561 #define Y0 1 #elif DGAV #define DEFAULT_SHRINK 3.0 /* max -> 2.9 */ #define X0 610 /* max -> 590 */ #define Y0 1 #endif #define XLENG 1995 /* A4 Width [x0.1 mm](1950,max=2095) */ #define YLENG 2870 /* A4 Height [x0.1 mm](2850,max=2970) */ #define XLENG_LAND 2870 #define YLENG_LAND 1995 typedef struct cord { int x; int y; } Cord; void open_display(char *display_name); void init_window(int argc, char *argv[]); void init_pixmap(void); void close_window(void); void main_loop(void); void realize(void); void realize_part(int src_x, int src_y, int width, int height, int dest_x, int dest_y); void set_all(void); void beep(void); void get_window_size(void); unsigned long get_color_pix(char *color_name); void plot(void); SPTK-3.9/bin/zcross/0000755001051300105040000000000012637167720011247 500000000000000SPTK-3.9/bin/zcross/Makefile.am0000644001051300105040000000021512442245145013211 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = zcross zcross_SOURCES = _zcross.c zcross.c zcross_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/zcross/Makefile.in0000644001051300105040000004262512637167423013245 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = zcross$(EXEEXT) subdir = bin/zcross ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_zcross_OBJECTS = _zcross.$(OBJEXT) zcross.$(OBJEXT) zcross_OBJECTS = $(am_zcross_OBJECTS) zcross_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(zcross_SOURCES) DIST_SOURCES = $(zcross_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include zcross_SOURCES = _zcross.c zcross.c zcross_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/zcross/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/zcross/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) zcross$(EXEEXT): $(zcross_OBJECTS) $(zcross_DEPENDENCIES) $(EXTRA_zcross_DEPENDENCIES) @rm -f zcross$(EXEEXT) $(AM_V_CCLD)$(LINK) $(zcross_OBJECTS) $(zcross_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_zcross.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zcross.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/zcross/_zcross.c0000644001051300105040000000747112637156647013034 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /*********************************************************** $Id: _zcross.c,v 1.17 2015/12/14 01:14:25 uratec Exp $ obtain zero coss zcross(x, fl, n) double *x : input sequence int fl : frame length double n : flag of normalize Naohiro Isshiki, March 1996 ***********************************************************/ #include #include #include #if defined(WIN32) #include "SPTK.h" #else #include #endif static double sgn(const double x) { if (x >= 0) return (0.5); else return (-0.5); } double zcross(double *x, const int fl, const int n) { int i; double z = 0; for (i = 0; i < fl; i++) z += abs(sgn(x[i + 1]) - sgn(x[i])); if (n) z /= fl; return (z); } SPTK-3.9/bin/zcross/zcross.c0000644001051300105040000001464512637156647012676 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * Zero Cross * * * * 1996.3 N.Isshiki * * * * usage: * * zcross [ options ] [ infile ] > stdout * * options: * * -l l : frame length [256] * * -n : normalized by frame length [FALSE] * * infile: * * stdin for default * * input is assumed to be real * ************************************************************************/ static char *rcs_id = "$Id: zcross.c,v 1.28 2015/12/14 01:14:25 uratec Exp $"; /* Standard C Libraries */ #include #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define FLENG 256 #define NORM FA /* Command Name */ char *cmnd; void usage(status) int status; { fprintf(stderr, "\n"); fprintf(stderr, " %s - zero cross\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -l l : frame length [%d]\n", FLENG); fprintf(stderr, " -n : normalized by frame length [FALSE]\n"); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " data sequence (%s) [stdin]\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " zero cross rate (%s)\n", FORMAT); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char **argv) { FILE *fp = stdin; char *s, *infile = NULL, c; double *x; int flng = FLENG; double z; Boolean norm = NORM; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) { if (*(s = *++argv) == '-') { c = *++s; if (c != 'n' && *++s == '\0') { s = *++argv; --argc; } switch (c) { case 'l': flng = atoi(s); break; case 'n': norm = 1 - norm; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, c); usage(1); break; } } else infile = s; } if (infile) fp = getfp(infile, "rb"); x = dgetmem(flng); while (freadf(x, sizeof(*x), flng, fp) == flng) { z = zcross(x, flng, norm); fwritef(&z, sizeof(z), 1, stdout); } return (0); } SPTK-3.9/bin/zerodf/0000755001051300105040000000000012637167720011215 500000000000000SPTK-3.9/bin/zerodf/Makefile.am0000644001051300105040000000021512442245147013161 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include bin_PROGRAMS = zerodf zerodf_SOURCES = _zerodf.c zerodf.c zerodf_LDADD = @top_builddir@/lib/libSPTK.a SPTK-3.9/bin/zerodf/Makefile.in0000644001051300105040000004262512637167423013213 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = zerodf$(EXEEXT) subdir = bin/zerodf ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_zerodf_OBJECTS = _zerodf.$(OBJEXT) zerodf.$(OBJEXT) zerodf_OBJECTS = $(am_zerodf_OBJECTS) zerodf_DEPENDENCIES = @top_builddir@/lib/libSPTK.a AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(zerodf_SOURCES) DIST_SOURCES = $(zerodf_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include zerodf_SOURCES = _zerodf.c zerodf.c zerodf_LDADD = @top_builddir@/lib/libSPTK.a all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/zerodf/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/zerodf/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) zerodf$(EXEEXT): $(zerodf_OBJECTS) $(zerodf_DEPENDENCIES) $(EXTRA_zerodf_DEPENDENCIES) @rm -f zerodf$(EXEEXT) $(AM_V_CCLD)$(LINK) $(zerodf_OBJECTS) $(zerodf_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_zerodf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zerodf.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-binPROGRAMS install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/bin/zerodf/_zerodf.c0000644001051300105040000001070412637156647012741 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /**************************************************************** $Id: _zerodf.c,v 1.17 2015/12/14 01:14:25 uratec Exp $ All Zero Digital Filter double zerodf(x, b, m, d) double x : input double *b : MA coefficients int m : order of coefficients double *d : delay return value : filtered data *****************************************************************/ #include #include #if defined(WIN32) #include "SPTK.h" #else #include #endif double zerodf(double x, double *b, int m, double *d) { double out; out = b[0] * x; for (m--; m > 0; m--) { out += b[m + 1] * d[m]; d[m] = d[m - 1]; } out += b[1] * d[0]; d[0] = x; return (out); } double zerodft(double x, double *b, const int m, double *d) { int i; double out; out = b[0] * x + d[0]; for (i = 1; i < m; i++) d[i - 1] = b[i] * x + d[i]; d[m - 1] = b[m] * x; return (out); } double zerodf1(double x, double *b, int m, double *d) { double out; out = x; for (m--; m > 0; m--) { out += b[m + 1] * d[m]; d[m] = d[m - 1]; } out += b[1] * d[0]; d[0] = x; return (out); } double zerodf1t(double x, double *b, const int m, double *d) { int i; double out; out = x + d[0]; for (i = 1; i < m; i++) d[i - 1] = b[i] * x + d[i]; d[m - 1] = b[m] * x; return (out); } SPTK-3.9/bin/zerodf/zerodf.c0000644001051300105040000002133212637156647012601 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /************************************************************************ * * * All Zero Digital Filter for Speech Synthesis * * * * 1996.3 K.Koishida * * * * usage: * * zerodf [ options ] bfile [ infile ] > stdout * * options: * * -m m : order of coefficients [25] * * -p p : frame period [100] * * -i i : interpolation period [1] * * -t : transpose filter [FALSE] * * -k : filtering without gain [FALSE] * * infile: * * coefficients * * , b(0), b(1), ..., b(m), * * excitation sequence * * , x(0), x(1), ..., * * stdout: * * filtered sequence * * , y(0), y(1), ..., * * require: * * zerodf(), zerodft() * * * ************************************************************************/ static char *rcs_id = "$Id: zerodf.c,v 1.25 2015/12/14 01:14:25 uratec Exp $"; /* Standard C Libralies */ #include #ifdef HAVE_STRING_H #include #else #include #ifndef HAVE_STRRCHR #define strrchr rindex #endif #endif #include #if defined(WIN32) #include "SPTK.h" #else #include #endif /* Default Values */ #define ORDER 25 #define FPERIOD 100 #define IPERIOD 1 #define TRANSPOSE FA #define NGAIN FA char *BOOL[] = { "FALSE", "TRUE" }; /* Command Name */ char *cmnd; void usage(int status) { fprintf(stderr, "\n"); fprintf(stderr, " %s - all zero digital filter for speech synthesis\n", cmnd); fprintf(stderr, "\n"); fprintf(stderr, " usage:\n"); fprintf(stderr, " %s [ options ] bfile [ infile ] > stdout\n", cmnd); fprintf(stderr, " options:\n"); fprintf(stderr, " -m m : order of coefficients [%d]\n", ORDER); fprintf(stderr, " -p p : frame period [%d]\n", FPERIOD); fprintf(stderr, " -i i : interpolation period [%d]\n", IPERIOD); fprintf(stderr, " -t : transpose filter [%s]\n", BOOL[TRANSPOSE]); fprintf(stderr, " -k : filtering without gain [%s]\n", BOOL[NGAIN]); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, " filter input (%s) [stdin]\n", FORMAT); fprintf(stderr, " stdout:\n"); fprintf(stderr, " filter output (%s)\n", FORMAT); fprintf(stderr, " bfile:\n"); fprintf(stderr, " MA coefficients (%s)\n", FORMAT); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); fprintf(stderr, " SPTK: version %s\n", PACKAGE_VERSION); fprintf(stderr, " CVS Info: %s", rcs_id); #endif fprintf(stderr, "\n"); exit(status); } int main(int argc, char **argv) { int m = ORDER, fprd = FPERIOD, iprd = IPERIOD, i, j; FILE *fp = stdin, *fpc = NULL; double *c, *inc, *cc, *d, x; Boolean tp = TRANSPOSE, ngain = NGAIN; if ((cmnd = strrchr(argv[0], '/')) == NULL) cmnd = argv[0]; else cmnd++; while (--argc) if (**++argv == '-') { switch (*(*argv + 1)) { case 'm': m = atoi(*++argv); --argc; break; case 'p': fprd = atoi(*++argv); --argc; break; case 'i': iprd = atoi(*++argv); --argc; break; case 't': tp = 1 - tp; break; case 'k': ngain = 1 - ngain; break; case 'h': usage(0); default: fprintf(stderr, "%s : Invalid option '%c'!\n", cmnd, *(*argv + 1)); usage(1); } } else if (fpc == NULL) fpc = getfp(*argv, "rb"); else fp = getfp(*argv, "rb"); if (fpc == NULL) { fprintf(stderr, "%s : Cannot open cepstrum file!\n", cmnd); return (1); } c = dgetmem(m + m + m + 3 + m); cc = c + m + 1; inc = cc + m + 1; d = inc + m + 1; if (freadf(c, sizeof(*c), m + 1, fpc) != m + 1) return (1); for (;;) { if (freadf(cc, sizeof(*cc), m + 1, fpc) != m + 1) return (0); for (i = 0; i <= m; i++) inc[i] = (cc[i] - c[i]) * iprd / fprd; for (j = fprd, i = (iprd + 1) / 2; j--;) { if (freadf(&x, sizeof(x), 1, fp) != 1) return (0); if (ngain) for (i = m; i >= 0; i--) c[i] /= c[0]; if (!tp) x = zerodf(x, c, m, d); else x = zerodft(x, c, m, d); fwritef(&x, sizeof(x), 1, stdout); if (!--i) { for (i = 0; i <= m; i++) c[i] += inc[i]; i = iprd; } } movem(cc, c, sizeof(*cc), m + 1); } return (0); } SPTK-3.9/config/0000755001051300105040000000000012637167673010430 500000000000000SPTK-3.9/config/compile0000755001051300105040000001624512442245163011717 00000000000000#! /bin/sh # Wrapper for compilers which do not understand '-c -o'. scriptversion=2012-10-14.11; # UTC # Copyright (C) 1999-2013 Free Software Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to or send patches to # . nl=' ' # We need space, tab and new line, in precisely that order. Quoting is # there to prevent tools from complaining about whitespace usage. IFS=" "" $nl" file_conv= # func_file_conv build_file lazy # Convert a $build file to $host form and store it in $file # Currently only supports Windows hosts. If the determined conversion # type is listed in (the comma separated) LAZY, no conversion will # take place. func_file_conv () { file=$1 case $file in / | /[!/]*) # absolute file, and not a UNC file if test -z "$file_conv"; then # lazily determine how to convert abs files case `uname -s` in MINGW*) file_conv=mingw ;; CYGWIN*) file_conv=cygwin ;; *) file_conv=wine ;; esac fi case $file_conv/,$2, in *,$file_conv,*) ;; mingw/*) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; cygwin/*) file=`cygpath -m "$file" || echo "$file"` ;; wine/*) file=`winepath -w "$file" || echo "$file"` ;; esac ;; esac } # func_cl_dashL linkdir # Make cl look for libraries in LINKDIR func_cl_dashL () { func_file_conv "$1" if test -z "$lib_path"; then lib_path=$file else lib_path="$lib_path;$file" fi linker_opts="$linker_opts -LIBPATH:$file" } # func_cl_dashl library # Do a library search-path lookup for cl func_cl_dashl () { lib=$1 found=no save_IFS=$IFS IFS=';' for dir in $lib_path $LIB do IFS=$save_IFS if $shared && test -f "$dir/$lib.dll.lib"; then found=yes lib=$dir/$lib.dll.lib break fi if test -f "$dir/$lib.lib"; then found=yes lib=$dir/$lib.lib break fi if test -f "$dir/lib$lib.a"; then found=yes lib=$dir/lib$lib.a break fi done IFS=$save_IFS if test "$found" != yes; then lib=$lib.lib fi } # func_cl_wrapper cl arg... # Adjust compile command to suit cl func_cl_wrapper () { # Assume a capable shell lib_path= shared=: linker_opts= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. eat=1 case $2 in *.o | *.[oO][bB][jJ]) func_file_conv "$2" set x "$@" -Fo"$file" shift ;; *) func_file_conv "$2" set x "$@" -Fe"$file" shift ;; esac ;; -I) eat=1 func_file_conv "$2" mingw set x "$@" -I"$file" shift ;; -I*) func_file_conv "${1#-I}" mingw set x "$@" -I"$file" shift ;; -l) eat=1 func_cl_dashl "$2" set x "$@" "$lib" shift ;; -l*) func_cl_dashl "${1#-l}" set x "$@" "$lib" shift ;; -L) eat=1 func_cl_dashL "$2" ;; -L*) func_cl_dashL "${1#-L}" ;; -static) shared=false ;; -Wl,*) arg=${1#-Wl,} save_ifs="$IFS"; IFS=',' for flag in $arg; do IFS="$save_ifs" linker_opts="$linker_opts $flag" done IFS="$save_ifs" ;; -Xlinker) eat=1 linker_opts="$linker_opts $2" ;; -*) set x "$@" "$1" shift ;; *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) func_file_conv "$1" set x "$@" -Tp"$file" shift ;; *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) func_file_conv "$1" mingw set x "$@" "$file" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -n "$linker_opts"; then linker_opts="-link$linker_opts" fi exec "$@" $linker_opts exit 1 } eat= case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: compile [--help] [--version] PROGRAM [ARGS] Wrapper for compilers which do not understand '-c -o'. Remove '-o dest.o' from ARGS, run PROGRAM with the remaining arguments, and rename the output as expected. If you are trying to build a whole package this is not the right script to run: please start by reading the file 'INSTALL'. Report bugs to . EOF exit $? ;; -v | --v*) echo "compile $scriptversion" exit $? ;; cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) func_cl_wrapper "$@" # Doesn't return... ;; esac ofile= cfile= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. # So we strip '-o arg' only if arg is an object. eat=1 case $2 in *.o | *.obj) ofile=$2 ;; *) set x "$@" -o "$2" shift ;; esac ;; *.c) cfile=$1 set x "$@" "$1" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -z "$ofile" || test -z "$cfile"; then # If no '-o' option was seen then we might have been invoked from a # pattern rule where we don't need one. That is ok -- this is a # normal compilation that the losing compiler can handle. If no # '.c' file was seen then we are probably linking. That is also # ok. exec "$@" fi # Name of file we expect compiler to create. cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` # Create the lock directory. # Note: use '[/\\:.-]' here to ensure that we don't use the same name # that we are using for the .o file. Also, base the name on the expected # object file name, since that is what matters with a parallel build. lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d while true; do if mkdir "$lockdir" >/dev/null 2>&1; then break fi sleep 1 done # FIXME: race condition here if user kills between mkdir and trap. trap "rmdir '$lockdir'; exit 1" 1 2 15 # Run the compile. "$@" ret=$? if test -f "$cofile"; then test "$cofile" = "$ofile" || mv "$cofile" "$ofile" elif test -f "${cofile}bj"; then test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" fi rmdir "$lockdir" exit $ret # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: SPTK-3.9/config/config.guess0000755001051300105040000013135512442245163012661 00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright 1992-2013 Free Software Foundation, Inc. timestamp='2013-11-29' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # # Originally written by Per Bothner. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD # # Please send patches with a ChangeLog entry to config-patches@gnu.org. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright 1992-2013 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown case "${UNAME_SYSTEM}" in Linux|GNU|GNU/*) # If the system lacks a compiler, then just pick glibc. # We could probably try harder. LIBC=gnu eval $set_cc_for_build cat <<-EOF > $dummy.c #include #if defined(__UCLIBC__) LIBC=uclibc #elif defined(__dietlibc__) LIBC=dietlibc #else LIBC=gnu #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` ;; esac # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 exit $exitcode ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm*:riscos:*:*|arm*:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) echo i386-pc-auroraux${UNAME_RELEASE} exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build SUN_ARCH="i386" # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH="x86_64" fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` case ${UNAME_PROCESSOR} in amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW64*:*) echo ${UNAME_MACHINE}-pc-mingw64 exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:MSYS*:*) echo ${UNAME_MACHINE}-pc-msys exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; authenticamd | genuineintel | EM64T) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; 8664:Windows_NT:*) echo x86_64-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; aarch64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC="gnulibc1" ; fi echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arc:Linux:*:* | arceb:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-${LIBC} else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi else echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf fi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; cris:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; crisv32:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; frv:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; hexagon:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:Linux:*:*) echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=${UNAME_MACHINE} #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } ;; or1k:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; or32:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; padre:Linux:*:*) echo sparc-unknown-linux-${LIBC} exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; *) echo hppa-unknown-linux-${LIBC} ;; esac exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-${LIBC} exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-${LIBC} exit ;; ppc64le:Linux:*:*) echo powerpc64le-unknown-linux-${LIBC} exit ;; ppcle:Linux:*:*) echo powerpcle-unknown-linux-${LIBC} exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux-${LIBC} exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; tile*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-${LIBC} exit ;; x86_64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configury will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; x86_64:Haiku:*:*) echo x86_64-unknown-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown eval $set_cc_for_build if test "$UNAME_PROCESSOR" = unknown ; then UNAME_PROCESSOR=powerpc fi if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then case $UNAME_PROCESSOR in i386) UNAME_PROCESSOR=x86_64 ;; powerpc) UNAME_PROCESSOR=powerpc64 ;; esac fi fi elif test "$UNAME_PROCESSOR" = i386 ; then # Avoid executing cc on OS X 10.9, as it ships with a stub # that puts up a graphical alert prompting to install # developer tools. Any system running Mac OS X 10.7 or # later (Darwin 11 and later) is required to have a 64-bit # processor. This is not true of the ARM version of Darwin # that Apple uses in portable devices. UNAME_PROCESSOR=x86_64 fi echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NEO-?:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk${UNAME_RELEASE} exit ;; NSE-*:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; x86_64:VMkernel:*:*) echo ${UNAME_MACHINE}-unknown-esx exit ;; esac eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; c34*) echo c34-convex-bsd exit ;; c38*) echo c38-convex-bsd exit ;; c4*) echo c4-convex-bsd exit ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: SPTK-3.9/config/config.sub0000755001051300105040000010541212442245163012317 00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright 1992-2013 Free Software Foundation, Inc. timestamp='2013-10-01' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # Please send patches with a ChangeLog entry to config-patches@gnu.org. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright 1992-2013 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; android-linux) os=-linux-android basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray | -microblaze*) os= basic_machine=$1 ;; -bluegene*) os=-cnk ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*178) os=-lynxos178 ;; -lynx*5) os=-lynxos5 ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | aarch64 | aarch64_be \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arceb \ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ | avr | avr32 \ | be32 | be64 \ | bfin \ | c4x | c8051 | clipper \ | d10v | d30v | dlx | dsp16xx \ | epiphany \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | k1om \ | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ | mips64r5900 | mips64r5900el \ | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipsr5900 | mipsr5900el \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ | nios | nios2 | nios2eb | nios2el \ | ns16k | ns32k \ | open8 \ | or1k | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ | rl78 | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu \ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | we32k \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; c54x) basic_machine=tic54x-unknown ;; c55x) basic_machine=tic55x-unknown ;; c6x) basic_machine=tic6x-unknown ;; m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; strongarm | thumb | xscale) basic_machine=arm-unknown ;; xgate) basic_machine=$basic_machine-unknown os=-none ;; xscaleeb) basic_machine=armeb-unknown ;; xscaleel) basic_machine=armel-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | aarch64-* | aarch64_be-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ | c8051-* | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | hexagon-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | k1om-* \ | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ | microblaze-* | microblazeel-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ | mips64r5900-* | mips64r5900el-* \ | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipsr5900-* | mipsr5900el-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ | nios-* | nios2-* | nios2eb-* | nios2el-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ | rl78-* | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tile*-* \ | tron-* \ | ubicom32-* \ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aros) basic_machine=i386-pc os=-aros ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; bluegene*) basic_machine=powerpc-ibm os=-cnk ;; c54x-*) basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c55x-*) basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c6x-*) basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c90) basic_machine=c90-cray os=-unicos ;; cegcc) basic_machine=arm-unknown os=-cegcc ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16 | cr16-*) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dicos) basic_machine=i686-pc os=-dicos ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; microblaze*) basic_machine=microblaze-xilinx ;; mingw64) basic_machine=x86_64-pc os=-mingw64 ;; mingw32) basic_machine=i686-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; msys) basic_machine=i686-pc os=-msys ;; mvs) basic_machine=i370-ibm os=-mvs ;; nacl) basic_machine=le32-unknown os=-nacl ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; neo-tandem) basic_machine=neo-tandem ;; nse-tandem) basic_machine=nse-tandem ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc | ppcbe) basic_machine=powerpc-unknown ;; ppc-* | ppcbe-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos | rdos64) basic_machine=x86_64-pc os=-rdos ;; rdos32) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; strongarm-* | thumb-*) basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tile*) basic_machine=$basic_machine-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; xscale-* | xscalee[bl]-*) basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; z80-*-coff) basic_machine=z80-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -auroraux) os=-auroraux ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -sym* | -kopensolaris* | -plan9* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -bitrig* | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; -nacl*) ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; c8051-*) os=-elf ;; hexagon-*) os=-elf ;; tic54x-*) os=-coff ;; tic55x-*) os=-coff ;; tic6x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or1k-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -cnk*|-aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: SPTK-3.9/config/install-sh0000755001051300105040000003325512442245163012345 00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2011-11-20.07; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # 'make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. nl=' ' IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} if test -z "$doit"; then doit_exec=exec else doit_exec=$doit fi # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_glob='?' initialize_posix_glob=' test "$posix_glob" != "?" || { if (set -f) 2>/dev/null; then posix_glob= else posix_glob=: fi } ' posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false no_target_directory= usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *' '* | *' '* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) dst_arg=$2 # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac shift;; -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call 'install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then do_exit='(exit $ret); exit $ret' trap "ret=129; $do_exit" 1 trap "ret=130; $do_exit" 2 trap "ret=141; $do_exit" 13 trap "ret=143; $do_exit" 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names problematic for 'test' and other utilities. case $src in -* | [=\(\)!]) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; [-=\(\)!]*) prefix='./';; *) prefix='';; esac eval "$initialize_posix_glob" oIFS=$IFS IFS=/ $posix_glob set -f set fnord $dstdir shift $posix_glob set +f IFS=$oIFS prefixes= for d do test X"$d" = X && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && eval "$initialize_posix_glob" && $posix_glob set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && $posix_glob set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: SPTK-3.9/config/missing0000755001051300105040000001533012442245163011732 00000000000000#! /bin/sh # Common wrapper for a few potentially missing GNU programs. scriptversion=2013-10-28.13; # UTC # Copyright (C) 1996-2013 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try '$0 --help' for more information" exit 1 fi case $1 in --is-lightweight) # Used by our autoconf macros to check whether the available missing # script is modern enough. exit 0 ;; --run) # Back-compat with the calling convention used by older automake. shift ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due to PROGRAM being missing or too old. Options: -h, --help display this help and exit -v, --version output version information and exit Supported PROGRAM values: aclocal autoconf autoheader autom4te automake makeinfo bison yacc flex lex help2man Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and 'g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: unknown '$1' option" echo 1>&2 "Try '$0 --help' for more information" exit 1 ;; esac # Run the given program, remember its exit status. "$@"; st=$? # If it succeeded, we are done. test $st -eq 0 && exit 0 # Also exit now if we it failed (or wasn't found), and '--version' was # passed; such an option is passed most likely to detect whether the # program is present and works. case $2 in --version|--help) exit $st;; esac # Exit code 63 means version mismatch. This often happens when the user # tries to use an ancient version of a tool on a file that requires a # minimum version. if test $st -eq 63; then msg="probably too old" elif test $st -eq 127; then # Program was missing. msg="missing on your system" else # Program was found and executed, but failed. Give up. exit $st fi perl_URL=http://www.perl.org/ flex_URL=http://flex.sourceforge.net/ gnu_software_URL=http://www.gnu.org/software program_details () { case $1 in aclocal|automake) echo "The '$1' program is part of the GNU Automake package:" echo "<$gnu_software_URL/automake>" echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/autoconf>" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; autoconf|autom4te|autoheader) echo "The '$1' program is part of the GNU Autoconf package:" echo "<$gnu_software_URL/autoconf/>" echo "It also requires GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; esac } give_advice () { # Normalize program name to check for. normalized_program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` printf '%s\n' "'$1' is $msg." configure_deps="'configure.ac' or m4 files included by 'configure.ac'" case $normalized_program in autoconf*) echo "You should only need it if you modified 'configure.ac'," echo "or m4 files included by it." program_details 'autoconf' ;; autoheader*) echo "You should only need it if you modified 'acconfig.h' or" echo "$configure_deps." program_details 'autoheader' ;; automake*) echo "You should only need it if you modified 'Makefile.am' or" echo "$configure_deps." program_details 'automake' ;; aclocal*) echo "You should only need it if you modified 'acinclude.m4' or" echo "$configure_deps." program_details 'aclocal' ;; autom4te*) echo "You might have modified some maintainer files that require" echo "the 'autom4te' program to be rebuilt." program_details 'autom4te' ;; bison*|yacc*) echo "You should only need it if you modified a '.y' file." echo "You may want to install the GNU Bison package:" echo "<$gnu_software_URL/bison/>" ;; lex*|flex*) echo "You should only need it if you modified a '.l' file." echo "You may want to install the Fast Lexical Analyzer package:" echo "<$flex_URL>" ;; help2man*) echo "You should only need it if you modified a dependency" \ "of a man page." echo "You may want to install the GNU Help2man package:" echo "<$gnu_software_URL/help2man/>" ;; makeinfo*) echo "You should only need it if you modified a '.texi' file, or" echo "any other file indirectly affecting the aspect of the manual." echo "You might want to install the Texinfo package:" echo "<$gnu_software_URL/texinfo/>" echo "The spurious makeinfo call might also be the consequence of" echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" echo "want to install GNU make:" echo "<$gnu_software_URL/make/>" ;; *) echo "You might have modified some files without having the proper" echo "tools for further handling them. Check the 'README' file, it" echo "often tells you about the needed prerequisites for installing" echo "this package. You may also peek at any GNU archive site, in" echo "case some other package contains this missing '$1' program." ;; esac } give_advice "$1" | sed -e '1s/^/WARNING: /' \ -e '2,$s/^/ /' >&2 # Propagate the correct exit status (expected to be 127 for a program # not found, 63 for a program that failed due to version mismatch). exit $st # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: SPTK-3.9/config/depcomp0000755001051300105040000005601612442245163011716 00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2013-05-30.07; # UTC # Copyright (C) 1999-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by 'PROGRAMS ARGS'. object Object file output by 'PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputting dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac # Get the directory component of the given path, and save it in the # global variables '$dir'. Note that this directory component will # be either empty or ending with a '/' character. This is deliberate. set_dir_from () { case $1 in */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; *) dir=;; esac } # Get the suffix-stripped basename of the given path, and save it the # global variable '$base'. set_base_from () { base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` } # If no dependency file was actually created by the compiler invocation, # we still have to create a dummy depfile, to avoid errors with the # Makefile "include basename.Plo" scheme. make_dummy_depfile () { echo "#dummy" > "$depfile" } # Factor out some common post-processing of the generated depfile. # Requires the auxiliary global variable '$tmpdepfile' to be set. aix_post_process_depfile () { # If the compiler actually managed to produce a dependency file, # post-process it. if test -f "$tmpdepfile"; then # Each line is of the form 'foo.o: dependency.h'. # Do two passes, one to just change these to # $object: dependency.h # and one to simply output # dependency.h: # which is needed to avoid the deleted-header problem. { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" } > "$depfile" rm -f "$tmpdepfile" else make_dummy_depfile fi } # A tabulation character. tab=' ' # A newline character. nl=' ' # Character ranges might be problematic outside the C locale. # These definitions help. upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ lower=abcdefghijklmnopqrstuvwxyz digits=0123456789 alpha=${upper}${lower} if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Avoid interferences from the environment. gccflag= dashmflag= # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvisualcpp fi if test "$depmode" = msvc7msys; then # This is just like msvc7 but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvc7 fi if test "$depmode" = xlc; then # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. gccflag=-qmakedep=gcc,-MF depmode=gcc fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. ## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. ## (see the conditional assignment to $gccflag above). ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). Also, it might not be ## supported by the other compilers which use the 'gcc' depmode. ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The second -e expression handles DOS-style file names with drive # letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the "deleted header file" problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. ## Some versions of gcc put a space before the ':'. On the theory ## that the space means something, we add a space to the output as ## well. hp depmode also adds that space, but also prefixes the VPATH ## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like '#:fec' to the end of the # dependency line. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ | tr "$nl" ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" ;; xlc) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts '$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done aix_post_process_depfile ;; tcc) # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 # FIXME: That version still under development at the moment of writing. # Make that this statement remains true also for stable, released # versions. # It will wrap lines (doesn't matter whether long or short) with a # trailing '\', as in: # # foo.o : \ # foo.c \ # foo.h \ # # It will put a trailing '\' even on the last line, and will use leading # spaces rather than leading tabs (at least since its commit 0394caf7 # "Emit spaces for -MD"). "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. # We have to change lines of the first kind to '$object: \'. sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" # And for each line of the second kind, we have to emit a 'dep.h:' # dummy dependency, to avoid the deleted-header problem. sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" rm -f "$tmpdepfile" ;; ## The order of this option in the case statement is important, since the ## shell code in configure will try each of these formats in the order ## listed in this file. A plain '-MD' option would be understood by many ## compilers, so we must ensure this comes after the gcc and icc options. pgcc) # Portland's C compiler understands '-MD'. # Will always output deps to 'file.d' where file is the root name of the # source file under compilation, even if file resides in a subdirectory. # The object file name does not affect the name of the '.d' file. # pgcc 10.2 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using '\' : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... set_dir_from "$object" # Use the source, not the object, to determine the base name, since # that's sadly what pgcc will do too. set_base_from "$source" tmpdepfile=$base.d # For projects that build the same source file twice into different object # files, the pgcc approach of using the *source* file root name can cause # problems in parallel builds. Use a locking strategy to avoid stomping on # the same $tmpdepfile. lockdir=$base.d-lock trap " echo '$0: caught signal, cleaning up...' >&2 rmdir '$lockdir' exit 1 " 1 2 13 15 numtries=100 i=$numtries while test $i -gt 0; do # mkdir is a portable test-and-set. if mkdir "$lockdir" 2>/dev/null; then # This process acquired the lock. "$@" -MD stat=$? # Release the lock. rmdir "$lockdir" break else # If the lock is being held by a different process, wait # until the winning process is done or we timeout. while test -d "$lockdir" && test $i -gt 0; do sleep 1 i=`expr $i - 1` done fi i=`expr $i - 1` done trap - 1 2 13 15 if test $i -le 0; then echo "$0: failed to acquire lock after $numtries attempts" >&2 echo "$0: check lockdir '$lockdir'" >&2 exit 1 fi if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" # Add 'dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in 'foo.d' instead, so we check for that too. # Subdirectories are respected. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then # Libtool generates 2 separate objects for the 2 libraries. These # two compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir$base.o.d # libtool 1.5 tmpdepfile2=$dir.libs/$base.o.d # Likewise. tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d "$@" -MD fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done # Same post-processing that is required for AIX mode. aix_post_process_depfile ;; msvc7) if test "$libtool" = yes; then showIncludes=-Wc,-showIncludes else showIncludes=-showIncludes fi "$@" $showIncludes > "$tmpdepfile" stat=$? grep -v '^Note: including file: ' "$tmpdepfile" if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The first sed program below extracts the file names and escapes # backslashes for cygpath. The second sed program outputs the file # name when reading, but also accumulates all include files in the # hold buffer in order to output them again at the end. This only # works with sed implementations that can handle large buffers. sed < "$tmpdepfile" -n ' /^Note: including file: *\(.*\)/ { s//\1/ s/\\/\\\\/g p }' | $cygpath_u | sort -u | sed -n ' s/ /\\ /g s/\(.*\)/'"$tab"'\1 \\/p s/.\(.*\) \\/\1:/ H $ { s/.*/'"$tab"'/ G p }' >> "$depfile" echo >> "$depfile" # make sure the fragment doesn't end with a backslash rm -f "$tmpdepfile" ;; msvc7msys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for ':' # in the target name. This is to cope with DOS-style filenames: # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. "$@" $dashmflag | sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this sed invocation # correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" # makedepend may prepend the VPATH from the source file name to the object. # No need to regex-escape $object, excess matching of '.' is harmless. sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process the last invocation # correctly. Breaking it into two sed invocations is a workaround. sed '1,2d' "$tmpdepfile" \ | tr ' ' "$nl" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E \ | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" echo "$tab" >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: SPTK-3.9/include/0000755001051300105040000000000012637167673010606 500000000000000SPTK-3.9/include/SPTK.h0000644001051300105040000004367112637156651011465 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /*********************************************************** $Id: SPTK.h,v 1.62 2015/12/14 01:14:25 uratec Exp $ Speech Signal Processing Toolkit SPTK.h ***********************************************************/ #ifndef PI #define PI 3.14159265358979323846 #endif /* PI */ #ifndef PI2 #define PI2 6.28318530717958647692 #endif /* PI2 */ #ifndef M_PI #define M_PI 3.1415926535897932384626433832795 #endif /* M_PI */ #ifndef M_2PI #define M_2PI 6.2831853071795864769252867665590 #endif /* M_2PI */ #define LN_TO_LOG 4.3429448190325182765 #define LZERO (-1.0e+10) #define LSMALL (-0.5e+10) /* #ifndef ABS(x) */ #define ABS(x) ((x<0.0) ? -x : x) /* #endif */ #ifdef __BIG_ENDIAN #if __BYTE_ORDER == __BIG_ENDIAN #define WORDS_BIGENDIAN #endif #endif /* enum for Boolean */ typedef enum _Boolean { FA, TR } Boolean; /* enum for window type */ typedef enum _Window { BLACKMAN, HAMMING, HANNING, BARTLETT, TRAPEZOID, RECTANGULAR } Window; /* struct for complex */ typedef struct { double re; double im; } complex; /* struct for Gaussian distribution */ typedef struct _Gauss { double *mean; double *var; double **cov; double **inv; double gconst; } Gauss; /* structure for GMM */ typedef struct _GMM { int nmix; int dim; Boolean full; double *weight; Gauss *gauss; } GMM; typedef struct _deltawindow { size_t win_size; size_t win_max_width; int *win_l_width; int *win_r_width; double **win_coefficient; } DELTAWINDOW; /* structure for wavsplit and wavjoin */ typedef struct _wavfile { int file_size; /* file size */ int fmt_chunk_size; /* size of 'fmt ' chunk (byte) */ int data_chunk_size; /* size of 'data' chunk (byte) */ short format_id; /* format ID (PCM(1) or IEEE float(3)) */ short channel_num; /* mono:1¡¤stereo:2 */ int sample_freq; /* sampling frequency (Hz) */ int byte_per_sec; /* byte per second */ short block_size; /* 16bit, mono => 16bit*1=2byte */ short bit_per_sample; /* bit per sample */ short extended_size; /* size of 'extension' */ char input_data_type; char format_type; char *data; /* waveform data */ } Wavfile; typedef struct _filelist { int num; char **name; } Filelist; /* library routines */ double agexp(double r, double x, double y); int cholesky(double *c, double *a, double *b, const int n, double eps); int freada(double *p, const int bl, FILE * fp); int fwritex(void *ptr, const size_t size, const int nitems, FILE * fp); int freadx(void *ptr, const size_t size, const int nitems, FILE * fp); int fwritef(double *ptr, const size_t size, const int nitems, FILE * fp); int freadf(double *ptr, const size_t size, const int nitems, FILE * fp); int fwrite_little_endian(void *ptr, const size_t size, const size_t n, FILE * fp); void fillz(void *ptr, const size_t size, const int nitem); FILE *getfp(char *name, char *opt); short *sgetmem(const int leng); long *lgetmem(const int leng); double *dgetmem(const int leng); float *fgetmem(const int leng); /* real *rgetmem (const int leng); */ float **ffgetmem(const int leng); double **ddgetmem(const int leng1, const int leng2); char *getmem(const size_t leng, const size_t size); double gexp(const double r, const double x); double glog(const double r, const double x); int ifftr(double *x, double *y, const int l); double invert(double **mat, double **inv, const int n); void multim(double x[], const int xx, const int xy, double y[], const int yx, const int yy, double a[]); void addm(double x[], double y[], const int xx, const int yy, double a[]); void movem(void *a, void *b, const size_t size, const int nitem); int mseq(void); int theq(double *t, double *h, double *a, double *b, const int n, double eps); int toeplitz(double *t, double *a, double *b, const int n, double eps); /* tool routines */ double acep(double x, double *c, const int m, const double lambda, const double step, const double tau, const int pd, const double eps); void acorr(double *x, int l, double *r, const int np); double agcep(double x, double *c, const int m, const int stage, const double lambda, const double step, const double tau, const double eps); double amcep(double x, double *b, const int m, const double a, const double lambda, const double step, const double tau, const int pd, const double eps); void phidf(const double x, const int m, double a, double *d); double average(double *x, const int n); void vaverage(double *x, const int l, const int num, double *ave); void b2mc(double *b, double *mc, int m, const double a); void c2acr(double *c, const int m1, double *r, const int m2, const int flng); void c2ir(double *c, const int nc, double *h, const int leng); void c2ndps(double *c, const int m, double *n, const int l); void ic2ir(double *h, const int leng, double *c, const int nc); void c2sp(double *c, const int m, double *x, double *y, const int l); void clip(double *x, const int l, const double min, const double max, double *y); int dft(double *pReal, double *pImag, const int nDFTLength); void dct(double *in, double *out, const int size, const int m, const Boolean dftmode, const Boolean compmode); int dct_create_table_fft(const int nSize); int dct_create_table(const int nSize); int dct_based_on_fft(double *pReal, double *pImag, const double *pInReal, const double *pInImag); int dct_based_on_dft(double *pReal, double *pImag, const double *pInReal, const double *pInImag); double df2(const double x, const double sf, const double f0p, const double wbp, const double f0z, const double wbz, const int fp, const int fz, double *buf, int *bufp); double dfs(double x, double *a, int m, double *b, int n, double *buf, int *bufp); int fft(double *x, double *y, const int m); int fft2(double x[], double y[], const int n); void fftcep(double *sp, const int flng, double *c, const int m, int itr, double ac); int fftr(double *x, double *y, const int m); int fftr2(double x[], double y[], const int n); void freqt(double *c1, const int m1, double *c2, const int m2, const double a); void gc2gc(double *c1, const int m1, const double g1, double *c2, const int m2, const double g2); int gcep(double *xw, const int flng, double *gc, const int m, const double g, const int itr1, const int itr2, const double d, const int etype, const double e, const double f, const int itype); double glsadf(double x, double *c, const int m, const int n, double *d); double glsadf1(double x, double *c, const int m, const int n, double *d); double glsadft(double x, double *c, const int m, const int n, double *d); double glsadf1t(double x, double *c, const int m, const int n, double *d); double cal_gconst(double *var, const int D); double cal_gconstf(double **var, const int D); double log_wgd(const GMM * gmm, const int m, const int L, const double *dat); double log_add(double logx, double logy); double log_outp(const GMM * gmm, const int L, const double *dat); void fillz_GMM(GMM * gmm); int alloc_GMM(GMM * gmm, const int M, const int L, const Boolean full); int load_GMM(GMM * gmm, FILE * fp); int save_GMM(const GMM * gmm, FILE * fp); int free_GMM(GMM * gmm); int prepareCovInv_GMM(GMM * gmm); int prepareGconst_GMM(GMM * gmm); int floorWeight_GMM(GMM * gmm, double floor); int floorVar_GMM(GMM * gmm, double floor); void gnorm(double *c1, double *c2, int m, const double g); void grpdelay(double *x, double *gd, const int size, const int is_arma); int histogram(double *x, const int size, const double min, const double max, const double step, double *h); int ifft(double *x, double *y, const int m); int ifft2(double x[], double y[], const int n); double iglsadf(double x, double *c, const int m, const int n, double *d); double iglsadf1(double x, double *c, const int m, const int n, double *d); double iglsadft(double x, double *c, const int m, const int n, double *d); double iglsadf1t(double x, double *c, const int m, const int n, double *d); void ignorm(double *c1, double *c2, int m, const double g); double imglsadf(double x, double *b, const int m, const double a, const int n, double *d); double imglsadf1(double x, double *b, const int m, const double a, const int n, double *d); double imglsadft(double x, double *b, const int m, const double a, const int n, double *d); double imglsadf1t(double x, double *b, const int m, const double a, const int n, double *d); void imsvq(int *index, double *cb, const int l, int *cbsize, const int stage, double *x); void ivq(const int index, double *cb, const int l, double *x); void lbg(double *x, const int l, const int tnum, double *icb, int icbsize, double *cb, const int ecbsize, const int iter, const int mintnum, const int seed, const int centup, const double delta, const double end); int levdur(double *r, double *a, const int m, double eps); double lmadf(double x, double *c, const int m, const int pd, double *d); double lmadft(double x, double *c, const int m, const int pd, double *d); double lmadf1(double x, double *c, const int m, double *d, const int m1, const int m2, const int pd); double lmadf1t(double x, double *b, const int pd, double *d); int lpc(double *x, const int flng, double *a, const int m, const double f); void lpc2c(double *a, int m1, double *c, const int m2); int lpc2lsp(double *lpc, double *lsp, const int order, const int numsp, const int maxitr, const double eps); int lpc2par(double *a, double *k, const int m); void lsp2lpc(double *lsp, double *a, const int m); void lsp2sp(double *lsp, const int m, double *x, const int l, const int gain); int lspcheck(double *lsp, const int ord); double lspdf_even(double x, double *f, const int m, double *d); double lspdf_odd(double x, double *f, const int m, double *d); double ltcdf(double x, double *k, int m, double *d); void mc2b(double *mc, double *b, int m, const double a); int mcep(double *xw, const int flng, double *mc, const int m, const double a, const int itr1, const int itr2, const double dd, const int etype, const double e, const double f, const int itype); void mfcc(double *in, double *mc, const double sampleFreq, const double alpha, const double eps, const int wlng, const int flng, const int m, const int n, const int ceplift, const Boolean dftmode, const Boolean usehamming); void maskCov_GMM(GMM * gmm, const int *dim_list, const int cov_dim, const Boolean block_full, const Boolean block_corr); void frqtr(double *c1, int m1, double *c2, int m2, const double a); void mgc2mgc(double *c1, const int m1, const double a1, const double g1, double *c2, const int m2, const double a2, const double g2); void mgc2sp(double *mgc, const int m, const double a, const double g, double *x, double *y, const int flng); void mgclsp2sp(double a, double g, double *lsp, const int m, double *x, const int l, const int gain); int mgcep(double *xw, int flng, double *b, const int m, const double a, const double g, const int n, const int itr1, const int itr2, const double dd, const int etype, const double e, const double f, const int itype); double newton(double *x, const int flng, double *c, const int m, const double a, const double g, const int n, const int j, const double f); double mglsadf(double x, double *b, const int m, const double a, const int n, double *d); double mglsadf1(double x, double *b, const int m, const double a, const int n, double *d); double mglsadft(double x, double *b, const int m, const double a, const int n, double *d); double mglsadf1t(double x, double *b, const int m, const double a, const int n, double *d); int str2darray(char *c, double **x); int isfloat(char *c); double mlsadf(double x, double *b, const int m, const double a, const int pd, double *d); double mlsadft(double x, double *b, const int m, const double a, const int pd, double *d); void msvq(double *x, double *cb, const int l, int *cbsize, const int stage, int *index); void ndps2c(double *n, const int l, double *c, const int m); void norm0(double *x, double *y, int m); int nrand(double *p, const int leng, const int seed); double nrandom(unsigned long *next); unsigned long srnd(const unsigned int seed); void par2lpc(double *k, double *a, const int m); void phase(double *p, const int mp, double *z, const int mz, double *ph, const int flng, const int unlap); double poledf(double x, double *a, int m, double *d); double poledft(double x, double *a, int m, double *d); void reverse(double *x, const int l); double rmse(double *x, double *y, const int n); void output_root_pol(complex * x, int odr, int form); void root_pol(double *a, const int odr, complex * x, const int a_zero, const double eps, const int itrat); complex *cplx_getmem(const int leng); int smcep(double *xw, const int flng, double *mc, const int m, const int fftsz, const double a, const double t, const int itr1, const int itr2, const double dd, const int etype, const double e, const double f, const int itype); int uels(double *xw, const int flng, double *c, const int m, const int itr1, const int itr2, const double dd, const int etype, const double e, const int itype); double ulaw_c(const double x, const double max, const double mu); double ulaw_d(const double x, const double max, const double mu); int vc(const GMM * gmm, const DELTAWINDOW * window, const size_t total_frame, const size_t source_vlen, const size_t target_vlen, const double *gv_mean, const double *gv_vari, const double *source, double *target); int vq(double *x, double *cb, const int l, const int cbsize); double edist(double *x, double *y, const int m); double window(Window type, double *x, const int size, const int nflg); double zcross(double *x, const int fl, const int n); double zerodf(double x, double *b, int m, double *d); double zerodft(double x, double *b, const int m, double *d); double zerodf1(double x, double *b, int m, double *d); double zerodf1t(double x, double *b, const int m, double *d); /* wavsplit and wavjoin */ void copy_wav_header(Wavfile * dest_wav, const Wavfile * source_wav); void separate_path(char **dir, char **name, char *path); Boolean get_wav_list(Filelist * filelist, const char *dirname); Boolean wavread(Wavfile * wavfile, const char *fullpath); Boolean wavwrite(Wavfile * wavfile, const char *outpath); void wavsplit(Wavfile * wavout, const Wavfile * wavin); void free_wav_list(Filelist * filelist); void free_wav_data(Wavfile * wavfile); void wavjoin(Wavfile * wavout, const Wavfile * wavin); int search_wav_list(Filelist * filelist, char *key); SPTK-3.9/include/Makefile.mak0000644001051300105040000000014612442245164012720 00000000000000# Makefile for VC++ 2005 nmake tool # # 2007.10 Jong-Jin Kim # include_HEADERS = SPTK.h SPTK-3.9/include/Makefile.am0000644001051300105040000000003112442245164012536 00000000000000include_HEADERS = SPTK.h SPTK-3.9/include/Makefile.in0000644001051300105040000003661112637167423012573 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = include ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(include_HEADERS) \ $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(includedir)" HEADERS = $(include_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ include_HEADERS = SPTK.h all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu include/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-includeHEADERS: $(include_HEADERS) @$(NORMAL_INSTALL) @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ done uninstall-includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(HEADERS) installdirs: for dir in "$(DESTDIR)$(includedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-includeHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-includeHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ cscopelist-am ctags ctags-am distclean distclean-generic \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-includeHEADERS install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-includeHEADERS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/lib/0000755001051300105040000000000012637167674007732 500000000000000SPTK-3.9/lib/Makefile.mak0000644001051300105040000000511712442245154012045 00000000000000.c.obj: $(CC) /nologo /Fo$(@D)\ $(CFLAGS) /c $< CC = cl CL = link CPU = win32 SPTKCFG = /I ..\include SYSCFG = /O2 /Ot /GL /FD /EHsc /MT /W3 /nologo /c /Zi /TC /D "NDEBUG" /D "HAVE_STRING_H" /D "WIN32" /D "_WINDOWS" /D "_CONSOLE" /D "_MBCS" /D "_CRT_SECURE_NO_WARNINGS" !IFNDEF DOUBLE SYSCFG = $(SYSCFG) /D "FORMAT=\"float\"" !ELSE SYSCFG = $(SYSCFG) /D "FORMAT=\"double\"" !ENDIF CFLAGS = $(SYSCFG) $(SPTKCFG) CORES = agexp.obj \ cholesky.obj \ fileio.obj \ fillz.obj \ getfp.obj \ getmem.obj \ gexp.obj \ glog.obj \ invert.obj \ matrix.obj \ movem.obj \ mseq.obj \ theq.obj \ toeplitz.obj MODULES = ..\bin\acep\_acep.obj \ ..\bin\acorr\_acorr.obj \ ..\bin\agcep\_agcep.obj \ ..\bin\amcep\_amcep.obj \ ..\bin\average\_average.obj \ ..\bin\b2mc\_b2mc.obj \ ..\bin\c2acr\_c2acr.obj \ ..\bin\c2ir\_c2ir.obj \ ..\bin\c2sp\_c2sp.obj \ ..\bin\clip\_clip.obj \ ..\bin\dct\_dct.obj \ ..\bin\df2\_df2.obj \ ..\bin\dfs\_dfs.obj \ ..\bin\fft\_fft.obj \ ..\bin\fft2\_fft2.obj \ ..\bin\fftcep\_fftcep.obj \ ..\bin\fftr\_fftr.obj \ ..\bin\fftr2\_fftr2.obj \ ..\bin\freqt\_freqt.obj \ ..\bin\gc2gc\_gc2gc.obj \ ..\bin\gcep\_gcep.obj \ ..\bin\glsadf\_glsadf.obj \ ..\bin\gmm\_gmm.obj \ ..\bin\gnorm\_gnorm.obj \ ..\bin\grpdelay\_grpdelay.obj \ ..\bin\histogram\_histogram.obj \ ..\bin\ifft\_ifft.obj \ ..\bin\ifft2\_ifft2.obj \ ..\bin\ifftr\_ifftr.obj \ ..\bin\ignorm\_ignorm.obj \ ..\bin\imsvq\_imsvq.obj \ ..\bin\ivq\_ivq.obj \ ..\bin\lbg\_lbg.obj \ ..\bin\levdur\_levdur.obj \ ..\bin\lmadf\_lmadf.obj \ ..\bin\lpc\_lpc.obj \ ..\bin\lpc2c\_lpc2c.obj \ ..\bin\lpc2lsp\_lpc2lsp.obj \ ..\bin\lpc2par\_lpc2par.obj \ ..\bin\lsp2lpc\_lsp2lpc.obj \ ..\bin\lspcheck\_lspcheck.obj \ ..\bin\lspdf\_lspdf.obj \ ..\bin\ltcdf\_ltcdf.obj \ ..\bin\mc2b\_mc2b.obj \ ..\bin\mcep\_mcep.obj \ ..\bin\mfcc\_mfcc.obj \ ..\bin\mgc2mgc\_mgc2mgc.obj \ ..\bin\mgc2sp\_mgc2sp.obj \ ..\bin\mgcep\_mgcep.obj \ ..\bin\mglsadf\_mglsadf.obj \ ..\bin\mlpg\_mlpg.obj \ ..\bin\mlsadf\_mlsadf.obj \ ..\bin\msvq\_msvq.obj \ ..\bin\norm0\_norm0.obj \ ..\bin\nrand\_nrand.obj \ ..\bin\par2lpc\_par2lpc.obj \ ..\bin\phase\_phase.obj \ ..\bin\poledf\_poledf.obj \ ..\bin\reverse\_reverse.obj \ ..\bin\rmse\_rmse.obj \ ..\bin\root_pol\_root_pol.obj \ ..\bin\smcep\_smcep.obj \ ..\bin\transpose/_transpose.obj \ ..\bin\uels\_uels.obj \ ..\bin\ulaw\_ulaw.obj \ ..\bin\vq\_vq.obj \ ..\bin\window\_window.obj \ ..\bin\zcross\_zcross.obj \ ..\bin\zerodf\_zerodf.obj SPTK.lib: $(CORES) $(MODULES) lib /OUT:SPTK.lib $(CORES) $(MODULES) lib /list SPTK.lib clean: del *.lib del $(CORES) del $(MODULES) SPTK-3.9/lib/Makefile.am0000644001051300105040000000571712442245154011700 00000000000000AM_CPPFLAGS = -I @top_srcdir@/include lib_LIBRARIES = libSPTK.a libSPTK_a_SOURCES = agexp.c \ cholesky.c \ fileio.c \ fillz.c \ getfp.c \ getmem.c \ gexp.c \ glog.c \ invert.c \ matrix.c \ movem.c \ mseq.c \ theq.c \ toeplitz.c nodist_libSPTK_a_SOURCES = @top_srcdir@/include/SPTK.h \ @top_srcdir@/bin/acep/_acep.c \ @top_srcdir@/bin/acorr/_acorr.c \ @top_srcdir@/bin/agcep/_agcep.c \ @top_srcdir@/bin/amcep/_amcep.c \ @top_srcdir@/bin/average/_average.c \ @top_srcdir@/bin/b2mc/_b2mc.c \ @top_srcdir@/bin/c2acr/_c2acr.c \ @top_srcdir@/bin/c2ir/_c2ir.c \ @top_srcdir@/bin/c2sp/_c2sp.c \ @top_srcdir@/bin/clip/_clip.c \ @top_srcdir@/bin/dct/_dct.c \ @top_srcdir@/bin/df2/_df2.c \ @top_srcdir@/bin/dfs/_dfs.c \ @top_srcdir@/bin/fft/_fft.c \ @top_srcdir@/bin/fft2/_fft2.c \ @top_srcdir@/bin/fftcep/_fftcep.c \ @top_srcdir@/bin/fftr/_fftr.c \ @top_srcdir@/bin/fftr2/_fftr2.c \ @top_srcdir@/bin/freqt/_freqt.c \ @top_srcdir@/bin/gc2gc/_gc2gc.c \ @top_srcdir@/bin/gcep/_gcep.c \ @top_srcdir@/bin/glsadf/_glsadf.c \ @top_srcdir@/bin/gmm/_gmm.c \ @top_srcdir@/bin/gnorm/_gnorm.c \ @top_srcdir@/bin/grpdelay/_grpdelay.c \ @top_srcdir@/bin/histogram/_histogram.c \ @top_srcdir@/bin/ifft/_ifft.c \ @top_srcdir@/bin/ifftr/_ifftr.c \ @top_srcdir@/bin/ifft2/_ifft2.c \ @top_srcdir@/bin/ignorm/_ignorm.c \ @top_srcdir@/bin/imsvq/_imsvq.c \ @top_srcdir@/bin/ivq/_ivq.c \ @top_srcdir@/bin/lbg/_lbg.c \ @top_srcdir@/bin/levdur/_levdur.c \ @top_srcdir@/bin/lmadf/_lmadf.c \ @top_srcdir@/bin/lpc/_lpc.c \ @top_srcdir@/bin/lpc2c/_lpc2c.c \ @top_srcdir@/bin/lpc2lsp/_lpc2lsp.c \ @top_srcdir@/bin/lpc2par/_lpc2par.c \ @top_srcdir@/bin/lsp2lpc/_lsp2lpc.c \ @top_srcdir@/bin/lsp2sp/_lsp2sp.c \ @top_srcdir@/bin/lspcheck/_lspcheck.c \ @top_srcdir@/bin/lspdf/_lspdf.c \ @top_srcdir@/bin/ltcdf/_ltcdf.c \ @top_srcdir@/bin/mc2b/_mc2b.c \ @top_srcdir@/bin/mcep/_mcep.c \ @top_srcdir@/bin/mfcc/_mfcc.c \ @top_srcdir@/bin/mgc2mgc/_mgc2mgc.c \ @top_srcdir@/bin/mgc2sp/_mgc2sp.c \ @top_srcdir@/bin/mgcep/_mgcep.c \ @top_srcdir@/bin/mglsadf/_mglsadf.c \ @top_srcdir@/bin/mlpg/_mlpg.c \ @top_srcdir@/bin/mlsadf/_mlsadf.c \ @top_srcdir@/bin/msvq/_msvq.c \ @top_srcdir@/bin/norm0/_norm0.c \ @top_srcdir@/bin/nrand/_nrand.c \ @top_srcdir@/bin/par2lpc/_par2lpc.c \ @top_srcdir@/bin/phase/_phase.c \ @top_srcdir@/bin/poledf/_poledf.c \ @top_srcdir@/bin/reverse/_reverse.c \ @top_srcdir@/bin/rmse/_rmse.c \ @top_srcdir@/bin/root_pol/_root_pol.c \ @top_srcdir@/bin/smcep/_smcep.c \ @top_srcdir@/bin/transpose/_transpose.c \ @top_srcdir@/bin/uels/_uels.c \ @top_srcdir@/bin/ulaw/_ulaw.c \ @top_srcdir@/bin/vc/_vc.c \ @top_srcdir@/bin/vq/_vq.c \ @top_srcdir@/bin/wavjoin/_wavjoin.c \ @top_srcdir@/bin/wavsplit/_wavsplit.c \ @top_srcdir@/bin/window/_window.c \ @top_srcdir@/bin/zcross/_zcross.c \ @top_srcdir@/bin/zerodf/_zerodf.c SPTK-3.9/lib/Makefile.in0000644001051300105040000023027112637167423011714 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = lib ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" LIBRARIES = $(lib_LIBRARIES) ARFLAGS = cru AM_V_AR = $(am__v_AR_@AM_V@) am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) am__v_AR_0 = @echo " AR " $@; am__v_AR_1 = libSPTK_a_AR = $(AR) $(ARFLAGS) libSPTK_a_LIBADD = am_libSPTK_a_OBJECTS = agexp.$(OBJEXT) cholesky.$(OBJEXT) \ fileio.$(OBJEXT) fillz.$(OBJEXT) getfp.$(OBJEXT) \ getmem.$(OBJEXT) gexp.$(OBJEXT) glog.$(OBJEXT) \ invert.$(OBJEXT) matrix.$(OBJEXT) movem.$(OBJEXT) \ mseq.$(OBJEXT) theq.$(OBJEXT) toeplitz.$(OBJEXT) am__dirstamp = $(am__leading_dot)dirstamp nodist_libSPTK_a_OBJECTS = @top_srcdir@/bin/acep/_acep.$(OBJEXT) \ @top_srcdir@/bin/acorr/_acorr.$(OBJEXT) \ @top_srcdir@/bin/agcep/_agcep.$(OBJEXT) \ @top_srcdir@/bin/amcep/_amcep.$(OBJEXT) \ @top_srcdir@/bin/average/_average.$(OBJEXT) \ @top_srcdir@/bin/b2mc/_b2mc.$(OBJEXT) \ @top_srcdir@/bin/c2acr/_c2acr.$(OBJEXT) \ @top_srcdir@/bin/c2ir/_c2ir.$(OBJEXT) \ @top_srcdir@/bin/c2sp/_c2sp.$(OBJEXT) \ @top_srcdir@/bin/clip/_clip.$(OBJEXT) \ @top_srcdir@/bin/dct/_dct.$(OBJEXT) \ @top_srcdir@/bin/df2/_df2.$(OBJEXT) \ @top_srcdir@/bin/dfs/_dfs.$(OBJEXT) \ @top_srcdir@/bin/fft/_fft.$(OBJEXT) \ @top_srcdir@/bin/fft2/_fft2.$(OBJEXT) \ @top_srcdir@/bin/fftcep/_fftcep.$(OBJEXT) \ @top_srcdir@/bin/fftr/_fftr.$(OBJEXT) \ @top_srcdir@/bin/fftr2/_fftr2.$(OBJEXT) \ @top_srcdir@/bin/freqt/_freqt.$(OBJEXT) \ @top_srcdir@/bin/gc2gc/_gc2gc.$(OBJEXT) \ @top_srcdir@/bin/gcep/_gcep.$(OBJEXT) \ @top_srcdir@/bin/glsadf/_glsadf.$(OBJEXT) \ @top_srcdir@/bin/gmm/_gmm.$(OBJEXT) \ @top_srcdir@/bin/gnorm/_gnorm.$(OBJEXT) \ @top_srcdir@/bin/grpdelay/_grpdelay.$(OBJEXT) \ @top_srcdir@/bin/histogram/_histogram.$(OBJEXT) \ @top_srcdir@/bin/ifft/_ifft.$(OBJEXT) \ @top_srcdir@/bin/ifftr/_ifftr.$(OBJEXT) \ @top_srcdir@/bin/ifft2/_ifft2.$(OBJEXT) \ @top_srcdir@/bin/ignorm/_ignorm.$(OBJEXT) \ @top_srcdir@/bin/imsvq/_imsvq.$(OBJEXT) \ @top_srcdir@/bin/ivq/_ivq.$(OBJEXT) \ @top_srcdir@/bin/lbg/_lbg.$(OBJEXT) \ @top_srcdir@/bin/levdur/_levdur.$(OBJEXT) \ @top_srcdir@/bin/lmadf/_lmadf.$(OBJEXT) \ @top_srcdir@/bin/lpc/_lpc.$(OBJEXT) \ @top_srcdir@/bin/lpc2c/_lpc2c.$(OBJEXT) \ @top_srcdir@/bin/lpc2lsp/_lpc2lsp.$(OBJEXT) \ @top_srcdir@/bin/lpc2par/_lpc2par.$(OBJEXT) \ @top_srcdir@/bin/lsp2lpc/_lsp2lpc.$(OBJEXT) \ @top_srcdir@/bin/lsp2sp/_lsp2sp.$(OBJEXT) \ @top_srcdir@/bin/lspcheck/_lspcheck.$(OBJEXT) \ @top_srcdir@/bin/lspdf/_lspdf.$(OBJEXT) \ @top_srcdir@/bin/ltcdf/_ltcdf.$(OBJEXT) \ @top_srcdir@/bin/mc2b/_mc2b.$(OBJEXT) \ @top_srcdir@/bin/mcep/_mcep.$(OBJEXT) \ @top_srcdir@/bin/mfcc/_mfcc.$(OBJEXT) \ @top_srcdir@/bin/mgc2mgc/_mgc2mgc.$(OBJEXT) \ @top_srcdir@/bin/mgc2sp/_mgc2sp.$(OBJEXT) \ @top_srcdir@/bin/mgcep/_mgcep.$(OBJEXT) \ @top_srcdir@/bin/mglsadf/_mglsadf.$(OBJEXT) \ @top_srcdir@/bin/mlpg/_mlpg.$(OBJEXT) \ @top_srcdir@/bin/mlsadf/_mlsadf.$(OBJEXT) \ @top_srcdir@/bin/msvq/_msvq.$(OBJEXT) \ @top_srcdir@/bin/norm0/_norm0.$(OBJEXT) \ @top_srcdir@/bin/nrand/_nrand.$(OBJEXT) \ @top_srcdir@/bin/par2lpc/_par2lpc.$(OBJEXT) \ @top_srcdir@/bin/phase/_phase.$(OBJEXT) \ @top_srcdir@/bin/poledf/_poledf.$(OBJEXT) \ @top_srcdir@/bin/reverse/_reverse.$(OBJEXT) \ @top_srcdir@/bin/rmse/_rmse.$(OBJEXT) \ @top_srcdir@/bin/root_pol/_root_pol.$(OBJEXT) \ @top_srcdir@/bin/smcep/_smcep.$(OBJEXT) \ @top_srcdir@/bin/transpose/_transpose.$(OBJEXT) \ @top_srcdir@/bin/uels/_uels.$(OBJEXT) \ @top_srcdir@/bin/ulaw/_ulaw.$(OBJEXT) \ @top_srcdir@/bin/vc/_vc.$(OBJEXT) \ @top_srcdir@/bin/vq/_vq.$(OBJEXT) \ @top_srcdir@/bin/wavjoin/_wavjoin.$(OBJEXT) \ @top_srcdir@/bin/wavsplit/_wavsplit.$(OBJEXT) \ @top_srcdir@/bin/window/_window.$(OBJEXT) \ @top_srcdir@/bin/zcross/_zcross.$(OBJEXT) \ @top_srcdir@/bin/zerodf/_zerodf.$(OBJEXT) libSPTK_a_OBJECTS = $(am_libSPTK_a_OBJECTS) \ $(nodist_libSPTK_a_OBJECTS) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libSPTK_a_SOURCES) $(nodist_libSPTK_a_SOURCES) DIST_SOURCES = $(libSPTK_a_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I @top_srcdir@/include lib_LIBRARIES = libSPTK.a libSPTK_a_SOURCES = agexp.c \ cholesky.c \ fileio.c \ fillz.c \ getfp.c \ getmem.c \ gexp.c \ glog.c \ invert.c \ matrix.c \ movem.c \ mseq.c \ theq.c \ toeplitz.c nodist_libSPTK_a_SOURCES = @top_srcdir@/include/SPTK.h \ @top_srcdir@/bin/acep/_acep.c \ @top_srcdir@/bin/acorr/_acorr.c \ @top_srcdir@/bin/agcep/_agcep.c \ @top_srcdir@/bin/amcep/_amcep.c \ @top_srcdir@/bin/average/_average.c \ @top_srcdir@/bin/b2mc/_b2mc.c \ @top_srcdir@/bin/c2acr/_c2acr.c \ @top_srcdir@/bin/c2ir/_c2ir.c \ @top_srcdir@/bin/c2sp/_c2sp.c \ @top_srcdir@/bin/clip/_clip.c \ @top_srcdir@/bin/dct/_dct.c \ @top_srcdir@/bin/df2/_df2.c \ @top_srcdir@/bin/dfs/_dfs.c \ @top_srcdir@/bin/fft/_fft.c \ @top_srcdir@/bin/fft2/_fft2.c \ @top_srcdir@/bin/fftcep/_fftcep.c \ @top_srcdir@/bin/fftr/_fftr.c \ @top_srcdir@/bin/fftr2/_fftr2.c \ @top_srcdir@/bin/freqt/_freqt.c \ @top_srcdir@/bin/gc2gc/_gc2gc.c \ @top_srcdir@/bin/gcep/_gcep.c \ @top_srcdir@/bin/glsadf/_glsadf.c \ @top_srcdir@/bin/gmm/_gmm.c \ @top_srcdir@/bin/gnorm/_gnorm.c \ @top_srcdir@/bin/grpdelay/_grpdelay.c \ @top_srcdir@/bin/histogram/_histogram.c \ @top_srcdir@/bin/ifft/_ifft.c \ @top_srcdir@/bin/ifftr/_ifftr.c \ @top_srcdir@/bin/ifft2/_ifft2.c \ @top_srcdir@/bin/ignorm/_ignorm.c \ @top_srcdir@/bin/imsvq/_imsvq.c \ @top_srcdir@/bin/ivq/_ivq.c \ @top_srcdir@/bin/lbg/_lbg.c \ @top_srcdir@/bin/levdur/_levdur.c \ @top_srcdir@/bin/lmadf/_lmadf.c \ @top_srcdir@/bin/lpc/_lpc.c \ @top_srcdir@/bin/lpc2c/_lpc2c.c \ @top_srcdir@/bin/lpc2lsp/_lpc2lsp.c \ @top_srcdir@/bin/lpc2par/_lpc2par.c \ @top_srcdir@/bin/lsp2lpc/_lsp2lpc.c \ @top_srcdir@/bin/lsp2sp/_lsp2sp.c \ @top_srcdir@/bin/lspcheck/_lspcheck.c \ @top_srcdir@/bin/lspdf/_lspdf.c \ @top_srcdir@/bin/ltcdf/_ltcdf.c \ @top_srcdir@/bin/mc2b/_mc2b.c \ @top_srcdir@/bin/mcep/_mcep.c \ @top_srcdir@/bin/mfcc/_mfcc.c \ @top_srcdir@/bin/mgc2mgc/_mgc2mgc.c \ @top_srcdir@/bin/mgc2sp/_mgc2sp.c \ @top_srcdir@/bin/mgcep/_mgcep.c \ @top_srcdir@/bin/mglsadf/_mglsadf.c \ @top_srcdir@/bin/mlpg/_mlpg.c \ @top_srcdir@/bin/mlsadf/_mlsadf.c \ @top_srcdir@/bin/msvq/_msvq.c \ @top_srcdir@/bin/norm0/_norm0.c \ @top_srcdir@/bin/nrand/_nrand.c \ @top_srcdir@/bin/par2lpc/_par2lpc.c \ @top_srcdir@/bin/phase/_phase.c \ @top_srcdir@/bin/poledf/_poledf.c \ @top_srcdir@/bin/reverse/_reverse.c \ @top_srcdir@/bin/rmse/_rmse.c \ @top_srcdir@/bin/root_pol/_root_pol.c \ @top_srcdir@/bin/smcep/_smcep.c \ @top_srcdir@/bin/transpose/_transpose.c \ @top_srcdir@/bin/uels/_uels.c \ @top_srcdir@/bin/ulaw/_ulaw.c \ @top_srcdir@/bin/vc/_vc.c \ @top_srcdir@/bin/vq/_vq.c \ @top_srcdir@/bin/wavjoin/_wavjoin.c \ @top_srcdir@/bin/wavsplit/_wavsplit.c \ @top_srcdir@/bin/window/_window.c \ @top_srcdir@/bin/zcross/_zcross.c \ @top_srcdir@/bin/zerodf/_zerodf.c all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu lib/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-libLIBRARIES: $(lib_LIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(INSTALL_DATA) $$list2 '$(DESTDIR)$(libdir)'"; \ $(INSTALL_DATA) $$list2 "$(DESTDIR)$(libdir)" || exit $$?; } @$(POST_INSTALL) @list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ if test -f $$p; then \ $(am__strip_dir) \ echo " ( cd '$(DESTDIR)$(libdir)' && $(RANLIB) $$f )"; \ ( cd "$(DESTDIR)$(libdir)" && $(RANLIB) $$f ) || exit $$?; \ else :; fi; \ done uninstall-libLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(libdir)'; $(am__uninstall_files_from_dir) clean-libLIBRARIES: -test -z "$(lib_LIBRARIES)" || rm -f $(lib_LIBRARIES) @top_srcdir@/bin/acep/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/acep @: > @top_srcdir@/bin/acep/$(am__dirstamp) @top_srcdir@/bin/acep/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/acep/$(DEPDIR) @: > @top_srcdir@/bin/acep/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/acep/_acep.$(OBJEXT): \ @top_srcdir@/bin/acep/$(am__dirstamp) \ @top_srcdir@/bin/acep/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/acorr/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/acorr @: > @top_srcdir@/bin/acorr/$(am__dirstamp) @top_srcdir@/bin/acorr/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/acorr/$(DEPDIR) @: > @top_srcdir@/bin/acorr/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/acorr/_acorr.$(OBJEXT): \ @top_srcdir@/bin/acorr/$(am__dirstamp) \ @top_srcdir@/bin/acorr/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/agcep/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/agcep @: > @top_srcdir@/bin/agcep/$(am__dirstamp) @top_srcdir@/bin/agcep/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/agcep/$(DEPDIR) @: > @top_srcdir@/bin/agcep/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/agcep/_agcep.$(OBJEXT): \ @top_srcdir@/bin/agcep/$(am__dirstamp) \ @top_srcdir@/bin/agcep/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/amcep/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/amcep @: > @top_srcdir@/bin/amcep/$(am__dirstamp) @top_srcdir@/bin/amcep/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/amcep/$(DEPDIR) @: > @top_srcdir@/bin/amcep/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/amcep/_amcep.$(OBJEXT): \ @top_srcdir@/bin/amcep/$(am__dirstamp) \ @top_srcdir@/bin/amcep/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/average/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/average @: > @top_srcdir@/bin/average/$(am__dirstamp) @top_srcdir@/bin/average/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/average/$(DEPDIR) @: > @top_srcdir@/bin/average/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/average/_average.$(OBJEXT): \ @top_srcdir@/bin/average/$(am__dirstamp) \ @top_srcdir@/bin/average/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/b2mc/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/b2mc @: > @top_srcdir@/bin/b2mc/$(am__dirstamp) @top_srcdir@/bin/b2mc/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/b2mc/$(DEPDIR) @: > @top_srcdir@/bin/b2mc/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/b2mc/_b2mc.$(OBJEXT): \ @top_srcdir@/bin/b2mc/$(am__dirstamp) \ @top_srcdir@/bin/b2mc/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/c2acr/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/c2acr @: > @top_srcdir@/bin/c2acr/$(am__dirstamp) @top_srcdir@/bin/c2acr/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/c2acr/$(DEPDIR) @: > @top_srcdir@/bin/c2acr/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/c2acr/_c2acr.$(OBJEXT): \ @top_srcdir@/bin/c2acr/$(am__dirstamp) \ @top_srcdir@/bin/c2acr/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/c2ir/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/c2ir @: > @top_srcdir@/bin/c2ir/$(am__dirstamp) @top_srcdir@/bin/c2ir/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/c2ir/$(DEPDIR) @: > @top_srcdir@/bin/c2ir/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/c2ir/_c2ir.$(OBJEXT): \ @top_srcdir@/bin/c2ir/$(am__dirstamp) \ @top_srcdir@/bin/c2ir/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/c2sp/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/c2sp @: > @top_srcdir@/bin/c2sp/$(am__dirstamp) @top_srcdir@/bin/c2sp/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/c2sp/$(DEPDIR) @: > @top_srcdir@/bin/c2sp/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/c2sp/_c2sp.$(OBJEXT): \ @top_srcdir@/bin/c2sp/$(am__dirstamp) \ @top_srcdir@/bin/c2sp/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/clip/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/clip @: > @top_srcdir@/bin/clip/$(am__dirstamp) @top_srcdir@/bin/clip/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/clip/$(DEPDIR) @: > @top_srcdir@/bin/clip/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/clip/_clip.$(OBJEXT): \ @top_srcdir@/bin/clip/$(am__dirstamp) \ @top_srcdir@/bin/clip/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/dct/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/dct @: > @top_srcdir@/bin/dct/$(am__dirstamp) @top_srcdir@/bin/dct/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/dct/$(DEPDIR) @: > @top_srcdir@/bin/dct/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/dct/_dct.$(OBJEXT): \ @top_srcdir@/bin/dct/$(am__dirstamp) \ @top_srcdir@/bin/dct/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/df2/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/df2 @: > @top_srcdir@/bin/df2/$(am__dirstamp) @top_srcdir@/bin/df2/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/df2/$(DEPDIR) @: > @top_srcdir@/bin/df2/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/df2/_df2.$(OBJEXT): \ @top_srcdir@/bin/df2/$(am__dirstamp) \ @top_srcdir@/bin/df2/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/dfs/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/dfs @: > @top_srcdir@/bin/dfs/$(am__dirstamp) @top_srcdir@/bin/dfs/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/dfs/$(DEPDIR) @: > @top_srcdir@/bin/dfs/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/dfs/_dfs.$(OBJEXT): \ @top_srcdir@/bin/dfs/$(am__dirstamp) \ @top_srcdir@/bin/dfs/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/fft/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/fft @: > @top_srcdir@/bin/fft/$(am__dirstamp) @top_srcdir@/bin/fft/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/fft/$(DEPDIR) @: > @top_srcdir@/bin/fft/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/fft/_fft.$(OBJEXT): \ @top_srcdir@/bin/fft/$(am__dirstamp) \ @top_srcdir@/bin/fft/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/fft2/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/fft2 @: > @top_srcdir@/bin/fft2/$(am__dirstamp) @top_srcdir@/bin/fft2/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/fft2/$(DEPDIR) @: > @top_srcdir@/bin/fft2/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/fft2/_fft2.$(OBJEXT): \ @top_srcdir@/bin/fft2/$(am__dirstamp) \ @top_srcdir@/bin/fft2/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/fftcep/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/fftcep @: > @top_srcdir@/bin/fftcep/$(am__dirstamp) @top_srcdir@/bin/fftcep/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/fftcep/$(DEPDIR) @: > @top_srcdir@/bin/fftcep/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/fftcep/_fftcep.$(OBJEXT): \ @top_srcdir@/bin/fftcep/$(am__dirstamp) \ @top_srcdir@/bin/fftcep/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/fftr/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/fftr @: > @top_srcdir@/bin/fftr/$(am__dirstamp) @top_srcdir@/bin/fftr/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/fftr/$(DEPDIR) @: > @top_srcdir@/bin/fftr/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/fftr/_fftr.$(OBJEXT): \ @top_srcdir@/bin/fftr/$(am__dirstamp) \ @top_srcdir@/bin/fftr/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/fftr2/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/fftr2 @: > @top_srcdir@/bin/fftr2/$(am__dirstamp) @top_srcdir@/bin/fftr2/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/fftr2/$(DEPDIR) @: > @top_srcdir@/bin/fftr2/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/fftr2/_fftr2.$(OBJEXT): \ @top_srcdir@/bin/fftr2/$(am__dirstamp) \ @top_srcdir@/bin/fftr2/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/freqt/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/freqt @: > @top_srcdir@/bin/freqt/$(am__dirstamp) @top_srcdir@/bin/freqt/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/freqt/$(DEPDIR) @: > @top_srcdir@/bin/freqt/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/freqt/_freqt.$(OBJEXT): \ @top_srcdir@/bin/freqt/$(am__dirstamp) \ @top_srcdir@/bin/freqt/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/gc2gc/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/gc2gc @: > @top_srcdir@/bin/gc2gc/$(am__dirstamp) @top_srcdir@/bin/gc2gc/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/gc2gc/$(DEPDIR) @: > @top_srcdir@/bin/gc2gc/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/gc2gc/_gc2gc.$(OBJEXT): \ @top_srcdir@/bin/gc2gc/$(am__dirstamp) \ @top_srcdir@/bin/gc2gc/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/gcep/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/gcep @: > @top_srcdir@/bin/gcep/$(am__dirstamp) @top_srcdir@/bin/gcep/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/gcep/$(DEPDIR) @: > @top_srcdir@/bin/gcep/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/gcep/_gcep.$(OBJEXT): \ @top_srcdir@/bin/gcep/$(am__dirstamp) \ @top_srcdir@/bin/gcep/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/glsadf/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/glsadf @: > @top_srcdir@/bin/glsadf/$(am__dirstamp) @top_srcdir@/bin/glsadf/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/glsadf/$(DEPDIR) @: > @top_srcdir@/bin/glsadf/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/glsadf/_glsadf.$(OBJEXT): \ @top_srcdir@/bin/glsadf/$(am__dirstamp) \ @top_srcdir@/bin/glsadf/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/gmm/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/gmm @: > @top_srcdir@/bin/gmm/$(am__dirstamp) @top_srcdir@/bin/gmm/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/gmm/$(DEPDIR) @: > @top_srcdir@/bin/gmm/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/gmm/_gmm.$(OBJEXT): \ @top_srcdir@/bin/gmm/$(am__dirstamp) \ @top_srcdir@/bin/gmm/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/gnorm/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/gnorm @: > @top_srcdir@/bin/gnorm/$(am__dirstamp) @top_srcdir@/bin/gnorm/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/gnorm/$(DEPDIR) @: > @top_srcdir@/bin/gnorm/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/gnorm/_gnorm.$(OBJEXT): \ @top_srcdir@/bin/gnorm/$(am__dirstamp) \ @top_srcdir@/bin/gnorm/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/grpdelay/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/grpdelay @: > @top_srcdir@/bin/grpdelay/$(am__dirstamp) @top_srcdir@/bin/grpdelay/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/grpdelay/$(DEPDIR) @: > @top_srcdir@/bin/grpdelay/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/grpdelay/_grpdelay.$(OBJEXT): \ @top_srcdir@/bin/grpdelay/$(am__dirstamp) \ @top_srcdir@/bin/grpdelay/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/histogram/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/histogram @: > @top_srcdir@/bin/histogram/$(am__dirstamp) @top_srcdir@/bin/histogram/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/histogram/$(DEPDIR) @: > @top_srcdir@/bin/histogram/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/histogram/_histogram.$(OBJEXT): \ @top_srcdir@/bin/histogram/$(am__dirstamp) \ @top_srcdir@/bin/histogram/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/ifft/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/ifft @: > @top_srcdir@/bin/ifft/$(am__dirstamp) @top_srcdir@/bin/ifft/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/ifft/$(DEPDIR) @: > @top_srcdir@/bin/ifft/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/ifft/_ifft.$(OBJEXT): \ @top_srcdir@/bin/ifft/$(am__dirstamp) \ @top_srcdir@/bin/ifft/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/ifftr/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/ifftr @: > @top_srcdir@/bin/ifftr/$(am__dirstamp) @top_srcdir@/bin/ifftr/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/ifftr/$(DEPDIR) @: > @top_srcdir@/bin/ifftr/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/ifftr/_ifftr.$(OBJEXT): \ @top_srcdir@/bin/ifftr/$(am__dirstamp) \ @top_srcdir@/bin/ifftr/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/ifft2/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/ifft2 @: > @top_srcdir@/bin/ifft2/$(am__dirstamp) @top_srcdir@/bin/ifft2/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/ifft2/$(DEPDIR) @: > @top_srcdir@/bin/ifft2/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/ifft2/_ifft2.$(OBJEXT): \ @top_srcdir@/bin/ifft2/$(am__dirstamp) \ @top_srcdir@/bin/ifft2/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/ignorm/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/ignorm @: > @top_srcdir@/bin/ignorm/$(am__dirstamp) @top_srcdir@/bin/ignorm/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/ignorm/$(DEPDIR) @: > @top_srcdir@/bin/ignorm/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/ignorm/_ignorm.$(OBJEXT): \ @top_srcdir@/bin/ignorm/$(am__dirstamp) \ @top_srcdir@/bin/ignorm/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/imsvq/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/imsvq @: > @top_srcdir@/bin/imsvq/$(am__dirstamp) @top_srcdir@/bin/imsvq/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/imsvq/$(DEPDIR) @: > @top_srcdir@/bin/imsvq/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/imsvq/_imsvq.$(OBJEXT): \ @top_srcdir@/bin/imsvq/$(am__dirstamp) \ @top_srcdir@/bin/imsvq/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/ivq/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/ivq @: > @top_srcdir@/bin/ivq/$(am__dirstamp) @top_srcdir@/bin/ivq/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/ivq/$(DEPDIR) @: > @top_srcdir@/bin/ivq/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/ivq/_ivq.$(OBJEXT): \ @top_srcdir@/bin/ivq/$(am__dirstamp) \ @top_srcdir@/bin/ivq/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/lbg/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/lbg @: > @top_srcdir@/bin/lbg/$(am__dirstamp) @top_srcdir@/bin/lbg/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/lbg/$(DEPDIR) @: > @top_srcdir@/bin/lbg/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/lbg/_lbg.$(OBJEXT): \ @top_srcdir@/bin/lbg/$(am__dirstamp) \ @top_srcdir@/bin/lbg/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/levdur/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/levdur @: > @top_srcdir@/bin/levdur/$(am__dirstamp) @top_srcdir@/bin/levdur/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/levdur/$(DEPDIR) @: > @top_srcdir@/bin/levdur/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/levdur/_levdur.$(OBJEXT): \ @top_srcdir@/bin/levdur/$(am__dirstamp) \ @top_srcdir@/bin/levdur/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/lmadf/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/lmadf @: > @top_srcdir@/bin/lmadf/$(am__dirstamp) @top_srcdir@/bin/lmadf/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/lmadf/$(DEPDIR) @: > @top_srcdir@/bin/lmadf/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/lmadf/_lmadf.$(OBJEXT): \ @top_srcdir@/bin/lmadf/$(am__dirstamp) \ @top_srcdir@/bin/lmadf/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/lpc/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/lpc @: > @top_srcdir@/bin/lpc/$(am__dirstamp) @top_srcdir@/bin/lpc/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/lpc/$(DEPDIR) @: > @top_srcdir@/bin/lpc/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/lpc/_lpc.$(OBJEXT): \ @top_srcdir@/bin/lpc/$(am__dirstamp) \ @top_srcdir@/bin/lpc/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/lpc2c/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/lpc2c @: > @top_srcdir@/bin/lpc2c/$(am__dirstamp) @top_srcdir@/bin/lpc2c/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/lpc2c/$(DEPDIR) @: > @top_srcdir@/bin/lpc2c/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/lpc2c/_lpc2c.$(OBJEXT): \ @top_srcdir@/bin/lpc2c/$(am__dirstamp) \ @top_srcdir@/bin/lpc2c/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/lpc2lsp/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/lpc2lsp @: > @top_srcdir@/bin/lpc2lsp/$(am__dirstamp) @top_srcdir@/bin/lpc2lsp/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/lpc2lsp/$(DEPDIR) @: > @top_srcdir@/bin/lpc2lsp/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/lpc2lsp/_lpc2lsp.$(OBJEXT): \ @top_srcdir@/bin/lpc2lsp/$(am__dirstamp) \ @top_srcdir@/bin/lpc2lsp/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/lpc2par/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/lpc2par @: > @top_srcdir@/bin/lpc2par/$(am__dirstamp) @top_srcdir@/bin/lpc2par/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/lpc2par/$(DEPDIR) @: > @top_srcdir@/bin/lpc2par/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/lpc2par/_lpc2par.$(OBJEXT): \ @top_srcdir@/bin/lpc2par/$(am__dirstamp) \ @top_srcdir@/bin/lpc2par/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/lsp2lpc/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/lsp2lpc @: > @top_srcdir@/bin/lsp2lpc/$(am__dirstamp) @top_srcdir@/bin/lsp2lpc/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/lsp2lpc/$(DEPDIR) @: > @top_srcdir@/bin/lsp2lpc/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/lsp2lpc/_lsp2lpc.$(OBJEXT): \ @top_srcdir@/bin/lsp2lpc/$(am__dirstamp) \ @top_srcdir@/bin/lsp2lpc/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/lsp2sp/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/lsp2sp @: > @top_srcdir@/bin/lsp2sp/$(am__dirstamp) @top_srcdir@/bin/lsp2sp/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/lsp2sp/$(DEPDIR) @: > @top_srcdir@/bin/lsp2sp/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/lsp2sp/_lsp2sp.$(OBJEXT): \ @top_srcdir@/bin/lsp2sp/$(am__dirstamp) \ @top_srcdir@/bin/lsp2sp/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/lspcheck/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/lspcheck @: > @top_srcdir@/bin/lspcheck/$(am__dirstamp) @top_srcdir@/bin/lspcheck/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/lspcheck/$(DEPDIR) @: > @top_srcdir@/bin/lspcheck/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/lspcheck/_lspcheck.$(OBJEXT): \ @top_srcdir@/bin/lspcheck/$(am__dirstamp) \ @top_srcdir@/bin/lspcheck/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/lspdf/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/lspdf @: > @top_srcdir@/bin/lspdf/$(am__dirstamp) @top_srcdir@/bin/lspdf/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/lspdf/$(DEPDIR) @: > @top_srcdir@/bin/lspdf/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/lspdf/_lspdf.$(OBJEXT): \ @top_srcdir@/bin/lspdf/$(am__dirstamp) \ @top_srcdir@/bin/lspdf/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/ltcdf/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/ltcdf @: > @top_srcdir@/bin/ltcdf/$(am__dirstamp) @top_srcdir@/bin/ltcdf/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/ltcdf/$(DEPDIR) @: > @top_srcdir@/bin/ltcdf/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/ltcdf/_ltcdf.$(OBJEXT): \ @top_srcdir@/bin/ltcdf/$(am__dirstamp) \ @top_srcdir@/bin/ltcdf/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/mc2b/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/mc2b @: > @top_srcdir@/bin/mc2b/$(am__dirstamp) @top_srcdir@/bin/mc2b/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/mc2b/$(DEPDIR) @: > @top_srcdir@/bin/mc2b/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/mc2b/_mc2b.$(OBJEXT): \ @top_srcdir@/bin/mc2b/$(am__dirstamp) \ @top_srcdir@/bin/mc2b/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/mcep/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/mcep @: > @top_srcdir@/bin/mcep/$(am__dirstamp) @top_srcdir@/bin/mcep/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/mcep/$(DEPDIR) @: > @top_srcdir@/bin/mcep/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/mcep/_mcep.$(OBJEXT): \ @top_srcdir@/bin/mcep/$(am__dirstamp) \ @top_srcdir@/bin/mcep/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/mfcc/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/mfcc @: > @top_srcdir@/bin/mfcc/$(am__dirstamp) @top_srcdir@/bin/mfcc/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/mfcc/$(DEPDIR) @: > @top_srcdir@/bin/mfcc/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/mfcc/_mfcc.$(OBJEXT): \ @top_srcdir@/bin/mfcc/$(am__dirstamp) \ @top_srcdir@/bin/mfcc/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/mgc2mgc/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/mgc2mgc @: > @top_srcdir@/bin/mgc2mgc/$(am__dirstamp) @top_srcdir@/bin/mgc2mgc/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/mgc2mgc/$(DEPDIR) @: > @top_srcdir@/bin/mgc2mgc/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/mgc2mgc/_mgc2mgc.$(OBJEXT): \ @top_srcdir@/bin/mgc2mgc/$(am__dirstamp) \ @top_srcdir@/bin/mgc2mgc/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/mgc2sp/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/mgc2sp @: > @top_srcdir@/bin/mgc2sp/$(am__dirstamp) @top_srcdir@/bin/mgc2sp/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/mgc2sp/$(DEPDIR) @: > @top_srcdir@/bin/mgc2sp/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/mgc2sp/_mgc2sp.$(OBJEXT): \ @top_srcdir@/bin/mgc2sp/$(am__dirstamp) \ @top_srcdir@/bin/mgc2sp/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/mgcep/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/mgcep @: > @top_srcdir@/bin/mgcep/$(am__dirstamp) @top_srcdir@/bin/mgcep/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/mgcep/$(DEPDIR) @: > @top_srcdir@/bin/mgcep/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/mgcep/_mgcep.$(OBJEXT): \ @top_srcdir@/bin/mgcep/$(am__dirstamp) \ @top_srcdir@/bin/mgcep/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/mglsadf/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/mglsadf @: > @top_srcdir@/bin/mglsadf/$(am__dirstamp) @top_srcdir@/bin/mglsadf/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/mglsadf/$(DEPDIR) @: > @top_srcdir@/bin/mglsadf/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/mglsadf/_mglsadf.$(OBJEXT): \ @top_srcdir@/bin/mglsadf/$(am__dirstamp) \ @top_srcdir@/bin/mglsadf/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/mlpg/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/mlpg @: > @top_srcdir@/bin/mlpg/$(am__dirstamp) @top_srcdir@/bin/mlpg/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/mlpg/$(DEPDIR) @: > @top_srcdir@/bin/mlpg/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/mlpg/_mlpg.$(OBJEXT): \ @top_srcdir@/bin/mlpg/$(am__dirstamp) \ @top_srcdir@/bin/mlpg/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/mlsadf/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/mlsadf @: > @top_srcdir@/bin/mlsadf/$(am__dirstamp) @top_srcdir@/bin/mlsadf/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/mlsadf/$(DEPDIR) @: > @top_srcdir@/bin/mlsadf/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/mlsadf/_mlsadf.$(OBJEXT): \ @top_srcdir@/bin/mlsadf/$(am__dirstamp) \ @top_srcdir@/bin/mlsadf/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/msvq/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/msvq @: > @top_srcdir@/bin/msvq/$(am__dirstamp) @top_srcdir@/bin/msvq/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/msvq/$(DEPDIR) @: > @top_srcdir@/bin/msvq/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/msvq/_msvq.$(OBJEXT): \ @top_srcdir@/bin/msvq/$(am__dirstamp) \ @top_srcdir@/bin/msvq/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/norm0/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/norm0 @: > @top_srcdir@/bin/norm0/$(am__dirstamp) @top_srcdir@/bin/norm0/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/norm0/$(DEPDIR) @: > @top_srcdir@/bin/norm0/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/norm0/_norm0.$(OBJEXT): \ @top_srcdir@/bin/norm0/$(am__dirstamp) \ @top_srcdir@/bin/norm0/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/nrand/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/nrand @: > @top_srcdir@/bin/nrand/$(am__dirstamp) @top_srcdir@/bin/nrand/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/nrand/$(DEPDIR) @: > @top_srcdir@/bin/nrand/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/nrand/_nrand.$(OBJEXT): \ @top_srcdir@/bin/nrand/$(am__dirstamp) \ @top_srcdir@/bin/nrand/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/par2lpc/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/par2lpc @: > @top_srcdir@/bin/par2lpc/$(am__dirstamp) @top_srcdir@/bin/par2lpc/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/par2lpc/$(DEPDIR) @: > @top_srcdir@/bin/par2lpc/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/par2lpc/_par2lpc.$(OBJEXT): \ @top_srcdir@/bin/par2lpc/$(am__dirstamp) \ @top_srcdir@/bin/par2lpc/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/phase/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/phase @: > @top_srcdir@/bin/phase/$(am__dirstamp) @top_srcdir@/bin/phase/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/phase/$(DEPDIR) @: > @top_srcdir@/bin/phase/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/phase/_phase.$(OBJEXT): \ @top_srcdir@/bin/phase/$(am__dirstamp) \ @top_srcdir@/bin/phase/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/poledf/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/poledf @: > @top_srcdir@/bin/poledf/$(am__dirstamp) @top_srcdir@/bin/poledf/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/poledf/$(DEPDIR) @: > @top_srcdir@/bin/poledf/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/poledf/_poledf.$(OBJEXT): \ @top_srcdir@/bin/poledf/$(am__dirstamp) \ @top_srcdir@/bin/poledf/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/reverse/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/reverse @: > @top_srcdir@/bin/reverse/$(am__dirstamp) @top_srcdir@/bin/reverse/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/reverse/$(DEPDIR) @: > @top_srcdir@/bin/reverse/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/reverse/_reverse.$(OBJEXT): \ @top_srcdir@/bin/reverse/$(am__dirstamp) \ @top_srcdir@/bin/reverse/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/rmse/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/rmse @: > @top_srcdir@/bin/rmse/$(am__dirstamp) @top_srcdir@/bin/rmse/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/rmse/$(DEPDIR) @: > @top_srcdir@/bin/rmse/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/rmse/_rmse.$(OBJEXT): \ @top_srcdir@/bin/rmse/$(am__dirstamp) \ @top_srcdir@/bin/rmse/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/root_pol/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/root_pol @: > @top_srcdir@/bin/root_pol/$(am__dirstamp) @top_srcdir@/bin/root_pol/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/root_pol/$(DEPDIR) @: > @top_srcdir@/bin/root_pol/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/root_pol/_root_pol.$(OBJEXT): \ @top_srcdir@/bin/root_pol/$(am__dirstamp) \ @top_srcdir@/bin/root_pol/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/smcep/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/smcep @: > @top_srcdir@/bin/smcep/$(am__dirstamp) @top_srcdir@/bin/smcep/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/smcep/$(DEPDIR) @: > @top_srcdir@/bin/smcep/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/smcep/_smcep.$(OBJEXT): \ @top_srcdir@/bin/smcep/$(am__dirstamp) \ @top_srcdir@/bin/smcep/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/transpose/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/transpose @: > @top_srcdir@/bin/transpose/$(am__dirstamp) @top_srcdir@/bin/transpose/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/transpose/$(DEPDIR) @: > @top_srcdir@/bin/transpose/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/transpose/_transpose.$(OBJEXT): \ @top_srcdir@/bin/transpose/$(am__dirstamp) \ @top_srcdir@/bin/transpose/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/uels/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/uels @: > @top_srcdir@/bin/uels/$(am__dirstamp) @top_srcdir@/bin/uels/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/uels/$(DEPDIR) @: > @top_srcdir@/bin/uels/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/uels/_uels.$(OBJEXT): \ @top_srcdir@/bin/uels/$(am__dirstamp) \ @top_srcdir@/bin/uels/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/ulaw/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/ulaw @: > @top_srcdir@/bin/ulaw/$(am__dirstamp) @top_srcdir@/bin/ulaw/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/ulaw/$(DEPDIR) @: > @top_srcdir@/bin/ulaw/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/ulaw/_ulaw.$(OBJEXT): \ @top_srcdir@/bin/ulaw/$(am__dirstamp) \ @top_srcdir@/bin/ulaw/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/vc/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/vc @: > @top_srcdir@/bin/vc/$(am__dirstamp) @top_srcdir@/bin/vc/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/vc/$(DEPDIR) @: > @top_srcdir@/bin/vc/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/vc/_vc.$(OBJEXT): \ @top_srcdir@/bin/vc/$(am__dirstamp) \ @top_srcdir@/bin/vc/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/vq/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/vq @: > @top_srcdir@/bin/vq/$(am__dirstamp) @top_srcdir@/bin/vq/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/vq/$(DEPDIR) @: > @top_srcdir@/bin/vq/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/vq/_vq.$(OBJEXT): \ @top_srcdir@/bin/vq/$(am__dirstamp) \ @top_srcdir@/bin/vq/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/wavjoin/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/wavjoin @: > @top_srcdir@/bin/wavjoin/$(am__dirstamp) @top_srcdir@/bin/wavjoin/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/wavjoin/$(DEPDIR) @: > @top_srcdir@/bin/wavjoin/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/wavjoin/_wavjoin.$(OBJEXT): \ @top_srcdir@/bin/wavjoin/$(am__dirstamp) \ @top_srcdir@/bin/wavjoin/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/wavsplit/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/wavsplit @: > @top_srcdir@/bin/wavsplit/$(am__dirstamp) @top_srcdir@/bin/wavsplit/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/wavsplit/$(DEPDIR) @: > @top_srcdir@/bin/wavsplit/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/wavsplit/_wavsplit.$(OBJEXT): \ @top_srcdir@/bin/wavsplit/$(am__dirstamp) \ @top_srcdir@/bin/wavsplit/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/window/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/window @: > @top_srcdir@/bin/window/$(am__dirstamp) @top_srcdir@/bin/window/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/window/$(DEPDIR) @: > @top_srcdir@/bin/window/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/window/_window.$(OBJEXT): \ @top_srcdir@/bin/window/$(am__dirstamp) \ @top_srcdir@/bin/window/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/zcross/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/zcross @: > @top_srcdir@/bin/zcross/$(am__dirstamp) @top_srcdir@/bin/zcross/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/zcross/$(DEPDIR) @: > @top_srcdir@/bin/zcross/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/zcross/_zcross.$(OBJEXT): \ @top_srcdir@/bin/zcross/$(am__dirstamp) \ @top_srcdir@/bin/zcross/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/zerodf/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/zerodf @: > @top_srcdir@/bin/zerodf/$(am__dirstamp) @top_srcdir@/bin/zerodf/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) @top_srcdir@/bin/zerodf/$(DEPDIR) @: > @top_srcdir@/bin/zerodf/$(DEPDIR)/$(am__dirstamp) @top_srcdir@/bin/zerodf/_zerodf.$(OBJEXT): \ @top_srcdir@/bin/zerodf/$(am__dirstamp) \ @top_srcdir@/bin/zerodf/$(DEPDIR)/$(am__dirstamp) libSPTK.a: $(libSPTK_a_OBJECTS) $(libSPTK_a_DEPENDENCIES) $(EXTRA_libSPTK_a_DEPENDENCIES) $(AM_V_at)-rm -f libSPTK.a $(AM_V_AR)$(libSPTK_a_AR) libSPTK.a $(libSPTK_a_OBJECTS) $(libSPTK_a_LIBADD) $(AM_V_at)$(RANLIB) libSPTK.a mostlyclean-compile: -rm -f *.$(OBJEXT) -rm -f @top_srcdir@/bin/acep/*.$(OBJEXT) -rm -f @top_srcdir@/bin/acorr/*.$(OBJEXT) -rm -f @top_srcdir@/bin/agcep/*.$(OBJEXT) -rm -f @top_srcdir@/bin/amcep/*.$(OBJEXT) -rm -f @top_srcdir@/bin/average/*.$(OBJEXT) -rm -f @top_srcdir@/bin/b2mc/*.$(OBJEXT) -rm -f @top_srcdir@/bin/c2acr/*.$(OBJEXT) -rm -f @top_srcdir@/bin/c2ir/*.$(OBJEXT) -rm -f @top_srcdir@/bin/c2sp/*.$(OBJEXT) -rm -f @top_srcdir@/bin/clip/*.$(OBJEXT) -rm -f @top_srcdir@/bin/dct/*.$(OBJEXT) -rm -f @top_srcdir@/bin/df2/*.$(OBJEXT) -rm -f @top_srcdir@/bin/dfs/*.$(OBJEXT) -rm -f @top_srcdir@/bin/fft/*.$(OBJEXT) -rm -f @top_srcdir@/bin/fft2/*.$(OBJEXT) -rm -f @top_srcdir@/bin/fftcep/*.$(OBJEXT) -rm -f @top_srcdir@/bin/fftr/*.$(OBJEXT) -rm -f @top_srcdir@/bin/fftr2/*.$(OBJEXT) -rm -f @top_srcdir@/bin/freqt/*.$(OBJEXT) -rm -f @top_srcdir@/bin/gc2gc/*.$(OBJEXT) -rm -f @top_srcdir@/bin/gcep/*.$(OBJEXT) -rm -f @top_srcdir@/bin/glsadf/*.$(OBJEXT) -rm -f @top_srcdir@/bin/gmm/*.$(OBJEXT) -rm -f @top_srcdir@/bin/gnorm/*.$(OBJEXT) -rm -f @top_srcdir@/bin/grpdelay/*.$(OBJEXT) -rm -f @top_srcdir@/bin/histogram/*.$(OBJEXT) -rm -f @top_srcdir@/bin/ifft/*.$(OBJEXT) -rm -f @top_srcdir@/bin/ifft2/*.$(OBJEXT) -rm -f @top_srcdir@/bin/ifftr/*.$(OBJEXT) -rm -f @top_srcdir@/bin/ignorm/*.$(OBJEXT) -rm -f @top_srcdir@/bin/imsvq/*.$(OBJEXT) -rm -f @top_srcdir@/bin/ivq/*.$(OBJEXT) -rm -f @top_srcdir@/bin/lbg/*.$(OBJEXT) -rm -f @top_srcdir@/bin/levdur/*.$(OBJEXT) -rm -f @top_srcdir@/bin/lmadf/*.$(OBJEXT) -rm -f @top_srcdir@/bin/lpc/*.$(OBJEXT) -rm -f @top_srcdir@/bin/lpc2c/*.$(OBJEXT) -rm -f @top_srcdir@/bin/lpc2lsp/*.$(OBJEXT) -rm -f @top_srcdir@/bin/lpc2par/*.$(OBJEXT) -rm -f @top_srcdir@/bin/lsp2lpc/*.$(OBJEXT) -rm -f @top_srcdir@/bin/lsp2sp/*.$(OBJEXT) -rm -f @top_srcdir@/bin/lspcheck/*.$(OBJEXT) -rm -f @top_srcdir@/bin/lspdf/*.$(OBJEXT) -rm -f @top_srcdir@/bin/ltcdf/*.$(OBJEXT) -rm -f @top_srcdir@/bin/mc2b/*.$(OBJEXT) -rm -f @top_srcdir@/bin/mcep/*.$(OBJEXT) -rm -f @top_srcdir@/bin/mfcc/*.$(OBJEXT) -rm -f @top_srcdir@/bin/mgc2mgc/*.$(OBJEXT) -rm -f @top_srcdir@/bin/mgc2sp/*.$(OBJEXT) -rm -f @top_srcdir@/bin/mgcep/*.$(OBJEXT) -rm -f @top_srcdir@/bin/mglsadf/*.$(OBJEXT) -rm -f @top_srcdir@/bin/mlpg/*.$(OBJEXT) -rm -f @top_srcdir@/bin/mlsadf/*.$(OBJEXT) -rm -f @top_srcdir@/bin/msvq/*.$(OBJEXT) -rm -f @top_srcdir@/bin/norm0/*.$(OBJEXT) -rm -f @top_srcdir@/bin/nrand/*.$(OBJEXT) -rm -f @top_srcdir@/bin/par2lpc/*.$(OBJEXT) -rm -f @top_srcdir@/bin/phase/*.$(OBJEXT) -rm -f @top_srcdir@/bin/poledf/*.$(OBJEXT) -rm -f @top_srcdir@/bin/reverse/*.$(OBJEXT) -rm -f @top_srcdir@/bin/rmse/*.$(OBJEXT) -rm -f @top_srcdir@/bin/root_pol/*.$(OBJEXT) -rm -f @top_srcdir@/bin/smcep/*.$(OBJEXT) -rm -f @top_srcdir@/bin/transpose/*.$(OBJEXT) -rm -f @top_srcdir@/bin/uels/*.$(OBJEXT) -rm -f @top_srcdir@/bin/ulaw/*.$(OBJEXT) -rm -f @top_srcdir@/bin/vc/*.$(OBJEXT) -rm -f @top_srcdir@/bin/vq/*.$(OBJEXT) -rm -f @top_srcdir@/bin/wavjoin/*.$(OBJEXT) -rm -f @top_srcdir@/bin/wavsplit/*.$(OBJEXT) -rm -f @top_srcdir@/bin/window/*.$(OBJEXT) -rm -f @top_srcdir@/bin/zcross/*.$(OBJEXT) -rm -f @top_srcdir@/bin/zerodf/*.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/agexp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cholesky.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fileio.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fillz.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getfp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getmem.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gexp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glog.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/invert.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/matrix.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/movem.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mseq.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/theq.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/toeplitz.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@top_srcdir@/bin/acep/$(DEPDIR)/_acep.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@top_srcdir@/bin/acorr/$(DEPDIR)/_acorr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@top_srcdir@/bin/agcep/$(DEPDIR)/_agcep.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@top_srcdir@/bin/amcep/$(DEPDIR)/_amcep.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@top_srcdir@/bin/average/$(DEPDIR)/_average.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@top_srcdir@/bin/b2mc/$(DEPDIR)/_b2mc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@top_srcdir@/bin/c2acr/$(DEPDIR)/_c2acr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@top_srcdir@/bin/c2ir/$(DEPDIR)/_c2ir.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@top_srcdir@/bin/c2sp/$(DEPDIR)/_c2sp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@top_srcdir@/bin/clip/$(DEPDIR)/_clip.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@top_srcdir@/bin/dct/$(DEPDIR)/_dct.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@top_srcdir@/bin/df2/$(DEPDIR)/_df2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@top_srcdir@/bin/dfs/$(DEPDIR)/_dfs.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@top_srcdir@/bin/fft/$(DEPDIR)/_fft.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@top_srcdir@/bin/fft2/$(DEPDIR)/_fft2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@top_srcdir@/bin/fftcep/$(DEPDIR)/_fftcep.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@top_srcdir@/bin/fftr/$(DEPDIR)/_fftr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@top_srcdir@/bin/fftr2/$(DEPDIR)/_fftr2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@top_srcdir@/bin/freqt/$(DEPDIR)/_freqt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@top_srcdir@/bin/gc2gc/$(DEPDIR)/_gc2gc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@top_srcdir@/bin/gcep/$(DEPDIR)/_gcep.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@top_srcdir@/bin/glsadf/$(DEPDIR)/_glsadf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@top_srcdir@/bin/gmm/$(DEPDIR)/_gmm.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@top_srcdir@/bin/gnorm/$(DEPDIR)/_gnorm.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@top_srcdir@/bin/grpdelay/$(DEPDIR)/_grpdelay.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@top_srcdir@/bin/histogram/$(DEPDIR)/_histogram.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@top_srcdir@/bin/ifft/$(DEPDIR)/_ifft.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@top_srcdir@/bin/ifft2/$(DEPDIR)/_ifft2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@top_srcdir@/bin/ifftr/$(DEPDIR)/_ifftr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@top_srcdir@/bin/ignorm/$(DEPDIR)/_ignorm.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@top_srcdir@/bin/imsvq/$(DEPDIR)/_imsvq.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@top_srcdir@/bin/ivq/$(DEPDIR)/_ivq.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@top_srcdir@/bin/lbg/$(DEPDIR)/_lbg.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@top_srcdir@/bin/levdur/$(DEPDIR)/_levdur.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@top_srcdir@/bin/lmadf/$(DEPDIR)/_lmadf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@top_srcdir@/bin/lpc/$(DEPDIR)/_lpc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@top_srcdir@/bin/lpc2c/$(DEPDIR)/_lpc2c.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@top_srcdir@/bin/lpc2lsp/$(DEPDIR)/_lpc2lsp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@top_srcdir@/bin/lpc2par/$(DEPDIR)/_lpc2par.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@top_srcdir@/bin/lsp2lpc/$(DEPDIR)/_lsp2lpc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@top_srcdir@/bin/lsp2sp/$(DEPDIR)/_lsp2sp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@top_srcdir@/bin/lspcheck/$(DEPDIR)/_lspcheck.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@top_srcdir@/bin/lspdf/$(DEPDIR)/_lspdf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@top_srcdir@/bin/ltcdf/$(DEPDIR)/_ltcdf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@top_srcdir@/bin/mc2b/$(DEPDIR)/_mc2b.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@top_srcdir@/bin/mcep/$(DEPDIR)/_mcep.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@top_srcdir@/bin/mfcc/$(DEPDIR)/_mfcc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@top_srcdir@/bin/mgc2mgc/$(DEPDIR)/_mgc2mgc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@top_srcdir@/bin/mgc2sp/$(DEPDIR)/_mgc2sp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@top_srcdir@/bin/mgcep/$(DEPDIR)/_mgcep.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@top_srcdir@/bin/mglsadf/$(DEPDIR)/_mglsadf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@top_srcdir@/bin/mlpg/$(DEPDIR)/_mlpg.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@top_srcdir@/bin/mlsadf/$(DEPDIR)/_mlsadf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@top_srcdir@/bin/msvq/$(DEPDIR)/_msvq.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@top_srcdir@/bin/norm0/$(DEPDIR)/_norm0.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@top_srcdir@/bin/nrand/$(DEPDIR)/_nrand.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@top_srcdir@/bin/par2lpc/$(DEPDIR)/_par2lpc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@top_srcdir@/bin/phase/$(DEPDIR)/_phase.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@top_srcdir@/bin/poledf/$(DEPDIR)/_poledf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@top_srcdir@/bin/reverse/$(DEPDIR)/_reverse.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@top_srcdir@/bin/rmse/$(DEPDIR)/_rmse.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@top_srcdir@/bin/root_pol/$(DEPDIR)/_root_pol.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@top_srcdir@/bin/smcep/$(DEPDIR)/_smcep.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@top_srcdir@/bin/transpose/$(DEPDIR)/_transpose.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@top_srcdir@/bin/uels/$(DEPDIR)/_uels.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@top_srcdir@/bin/ulaw/$(DEPDIR)/_ulaw.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@top_srcdir@/bin/vc/$(DEPDIR)/_vc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@top_srcdir@/bin/vq/$(DEPDIR)/_vq.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@top_srcdir@/bin/wavjoin/$(DEPDIR)/_wavjoin.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@top_srcdir@/bin/wavsplit/$(DEPDIR)/_wavsplit.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@top_srcdir@/bin/window/$(DEPDIR)/_window.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@top_srcdir@/bin/zcross/$(DEPDIR)/_zcross.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@@top_srcdir@/bin/zerodf/$(DEPDIR)/_zerodf.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LIBRARIES) installdirs: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -rm -f @top_srcdir@/bin/acep/$(DEPDIR)/$(am__dirstamp) -rm -f @top_srcdir@/bin/acep/$(am__dirstamp) -rm -f @top_srcdir@/bin/acorr/$(DEPDIR)/$(am__dirstamp) -rm -f @top_srcdir@/bin/acorr/$(am__dirstamp) -rm -f @top_srcdir@/bin/agcep/$(DEPDIR)/$(am__dirstamp) -rm -f @top_srcdir@/bin/agcep/$(am__dirstamp) -rm -f @top_srcdir@/bin/amcep/$(DEPDIR)/$(am__dirstamp) -rm -f @top_srcdir@/bin/amcep/$(am__dirstamp) -rm -f @top_srcdir@/bin/average/$(DEPDIR)/$(am__dirstamp) -rm -f @top_srcdir@/bin/average/$(am__dirstamp) -rm -f @top_srcdir@/bin/b2mc/$(DEPDIR)/$(am__dirstamp) -rm -f @top_srcdir@/bin/b2mc/$(am__dirstamp) -rm -f @top_srcdir@/bin/c2acr/$(DEPDIR)/$(am__dirstamp) -rm -f @top_srcdir@/bin/c2acr/$(am__dirstamp) -rm -f @top_srcdir@/bin/c2ir/$(DEPDIR)/$(am__dirstamp) -rm -f @top_srcdir@/bin/c2ir/$(am__dirstamp) -rm -f @top_srcdir@/bin/c2sp/$(DEPDIR)/$(am__dirstamp) -rm -f @top_srcdir@/bin/c2sp/$(am__dirstamp) -rm -f @top_srcdir@/bin/clip/$(DEPDIR)/$(am__dirstamp) -rm -f @top_srcdir@/bin/clip/$(am__dirstamp) -rm -f @top_srcdir@/bin/dct/$(DEPDIR)/$(am__dirstamp) -rm -f @top_srcdir@/bin/dct/$(am__dirstamp) -rm -f @top_srcdir@/bin/df2/$(DEPDIR)/$(am__dirstamp) -rm -f @top_srcdir@/bin/df2/$(am__dirstamp) -rm -f @top_srcdir@/bin/dfs/$(DEPDIR)/$(am__dirstamp) -rm -f @top_srcdir@/bin/dfs/$(am__dirstamp) -rm -f @top_srcdir@/bin/fft/$(DEPDIR)/$(am__dirstamp) -rm -f @top_srcdir@/bin/fft/$(am__dirstamp) -rm -f @top_srcdir@/bin/fft2/$(DEPDIR)/$(am__dirstamp) -rm -f @top_srcdir@/bin/fft2/$(am__dirstamp) -rm -f @top_srcdir@/bin/fftcep/$(DEPDIR)/$(am__dirstamp) -rm -f @top_srcdir@/bin/fftcep/$(am__dirstamp) -rm -f @top_srcdir@/bin/fftr/$(DEPDIR)/$(am__dirstamp) -rm -f @top_srcdir@/bin/fftr/$(am__dirstamp) -rm -f @top_srcdir@/bin/fftr2/$(DEPDIR)/$(am__dirstamp) -rm -f @top_srcdir@/bin/fftr2/$(am__dirstamp) -rm -f @top_srcdir@/bin/freqt/$(DEPDIR)/$(am__dirstamp) -rm -f @top_srcdir@/bin/freqt/$(am__dirstamp) -rm -f @top_srcdir@/bin/gc2gc/$(DEPDIR)/$(am__dirstamp) -rm -f @top_srcdir@/bin/gc2gc/$(am__dirstamp) -rm -f @top_srcdir@/bin/gcep/$(DEPDIR)/$(am__dirstamp) -rm -f @top_srcdir@/bin/gcep/$(am__dirstamp) -rm -f @top_srcdir@/bin/glsadf/$(DEPDIR)/$(am__dirstamp) -rm -f @top_srcdir@/bin/glsadf/$(am__dirstamp) -rm -f @top_srcdir@/bin/gmm/$(DEPDIR)/$(am__dirstamp) -rm -f @top_srcdir@/bin/gmm/$(am__dirstamp) -rm -f @top_srcdir@/bin/gnorm/$(DEPDIR)/$(am__dirstamp) -rm -f @top_srcdir@/bin/gnorm/$(am__dirstamp) -rm -f @top_srcdir@/bin/grpdelay/$(DEPDIR)/$(am__dirstamp) -rm -f @top_srcdir@/bin/grpdelay/$(am__dirstamp) -rm -f @top_srcdir@/bin/histogram/$(DEPDIR)/$(am__dirstamp) -rm -f @top_srcdir@/bin/histogram/$(am__dirstamp) -rm -f @top_srcdir@/bin/ifft/$(DEPDIR)/$(am__dirstamp) -rm -f @top_srcdir@/bin/ifft/$(am__dirstamp) -rm -f @top_srcdir@/bin/ifft2/$(DEPDIR)/$(am__dirstamp) -rm -f @top_srcdir@/bin/ifft2/$(am__dirstamp) -rm -f @top_srcdir@/bin/ifftr/$(DEPDIR)/$(am__dirstamp) -rm -f @top_srcdir@/bin/ifftr/$(am__dirstamp) -rm -f @top_srcdir@/bin/ignorm/$(DEPDIR)/$(am__dirstamp) -rm -f @top_srcdir@/bin/ignorm/$(am__dirstamp) -rm -f @top_srcdir@/bin/imsvq/$(DEPDIR)/$(am__dirstamp) -rm -f @top_srcdir@/bin/imsvq/$(am__dirstamp) -rm -f @top_srcdir@/bin/ivq/$(DEPDIR)/$(am__dirstamp) -rm -f @top_srcdir@/bin/ivq/$(am__dirstamp) -rm -f @top_srcdir@/bin/lbg/$(DEPDIR)/$(am__dirstamp) -rm -f @top_srcdir@/bin/lbg/$(am__dirstamp) -rm -f @top_srcdir@/bin/levdur/$(DEPDIR)/$(am__dirstamp) -rm -f @top_srcdir@/bin/levdur/$(am__dirstamp) -rm -f @top_srcdir@/bin/lmadf/$(DEPDIR)/$(am__dirstamp) -rm -f @top_srcdir@/bin/lmadf/$(am__dirstamp) -rm -f @top_srcdir@/bin/lpc/$(DEPDIR)/$(am__dirstamp) -rm -f @top_srcdir@/bin/lpc/$(am__dirstamp) -rm -f @top_srcdir@/bin/lpc2c/$(DEPDIR)/$(am__dirstamp) -rm -f @top_srcdir@/bin/lpc2c/$(am__dirstamp) -rm -f @top_srcdir@/bin/lpc2lsp/$(DEPDIR)/$(am__dirstamp) -rm -f @top_srcdir@/bin/lpc2lsp/$(am__dirstamp) -rm -f @top_srcdir@/bin/lpc2par/$(DEPDIR)/$(am__dirstamp) -rm -f @top_srcdir@/bin/lpc2par/$(am__dirstamp) -rm -f @top_srcdir@/bin/lsp2lpc/$(DEPDIR)/$(am__dirstamp) -rm -f @top_srcdir@/bin/lsp2lpc/$(am__dirstamp) -rm -f @top_srcdir@/bin/lsp2sp/$(DEPDIR)/$(am__dirstamp) -rm -f @top_srcdir@/bin/lsp2sp/$(am__dirstamp) -rm -f @top_srcdir@/bin/lspcheck/$(DEPDIR)/$(am__dirstamp) -rm -f @top_srcdir@/bin/lspcheck/$(am__dirstamp) -rm -f @top_srcdir@/bin/lspdf/$(DEPDIR)/$(am__dirstamp) -rm -f @top_srcdir@/bin/lspdf/$(am__dirstamp) -rm -f @top_srcdir@/bin/ltcdf/$(DEPDIR)/$(am__dirstamp) -rm -f @top_srcdir@/bin/ltcdf/$(am__dirstamp) -rm -f @top_srcdir@/bin/mc2b/$(DEPDIR)/$(am__dirstamp) -rm -f @top_srcdir@/bin/mc2b/$(am__dirstamp) -rm -f @top_srcdir@/bin/mcep/$(DEPDIR)/$(am__dirstamp) -rm -f @top_srcdir@/bin/mcep/$(am__dirstamp) -rm -f @top_srcdir@/bin/mfcc/$(DEPDIR)/$(am__dirstamp) -rm -f @top_srcdir@/bin/mfcc/$(am__dirstamp) -rm -f @top_srcdir@/bin/mgc2mgc/$(DEPDIR)/$(am__dirstamp) -rm -f @top_srcdir@/bin/mgc2mgc/$(am__dirstamp) -rm -f @top_srcdir@/bin/mgc2sp/$(DEPDIR)/$(am__dirstamp) -rm -f @top_srcdir@/bin/mgc2sp/$(am__dirstamp) -rm -f @top_srcdir@/bin/mgcep/$(DEPDIR)/$(am__dirstamp) -rm -f @top_srcdir@/bin/mgcep/$(am__dirstamp) -rm -f @top_srcdir@/bin/mglsadf/$(DEPDIR)/$(am__dirstamp) -rm -f @top_srcdir@/bin/mglsadf/$(am__dirstamp) -rm -f @top_srcdir@/bin/mlpg/$(DEPDIR)/$(am__dirstamp) -rm -f @top_srcdir@/bin/mlpg/$(am__dirstamp) -rm -f @top_srcdir@/bin/mlsadf/$(DEPDIR)/$(am__dirstamp) -rm -f @top_srcdir@/bin/mlsadf/$(am__dirstamp) -rm -f @top_srcdir@/bin/msvq/$(DEPDIR)/$(am__dirstamp) -rm -f @top_srcdir@/bin/msvq/$(am__dirstamp) -rm -f @top_srcdir@/bin/norm0/$(DEPDIR)/$(am__dirstamp) -rm -f @top_srcdir@/bin/norm0/$(am__dirstamp) -rm -f @top_srcdir@/bin/nrand/$(DEPDIR)/$(am__dirstamp) -rm -f @top_srcdir@/bin/nrand/$(am__dirstamp) -rm -f @top_srcdir@/bin/par2lpc/$(DEPDIR)/$(am__dirstamp) -rm -f @top_srcdir@/bin/par2lpc/$(am__dirstamp) -rm -f @top_srcdir@/bin/phase/$(DEPDIR)/$(am__dirstamp) -rm -f @top_srcdir@/bin/phase/$(am__dirstamp) -rm -f @top_srcdir@/bin/poledf/$(DEPDIR)/$(am__dirstamp) -rm -f @top_srcdir@/bin/poledf/$(am__dirstamp) -rm -f @top_srcdir@/bin/reverse/$(DEPDIR)/$(am__dirstamp) -rm -f @top_srcdir@/bin/reverse/$(am__dirstamp) -rm -f @top_srcdir@/bin/rmse/$(DEPDIR)/$(am__dirstamp) -rm -f @top_srcdir@/bin/rmse/$(am__dirstamp) -rm -f @top_srcdir@/bin/root_pol/$(DEPDIR)/$(am__dirstamp) -rm -f @top_srcdir@/bin/root_pol/$(am__dirstamp) -rm -f @top_srcdir@/bin/smcep/$(DEPDIR)/$(am__dirstamp) -rm -f @top_srcdir@/bin/smcep/$(am__dirstamp) -rm -f @top_srcdir@/bin/transpose/$(DEPDIR)/$(am__dirstamp) -rm -f @top_srcdir@/bin/transpose/$(am__dirstamp) -rm -f @top_srcdir@/bin/uels/$(DEPDIR)/$(am__dirstamp) -rm -f @top_srcdir@/bin/uels/$(am__dirstamp) -rm -f @top_srcdir@/bin/ulaw/$(DEPDIR)/$(am__dirstamp) -rm -f @top_srcdir@/bin/ulaw/$(am__dirstamp) -rm -f @top_srcdir@/bin/vc/$(DEPDIR)/$(am__dirstamp) -rm -f @top_srcdir@/bin/vc/$(am__dirstamp) -rm -f @top_srcdir@/bin/vq/$(DEPDIR)/$(am__dirstamp) -rm -f @top_srcdir@/bin/vq/$(am__dirstamp) -rm -f @top_srcdir@/bin/wavjoin/$(DEPDIR)/$(am__dirstamp) -rm -f @top_srcdir@/bin/wavjoin/$(am__dirstamp) -rm -f @top_srcdir@/bin/wavsplit/$(DEPDIR)/$(am__dirstamp) -rm -f @top_srcdir@/bin/wavsplit/$(am__dirstamp) -rm -f @top_srcdir@/bin/window/$(DEPDIR)/$(am__dirstamp) -rm -f @top_srcdir@/bin/window/$(am__dirstamp) -rm -f @top_srcdir@/bin/zcross/$(DEPDIR)/$(am__dirstamp) -rm -f @top_srcdir@/bin/zcross/$(am__dirstamp) -rm -f @top_srcdir@/bin/zerodf/$(DEPDIR)/$(am__dirstamp) -rm -f @top_srcdir@/bin/zerodf/$(am__dirstamp) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLIBRARIES mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) @top_srcdir@/bin/acep/$(DEPDIR) @top_srcdir@/bin/acorr/$(DEPDIR) @top_srcdir@/bin/agcep/$(DEPDIR) @top_srcdir@/bin/amcep/$(DEPDIR) @top_srcdir@/bin/average/$(DEPDIR) @top_srcdir@/bin/b2mc/$(DEPDIR) @top_srcdir@/bin/c2acr/$(DEPDIR) @top_srcdir@/bin/c2ir/$(DEPDIR) @top_srcdir@/bin/c2sp/$(DEPDIR) @top_srcdir@/bin/clip/$(DEPDIR) @top_srcdir@/bin/dct/$(DEPDIR) @top_srcdir@/bin/df2/$(DEPDIR) @top_srcdir@/bin/dfs/$(DEPDIR) @top_srcdir@/bin/fft/$(DEPDIR) @top_srcdir@/bin/fft2/$(DEPDIR) @top_srcdir@/bin/fftcep/$(DEPDIR) @top_srcdir@/bin/fftr/$(DEPDIR) @top_srcdir@/bin/fftr2/$(DEPDIR) @top_srcdir@/bin/freqt/$(DEPDIR) @top_srcdir@/bin/gc2gc/$(DEPDIR) @top_srcdir@/bin/gcep/$(DEPDIR) @top_srcdir@/bin/glsadf/$(DEPDIR) @top_srcdir@/bin/gmm/$(DEPDIR) @top_srcdir@/bin/gnorm/$(DEPDIR) @top_srcdir@/bin/grpdelay/$(DEPDIR) @top_srcdir@/bin/histogram/$(DEPDIR) @top_srcdir@/bin/ifft/$(DEPDIR) @top_srcdir@/bin/ifft2/$(DEPDIR) @top_srcdir@/bin/ifftr/$(DEPDIR) @top_srcdir@/bin/ignorm/$(DEPDIR) @top_srcdir@/bin/imsvq/$(DEPDIR) @top_srcdir@/bin/ivq/$(DEPDIR) @top_srcdir@/bin/lbg/$(DEPDIR) @top_srcdir@/bin/levdur/$(DEPDIR) @top_srcdir@/bin/lmadf/$(DEPDIR) @top_srcdir@/bin/lpc/$(DEPDIR) @top_srcdir@/bin/lpc2c/$(DEPDIR) @top_srcdir@/bin/lpc2lsp/$(DEPDIR) @top_srcdir@/bin/lpc2par/$(DEPDIR) @top_srcdir@/bin/lsp2lpc/$(DEPDIR) @top_srcdir@/bin/lsp2sp/$(DEPDIR) @top_srcdir@/bin/lspcheck/$(DEPDIR) @top_srcdir@/bin/lspdf/$(DEPDIR) @top_srcdir@/bin/ltcdf/$(DEPDIR) @top_srcdir@/bin/mc2b/$(DEPDIR) @top_srcdir@/bin/mcep/$(DEPDIR) @top_srcdir@/bin/mfcc/$(DEPDIR) @top_srcdir@/bin/mgc2mgc/$(DEPDIR) @top_srcdir@/bin/mgc2sp/$(DEPDIR) @top_srcdir@/bin/mgcep/$(DEPDIR) @top_srcdir@/bin/mglsadf/$(DEPDIR) @top_srcdir@/bin/mlpg/$(DEPDIR) @top_srcdir@/bin/mlsadf/$(DEPDIR) @top_srcdir@/bin/msvq/$(DEPDIR) @top_srcdir@/bin/norm0/$(DEPDIR) @top_srcdir@/bin/nrand/$(DEPDIR) @top_srcdir@/bin/par2lpc/$(DEPDIR) @top_srcdir@/bin/phase/$(DEPDIR) @top_srcdir@/bin/poledf/$(DEPDIR) @top_srcdir@/bin/reverse/$(DEPDIR) @top_srcdir@/bin/rmse/$(DEPDIR) @top_srcdir@/bin/root_pol/$(DEPDIR) @top_srcdir@/bin/smcep/$(DEPDIR) @top_srcdir@/bin/transpose/$(DEPDIR) @top_srcdir@/bin/uels/$(DEPDIR) @top_srcdir@/bin/ulaw/$(DEPDIR) @top_srcdir@/bin/vc/$(DEPDIR) @top_srcdir@/bin/vq/$(DEPDIR) @top_srcdir@/bin/wavjoin/$(DEPDIR) @top_srcdir@/bin/wavsplit/$(DEPDIR) @top_srcdir@/bin/window/$(DEPDIR) @top_srcdir@/bin/zcross/$(DEPDIR) @top_srcdir@/bin/zerodf/$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) @top_srcdir@/bin/acep/$(DEPDIR) @top_srcdir@/bin/acorr/$(DEPDIR) @top_srcdir@/bin/agcep/$(DEPDIR) @top_srcdir@/bin/amcep/$(DEPDIR) @top_srcdir@/bin/average/$(DEPDIR) @top_srcdir@/bin/b2mc/$(DEPDIR) @top_srcdir@/bin/c2acr/$(DEPDIR) @top_srcdir@/bin/c2ir/$(DEPDIR) @top_srcdir@/bin/c2sp/$(DEPDIR) @top_srcdir@/bin/clip/$(DEPDIR) @top_srcdir@/bin/dct/$(DEPDIR) @top_srcdir@/bin/df2/$(DEPDIR) @top_srcdir@/bin/dfs/$(DEPDIR) @top_srcdir@/bin/fft/$(DEPDIR) @top_srcdir@/bin/fft2/$(DEPDIR) @top_srcdir@/bin/fftcep/$(DEPDIR) @top_srcdir@/bin/fftr/$(DEPDIR) @top_srcdir@/bin/fftr2/$(DEPDIR) @top_srcdir@/bin/freqt/$(DEPDIR) @top_srcdir@/bin/gc2gc/$(DEPDIR) @top_srcdir@/bin/gcep/$(DEPDIR) @top_srcdir@/bin/glsadf/$(DEPDIR) @top_srcdir@/bin/gmm/$(DEPDIR) @top_srcdir@/bin/gnorm/$(DEPDIR) @top_srcdir@/bin/grpdelay/$(DEPDIR) @top_srcdir@/bin/histogram/$(DEPDIR) @top_srcdir@/bin/ifft/$(DEPDIR) @top_srcdir@/bin/ifft2/$(DEPDIR) @top_srcdir@/bin/ifftr/$(DEPDIR) @top_srcdir@/bin/ignorm/$(DEPDIR) @top_srcdir@/bin/imsvq/$(DEPDIR) @top_srcdir@/bin/ivq/$(DEPDIR) @top_srcdir@/bin/lbg/$(DEPDIR) @top_srcdir@/bin/levdur/$(DEPDIR) @top_srcdir@/bin/lmadf/$(DEPDIR) @top_srcdir@/bin/lpc/$(DEPDIR) @top_srcdir@/bin/lpc2c/$(DEPDIR) @top_srcdir@/bin/lpc2lsp/$(DEPDIR) @top_srcdir@/bin/lpc2par/$(DEPDIR) @top_srcdir@/bin/lsp2lpc/$(DEPDIR) @top_srcdir@/bin/lsp2sp/$(DEPDIR) @top_srcdir@/bin/lspcheck/$(DEPDIR) @top_srcdir@/bin/lspdf/$(DEPDIR) @top_srcdir@/bin/ltcdf/$(DEPDIR) @top_srcdir@/bin/mc2b/$(DEPDIR) @top_srcdir@/bin/mcep/$(DEPDIR) @top_srcdir@/bin/mfcc/$(DEPDIR) @top_srcdir@/bin/mgc2mgc/$(DEPDIR) @top_srcdir@/bin/mgc2sp/$(DEPDIR) @top_srcdir@/bin/mgcep/$(DEPDIR) @top_srcdir@/bin/mglsadf/$(DEPDIR) @top_srcdir@/bin/mlpg/$(DEPDIR) @top_srcdir@/bin/mlsadf/$(DEPDIR) @top_srcdir@/bin/msvq/$(DEPDIR) @top_srcdir@/bin/norm0/$(DEPDIR) @top_srcdir@/bin/nrand/$(DEPDIR) @top_srcdir@/bin/par2lpc/$(DEPDIR) @top_srcdir@/bin/phase/$(DEPDIR) @top_srcdir@/bin/poledf/$(DEPDIR) @top_srcdir@/bin/reverse/$(DEPDIR) @top_srcdir@/bin/rmse/$(DEPDIR) @top_srcdir@/bin/root_pol/$(DEPDIR) @top_srcdir@/bin/smcep/$(DEPDIR) @top_srcdir@/bin/transpose/$(DEPDIR) @top_srcdir@/bin/uels/$(DEPDIR) @top_srcdir@/bin/ulaw/$(DEPDIR) @top_srcdir@/bin/vc/$(DEPDIR) @top_srcdir@/bin/vq/$(DEPDIR) @top_srcdir@/bin/wavjoin/$(DEPDIR) @top_srcdir@/bin/wavsplit/$(DEPDIR) @top_srcdir@/bin/window/$(DEPDIR) @top_srcdir@/bin/zcross/$(DEPDIR) @top_srcdir@/bin/zerodf/$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libLIBRARIES cscopelist-am ctags ctags-am distclean \ distclean-compile distclean-generic distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-libLIBRARIES install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-libLIBRARIES .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/lib/agexp.c0000644001051300105040000000727312637156647011131 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /*************************************************************** $Id: agexp.c,v 1.13 2015/12/14 01:14:25 uratec Exp $ Magnitude Squared Generalized Exponential Function double agexp(r, x, y) double r : gamma double x : real part double y : imaginary part *****************************************************************/ #include #include double agexp(double r, double x, double y) { double w; if (r == 0.0) return (exp(2 * x)); else { x = 1 + r * x; y = r * y; w = x * x + y * y; if (r < 0.0) return (pow(1 / w, -1 / r)); else return (pow(w, 1 / r)); } } SPTK-3.9/lib/cholesky.c0000644001051300105040000001152312637156650011631 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /**************************************************************** $Id: cholesky.c,v 1.15 2015/12/14 01:14:25 uratec Exp $ Solve Linear Set of Equations Using Cholesky Decomposition int cholesky(c, a, b, n, eps) < Ca=b > double *c : symmetrical coefficient matrix double *a : solution vector double *b : constant vector int n : order of vector double eps : error check (if -1.0, 1.0e-6 is assumed) return value : 0 -> normally completed -1 -> abnormally completed ****************************************************************/ #include #include #include #if defined(WIN32) #include "SPTK.h" #else #include #endif int cholesky(double *c, double *a, double *b, const int n, double eps) { int i, j, k; static double *d = NULL, *y, *v, *vp; static int size; if (d == NULL) { d = dgetmem(n * (n + 2)); y = d + n; v = y + n; size = n; } if (n > size) { free(d); d = dgetmem(n * (n + 2)); y = d + n; v = y + n; size = n; } if (eps < 0.0) eps = 1.0e-6; for (j = 0; j < n; j++, c += n) { d[j] = c[j]; vp = v + j * n; for (k = 0; k < j; k++) d[j] -= vp[k] * vp[k] * d[k]; if (fabs(d[j]) <= eps) return (-1); for (i = j + 1; i < n; i++) { vp = v + i * n; vp[j] = c[i]; for (k = 0; k < j; k++) vp[j] -= vp[k] * v[j * n + k] * d[k]; vp[j] /= d[j]; } } for (i = 0; i < n; i++) { y[i] = b[i]; vp = v + i * n; for (k = 0; k < i; k++) y[i] -= vp[k] * y[k]; } for (i = n - 1; i >= 0; i--) { a[i] = y[i] / d[i]; for (k = i + 1; k < n; k++) a[i] -= v[n * k + i] * a[k]; } return (0); } SPTK-3.9/lib/fileio.c0000644001051300105040000001443512637156650011264 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /******************************************************************** $Id: fileio.c,v 1.21 2015/12/14 01:14:25 uratec Exp $ File I/O Functions int freada (p, bl, fp) int fwritex (ptr, size, nitems, fp) int freadx (ptr, size, nitems, fp) int fwritef (ptr, size, nitems, fp) int freadf (ptr, size, nitems, fp) **********************************************************************/ #include #include #if defined(WIN32) #include #include #include "SPTK.h" #else #include #endif #define LINEBUFSIZE 256 /* freada: read ascii */ int freada(double *p, const int bl, FILE * fp) { int c; char buf[LINEBUFSIZE]; #if defined(WIN32) _setmode(_fileno(fp), _O_TEXT); #endif c = 0; while (c < bl) { if (fgets(buf, LINEBUFSIZE, fp) == NULL) break; p[c] = atof(buf); c++; } return (c); } /* fritex: wrapper function for fwrite */ int fwritex(void *ptr, const size_t size, const int nitems, FILE * fp) { #if defined(WIN32) _setmode(_fileno(fp), _O_BINARY); #endif return (fwrite(ptr, size, nitems, fp)); } /* freadx: wrapper function for fread */ int freadx(void *ptr, const size_t size, const int nitems, FILE * fp) { #if defined(WIN32) _setmode(_fileno(fp), _O_BINARY); #endif return (fread(ptr, size, nitems, fp)); } /* --------------- double I/O compile --------------- */ #ifdef DOUBLE /* fwritef : write double type data */ int fwritef(double *ptr, const size_t size, const int nitems, FILE * fp) { return (fwritex(ptr, size, nitems, fp)); } /* freadf : read double type data */ int freadf(double *ptr, const size_t size, const int nitems, FILE * fp) { return (freadx(ptr, size, nitems, fp)); } #else /* DOUBLE */ /* --------------- float I/O compile --------------- */ static float *f; static int items; /* fwritef : convert double type data to float type and write */ int fwritef(double *ptr, const size_t size, const int nitems, FILE * fp) { int i; if (items < nitems) { if (f != NULL) free(f); items = nitems; f = fgetmem(items); } for (i = 0; i < nitems; i++) f[i] = ptr[i]; #if defined(WIN32) _setmode(_fileno(fp), _O_BINARY); #endif return fwrite(f, sizeof(float), nitems, fp); } /* freadf : read float type data and convert to double type */ int freadf(double *ptr, const size_t size, const int nitems, FILE * fp) { int i, n; if (items < nitems) { if (f != NULL) free(f); items = nitems; f = fgetmem(items); } #if defined(WIN32) _setmode(_fileno(fp), _O_BINARY); #endif n = fread(f, sizeof(float), nitems, fp); for (i = 0; i < n; i++) ptr[i] = f[i]; return n; } #endif /* DOUBLE */ void SPTK_byte_swap(void *p, size_t size, size_t num) { char *q, tmp; size_t i, j; q = (char *) p; for (i = 0; i < num; i++) { for (j = 0; j < (size / 2); j++) { tmp = *(q + j); *(q + j) = *(q + (size - 1 - j)); *(q + (size - 1 - j)) = tmp; } q += size; } } int fwrite_little_endian(void *buf, const size_t size, const size_t n, FILE * fp) { #ifdef WORDS_BIGENDIAN SPTK_byte_swap(buf, size, n); #endif return fwrite(buf, size, n, fp); } SPTK-3.9/lib/fillz.c0000644001051300105040000000701212637156650011126 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /******************************************************** $Id: fillz.c,v 1.14 2015/12/14 01:14:25 uratec Exp $ Fill Data with Zero fillz(ptr, size, nitem) void *ptr : intput data size_t size : size of data type int nitem : data length *********************************************************/ #include void fillz(void *ptr, const size_t size, const int nitem) { long n; char *p = ptr; n = size * nitem; while (n--) *p++ = '\0'; } SPTK-3.9/lib/getfp.c0000644001051300105040000000705112637156650011116 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /*************************************************************** $Id: getfp.c,v 1.15 2015/12/14 01:14:25 uratec Exp $ File Open Function FILE *getfp(name, opt) char *name : file name char *opt : file open mode ***************************************************************/ #include #include FILE *getfp(char *name, char *opt) { FILE *fp; if ((fp = fopen(name, opt)) == NULL) { fprintf(stderr, "Cannot open file %s!\n", name); exit(2); } return (fp); } SPTK-3.9/lib/getmem.c0000644001051300105040000001135212637156650011266 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /******************************************************************** $Id: getmem.c,v 1.19 2015/12/14 01:14:25 uratec Exp $ Memory Allocation Functions short *sgetmem(leng) long *lgetmem(leng) double *dgetmem(leng) float *fgetmem(leng) real *rgetmem(leng) float **fgetmem(leng) double **ddgetmem(leng1, leng2) int leng : data length char *getmem(leng, size) size_t leng : data length size_t size : size of data type **********************************************************************/ #include #include #ifdef DOUBLE #define real double #else #define real float #endif char *getmem(const size_t leng, const size_t size) { char *p = NULL; if ((p = (char *) calloc(leng, size)) == NULL) { fprintf(stderr, "Cannot allocate memory!\n"); exit(3); } return (p); } short *sgetmem(const int leng) { return ((short *) getmem((size_t) leng, sizeof(short))); } long *lgetmem(const int leng) { return ((long *) getmem((size_t) leng, sizeof(long))); } double *dgetmem(const int leng) { return ((double *) getmem((size_t) leng, sizeof(double))); } float *fgetmem(const int leng) { return ((float *) getmem((size_t) leng, sizeof(float))); } real *rgetmem(const int leng) { return ((real *) getmem((size_t) leng, sizeof(real))); } float **ffgetmem(const int leng) { return ((float **) getmem((size_t) leng, sizeof(float *))); } double **ddgetmem(const int leng1, const int leng2) { int i, j; double **tmp, *tmp2; tmp = (double **) getmem((size_t) leng1, sizeof(double *)); tmp2 = dgetmem(leng1 * leng2); for (i = 0, j = 0; i < leng1; i++, j += leng2) { tmp[i] = tmp2 + j; } return (tmp); } SPTK-3.9/lib/gexp.c0000644001051300105040000000710712637156650010756 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /*************************************************************** $Id: gexp.c,v 1.13 2015/12/14 01:14:25 uratec Exp $ Generalized Exponential Function (real argument) double gexp(r, x) double r : gamma double x : argument *****************************************************************/ #include double gexp(const double r, const double x) { if (r == 0.0) { return (exp(x)); } else { if (r < 0.0) return (pow(1 / (1 + r * x), -1 / r)); else return (pow(1 + r * x, 1 / r)); } } SPTK-3.9/lib/glog.c0000644001051300105040000000710612637156650010742 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /**************************************************************** $Id: glog.c,v 1.14 2015/12/14 01:14:25 uratec Exp $ Generalized Logarithmic Function (real argument) double glog(r, x) double r : gamma double x : argument *****************************************************************/ #include double glog(const double r, const double x) { if (r == 0.0) { return (log(x)); } else { if (r < 0.0) return ((pow(1 / x, -r) - 1.0) / r); else return ((pow(x, r) - 1.0) / r); } } SPTK-3.9/lib/invert.c0000644001051300105040000001343512637156650011323 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /**************************************************************** $Id: invert.c,v 1.5 2015/12/14 01:14:25 uratec Exp $ Calculate inverse matrix double invert (double **mat, double **inv, int n) double **mat : input matrix double **inv : inverse matrix int n : size of matrix return value : determinant of input matrix ****************************************************************/ #include #include #include #if defined(WIN32) #include "SPTK.h" #else #include #endif double invert(double **mat, double **inv, const int n) { int i, j, k, *swap, ii, ik; double **copy_mat, *tmpmat, d, u, det, *work; copy_mat = (double **) malloc(sizeof(double *) * n); tmpmat = dgetmem(n * n); for (i = 0, j = 0; i < n; i++, j += n) { copy_mat[i] = tmpmat + j; } for (i = 0; i < n; i++) { for (k = 0; k < n; k++) { copy_mat[i][k] = mat[i][k]; } } swap = (int *) malloc(sizeof(int) * n); work = dgetmem(n); for (k = 0; k < n; k++) { swap[k] = k; u = 0.0; for (j = 0; j < n; j++) { d = fabs(copy_mat[k][j]); if (d > u) { u = d; } } if (u == 0.0) { fprintf(stderr, "Can't calculate inverse matrix!\n"); exit(1); } work[k] = 1.0 / u; } det = 1; for (k = 0; k < n; k++) { u = -1; for (i = k; i < n; i++) { ii = swap[i]; d = fabs(copy_mat[ii][k]) * work[ii]; if (d > u) { u = d; j = i; } } ik = swap[j]; if (j != k) { swap[j] = swap[k]; swap[k] = ik; det = -det; } u = copy_mat[ik][k]; det *= u; if (u == 0.0) { fprintf(stderr, "Can't calculate inverse matrix!\n"); exit(1); } for (i = k + 1; i < n; i++) { ii = swap[i]; d = (copy_mat[ii][k] /= u); for (j = k + 1; j < n; j++) { copy_mat[ii][j] -= d * copy_mat[ik][j]; } } } if (det != 0.0) { for (k = 0; k < n; k++) { for (i = 0; i < n; i++) { ii = swap[i]; d = (ii == k); for (j = 0; j < i; j++) { d -= copy_mat[ii][j] * inv[j][k]; } inv[i][k] = d; } for (i = n - 1; i >= 0; i--) { d = inv[i][k]; ii = swap[i]; for (j = i + 1; j < n; j++) { d -= copy_mat[ii][j] * inv[j][k]; } inv[i][k] = d / copy_mat[ii][i]; } } } else { fprintf(stderr, "Can't calculate inverse matrix!\n"); exit(1); } free(copy_mat[0]); free(copy_mat); free(swap); free(work); return (det); } SPTK-3.9/lib/matrix.c0000644001051300105040000001372112637156650011316 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /***************************************************************** $Id: matrix.c,v 1.17 2015/12/14 01:14:25 uratec Exp $ compute matrix functions multiple matrix multim(x, xx, xy, y, yx, yy, a) double x[] : matrix1 int xx : row number of matrix1 int xy : line number of matrix1 double y[] : matrix2 int yx : row number of matrix2 int yy : line number of matrix2 double a[] : answer if xx=1 and xy=1 ,then x[0] is regarded as scalar add matrix addm(x, y, xx, yy, a) double x[] : matrix1 double y[] : matrix2 int xx : row number int xy : line number double a[] : answer Naohiro Isshiki Feb.1996 *******************************************************************/ #include #include #if defined(WIN32) #include "SPTK.h" #else #include #endif static double *tmp; static int tmpsize = 0; static void mm(double x[], const int xx, const int xy, double y[], const int yx, const int yy, double a[]) { int i, j, k; double *wx, *wy; if (xx == 1 && xy == 1) { for (i = yx * yy - 1; i >= 0; i--) a[i] = x[0] * y[i]; return; } if (xx != yy) { fprintf(stderr, "Invalid matrix size x= %d*%d,y= %d*%d\n", xx, xy, yx, yy); exit(1); } wx = x; for (i = 0; i < xy; i++) { for (j = 0; j < yx; j++) { wy = &y[j]; *a = 0; for (k = 0; k < xx; k++) { *a += *wx * *wy; wx++; wy += yx; } wx -= xx; a++; } wx += xx; } return; } void multim(double x[], const int xx, const int xy, double y[], const int yx, const int yy, double a[]) { int i; if (x == a) { if (((xy > yy) ? xy : yy) * yx > tmpsize) { if (tmp != NULL) free(tmp); tmpsize = ((xy > yy) ? xy : yy) * yx; tmp = (double *) getmem(tmpsize, sizeof(*tmp)); } mm(x, xx, xy, y, yx, yy, tmp); if (xx == xy) for (i = yx * yy - 1; i >= 0; i--) a[i] = tmp[i]; else for (i = xy * yx - 1; i >= 0; i--) a[i] = tmp[i]; } else { mm(x, xx, xy, y, yx, yy, a); } return; } static void am(double x[], double y[], const int xx, const int yy, double a[]) { int i, j; for (i = 0; i < yy; i++) for (j = 0; j < xx; j++) a[j + i * xx] = x[j + i * xx] + y[j + i * xx]; } void addm(double x[], double y[], const int xx, const int yy, double a[]) { int i; if (x == a) { if (xx * yy > tmpsize) { if (tmp != NULL) free(tmp); tmpsize = xx * yy; tmp = (double *) getmem(tmpsize, sizeof(*tmp)); } am(x, y, xx, yy, tmp); for (i = xx * yy - 1; i >= 0; i--) a[i] = tmp[i]; } else { am(x, y, xx, yy, a); } return; } SPTK-3.9/lib/movem.c0000644001051300105040000000725112637156650011136 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /******************************************************** $Id: movem.c,v 1.14 2015/12/14 01:14:25 uratec Exp $ Data Transfer Function movem(a, b, size, nitem) void *a : intput data void *b : output data size_t size : size of data type int nitem : data length *********************************************************/ #include void movem(void *a, void *b, const size_t size, const int nitem) { long i; char *c = a; char *d = b; i = size * nitem; if (c > d) while (i--) *d++ = *c++; else { c += i; d += i; while (i--) *--d = *--c; } } SPTK-3.9/lib/mseq.c0000644001051300105040000000730112637156650010754 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /**************************************************************** $Id: mseq.c,v 1.13 2015/12/14 01:14:25 uratec Exp $ M-Sequence Generator using X**31 + X**28 + 1 int mseq(void) return value : M-Sequence ****************************************************************/ #define B0 0x00000001 #define B28 0x10000000 #define B31 0x80000000 #define B31_ 0x7fffffff #define Z 0x00000000 int mseq(void) { static int x = 0x55555555; int x0, x28; x >>= 1; if (x & B0) x0 = 1; else x0 = -1; if (x & B28) x28 = 1; else x28 = -1; if (x0 + x28) x &= B31_; else x |= B31; return (x0); } SPTK-3.9/lib/theq.c0000644001051300105040000002216612637156650010756 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /****************************************************************** $Id: theq.c,v 1.22 2015/12/14 01:14:25 uratec Exp $ Subroutine for Solving a Toeplitz plus Hankel Coefficient Matrix System of Equations ( T + H ) a = b int theq(t, h, a, b, n, eps) double *t : Toeplitz elements -> T(i,j) = t(|i-j|) t[0]..t[n-1] double *h : Hankel elements -> H(i,j) = h(i+j) h[0]...h[2*n-2] double *a : solution vector of equation a[0]...a[n-1] double *b : known vector b[0]...b[n-1] int n : system order double eps : singular check (eps(if -1.0, 1.0e-6 is assumed)) return value : 0 : normally completed -1 : abnormally completed ****************************************************************/ #include #include #include static void mv_mul(double *t, double *x, double *y) { t[0] = x[0] * y[0] + x[1] * y[1]; t[1] = x[2] * y[0] + x[3] * y[1]; return; } static void mm_mul(double *t, double *x, double *y) { t[0] = x[0] * y[0] + x[1] * y[2]; t[1] = x[0] * y[1] + x[1] * y[3]; t[2] = x[2] * y[0] + x[3] * y[2]; t[3] = x[2] * y[1] + x[3] * y[3]; return; } static int inverse(double *x, double *y, const double eps) { double det; det = y[0] * y[3] - y[1] * y[2]; #ifdef WIN32 if ((fabs(det) < eps) || _isnan(det)) { #else if ((fabs(det) < eps) || isnan(det)) { #endif fprintf(stderr, "theq() : determinant of the normal matrix is too small!\n"); return (-1); } x[0] = y[3] / det; x[1] = -y[1] / det; x[2] = -y[2] / det; x[3] = y[0] / det; return (0); } static void crstrns(double *x, double *y) { x[0] = y[3]; x[1] = y[2]; x[2] = y[1]; x[3] = y[0]; return; } static double **mtrx2(const int a, const int b) { int i; double **x; if (!(x = (double **) calloc((size_t) a, sizeof(*x)))) { fprintf(stderr, "mtrx2() in theq() : Cannot allocate memory!\n"); exit(3); } for (i = 0; i < a; i++) if (!(x[i] = (double *) calloc((size_t) b, sizeof(**x)))) { fprintf(stderr, "mtrx2() in theq() : Cannot allocate memory!\n"); exit(3); } return (x); } static int cal_p0(double **p, double **r, double *b, const int n, const double eps) { double t[4], s[2]; if (inverse(t, r[0], eps) == -1) return (-1); s[0] = b[0]; s[1] = b[n - 1]; mv_mul(p[0], t, s); return (0); } static void cal_ex(double *ex, double **r, double **x, const int i) { int j; double t[4], s[4]; s[0] = s[1] = s[2] = s[3] = 0.; for (j = 0; j < i; j++) { mm_mul(t, r[i - j], x[j]); s[0] += t[0]; s[1] += t[1]; s[2] += t[2]; s[3] += t[3]; } ex[0] = s[0]; ex[1] = s[1]; ex[2] = s[2]; ex[3] = s[3]; return; } static void cal_ep(double *ep, double **r, double **p, const int i) { int j; double t[2], s[2]; s[0] = s[1] = 0.; for (j = 0; j < i; j++) { mv_mul(t, r[i - j], p[j]); s[0] += t[0]; s[1] += t[1]; } ep[0] = s[0]; ep[1] = s[1]; return; } static int cal_bx(double *bx, double *vx, double *ex, const double eps) { double t[4], s[4]; crstrns(t, vx); if (inverse(s, t, eps) == -1) return (-1); mm_mul(bx, s, ex); return (0); } static void cal_x(double **x, double **xx, double *bx, const int i) { int j; double t[4], s[4]; for (j = 1; j < i; j++) { crstrns(t, xx[i - j]); mm_mul(s, t, bx); x[j][0] -= s[0]; x[j][1] -= s[1]; x[j][2] -= s[2]; x[j][3] -= s[3]; } for (j = 1; j < i; j++) { xx[j][0] = x[j][0]; xx[j][1] = x[j][1]; xx[j][2] = x[j][2]; xx[j][3] = x[j][3]; } x[i][0] = xx[i][0] = -bx[0]; x[i][1] = xx[i][1] = -bx[1]; x[i][2] = xx[i][2] = -bx[2]; x[i][3] = xx[i][3] = -bx[3]; return; } static void cal_vx(double *vx, double *ex, double *bx) { double t[4], s[4]; crstrns(t, ex); mm_mul(s, t, bx); vx[0] -= s[0]; vx[1] -= s[1]; vx[2] -= s[2]; vx[3] -= s[3]; return; } static int cal_g(double *g, double *vx, double *b, double *ep, const int i, const int n, const double eps) { double t[2], s[4], u[4]; t[0] = b[i] - ep[0]; t[1] = b[n - 1 - i] - ep[1]; crstrns(s, vx); if (inverse(u, s, eps) == -1) return (-1); mv_mul(g, u, t); return (0); } static void cal_p(double **p, double **x, double *g, const int i) { double t[4], s[2]; int j; for (j = 0; j < i; j++) { crstrns(t, x[i - j]); mv_mul(s, t, g); p[j][0] += s[0]; p[j][1] += s[1]; } p[i][0] = g[0]; p[i][1] = g[1]; return; } int theq(double *t, double *h, double *a, double *b, const int n, double eps) { static double **r = NULL, **x, **xx, **p; static int size; double ex[4], ep[2], vx[4], bx[4], g[2]; int i; if (r == NULL) { r = mtrx2(n, 4); x = mtrx2(n, 4); xx = mtrx2(n, 4); p = mtrx2(n, 2); size = n; } if (n > size) { for (i = 0; i < size; i++) { free((char *) r[i]); free((char *) x[i]); free((char *) xx[i]); free((char *) p[i]); } free((char *) r); free((char *) x); free((char *) xx); free((char *) p); r = mtrx2(n, 4); x = mtrx2(n, 4); xx = mtrx2(n, 4); p = mtrx2(n, 2); size = n; } if (eps < 0.0) eps = 1.0e-6; /* make r */ for (i = 0; i < n; i++) { r[i][0] = r[i][3] = t[i]; r[i][1] = h[n - 1 + i]; r[i][2] = h[n - 1 - i]; } /* step 1 */ x[0][0] = x[0][3] = 1.0; if (cal_p0(p, r, b, n, eps) == -1) return (-1); vx[0] = r[0][0]; vx[1] = r[0][1]; vx[2] = r[0][2]; vx[3] = r[0][3]; /* step 2 */ for (i = 1; i < n; i++) { cal_ex(ex, r, x, i); cal_ep(ep, r, p, i); if (cal_bx(bx, vx, ex, eps) == -1) return (-1); cal_x(x, xx, bx, i); cal_vx(vx, ex, bx); if (cal_g(g, vx, b, ep, i, n, eps) == -1) return (-1); cal_p(p, x, g, i); } /* step 3 */ for (i = 0; i < n; i++) a[i] = p[i][0]; return (0); } SPTK-3.9/lib/toeplitz.c0000644001051300105040000001153712637156650011667 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ /**************************************************************** $Id: toeplitz.c,v 1.15 2015/12/14 01:14:25 uratec Exp $ Solve a Synmetric Toeplitz Set of Linear Equations int toeplitz(t, a, b, n, eps) < Ta=b > double *t : Toeplitz elements -> T(i,j) = t(|i-j|) t[0]..t[n-1] double *a : solution vector of equation double *b : known vector int n : system order double eps : singular check (eps(if -1., 1.0e-6 is assumed)) return value : 0 -> normally completed -1 -> abnormally completed ****************************************************************/ #include #include #if defined(WIN32) #include "SPTK.h" #else #include #endif int toeplitz(double *t, double *a, double *b, const int n, double eps) { int l, k; static double *c = NULL, *cc; static int size; double rmd, mue, mue2; if (c == NULL) { c = dgetmem(n + n + 2); cc = c + n; size = n; } if (n > size) { free(c); c = dgetmem(n + n + 2); cc = c + n; size = n; } if (eps < 0.0) eps = 1.0e-6; fillz(c, sizeof(*c), n + 1); rmd = t[0]; if (((rmd < 0.0) ? -rmd : rmd) <= eps) return (-1); a[0] = b[0] / rmd; for (l = 1; l < n; l++) { mue = -t[l]; for (k = 1; k < l; k++) mue -= c[k] * t[l - k]; mue /= rmd; for (k = 1; k < l; k++) cc[k] = c[k] + mue * c[l - k]; cc[l] = mue; rmd = (1.0 - mue * mue) * rmd; if (((rmd < 0.0) ? -rmd : rmd) <= eps) return (-1); for (k = 1; k <= l; k++) c[k] = cc[k]; mue2 = b[l]; for (k = 0; k <= l - 1; k++) mue2 += c[l - k] * b[k]; mue2 /= rmd; for (k = 0; k < l; k++) a[k] += mue2 * c[l - k]; a[l] = mue2; } return (0); } SPTK-3.9/Makefile.am0000644001051300105040000000134012442245162011115 00000000000000SUBDIRS = include lib bin script # Header files to be included in the distribution. include_HEADERS = include/SPTK.h # Additional files to be included in the distribution. EXTRA_DIST = AUTHORS COPYING ChangeLog INSTALL NEWS README Makefile.mak \ bin/Makefile.mak include/Makefile.mak lib/Makefile.mak # Files to remove by 'make distclean' DISTCLEANFILES = *.log *.out *~ bin/*~ bin/*/*~ config/*~ include/*~ lib/*~ scripts/*~ # Autotools-generated files to remove by 'make maintainer-clean'. MAINTAINERCLEANFILES = aclocal.m4 configure Makefile.in \ config/config.guess config/config.sub \ config/depcomp config/install-sh \ config/missing SPTK-3.9/configure0000755001051300105040000066363712635700022011012 00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for SPTK 3.9. # # Report bugs to . # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. # # Copyright 1984-2007 Tokyo Institute of Technology # # Copyright 1996-2015 Nagoya Institute of Technology ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and $0: http://sourceforge.net/projects/sp-tk/ about your $0: system, including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='SPTK' PACKAGE_TARNAME='SPTK' PACKAGE_VERSION='3.9' PACKAGE_STRING='SPTK 3.9' PACKAGE_BUGREPORT='http://sourceforge.net/projects/sp-tk/' PACKAGE_URL='' # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS USEDA_FALSE USEDA_TRUE IO_FORMAT IO_SYMBOL POW_LIB LIBOBJS host_os host_vendor host_cpu host build_os build_vendor build_cpu build EGREP GREP USEXGR_FALSE USEXGR_TRUE X_EXTRA_LIBS X_LIBS X_PRE_LIBS X_CFLAGS CPP XMKMF CSH AR RANLIB LN_S am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_silent_rules enable_dependency_tracking with_x enable_double enable_da ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS XMKMF CPP' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures SPTK 3.9 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/SPTK] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names X features: --x-includes=DIR X include files are in DIR --x-libraries=DIR X library files are in DIR System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of SPTK 3.9:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-silent-rules less verbose build output (undo: "make V=1") --disable-silent-rules verbose build output (undo: "make V=0") --enable-dependency-tracking do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build --enable-double deal with data in double (default=no) --enable-da use audio output (default=yes) Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-x use the X Window System Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory XMKMF Path to xmkmf, Makefile generator for X Window System CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF SPTK configure 3.9 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. Copyright 1984-2007 Tokyo Institute of Technology Copyright 1996-2015 Nagoya Institute of Technology _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ( $as_echo "## ----------------------------------------------------- ## ## Report this to http://sourceforge.net/projects/sp-tk/ ## ## ----------------------------------------------------- ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # ac_fn_c_check_type LINENO TYPE VAR INCLUDES # ------------------------------------------- # Tests whether TYPE exists after having included INCLUDES, setting cache # variable VAR accordingly. ac_fn_c_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof ($2)) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof (($2))) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else eval "$3=yes" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by SPTK $as_me 3.9, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_aux_dir= for ac_dir in config "$srcdir"/config; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. am__api_version='1.15' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi if test "$2" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi rm -f conftest.file test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null # Check whether --enable-silent-rules was given. if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; fi case $enable_silent_rules in # ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=1;; esac am_make=${MAKE-make} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 $as_echo_n "checking whether $am_make supports nested variables... " >&6; } if ${am_cv_make_support_nested_variables+:} false; then : $as_echo_n "(cached) " >&6 else if $as_echo 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 $as_echo "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AM_BACKSLASH='\' if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='SPTK' VERSION='3.9' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # mkdir_p='$(MKDIR_P)' # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar pax cpio none' am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 fi fi # Checks for programs. ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; } if ${am_cv_prog_cc_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 $as_echo "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="${ac_tool_prefix}ar" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_AR"; then ac_ct_AR=$AR # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="ar" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_AR" = x; then AR=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi else AR="$ac_cv_prog_AR" fi # Extract the first word of "csh", so it can be a program name with args. set dummy csh; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_CSH+:} false; then : $as_echo_n "(cached) " >&6 else case $CSH in [\\/]* | ?:[\\/]*) ac_cv_path_CSH="$CSH" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_CSH="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_CSH" && ac_cv_path_CSH="no" ;; esac fi CSH=$ac_cv_path_CSH if test -n "$CSH"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CSH" >&5 $as_echo "$CSH" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "$CSH" = "no"; then as_fn_error $? "\"Cannot find csh\"" "$LINENO" 5 fi # Checks for libraries. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for log in -lm" >&5 $as_echo_n "checking for log in -lm... " >&6; } if ${ac_cv_lib_m_log+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char log (); int main () { return log (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_m_log=yes else ac_cv_lib_m_log=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_log" >&5 $as_echo "$ac_cv_lib_m_log" >&6; } if test "x$ac_cv_lib_m_log" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBM 1 _ACEOF LIBS="-lm $LIBS" else as_fn_error $? "Cannot find libm" "$LINENO" 5 fi # Checks for X Window Systems ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 $as_echo_n "checking for X... " >&6; } # Check whether --with-x was given. if test "${with_x+set}" = set; then : withval=$with_x; fi # $have_x is `yes', `no', `disabled', or empty when we do not yet know. if test "x$with_x" = xno; then # The user explicitly disabled X. have_x=disabled else case $x_includes,$x_libraries in #( *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #( *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then : $as_echo_n "(cached) " >&6 else # One or both of the vars are not set, and there is no cached value. ac_x_includes=no ac_x_libraries=no rm -f -r conftest.dir if mkdir conftest.dir; then cd conftest.dir cat >Imakefile <<'_ACEOF' incroot: @echo incroot='${INCROOT}' usrlibdir: @echo usrlibdir='${USRLIBDIR}' libdir: @echo libdir='${LIBDIR}' _ACEOF if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. for ac_var in incroot usrlibdir libdir; do eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" done # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. for ac_extension in a so sl dylib la dll; do if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && test -f "$ac_im_libdir/libX11.$ac_extension"; then ac_im_usrlibdir=$ac_im_libdir; break fi done # Screen out bogus values from the imake configuration. They are # bogus both because they are the default anyway, and because # using them would break gcc on systems where it needs fixed includes. case $ac_im_incroot in /usr/include) ac_x_includes= ;; *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; esac case $ac_im_usrlibdir in /usr/lib | /usr/lib64 | /lib | /lib64) ;; *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; esac fi cd .. rm -f -r conftest.dir fi # Standard set of common directories for X headers. # Check X11 before X11Rn because it is often a symlink to the current release. ac_x_header_dirs=' /usr/X11/include /usr/X11R7/include /usr/X11R6/include /usr/X11R5/include /usr/X11R4/include /usr/include/X11 /usr/include/X11R7 /usr/include/X11R6 /usr/include/X11R5 /usr/include/X11R4 /usr/local/X11/include /usr/local/X11R7/include /usr/local/X11R6/include /usr/local/X11R5/include /usr/local/X11R4/include /usr/local/include/X11 /usr/local/include/X11R7 /usr/local/include/X11R6 /usr/local/include/X11R5 /usr/local/include/X11R4 /usr/X386/include /usr/x386/include /usr/XFree86/include/X11 /usr/include /usr/local/include /usr/unsupported/include /usr/athena/include /usr/local/x11r5/include /usr/lpp/Xamples/include /usr/openwin/include /usr/openwin/share/include' if test "$ac_x_includes" = no; then # Guess where to find include files, by looking for Xlib.h. # First, try using that file with no special directory specified. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # We can compile using X headers with no special include directory. ac_x_includes= else for ac_dir in $ac_x_header_dirs; do if test -r "$ac_dir/X11/Xlib.h"; then ac_x_includes=$ac_dir break fi done fi rm -f conftest.err conftest.i conftest.$ac_ext fi # $ac_x_includes = no if test "$ac_x_libraries" = no; then # Check for the libraries. # See if we find them without any special options. # Don't add to $LIBS permanently. ac_save_LIBS=$LIBS LIBS="-lX11 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { XrmInitialize () ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : LIBS=$ac_save_LIBS # We can link X programs with no special library path. ac_x_libraries= else LIBS=$ac_save_LIBS for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` do # Don't even attempt the hair of trying to link an X program! for ac_extension in a so sl dylib la dll; do if test -r "$ac_dir/libX11.$ac_extension"; then ac_x_libraries=$ac_dir break 2 fi done done fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi # $ac_x_libraries = no case $ac_x_includes,$ac_x_libraries in #( no,* | *,no | *\'*) # Didn't find X, or a directory has "'" in its name. ac_cv_have_x="have_x=no";; #( *) # Record where we found X for the cache. ac_cv_have_x="have_x=yes\ ac_x_includes='$ac_x_includes'\ ac_x_libraries='$ac_x_libraries'" esac fi ;; #( *) have_x=yes;; esac eval "$ac_cv_have_x" fi # $with_x != no if test "$have_x" != yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 $as_echo "$have_x" >&6; } no_x=yes else # If each of the values was on the command line, it overrides each guess. test "x$x_includes" = xNONE && x_includes=$ac_x_includes test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries # Update the cache value to reflect the command line values. ac_cv_have_x="have_x=yes\ ac_x_includes='$x_includes'\ ac_x_libraries='$x_libraries'" { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5 $as_echo "libraries $x_libraries, headers $x_includes" >&6; } fi if test "$no_x" = yes; then # Not all programs may use this symbol, but it does not hurt to define it. $as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= else if test -n "$x_includes"; then X_CFLAGS="$X_CFLAGS -I$x_includes" fi # It would also be nice to do this for all -L options, not just this one. if test -n "$x_libraries"; then X_LIBS="$X_LIBS -L$x_libraries" # For Solaris; some versions of Sun CC require a space after -R and # others require no space. Words are not sufficient . . . . { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5 $as_echo_n "checking whether -R must be followed by a space... " >&6; } ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries" ac_xsave_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } X_LIBS="$X_LIBS -R$x_libraries" else LIBS="$ac_xsave_LIBS -R $x_libraries" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } X_LIBS="$X_LIBS -R $x_libraries" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5 $as_echo "neither works" >&6; } fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_c_werror_flag=$ac_xsave_c_werror_flag LIBS=$ac_xsave_LIBS fi # Check for system-dependent libraries X programs must link with. # Do this before checking for the system-independent R6 libraries # (-lICE), since we may need -lsocket or whatever for X linking. if test "$ISC" = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet" else # Martyn Johnson says this is needed for Ultrix, if the X # libraries were built with DECnet support. And Karl Berry says # the Alpha needs dnet_stub (dnet does not exist). ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char XOpenDisplay (); int main () { return XOpenDisplay (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; } if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnet $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dnet_ntoa (); int main () { return dnet_ntoa (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dnet_dnet_ntoa=yes else ac_cv_lib_dnet_dnet_ntoa=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; } if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" fi if test $ac_cv_lib_dnet_dnet_ntoa = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; } if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnet_stub $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dnet_ntoa (); int main () { return dnet_ntoa (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dnet_stub_dnet_ntoa=yes else ac_cv_lib_dnet_stub_dnet_ntoa=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; } if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" fi fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$ac_xsave_LIBS" # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, # to get the SysV transport functions. # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4) # needs -lnsl. # The nsl library prevents programs from opening the X display # on Irix 5.2, according to T.E. Dickey. # The functions gethostbyname, getservbyname, and inet_addr are # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking. ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" if test "x$ac_cv_func_gethostbyname" = xyes; then : fi if test $ac_cv_func_gethostbyname = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; } if ${ac_cv_lib_nsl_gethostbyname+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gethostbyname (); int main () { return gethostbyname (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_nsl_gethostbyname=yes else ac_cv_lib_nsl_gethostbyname=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; } if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" fi if test $ac_cv_lib_nsl_gethostbyname = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; } if ${ac_cv_lib_bsd_gethostbyname+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbsd $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gethostbyname (); int main () { return gethostbyname (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bsd_gethostbyname=yes else ac_cv_lib_bsd_gethostbyname=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; } if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd" fi fi fi # lieder@skyler.mavd.honeywell.com says without -lsocket, # socket/setsockopt and other routines are undefined under SCO ODT # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary # on later versions), says Simon Leinen: it contains gethostby* # variants that don't use the name server (or something). -lsocket # must be given before -lnsl if both are needed. We assume that # if connect needs -lnsl, so does gethostbyname. ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect" if test "x$ac_cv_func_connect" = xyes; then : fi if test $ac_cv_func_connect = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5 $as_echo_n "checking for connect in -lsocket... " >&6; } if ${ac_cv_lib_socket_connect+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $X_EXTRA_LIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char connect (); int main () { return connect (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_socket_connect=yes else ac_cv_lib_socket_connect=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5 $as_echo "$ac_cv_lib_socket_connect" >&6; } if test "x$ac_cv_lib_socket_connect" = xyes; then : X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" fi fi # Guillermo Gomez says -lposix is necessary on A/UX. ac_fn_c_check_func "$LINENO" "remove" "ac_cv_func_remove" if test "x$ac_cv_func_remove" = xyes; then : fi if test $ac_cv_func_remove = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5 $as_echo_n "checking for remove in -lposix... " >&6; } if ${ac_cv_lib_posix_remove+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lposix $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char remove (); int main () { return remove (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_posix_remove=yes else ac_cv_lib_posix_remove=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5 $as_echo "$ac_cv_lib_posix_remove" >&6; } if test "x$ac_cv_lib_posix_remove" = xyes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" fi fi # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. ac_fn_c_check_func "$LINENO" "shmat" "ac_cv_func_shmat" if test "x$ac_cv_func_shmat" = xyes; then : fi if test $ac_cv_func_shmat = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5 $as_echo_n "checking for shmat in -lipc... " >&6; } if ${ac_cv_lib_ipc_shmat+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lipc $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shmat (); int main () { return shmat (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_ipc_shmat=yes else ac_cv_lib_ipc_shmat=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5 $as_echo "$ac_cv_lib_ipc_shmat" >&6; } if test "x$ac_cv_lib_ipc_shmat" = xyes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" fi fi fi # Check for libraries that X11R6 Xt/Xaw programs need. ac_save_LDFLAGS=$LDFLAGS test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries" # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to # check for ICE first), but we must link in the order -lSM -lICE or # we get undefined symbols. So assume we have SM if we have ICE. # These have to be linked with before -lX11, unlike the other # libraries we check for below, so use a different variable. # John Interrante, Karl Berry { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; } if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lICE $X_EXTRA_LIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char IceConnectionNumber (); int main () { return IceConnectionNumber (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_ICE_IceConnectionNumber=yes else ac_cv_lib_ICE_IceConnectionNumber=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; } if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then : X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" fi LDFLAGS=$ac_save_LDFLAGS fi if test x$no_x = "x"; then if true; then USEXGR_TRUE= USEXGR_FALSE='#' else USEXGR_TRUE='#' USEXGR_FALSE= fi else if false; then USEXGR_TRUE= USEXGR_FALSE='#' else USEXGR_TRUE='#' USEXGR_FALSE= fi fi # Checks for header files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in fcntl.h limits.h stdlib.h string.h strings.h sys/ioctl.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done # Checks for typedefs, structures, and compiler characteristics. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } if ${ac_cv_c_const+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __cplusplus /* Ultrix mips cc rejects this sort of thing. */ typedef int charset[2]; const charset cs = { 0, 0 }; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; pcpcc = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; { /* SCO 3.2v4 cc rejects this sort of thing. */ char tx; char *t = &tx; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; if (s) return 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; } bx; struct s *b = &bx; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; if (!foo) return 0; } return !cs[0] && !zero.x; #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_const=yes else ac_cv_c_const=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 $as_echo "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then $as_echo "#define const /**/" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF fi # use host info # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac # Checks for library functions. if test $ac_cv_c_compiler_gnu = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5 $as_echo_n "checking whether $CC needs -traditional... " >&6; } if ${ac_cv_prog_gcc_traditional+:} false; then : $as_echo_n "(cached) " >&6 else ac_pattern="Autoconf.*'x'" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include Autoconf TIOCGETP _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "$ac_pattern" >/dev/null 2>&1; then : ac_cv_prog_gcc_traditional=yes else ac_cv_prog_gcc_traditional=no fi rm -f conftest* if test $ac_cv_prog_gcc_traditional = no; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include Autoconf TCGETA _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "$ac_pattern" >/dev/null 2>&1; then : ac_cv_prog_gcc_traditional=yes fi rm -f conftest* fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5 $as_echo "$ac_cv_prog_gcc_traditional" >&6; } if test $ac_cv_prog_gcc_traditional = yes; then CC="$CC -traditional" fi fi for ac_header in stdlib.h do : ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" if test "x$ac_cv_header_stdlib_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STDLIB_H 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5 $as_echo_n "checking for GNU libc compatible malloc... " >&6; } if ${ac_cv_func_malloc_0_nonnull+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_malloc_0_nonnull=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined STDC_HEADERS || defined HAVE_STDLIB_H # include #else char *malloc (); #endif int main () { return ! malloc (0); ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_malloc_0_nonnull=yes else ac_cv_func_malloc_0_nonnull=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5 $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; } if test $ac_cv_func_malloc_0_nonnull = yes; then : $as_echo "#define HAVE_MALLOC 1" >>confdefs.h else $as_echo "#define HAVE_MALLOC 0" >>confdefs.h case " $LIBOBJS " in *" malloc.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS malloc.$ac_objext" ;; esac $as_echo "#define malloc rpl_malloc" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strtod" >&5 $as_echo_n "checking for working strtod... " >&6; } if ${ac_cv_func_strtod+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_strtod=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default #ifndef strtod double strtod (); #endif int main() { { /* Some versions of Linux strtod mis-parse strings with leading '+'. */ char *string = " +69"; char *term; double value; value = strtod (string, &term); if (value != 69 || term != (string + 4)) return 1; } { /* Under Solaris 2.4, strtod returns the wrong value for the terminating character under some conditions. */ char *string = "NaN"; char *term; strtod (string, &term); if (term != string && *(term - 1) == 0) return 1; } return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_strtod=yes else ac_cv_func_strtod=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strtod" >&5 $as_echo "$ac_cv_func_strtod" >&6; } if test $ac_cv_func_strtod = no; then case " $LIBOBJS " in *" strtod.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS strtod.$ac_objext" ;; esac ac_fn_c_check_func "$LINENO" "pow" "ac_cv_func_pow" if test "x$ac_cv_func_pow" = xyes; then : fi if test $ac_cv_func_pow = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pow in -lm" >&5 $as_echo_n "checking for pow in -lm... " >&6; } if ${ac_cv_lib_m_pow+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pow (); int main () { return pow (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_m_pow=yes else ac_cv_lib_m_pow=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_pow" >&5 $as_echo "$ac_cv_lib_m_pow" >&6; } if test "x$ac_cv_lib_m_pow" = xyes; then : POW_LIB=-lm else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find library containing definition of pow" >&5 $as_echo "$as_me: WARNING: cannot find library containing definition of pow" >&2;} fi fi fi ac_fn_c_check_func "$LINENO" "pow" "ac_cv_func_pow" if test "x$ac_cv_func_pow" = xyes; then : else as_fn_error $? "\"Cannot find pow()\"" "$LINENO" 5 fi ac_fn_c_check_func "$LINENO" "sqrt" "ac_cv_func_sqrt" if test "x$ac_cv_func_sqrt" = xyes; then : else as_fn_error $? "\"Cannot find sqrt()\"" "$LINENO" 5 fi find_memset=no find_strrchr=no for ac_func in bzero memset do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF find_memset="yes" fi done for ac_func in strrchr rindex do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF find_strrchr="yes" fi done if test "$find_memset" != "yes"; then as_fn_error $? "\"Cannot find memset() or bzero()\"" "$LINENO" 5 fi if test "$find_strrchr" != "yes"; then as_fn_error $? "\"Cannot find strrchr() or rindex()\"" "$LINENO" 5 fi # Checks for double use_double=no IO_SYMBOL='f' IO_FORMAT='float' # Check whether --enable-double was given. if test "${enable_double+set}" = set; then : enableval=$enable_double; if test "$enable_double" = "yes"; then use_double=yes IO_SYMBOL='d' IO_FORMAT='double' $as_echo "#define DOUBLE 1" >>confdefs.h fi fi if test "$use_double" = "yes"; then $as_echo "#define FORMAT \"double\"" >>confdefs.h else $as_echo "#define FORMAT \"float\"" >>confdefs.h fi # Checks for da command use_da=yes # Check whether --enable-da was given. if test "${enable_da+set}" = set; then : enableval=$enable_da; if test "$enable_da" = "no"; then use_da=no fi fi # Checks for audio device if test "$use_da" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking audio device" >&5 $as_echo_n "checking audio device... " >&6; } case $host in *-sunos*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: sunos" >&5 $as_echo "sunos" >&6; } ac_fn_c_check_header_mongrel "$LINENO" "sys/audioio.h" "ac_cv_header_sys_audioio_h" "$ac_includes_default" if test "x$ac_cv_header_sys_audioio_h" = xyes; then : $as_echo "#define SOLARIS 1" >>confdefs.h else as_fn_error $? "sys/audioio.h is not found" "$LINENO" 5 fi if true; then USEDA_TRUE= USEDA_FALSE='#' else USEDA_TRUE='#' USEDA_FALSE= fi ;; *-solaris*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: solaris" >&5 $as_echo "solaris" >&6; } ac_fn_c_check_header_mongrel "$LINENO" "sys/audioio.h" "ac_cv_header_sys_audioio_h" "$ac_includes_default" if test "x$ac_cv_header_sys_audioio_h" = xyes; then : $as_echo "#define SOLARIS 1" >>confdefs.h else as_fn_error $? "sys/audioio.h is not found" "$LINENO" 5 fi if true; then USEDA_TRUE= USEDA_FALSE='#' else USEDA_TRUE='#' USEDA_FALSE= fi ;; *-linux*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: linux" >&5 $as_echo "linux" >&6; } ac_fn_c_check_header_mongrel "$LINENO" "sys/soundcard.h" "ac_cv_header_sys_soundcard_h" "$ac_includes_default" if test "x$ac_cv_header_sys_soundcard_h" = xyes; then : $as_echo "#define LINUX 1" >>confdefs.h else as_fn_error $? "sys/soundcard.h is not found" "$LINENO" 5 fi if true; then USEDA_TRUE= USEDA_FALSE='#' else USEDA_TRUE='#' USEDA_FALSE= fi ;; *-freebsd*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: freebsd" >&5 $as_echo "freebsd" >&6; } ac_fn_c_check_header_mongrel "$LINENO" "sys/soundcard.h" "ac_cv_header_sys_soundcard_h" "$ac_includes_default" if test "x$ac_cv_header_sys_soundcard_h" = xyes; then : $as_echo "#define FreeBSD 1" >>confdefs.h else as_fn_error $? "sys/soundcard.h is not found" "$LINENO" 5 fi if true; then USEDA_TRUE= USEDA_FALSE='#' else USEDA_TRUE='#' USEDA_FALSE= fi ;; *win32* | *wince* | *cygwin* | *mingw* ) { $as_echo "$as_me:${as_lineno-$LINENO}: result: windows" >&5 $as_echo "windows" >&6; } ac_fn_c_check_header_mongrel "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default" if test "x$ac_cv_header_windows_h" = xyes; then : $as_echo "#define WIN32 1" >>confdefs.h else as_fn_error $? "windows.h is not found" "$LINENO" 5 fi if true; then USEDA_TRUE= USEDA_FALSE='#' else USEDA_TRUE='#' USEDA_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lwinmm" >&5 $as_echo_n "checking for main in -lwinmm... " >&6; } if ${ac_cv_lib_winmm_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lwinmm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_winmm_main=yes else ac_cv_lib_winmm_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_winmm_main" >&5 $as_echo "$ac_cv_lib_winmm_main" >&6; } if test "x$ac_cv_lib_winmm_main" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBWINMM 1 _ACEOF LIBS="-lwinmm $LIBS" else as_fn_error $? "No winmm" "$LINENO" 5 fi ac_cv_lib_winmm=ac_cv_lib_winmm_main ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: not found" >&5 $as_echo "$as_me: WARNING: not found" >&2;} if false; then USEDA_TRUE= USEDA_FALSE='#' else USEDA_TRUE='#' USEDA_FALSE= fi ;; esac else if false; then USEDA_TRUE= USEDA_FALSE='#' else USEDA_TRUE='#' USEDA_FALSE= fi fi # check solaris & gcc case $host in *-solaris*) if test "$GCC" = "yes"; then CFLAGS="-std=c99 $CFLAGS" fi ;; esac ac_config_files="$ac_config_files Makefile bin/Makefile bin/acep/Makefile bin/acorr/Makefile bin/agcep/Makefile bin/amcep/Makefile bin/average/Makefile bin/b2mc/Makefile bin/bcp/Makefile bin/bcut/Makefile bin/c2acr/Makefile bin/c2ir/Makefile bin/c2ndps/Makefile bin/c2sp/Makefile bin/cat2/Makefile bin/cdist/Makefile bin/clip/Makefile bin/da/Makefile bin/dct/Makefile bin/decimate/Makefile bin/delay/Makefile bin/delta/Makefile bin/df2/Makefile bin/dfs/Makefile bin/dmp/Makefile bin/ds/Makefile bin/dtw/Makefile bin/echo2/Makefile bin/excite/Makefile bin/extract/Makefile bin/fd/Makefile bin/fft/Makefile bin/fft2/Makefile bin/fftcep/Makefile bin/fftr/Makefile bin/fftr2/Makefile bin/fig+fdrw/Makefile bin/frame/Makefile bin/freqt/Makefile bin/gc2gc/Makefile bin/gcep/Makefile bin/glsadf/Makefile bin/gmm/Makefile bin/gnorm/Makefile bin/grpdelay/Makefile bin/histogram/Makefile bin/idct/Makefile bin/ifft/Makefile bin/ifftr/Makefile bin/ifft2/Makefile bin/ignorm/Makefile bin/impulse/Makefile bin/imsvq/Makefile bin/interpolate/Makefile bin/ivq/Makefile bin/lbg/Makefile bin/levdur/Makefile bin/linear_intpl/Makefile bin/lmadf/Makefile bin/lpc/Makefile bin/lpc2c/Makefile bin/lpc2lsp/Makefile bin/lpc2par/Makefile bin/lsp2lpc/Makefile bin/lsp2sp/Makefile bin/lspcheck/Makefile bin/lspdf/Makefile bin/ltcdf/Makefile bin/mc2b/Makefile bin/mcep/Makefile bin/merge/Makefile bin/mfcc/Makefile bin/mgc2mgc/Makefile bin/mgc2sp/Makefile bin/mgclsp2sp/Makefile bin/mgcep/Makefile bin/mglsadf/Makefile bin/minmax/Makefile bin/mlpg/Makefile bin/mlsacheck/Makefile bin/mlsadf/Makefile bin/msvq/Makefile bin/nan/Makefile bin/ndps2c/Makefile bin/norm0/Makefile bin/nrand/Makefile bin/par2lpc/Makefile bin/pca/Makefile bin/phase/Makefile bin/pitch/Makefile bin/poledf/Makefile bin/psgr/Makefile bin/ramp/Makefile bin/rawtowav/Makefile bin/reverse/Makefile bin/rmse/Makefile bin/root_pol/Makefile bin/sin/Makefile bin/smcep/Makefile bin/snr/Makefile bin/sopr/Makefile bin/spec/Makefile bin/step/Makefile bin/swab/Makefile bin/symmetrize/Makefile bin/train/Makefile bin/transpose/Makefile bin/uels/Makefile bin/ulaw/Makefile bin/us/Makefile bin/vc/Makefile bin/vopr/Makefile bin/vq/Makefile bin/vstat/Makefile bin/vsum/Makefile bin/wavjoin/Makefile bin/wavsplit/Makefile bin/window/Makefile bin/x2x/Makefile bin/xgr/Makefile bin/zcross/Makefile bin/zerodf/Makefile include/Makefile lib/Makefile script/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that # take arguments), then branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. ac_script=' :mline /\\$/{ N s,\\\n,, b mline } t clear :clear s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g t quote s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g t quote b any :quote s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g s/\[/\\&/g s/\]/\\&/g s/\$/$$/g H :any ${ g s/^\n// s/\n/ /g p } ' DEFS=`sed -n "$ac_script" confdefs.h` ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 $as_echo_n "checking that generated files are newer than configure... " >&6; } if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 $as_echo "done" >&6; } if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USEXGR_TRUE}" && test -z "${USEXGR_FALSE}"; then as_fn_error $? "conditional \"USEXGR\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USEXGR_TRUE}" && test -z "${USEXGR_FALSE}"; then as_fn_error $? "conditional \"USEXGR\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USEDA_TRUE}" && test -z "${USEDA_FALSE}"; then as_fn_error $? "conditional \"USEDA\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USEDA_TRUE}" && test -z "${USEDA_FALSE}"; then as_fn_error $? "conditional \"USEDA\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USEDA_TRUE}" && test -z "${USEDA_FALSE}"; then as_fn_error $? "conditional \"USEDA\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USEDA_TRUE}" && test -z "${USEDA_FALSE}"; then as_fn_error $? "conditional \"USEDA\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USEDA_TRUE}" && test -z "${USEDA_FALSE}"; then as_fn_error $? "conditional \"USEDA\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USEDA_TRUE}" && test -z "${USEDA_FALSE}"; then as_fn_error $? "conditional \"USEDA\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USEDA_TRUE}" && test -z "${USEDA_FALSE}"; then as_fn_error $? "conditional \"USEDA\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by SPTK $as_me 3.9, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE Configuration files: $config_files Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ SPTK config.status 3.9 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --he | --h | --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "bin/Makefile") CONFIG_FILES="$CONFIG_FILES bin/Makefile" ;; "bin/acep/Makefile") CONFIG_FILES="$CONFIG_FILES bin/acep/Makefile" ;; "bin/acorr/Makefile") CONFIG_FILES="$CONFIG_FILES bin/acorr/Makefile" ;; "bin/agcep/Makefile") CONFIG_FILES="$CONFIG_FILES bin/agcep/Makefile" ;; "bin/amcep/Makefile") CONFIG_FILES="$CONFIG_FILES bin/amcep/Makefile" ;; "bin/average/Makefile") CONFIG_FILES="$CONFIG_FILES bin/average/Makefile" ;; "bin/b2mc/Makefile") CONFIG_FILES="$CONFIG_FILES bin/b2mc/Makefile" ;; "bin/bcp/Makefile") CONFIG_FILES="$CONFIG_FILES bin/bcp/Makefile" ;; "bin/bcut/Makefile") CONFIG_FILES="$CONFIG_FILES bin/bcut/Makefile" ;; "bin/c2acr/Makefile") CONFIG_FILES="$CONFIG_FILES bin/c2acr/Makefile" ;; "bin/c2ir/Makefile") CONFIG_FILES="$CONFIG_FILES bin/c2ir/Makefile" ;; "bin/c2ndps/Makefile") CONFIG_FILES="$CONFIG_FILES bin/c2ndps/Makefile" ;; "bin/c2sp/Makefile") CONFIG_FILES="$CONFIG_FILES bin/c2sp/Makefile" ;; "bin/cat2/Makefile") CONFIG_FILES="$CONFIG_FILES bin/cat2/Makefile" ;; "bin/cdist/Makefile") CONFIG_FILES="$CONFIG_FILES bin/cdist/Makefile" ;; "bin/clip/Makefile") CONFIG_FILES="$CONFIG_FILES bin/clip/Makefile" ;; "bin/da/Makefile") CONFIG_FILES="$CONFIG_FILES bin/da/Makefile" ;; "bin/dct/Makefile") CONFIG_FILES="$CONFIG_FILES bin/dct/Makefile" ;; "bin/decimate/Makefile") CONFIG_FILES="$CONFIG_FILES bin/decimate/Makefile" ;; "bin/delay/Makefile") CONFIG_FILES="$CONFIG_FILES bin/delay/Makefile" ;; "bin/delta/Makefile") CONFIG_FILES="$CONFIG_FILES bin/delta/Makefile" ;; "bin/df2/Makefile") CONFIG_FILES="$CONFIG_FILES bin/df2/Makefile" ;; "bin/dfs/Makefile") CONFIG_FILES="$CONFIG_FILES bin/dfs/Makefile" ;; "bin/dmp/Makefile") CONFIG_FILES="$CONFIG_FILES bin/dmp/Makefile" ;; "bin/ds/Makefile") CONFIG_FILES="$CONFIG_FILES bin/ds/Makefile" ;; "bin/dtw/Makefile") CONFIG_FILES="$CONFIG_FILES bin/dtw/Makefile" ;; "bin/echo2/Makefile") CONFIG_FILES="$CONFIG_FILES bin/echo2/Makefile" ;; "bin/excite/Makefile") CONFIG_FILES="$CONFIG_FILES bin/excite/Makefile" ;; "bin/extract/Makefile") CONFIG_FILES="$CONFIG_FILES bin/extract/Makefile" ;; "bin/fd/Makefile") CONFIG_FILES="$CONFIG_FILES bin/fd/Makefile" ;; "bin/fft/Makefile") CONFIG_FILES="$CONFIG_FILES bin/fft/Makefile" ;; "bin/fft2/Makefile") CONFIG_FILES="$CONFIG_FILES bin/fft2/Makefile" ;; "bin/fftcep/Makefile") CONFIG_FILES="$CONFIG_FILES bin/fftcep/Makefile" ;; "bin/fftr/Makefile") CONFIG_FILES="$CONFIG_FILES bin/fftr/Makefile" ;; "bin/fftr2/Makefile") CONFIG_FILES="$CONFIG_FILES bin/fftr2/Makefile" ;; "bin/fig+fdrw/Makefile") CONFIG_FILES="$CONFIG_FILES bin/fig+fdrw/Makefile" ;; "bin/frame/Makefile") CONFIG_FILES="$CONFIG_FILES bin/frame/Makefile" ;; "bin/freqt/Makefile") CONFIG_FILES="$CONFIG_FILES bin/freqt/Makefile" ;; "bin/gc2gc/Makefile") CONFIG_FILES="$CONFIG_FILES bin/gc2gc/Makefile" ;; "bin/gcep/Makefile") CONFIG_FILES="$CONFIG_FILES bin/gcep/Makefile" ;; "bin/glsadf/Makefile") CONFIG_FILES="$CONFIG_FILES bin/glsadf/Makefile" ;; "bin/gmm/Makefile") CONFIG_FILES="$CONFIG_FILES bin/gmm/Makefile" ;; "bin/gnorm/Makefile") CONFIG_FILES="$CONFIG_FILES bin/gnorm/Makefile" ;; "bin/grpdelay/Makefile") CONFIG_FILES="$CONFIG_FILES bin/grpdelay/Makefile" ;; "bin/histogram/Makefile") CONFIG_FILES="$CONFIG_FILES bin/histogram/Makefile" ;; "bin/idct/Makefile") CONFIG_FILES="$CONFIG_FILES bin/idct/Makefile" ;; "bin/ifft/Makefile") CONFIG_FILES="$CONFIG_FILES bin/ifft/Makefile" ;; "bin/ifftr/Makefile") CONFIG_FILES="$CONFIG_FILES bin/ifftr/Makefile" ;; "bin/ifft2/Makefile") CONFIG_FILES="$CONFIG_FILES bin/ifft2/Makefile" ;; "bin/ignorm/Makefile") CONFIG_FILES="$CONFIG_FILES bin/ignorm/Makefile" ;; "bin/impulse/Makefile") CONFIG_FILES="$CONFIG_FILES bin/impulse/Makefile" ;; "bin/imsvq/Makefile") CONFIG_FILES="$CONFIG_FILES bin/imsvq/Makefile" ;; "bin/interpolate/Makefile") CONFIG_FILES="$CONFIG_FILES bin/interpolate/Makefile" ;; "bin/ivq/Makefile") CONFIG_FILES="$CONFIG_FILES bin/ivq/Makefile" ;; "bin/lbg/Makefile") CONFIG_FILES="$CONFIG_FILES bin/lbg/Makefile" ;; "bin/levdur/Makefile") CONFIG_FILES="$CONFIG_FILES bin/levdur/Makefile" ;; "bin/linear_intpl/Makefile") CONFIG_FILES="$CONFIG_FILES bin/linear_intpl/Makefile" ;; "bin/lmadf/Makefile") CONFIG_FILES="$CONFIG_FILES bin/lmadf/Makefile" ;; "bin/lpc/Makefile") CONFIG_FILES="$CONFIG_FILES bin/lpc/Makefile" ;; "bin/lpc2c/Makefile") CONFIG_FILES="$CONFIG_FILES bin/lpc2c/Makefile" ;; "bin/lpc2lsp/Makefile") CONFIG_FILES="$CONFIG_FILES bin/lpc2lsp/Makefile" ;; "bin/lpc2par/Makefile") CONFIG_FILES="$CONFIG_FILES bin/lpc2par/Makefile" ;; "bin/lsp2lpc/Makefile") CONFIG_FILES="$CONFIG_FILES bin/lsp2lpc/Makefile" ;; "bin/lsp2sp/Makefile") CONFIG_FILES="$CONFIG_FILES bin/lsp2sp/Makefile" ;; "bin/lspcheck/Makefile") CONFIG_FILES="$CONFIG_FILES bin/lspcheck/Makefile" ;; "bin/lspdf/Makefile") CONFIG_FILES="$CONFIG_FILES bin/lspdf/Makefile" ;; "bin/ltcdf/Makefile") CONFIG_FILES="$CONFIG_FILES bin/ltcdf/Makefile" ;; "bin/mc2b/Makefile") CONFIG_FILES="$CONFIG_FILES bin/mc2b/Makefile" ;; "bin/mcep/Makefile") CONFIG_FILES="$CONFIG_FILES bin/mcep/Makefile" ;; "bin/merge/Makefile") CONFIG_FILES="$CONFIG_FILES bin/merge/Makefile" ;; "bin/mfcc/Makefile") CONFIG_FILES="$CONFIG_FILES bin/mfcc/Makefile" ;; "bin/mgc2mgc/Makefile") CONFIG_FILES="$CONFIG_FILES bin/mgc2mgc/Makefile" ;; "bin/mgc2sp/Makefile") CONFIG_FILES="$CONFIG_FILES bin/mgc2sp/Makefile" ;; "bin/mgclsp2sp/Makefile") CONFIG_FILES="$CONFIG_FILES bin/mgclsp2sp/Makefile" ;; "bin/mgcep/Makefile") CONFIG_FILES="$CONFIG_FILES bin/mgcep/Makefile" ;; "bin/mglsadf/Makefile") CONFIG_FILES="$CONFIG_FILES bin/mglsadf/Makefile" ;; "bin/minmax/Makefile") CONFIG_FILES="$CONFIG_FILES bin/minmax/Makefile" ;; "bin/mlpg/Makefile") CONFIG_FILES="$CONFIG_FILES bin/mlpg/Makefile" ;; "bin/mlsacheck/Makefile") CONFIG_FILES="$CONFIG_FILES bin/mlsacheck/Makefile" ;; "bin/mlsadf/Makefile") CONFIG_FILES="$CONFIG_FILES bin/mlsadf/Makefile" ;; "bin/msvq/Makefile") CONFIG_FILES="$CONFIG_FILES bin/msvq/Makefile" ;; "bin/nan/Makefile") CONFIG_FILES="$CONFIG_FILES bin/nan/Makefile" ;; "bin/ndps2c/Makefile") CONFIG_FILES="$CONFIG_FILES bin/ndps2c/Makefile" ;; "bin/norm0/Makefile") CONFIG_FILES="$CONFIG_FILES bin/norm0/Makefile" ;; "bin/nrand/Makefile") CONFIG_FILES="$CONFIG_FILES bin/nrand/Makefile" ;; "bin/par2lpc/Makefile") CONFIG_FILES="$CONFIG_FILES bin/par2lpc/Makefile" ;; "bin/pca/Makefile") CONFIG_FILES="$CONFIG_FILES bin/pca/Makefile" ;; "bin/phase/Makefile") CONFIG_FILES="$CONFIG_FILES bin/phase/Makefile" ;; "bin/pitch/Makefile") CONFIG_FILES="$CONFIG_FILES bin/pitch/Makefile" ;; "bin/poledf/Makefile") CONFIG_FILES="$CONFIG_FILES bin/poledf/Makefile" ;; "bin/psgr/Makefile") CONFIG_FILES="$CONFIG_FILES bin/psgr/Makefile" ;; "bin/ramp/Makefile") CONFIG_FILES="$CONFIG_FILES bin/ramp/Makefile" ;; "bin/rawtowav/Makefile") CONFIG_FILES="$CONFIG_FILES bin/rawtowav/Makefile" ;; "bin/reverse/Makefile") CONFIG_FILES="$CONFIG_FILES bin/reverse/Makefile" ;; "bin/rmse/Makefile") CONFIG_FILES="$CONFIG_FILES bin/rmse/Makefile" ;; "bin/root_pol/Makefile") CONFIG_FILES="$CONFIG_FILES bin/root_pol/Makefile" ;; "bin/sin/Makefile") CONFIG_FILES="$CONFIG_FILES bin/sin/Makefile" ;; "bin/smcep/Makefile") CONFIG_FILES="$CONFIG_FILES bin/smcep/Makefile" ;; "bin/snr/Makefile") CONFIG_FILES="$CONFIG_FILES bin/snr/Makefile" ;; "bin/sopr/Makefile") CONFIG_FILES="$CONFIG_FILES bin/sopr/Makefile" ;; "bin/spec/Makefile") CONFIG_FILES="$CONFIG_FILES bin/spec/Makefile" ;; "bin/step/Makefile") CONFIG_FILES="$CONFIG_FILES bin/step/Makefile" ;; "bin/swab/Makefile") CONFIG_FILES="$CONFIG_FILES bin/swab/Makefile" ;; "bin/symmetrize/Makefile") CONFIG_FILES="$CONFIG_FILES bin/symmetrize/Makefile" ;; "bin/train/Makefile") CONFIG_FILES="$CONFIG_FILES bin/train/Makefile" ;; "bin/transpose/Makefile") CONFIG_FILES="$CONFIG_FILES bin/transpose/Makefile" ;; "bin/uels/Makefile") CONFIG_FILES="$CONFIG_FILES bin/uels/Makefile" ;; "bin/ulaw/Makefile") CONFIG_FILES="$CONFIG_FILES bin/ulaw/Makefile" ;; "bin/us/Makefile") CONFIG_FILES="$CONFIG_FILES bin/us/Makefile" ;; "bin/vc/Makefile") CONFIG_FILES="$CONFIG_FILES bin/vc/Makefile" ;; "bin/vopr/Makefile") CONFIG_FILES="$CONFIG_FILES bin/vopr/Makefile" ;; "bin/vq/Makefile") CONFIG_FILES="$CONFIG_FILES bin/vq/Makefile" ;; "bin/vstat/Makefile") CONFIG_FILES="$CONFIG_FILES bin/vstat/Makefile" ;; "bin/vsum/Makefile") CONFIG_FILES="$CONFIG_FILES bin/vsum/Makefile" ;; "bin/wavjoin/Makefile") CONFIG_FILES="$CONFIG_FILES bin/wavjoin/Makefile" ;; "bin/wavsplit/Makefile") CONFIG_FILES="$CONFIG_FILES bin/wavsplit/Makefile" ;; "bin/window/Makefile") CONFIG_FILES="$CONFIG_FILES bin/window/Makefile" ;; "bin/x2x/Makefile") CONFIG_FILES="$CONFIG_FILES bin/x2x/Makefile" ;; "bin/xgr/Makefile") CONFIG_FILES="$CONFIG_FILES bin/xgr/Makefile" ;; "bin/zcross/Makefile") CONFIG_FILES="$CONFIG_FILES bin/zcross/Makefile" ;; "bin/zerodf/Makefile") CONFIG_FILES="$CONFIG_FILES bin/zerodf/Makefile" ;; "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;; "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;; "script/Makefile") CONFIG_FILES="$CONFIG_FILES script/Makefile" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" eval set X " :F $CONFIG_FILES :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi SPTK-3.9/configure.ac0000644001051300105040000002006612635677623011374 00000000000000# -*- Autoconf -*- # Process this file with autoconf to produce a configure script. AC_PREREQ(2.59) AC_INIT(SPTK, 3.9, http://sourceforge.net/projects/sp-tk/, SPTK) AC_CONFIG_AUX_DIR([config]) AC_COPYRIGHT(Copyright 1984-2007 Tokyo Institute of Technology) AC_COPYRIGHT(Copyright 1996-2015 Nagoya Institute of Technology) AM_INIT_AUTOMAKE([nostdinc subdir-objects]) AC_SUBST(PACKAGE_NAME) AC_SUBST(PACKAGE_VERSION) # Checks for programs. AC_PROG_CC AM_PROG_CC_C_O AC_PROG_INSTALL AC_PROG_LN_S AC_PROG_RANLIB AN_MAKEVAR([AR], [AC_PROG_AR]) AN_PROGRAM([ar], [AC_PROG_AR]) AC_DEFUN([AC_PROG_AR], [AC_CHECK_TOOL(AR, ar, :)]) AC_PROG_AR AC_PATH_PROG(CSH, csh, no) if test "$CSH" = "no"; then AC_MSG_ERROR("Cannot find csh") fi # Checks for libraries. AC_CHECK_LIB([m],[log],,AC_MSG_ERROR(Cannot find libm)) # Checks for X Window Systems AC_PATH_X AC_PATH_XTRA if test x$no_x = "x"; then AM_CONDITIONAL( USEXGR, true) else AM_CONDITIONAL( USEXGR, false) fi # Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS([fcntl.h limits.h stdlib.h string.h strings.h sys/ioctl.h]) # Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_TYPE_SIZE_T # use host info AC_CANONICAL_HOST # Checks for library functions. AC_PROG_GCC_TRADITIONAL AC_FUNC_MALLOC AC_FUNC_STRTOD AC_CHECK_FUNC(pow,,AC_MSG_ERROR("Cannot find pow()")) AC_CHECK_FUNC(sqrt,,AC_MSG_ERROR("Cannot find sqrt()")) find_memset=no find_strrchr=no AC_CHECK_FUNCS([bzero memset],find_memset="yes",) AC_CHECK_FUNCS([strrchr rindex],find_strrchr="yes",) if test "$find_memset" != "yes"; then AC_MSG_ERROR("Cannot find memset() or bzero()") fi if test "$find_strrchr" != "yes"; then AC_MSG_ERROR("Cannot find strrchr() or rindex()") fi # Checks for double use_double=no IO_SYMBOL='f' IO_FORMAT='float' AC_ARG_ENABLE(double, [ --enable-double deal with data in double (default=no)], [ if test "$enable_double" = "yes"; then use_double=yes IO_SYMBOL='d' IO_FORMAT='double' AC_DEFINE(DOUBLE) fi]) AC_SUBST(IO_SYMBOL) AC_SUBST(IO_FORMAT) if test "$use_double" = "yes"; then AC_DEFINE(FORMAT,"double") else AC_DEFINE(FORMAT,"float") fi # Checks for da command use_da=yes AC_ARG_ENABLE(da, [ --enable-da use audio output (default=yes)], [ if test "$enable_da" = "no"; then use_da=no fi]) # Checks for audio device if test "$use_da" = "yes"; then AC_MSG_CHECKING(audio device) case $host in *-sunos*) AC_MSG_RESULT([sunos]) AC_CHECK_HEADER([sys/audioio.h], [AC_DEFINE(SOLARIS)], [AC_MSG_ERROR([sys/audioio.h is not found])]) AM_CONDITIONAL( USEDA, true) ;; *-solaris*) AC_MSG_RESULT([solaris]) AC_CHECK_HEADER([sys/audioio.h], [AC_DEFINE(SOLARIS)], [AC_MSG_ERROR([sys/audioio.h is not found])]) AM_CONDITIONAL( USEDA, true) ;; *-linux*) AC_MSG_RESULT([linux]) AC_CHECK_HEADER([sys/soundcard.h], [AC_DEFINE(LINUX)], [AC_MSG_ERROR([sys/soundcard.h is not found])]) AM_CONDITIONAL( USEDA, true) ;; *-freebsd*) AC_MSG_RESULT([freebsd]) AC_CHECK_HEADER([sys/soundcard.h], [AC_DEFINE(FreeBSD)], [AC_MSG_ERROR([sys/soundcard.h is not found])]) AM_CONDITIONAL( USEDA, true) ;; *win32* | *wince* | *cygwin* | *mingw* ) AC_MSG_RESULT([windows]) AC_CHECK_HEADER([windows.h], [AC_DEFINE(WIN32)], [AC_MSG_ERROR([windows.h is not found])]) AM_CONDITIONAL( USEDA, true) AC_HAVE_LIBRARY([winmm],,AC_MSG_ERROR(No winmm)) ;; *) AC_MSG_WARN([not found]) AM_CONDITIONAL( USEDA, false) ;; esac else AM_CONDITIONAL( USEDA, false) fi # check solaris & gcc case $host in *-solaris*) if test "$GCC" = "yes"; then CFLAGS="-std=c99 $CFLAGS" fi ;; esac AC_CONFIG_FILES([Makefile bin/Makefile bin/acep/Makefile bin/acorr/Makefile bin/agcep/Makefile bin/amcep/Makefile bin/average/Makefile bin/b2mc/Makefile bin/bcp/Makefile bin/bcut/Makefile bin/c2acr/Makefile bin/c2ir/Makefile bin/c2ndps/Makefile bin/c2sp/Makefile bin/cat2/Makefile bin/cdist/Makefile bin/clip/Makefile bin/da/Makefile bin/dct/Makefile bin/decimate/Makefile bin/delay/Makefile bin/delta/Makefile bin/df2/Makefile bin/dfs/Makefile bin/dmp/Makefile bin/ds/Makefile bin/dtw/Makefile bin/echo2/Makefile bin/excite/Makefile bin/extract/Makefile bin/fd/Makefile bin/fft/Makefile bin/fft2/Makefile bin/fftcep/Makefile bin/fftr/Makefile bin/fftr2/Makefile bin/fig+fdrw/Makefile bin/frame/Makefile bin/freqt/Makefile bin/gc2gc/Makefile bin/gcep/Makefile bin/glsadf/Makefile bin/gmm/Makefile bin/gnorm/Makefile bin/grpdelay/Makefile bin/histogram/Makefile bin/idct/Makefile bin/ifft/Makefile bin/ifftr/Makefile bin/ifft2/Makefile bin/ignorm/Makefile bin/impulse/Makefile bin/imsvq/Makefile bin/interpolate/Makefile bin/ivq/Makefile bin/lbg/Makefile bin/levdur/Makefile bin/linear_intpl/Makefile bin/lmadf/Makefile bin/lpc/Makefile bin/lpc2c/Makefile bin/lpc2lsp/Makefile bin/lpc2par/Makefile bin/lsp2lpc/Makefile bin/lsp2sp/Makefile bin/lspcheck/Makefile bin/lspdf/Makefile bin/ltcdf/Makefile bin/mc2b/Makefile bin/mcep/Makefile bin/merge/Makefile bin/mfcc/Makefile bin/mgc2mgc/Makefile bin/mgc2sp/Makefile bin/mgclsp2sp/Makefile bin/mgcep/Makefile bin/mglsadf/Makefile bin/minmax/Makefile bin/mlpg/Makefile bin/mlsacheck/Makefile bin/mlsadf/Makefile bin/msvq/Makefile bin/nan/Makefile bin/ndps2c/Makefile bin/norm0/Makefile bin/nrand/Makefile bin/par2lpc/Makefile bin/pca/Makefile bin/phase/Makefile bin/pitch/Makefile bin/poledf/Makefile bin/psgr/Makefile bin/ramp/Makefile bin/rawtowav/Makefile bin/reverse/Makefile bin/rmse/Makefile bin/root_pol/Makefile bin/sin/Makefile bin/smcep/Makefile bin/snr/Makefile bin/sopr/Makefile bin/spec/Makefile bin/step/Makefile bin/swab/Makefile bin/symmetrize/Makefile bin/train/Makefile bin/transpose/Makefile bin/uels/Makefile bin/ulaw/Makefile bin/us/Makefile bin/vc/Makefile bin/vopr/Makefile bin/vq/Makefile bin/vstat/Makefile bin/vsum/Makefile bin/wavjoin/Makefile bin/wavsplit/Makefile bin/window/Makefile bin/x2x/Makefile bin/xgr/Makefile bin/zcross/Makefile bin/zerodf/Makefile include/Makefile lib/Makefile script/Makefile]) AC_OUTPUT SPTK-3.9/aclocal.m40000644001051300105040000012223512635677776010760 00000000000000# generated automatically by aclocal 1.15 -*- Autoconf -*- # Copyright (C) 1996-2014 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, [m4_warning([this file was generated for autoconf 2.69. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) # Copyright (C) 2002-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.15' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.15], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.15])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to # '$srcdir', '$srcdir/..', or '$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is '.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ([2.52])dnl m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], [$1], [CXX], [depcc="$CXX" am_compiler_list=], [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], [$1], [UPC], [depcc="$UPC" am_compiler_list=], [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES. AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE([dependency-tracking], [dnl AS_HELP_STRING( [--enable-dependency-tracking], [do not reject slow dependency extractors]) AS_HELP_STRING( [--disable-dependency-tracking], [speeds up one-time build])]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl AC_SUBST([am__nodep])dnl _AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each '.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC]) [_AM_PROG_CC_C_O ]) # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.65])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [AC_DIAGNOSE([obsolete], [$0: two- and three-arguments forms are deprecated.]) m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if( m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), [ok:ok],, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) AM_MISSING_PROG([AUTOCONF], [autoconf]) AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) AM_MISSING_PROG([AUTOHEADER], [autoheader]) AM_MISSING_PROG([MAKEINFO], [makeinfo]) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES([CC])], [m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES([CXX])], [m4_define([AC_PROG_CXX], m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES([OBJC])], [m4_define([AC_PROG_OBJC], m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], [_AM_DEPENDENCIES([OBJCXX])], [m4_define([AC_PROG_OBJCXX], m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) AC_REQUIRE([AM_SILENT_RULES])dnl dnl The testsuite driver may need to know about EXEEXT, so add the dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) fi fi dnl The trailing newline in this macro's definition is deliberate, for dnl backward compatibility and to allow trailing 'dnl'-style comments dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. ]) dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST([install_sh])]) # Copyright (C) 2003-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it is modern enough. # If it is, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= AC_MSG_WARN(['missing' script is too old or missing]) fi ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), [1])]) # _AM_SET_OPTIONS(OPTIONS) # ------------------------ # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Copyright (C) 1999-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_CC_C_O # --------------- # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC # to automatically call this. AC_DEFUN([_AM_PROG_CC_C_O], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([compile])dnl AC_LANG_PUSH([C])dnl AC_CACHE_CHECK( [whether $CC understands -c and -o together], [am_cv_prog_cc_c_o], [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i]) if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi AC_LANG_POP([C])]) # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_RUN_LOG(COMMAND) # ------------------- # Run COMMAND, save the exit status in ac_status, and log it. # (This has been adapted from Autoconf's _AC_RUN_LOG macro.) AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD (exit $ac_status); }]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi if test "$[2]" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT([yes]) # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi AC_CONFIG_COMMANDS_PRE( [AC_MSG_CHECKING([that generated files are newer than configure]) if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi AC_MSG_RESULT([done])]) rm -f conftest.file ]) # Copyright (C) 2009-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_SILENT_RULES([DEFAULT]) # -------------------------- # Enable less verbose build rules; with the default set to DEFAULT # ("yes" being less verbose, "no" or empty being verbose). AC_DEFUN([AM_SILENT_RULES], [AC_ARG_ENABLE([silent-rules], [dnl AS_HELP_STRING( [--enable-silent-rules], [less verbose build output (undo: "make V=1")]) AS_HELP_STRING( [--disable-silent-rules], [verbose build output (undo: "make V=0")])dnl ]) case $enable_silent_rules in @%:@ ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; esac dnl dnl A few 'make' implementations (e.g., NonStop OS and NextStep) dnl do not support nested variable expansions. dnl See automake bug#9928 and bug#10237. am_make=${MAKE-make} AC_CACHE_CHECK([whether $am_make supports nested variables], [am_cv_make_support_nested_variables], [if AS_ECHO([['TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi]) if test $am_cv_make_support_nested_variables = yes; then dnl Using '$V' instead of '$(V)' breaks IRIX make. AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AC_SUBST([AM_V])dnl AM_SUBST_NOTMAKE([AM_V])dnl AC_SUBST([AM_DEFAULT_V])dnl AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor 'install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in "make install-strip", and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # -------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of 'v7', 'ustar', or 'pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar # AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' m4_if([$1], [v7], [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar], [# The POSIX 1988 'ustar' format is defined with fixed-size fields. # There is notably a 21 bits limit for the UID and the GID. In fact, # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 # and bug#13588). am_max_uid=2097151 # 2^21 - 1 am_max_gid=$am_max_uid # The $UID and $GID variables are not portable, so we need to resort # to the POSIX-mandated id(1) utility. Errors in the 'id' calls # below are definitely unexpected, so allow the users to see them # (that is, avoid stderr redirection). am_uid=`id -u || echo unknown` am_gid=`id -g || echo unknown` AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) if test $am_uid -le $am_max_uid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) if test $am_gid -le $am_max_gid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi], [pax], [], [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Go ahead even if we have the value already cached. We do so because we # need to set the values for the 'am__tar' and 'am__untar' variables. _am_tools=${am_cv_prog_tar_$1-$_am_tools} for _am_tool in $_am_tools; do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works. rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR SPTK-3.9/Makefile.in0000644001051300105040000006561012637167405011151 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ $(am__configure_deps) $(include_HEADERS) $(am__DIST_COMMON) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(includedir)" HEADERS = $(include_HEADERS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ cscope distdir dist dist-all distcheck am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags CSCOPE = cscope DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/compile \ $(top_srcdir)/config/config.guess \ $(top_srcdir)/config/config.sub \ $(top_srcdir)/config/install-sh $(top_srcdir)/config/missing \ AUTHORS COPYING ChangeLog INSTALL NEWS README config/compile \ config/config.guess config/config.sub config/depcomp \ config/install-sh config/missing DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ if test -d "$(distdir)"; then \ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi am__post_remove_distdir = $(am__remove_distdir) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best DIST_TARGETS = dist-gzip distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = include lib bin script # Header files to be included in the distribution. include_HEADERS = include/SPTK.h # Additional files to be included in the distribution. EXTRA_DIST = AUTHORS COPYING ChangeLog INSTALL NEWS README Makefile.mak \ bin/Makefile.mak include/Makefile.mak lib/Makefile.mak # Files to remove by 'make distclean' DISTCLEANFILES = *.log *.out *~ bin/*~ bin/*/*~ config/*~ include/*~ lib/*~ scripts/*~ # Autotools-generated files to remove by 'make maintainer-clean'. MAINTAINERCLEANFILES = aclocal.m4 configure Makefile.in \ config/config.guess config/config.sub \ config/depcomp config/install-sh \ config/missing all: all-recursive .SUFFIXES: am--refresh: Makefile @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): install-includeHEADERS: $(include_HEADERS) @$(NORMAL_INSTALL) @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ done uninstall-includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscope: cscope.files test ! -s cscope.files \ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) clean-cscope: -rm -f cscope.files cscope.files: clean-cscope cscopelist cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files distdir: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__post_remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__post_remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__post_remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) dist-tarZ: distdir @echo WARNING: "Support for distribution archives compressed with" \ "legacy program 'compress' is deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir @echo WARNING: "Support for shar distribution archives is" \ "deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__post_remove_distdir) dist dist-all: $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' $(am__post_remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build/sub \ && ../../configure \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ --srcdir=../.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__post_remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @test -n '$(distuninstallcheck_dir)' || { \ echo 'ERROR: trying to run $@ with an empty' \ '$$(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ $(am__cd) '$(distuninstallcheck_dir)' || { \ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile $(HEADERS) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(includedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-recursive clean-am: clean-generic mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-includeHEADERS install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-includeHEADERS .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ am--refresh check check-am clean clean-cscope clean-generic \ cscope cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \ dist-gzip dist-lzip dist-shar dist-tarZ dist-xz dist-zip \ distcheck distclean distclean-generic distclean-tags \ distcleancheck distdir distuninstallcheck dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am \ install-includeHEADERS install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-includeHEADERS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/AUTHORS0000644001051300105040000000152712442245162010140 00000000000000The Speech Signal Processing Toolkit (SPTK) is a software for speech signal processing tools for UNIX environments. This software is released under the Modified BSD license. See the COPYING file in the same directory as this file for the license. The SPTK has been developed by several members of SPTK Working Group and some guraduate students in Nagoya Institute of Technology: Keiichi Tokuda http://www.sp.nitech.ac.jp/~tokuda/ (Produce and Design) Keiichiro Oura http://www.sp.nitech.ac.jp/~uratec/ (Main Maintainer) Akira Tamamori http://www.sp.nitech.ac.jp/~mataki/ Shinji Sako http://www.mmsp.nitech.ac.jp/~sako/ Heiga Zen Takashi Nose Toru Takahashi http://winnie.kuis.kyoto-u.ac.jp/~tall/ Junichi Yamagishi http://homepages.inf.ed.ac.uk/jyamagis/ Yoshihiko Nankaku http://www.sp.nitech.ac.jp/~nankaku/ SPTK-3.9/COPYING0000644001051300105040000000603012635677651010135 00000000000000/* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ SPTK-3.9/ChangeLog0000644001051300105040000073371712446675250010670 000000000000002014-12-25 11:41 uratec * bin/: lsp2lpc/lsp2lpc.c, lspcheck/lspcheck.c: fix code format. 2014-12-11 18:51 uratec * NEWS, configure.ac: update NEWS 2014-12-11 17:30 uratec * COPYING, README, configure.ac, bin/acep/_acep.c, bin/acep/acep.c, bin/acorr/_acorr.c, bin/acorr/acorr.c, bin/agcep/_agcep.c, bin/agcep/agcep.c, bin/amcep/_amcep.c, bin/amcep/amcep.c, bin/average/_average.c, bin/average/average.c, bin/b2mc/_b2mc.c, bin/b2mc/b2mc.c, bin/bcp/bcp.c, bin/bcut/bcut.c, bin/c2acr/_c2acr.c, bin/c2acr/c2acr.c, bin/c2ir/_c2ir.c, bin/c2ir/c2ir.c, bin/c2sp/_c2sp.c, bin/c2sp/c2sp.c, bin/cat2/cat2.c, bin/cdist/cdist.c, bin/clip/_clip.c, bin/clip/clip.c, bin/da/da.h, bin/da/da.in, bin/da/dawrite.c, bin/da/winplay.c, bin/da/winplay.h, bin/dct/_dct.c, bin/dct/dct.c, bin/decimate/decimate.c, bin/delay/delay.c, bin/delta/delta.c, bin/df2/_df2.c, bin/df2/df2.c, bin/dfs/_dfs.c, bin/dfs/dfs.c, bin/dmp/dmp.c, bin/ds/ds.c, bin/dtw/dtw.c, bin/echo2/echo2.c, bin/excite/excite.c, bin/extract/extract.c, bin/fd/fd.c, bin/fft/_fft.c, bin/fft/fft.c, bin/fft2/_fft2.c, bin/fft2/fft2.c, bin/fftcep/_fftcep.c, bin/fftcep/fftcep.c, bin/fftr/_fftr.c, bin/fftr/fftr.c, bin/fftr2/_fftr2.c, bin/fftr2/fftr2.c, bin/fig+fdrw/fdrw.c, bin/fig+fdrw/fig.c, bin/fig+fdrw/fig.h, bin/fig+fdrw/fig0.c, bin/fig+fdrw/fig1.c, bin/fig+fdrw/plot.c, bin/fig+fdrw/plot.h, bin/fig+fdrw/plsub.c, bin/frame/frame.c, bin/freqt/_freqt.c, bin/freqt/freqt.c, bin/gc2gc/_gc2gc.c, bin/gc2gc/gc2gc.c, bin/gcep/_gcep.c, bin/gcep/gcep.c, bin/glsadf/_glsadf.c, bin/glsadf/glsadf.c, bin/gmm/_gmm.c, bin/gmm/gmm.c, bin/gmm/gmmp.c, bin/gnorm/_gnorm.c, bin/gnorm/gnorm.c, bin/grpdelay/_grpdelay.c, bin/grpdelay/grpdelay.c, bin/histogram/_histogram.c, bin/histogram/histogram.c, bin/idct/idct.c, bin/ifft/_ifft.c, bin/ifft/ifft.c, bin/ifft2/_ifft2.c, bin/ifft2/ifft2.c, bin/ifftr/_ifftr.c, bin/ifftr/ifftr.c, bin/ignorm/_ignorm.c, bin/ignorm/ignorm.c, bin/impulse/impulse.c, bin/imsvq/_imsvq.c, bin/imsvq/imsvq.c, bin/interpolate/interpolate.c, bin/ivq/_ivq.c, bin/ivq/ivq.c, bin/lbg/_lbg.c, bin/lbg/lbg.c, bin/levdur/_levdur.c, bin/levdur/levdur.c, bin/linear_intpl/linear_intpl.c, bin/lmadf/_lmadf.c, bin/lmadf/lmadf.c, bin/lpc/_lpc.c, bin/lpc/lpc.c, bin/lpc2c/_lpc2c.c, bin/lpc2c/lpc2c.c, bin/lpc2lsp/_lpc2lsp.c, bin/lpc2lsp/lpc2lsp.c, bin/lpc2par/_lpc2par.c, bin/lpc2par/lpc2par.c, bin/lsp2lpc/_lsp2lpc.c, bin/lsp2lpc/lsp2lpc.c, bin/lsp2sp/_lsp2sp.c, bin/lsp2sp/lsp2sp.c, bin/lspcheck/_lspcheck.c, bin/lspcheck/lspcheck.c, bin/lspdf/_lspdf.c, bin/lspdf/lspdf.c, bin/ltcdf/_ltcdf.c, bin/ltcdf/ltcdf.c, bin/mc2b/_mc2b.c, bin/mc2b/mc2b.c, bin/mcep/_mcep.c, bin/mcep/mcep.c, bin/merge/merge.c, bin/mfcc/_mfcc.c, bin/mfcc/mfcc.c, bin/mgc2mgc/_mgc2mgc.c, bin/mgc2mgc/mgc2mgc.c, bin/mgc2sp/_mgc2sp.c, bin/mgc2sp/mgc2sp.c, bin/mgcep/_mgcep.c, bin/mgcep/mgcep.c, bin/mglsadf/_mglsadf.c, bin/mglsadf/mglsadf.c, bin/minmax/minmax.c, bin/mlpg/_mlpg.c, bin/mlpg/mlpg.c, bin/mlsacheck/mlsacheck.c, bin/mlsadf/_mlsadf.c, bin/mlsadf/mlsadf.c, bin/msvq/_msvq.c, bin/msvq/msvq.c, bin/nan/nan.c, bin/norm0/_norm0.c, bin/norm0/norm0.c, bin/nrand/_nrand.c, bin/nrand/nrand.c, bin/par2lpc/_par2lpc.c, bin/par2lpc/par2lpc.c, bin/pca/pca.c, bin/pca/pcas.c, bin/phase/_phase.c, bin/phase/phase.c, bin/pitch/pitch.c, bin/pitch/snack/COPYING, bin/pitch/snack/jkGetF0.c, bin/pitch/snack/jkGetF0.h, bin/pitch/snack/sigproc.c, bin/poledf/_poledf.c, bin/poledf/poledf.c, bin/psgr/dict.c, bin/psgr/eps.c, bin/psgr/plot.c, bin/psgr/psgr.c, bin/psgr/psgr.h, bin/ramp/ramp.c, bin/rawtowav/rawtowav.c, bin/reverse/_reverse.c, bin/reverse/reverse.c, bin/rmse/_rmse.c, bin/rmse/rmse.c, bin/root_pol/_root_pol.c, bin/root_pol/root_pol.c, bin/sin/sin.c, bin/smcep/_smcep.c, bin/smcep/smcep.c, bin/snr/snr.c, bin/sopr/sopr.c, bin/spec/spec.c, bin/step/step.c, bin/swab/swab.c, bin/symmetrize/symmetrize.c, bin/train/train.c, bin/transpose/_transpose.c, bin/transpose/transpose.c, bin/uels/_uels.c, bin/uels/uels.c, bin/ulaw/_ulaw.c, bin/ulaw/ulaw.c, bin/us/us.c, bin/us/us16.in, bin/us/uscd.in, bin/vc/_vc.c, bin/vc/vc.c, bin/vopr/vopr.c, bin/vq/_vq.c, bin/vq/vq.c, bin/vstat/vstat.c, bin/vsum/vsum.c, bin/wavjoin/_wavjoin.c, bin/wavjoin/wavjoin.c, bin/wavsplit/_wavsplit.c, bin/wavsplit/wavsplit.c, bin/window/_window.c, bin/window/window.c, bin/x2x/x2x.c, bin/xgr/config.h, bin/xgr/gcdata.h, bin/xgr/plot.c, bin/xgr/window.c, bin/xgr/xgr.c, bin/xgr/xgr.h, bin/zcross/_zcross.c, bin/zcross/zcross.c, bin/zerodf/_zerodf.c, bin/zerodf/zerodf.c, include/SPTK.h, lib/agexp.c, lib/cholesky.c, lib/fileio.c, lib/fillz.c, lib/getfp.c, lib/getmem.c, lib/gexp.c, lib/glog.c, lib/invert.c, lib/matrix.c, lib/movem.c, lib/mseq.c, lib/theq.c, lib/toeplitz.c, script/bell.in, script/glogsp.in, script/grlogsp.in, script/gseries.in, script/gwave.in, script/mgc2mgclsp.in, script/mgclsp2mgc.in, script/raw2wav.in, script/wav2raw.in: update copyright 2014-12-11 17:27 uratec * bin/vc/hts_engine_API/: COPYING, HTS_engine.h, HTS_hidden.h, HTS_misc.c, HTS_pstream.c, HTS_sstream.c: udpate hts_engine API to latest version 2014-12-11 16:33 uratec * bin/lsp2lpc/lsp2lpc.c, bin/lsp2sp/lsp2sp.c, bin/lspcheck/lspcheck.c, bin/mgclsp2sp/mgclsp2sp.c, include/SPTK.h: fix code format 2014-12-11 11:20 artk0816 * bin/: vc/vc.c, gmm/gmmp.c: separation of invert and gconst calculations from load_GMM() 2014-12-11 11:14 artk0816 * bin/gmm/_gmm.c, bin/gmm/gmm.c, include/SPTK.h: addition of map estimation for gmm 2014-12-04 21:13 uratec * bin/pitch/swipe/: COPYING, swipe.c, vector.c, vector.h: update swipe to version 1.5 2014-12-04 21:09 uratec * bin/mlsacheck/mlsacheck.c: remove compiler warning message in mlsacheck. 2014-12-04 10:46 uratec * Makefile.am, configure.ac, bin/Makefile.am, bin/acep/Makefile.am, bin/acorr/Makefile.am, bin/agcep/Makefile.am, bin/amcep/Makefile.am, bin/average/Makefile.am, bin/b2mc/Makefile.am, bin/bcp/Makefile.am, bin/bcut/Makefile.am, bin/c2acr/Makefile.am, bin/c2ir/Makefile.am, bin/c2ndps/Makefile.am, bin/c2sp/Makefile.am, bin/cat2/Makefile.am, bin/cdist/Makefile.am, bin/clip/Makefile.am, bin/da/Makefile.am, bin/dct/Makefile.am, bin/decimate/Makefile.am, bin/delay/Makefile.am, bin/delta/Makefile.am, bin/df2/Makefile.am, bin/dfs/Makefile.am, bin/dmp/Makefile.am, bin/ds/Makefile.am, bin/dtw/Makefile.am, bin/echo2/Makefile.am, bin/excite/Makefile.am, bin/extract/Makefile.am, bin/fd/Makefile.am, bin/fft/Makefile.am, bin/fft2/Makefile.am, bin/fftcep/Makefile.am, bin/fftr/Makefile.am, bin/fftr2/Makefile.am, bin/fig+fdrw/Makefile.am, bin/frame/Makefile.am, bin/freqt/Makefile.am, bin/gc2gc/Makefile.am, bin/gcep/Makefile.am, bin/glsadf/Makefile.am, bin/gmm/Makefile.am, bin/gnorm/Makefile.am, bin/grpdelay/Makefile.am, bin/histogram/Makefile.am, bin/idct/Makefile.am, bin/ifft/Makefile.am, bin/ifft2/Makefile.am, bin/ifftr/Makefile.am, bin/ignorm/Makefile.am, bin/impulse/Makefile.am, bin/imsvq/Makefile.am, bin/interpolate/Makefile.am, bin/ivq/Makefile.am, bin/lbg/Makefile.am, bin/levdur/Makefile.am, bin/linear_intpl/Makefile.am, bin/lmadf/Makefile.am, bin/lpc/Makefile.am, bin/lpc2c/Makefile.am, bin/lpc2lsp/Makefile.am, bin/lpc2par/Makefile.am, bin/lsp2lpc/Makefile.am, bin/lsp2sp/Makefile.am, bin/lspcheck/Makefile.am, bin/lspdf/Makefile.am, bin/ltcdf/Makefile.am, bin/mc2b/Makefile.am, bin/mcep/Makefile.am, bin/merge/Makefile.am, bin/mfcc/Makefile.am, bin/mgc2mgc/Makefile.am, bin/mgc2sp/Makefile.am, bin/mgcep/Makefile.am, bin/mgclsp2sp/Makefile.am, bin/mglsadf/Makefile.am, bin/minmax/Makefile.am, bin/mlpg/Makefile.am, bin/mlsacheck/Makefile.am, bin/mlsadf/Makefile.am, bin/msvq/Makefile.am, bin/nan/Makefile.am, bin/ndps2c/Makefile.am, bin/norm0/Makefile.am, bin/nrand/Makefile.am, bin/par2lpc/Makefile.am, bin/pca/Makefile.am, bin/phase/Makefile.am, bin/pitch/Makefile.am, bin/poledf/Makefile.am, bin/psgr/Makefile.am, bin/ramp/Makefile.am, bin/rawtowav/Makefile.am, bin/reverse/Makefile.am, bin/rmse/Makefile.am, bin/root_pol/Makefile.am, bin/sin/Makefile.am, bin/smcep/Makefile.am, bin/snr/Makefile.am, bin/sopr/Makefile.am, bin/spec/Makefile.am, bin/step/Makefile.am, bin/swab/Makefile.am, bin/symmetrize/Makefile.am, bin/train/Makefile.am, bin/transpose/Makefile.am, bin/uels/Makefile.am, bin/ulaw/Makefile.am, bin/us/Makefile.am, bin/vc/Makefile.am, bin/vopr/Makefile.am, bin/vq/Makefile.am, bin/vstat/Makefile.am, bin/vsum/Makefile.am, bin/wavjoin/Makefile.am, bin/wavsplit/Makefile.am, bin/window/Makefile.am, bin/x2x/Makefile.am, bin/xgr/Makefile.am, bin/zcross/Makefile.am, bin/zerodf/Makefile.am, include/Makefile.am, lib/Makefile.am, script/Makefile.am: update makefiles for automake 1.14.1 2014-12-04 09:34 uratec * bin/pitch/swipe/vector.c: fix pointer type in swipe 2014-12-03 17:49 shikano * bin/: acep/acep.c, amcep/amcep.c, bcp/bcp.c, bcut/bcut.c, fftcep/fftcep.c, glsadf/glsadf.c, lmadf/lmadf.c, mlpg/mlpg.c, vc/vc.c, vopr/vopr.c, vstat/vstat.c: change note to notice 2014-12-03 11:48 artk0816 * include/SPTK.h, lib/Makefile.am, bin/Makefile.am, configure.ac, bin/wavjoin/.cvsignore, bin/wavjoin/Makefile.am, bin/wavjoin/_wavjoin.c, bin/wavjoin/wavjoin.c, bin/wavsplit/.cvsignore, bin/wavsplit/Makefile.am, bin/wavsplit/_wavsplit.c, bin/wavsplit/wavsplit.c: addition of wav format joiner and splitter, wavjoin and wavsplit 2014-09-04 11:50 artk0816 * bin/delta/delta.c: fix of the explanation for -e in delta 2014-07-07 13:45 uratec * bin/pitch/swipe/swipe.c: fix frame shift calc. in swipe 2014-06-30 19:53 uratec * bin/gmm/gmm.c: remove stderr message in full covarinace calc. from gmm command. 2014-06-30 16:27 artk0816 * bin/ndps2c/_ndps2c.c: fixed warning of _indps.c 2014-06-30 16:00 artk0816 * bin/vc/vc.c: fixed warning of vc.c 2014-06-27 13:53 artk0816 * bin/vc/vc.c: VC was added the option -e that specifies small value added to covariance 2014-06-27 13:52 artk0816 * bin/delta/delta.c: DELTA was added the option -e that specifies small value added to diagonal component 2014-06-10 10:46 artk0816 * bin/vc/_vc.c: fix the GMM weight calculation of vc 2014-05-14 16:44 artk0816 * bin/mlsacheck/mlsacheck.c: add fast mode to mlsacheck 2014-04-24 13:35 artk0816 * configure.ac, bin/Makefile.am, include/SPTK.h: add mgclsp2sp 2014-04-24 13:30 artk0816 * bin/mgclsp2sp/: .cvsignore, Makefile.am, _mgclsp2sp.c, mgclsp2sp.c: add mgclsp2sp 2014-04-24 11:15 artk0816 * script/mgclsp2mgc.in: modify the -i option to -q. 2014-04-24 11:10 artk0816 * bin/: lsp2lpc/lsp2lpc.c, lsp2sp/lsp2sp.c, lspcheck/lspcheck.c: modify the -i option to -q. 2014-03-27 18:38 uratec * bin/: c2ndps/Makefile.am, ndps2c/Makefile.am: Remove autotools warning messages. 2014-03-27 18:28 artk0816 * bin/dtw/dtw.c: refactor dtw.c 2014-03-26 22:45 uratec * bin/c2ndps/c2ndps.c: Remove gcc warning in c2ndps. 2014-03-26 22:35 uratec * configure.ac, bin/da/Makefile.am, bin/da/da.in, bin/ds/Makefile.am, bin/lsp2sp/Makefile.am, bin/pitch/Makefile.am, bin/rawtowav/Makefile.am, bin/us/Makefile.am, bin/us/us16.in, bin/us/uscd.in, bin/vc/Makefile.am, lib/Makefile.am, script/Makefile.am, script/bell.in, script/glogsp.in, script/grlogsp.in, script/gseries.in, script/gwave.in, script/mgc2mgclsp.in, script/mgclsp2mgc.in, script/raw2wav.in, script/wav2raw.in: Optimize makefiles for latest autotools. 2014-02-28 02:28 artk0816 * bin/lsp2sp/: _c2ndps.c, _ndps2c.c, c2ndps.c, ndps2c.c: fix lsp2sp 2014-02-28 02:02 artk0816 * bin/ndps2c/Makefile.am: fix ndps2c 2014-02-27 18:53 artk0816 * bin/lsp2sp/: .cvsignore, Makefile.am: fix lsp2sp 2014-02-27 18:45 artk0816 * bin/ndps2c/: .cvsignore, Makefile.am, _ndps2c.c, ndps2c.c: add new commands ndps2c 2014-02-27 18:43 mataki * bin/dtw/dtw.c: - add -V option to make joint vector sequence of test/reference data along the Viterbi path. - change name of several functions. 2014-02-27 18:39 artk0816 * bin/c2ndps/: .cvsignore, Makefile.am, _c2ndps.c, c2ndps.c: add new commands c2ndps 2014-02-27 18:23 artk0816 * bin/lsp2sp/: .cvsignore, Makefile.am, _c2ndps.c, c2ndps.c, _ndps2c.c, ndps2c.c: add new commands c2ndps and ndps2c 2014-02-27 18:09 artk0816 * configure.ac, bin/Makefile.am: add new commands c2ndps and ndps2c 2014-02-27 18:01 artk0816 * include/SPTK.h: add new commands c2ndps and ndps2c 2014-02-25 16:58 mataki * bin/dtw/dtw.c: fix a bug suggested by Wern-Jun Wang. 2014-02-20 11:29 artk0816 * bin/lsp2sp/: lsp2sp.c, _lsp2sp.c: fix lsp2sp.c to add free() and _lsp2sp.c to correct explanation 2014-01-19 17:19 mataki * configure.ac: add statement to check existance of csh. 2013-12-24 19:27 mataki * Makefile.mak: fix Makefile.mak to install files correctly. 2013-12-23 23:27 uratec * README, bin/Makefile.am, bin/ds/Makefile.am, bin/ds/emime/COPYING, bin/ds/emime/lpfcoef.7to4, bin/ds/titech/COPYING, bin/ds/titech/lpfcoef.7to4, bin/us/Makefile.am, bin/us/emime/COPYING, bin/us/emime/lpfcoef.3to5, bin/us/emime/lpfcoef.7to8, bin/us/titech/COPYING, bin/us/titech/lpfcoef.3to5, bin/us/titech/lpfcoef.7to8: Fix copyrights of ds/us filter coefficients. 2013-12-23 09:40 mataki * README: fix README for COPYING. 2013-12-23 09:37 mataki * README: fix README for COPYING. 2013-12-23 09:02 mataki * bin/: mlsacheck/mlsacheck.c, symmetrize/symmetrize.c: fix source code to remove warning messages in compilation. 2013-12-23 01:58 uratec * NEWS, configure.ac, bin/Makefile.am, bin/ds/Makefile.am, bin/ds/ds.c, bin/ds/emime/COPYING, bin/ds/emime/lpfcoef.7to4, bin/us/Makefile.am, bin/us/us.c, bin/us/emime/COPYING, bin/us/emime/lpfcoef.3to5, bin/us/emime/lpfcoef.7to8: Add filter coefficients for 7:4 down-sampling, 3:5 and 7:8 up-sampling. 2013-12-19 11:47 mataki * NEWS: fix NEWS for version 3.7. 2013-12-19 11:28 mataki * bin/: lspcheck/lspcheck.c, lspdf/lspdf.c: fix source code for compatibility of log gain. 2013-12-19 11:07 mataki * NEWS: update NEWS for version 3.7. 2013-12-19 11:05 mataki * bin/: lspcheck/lspcheck.c, lspdf/lspdf.c: change -l option to -L option to specify log gain. 2013-12-19 08:36 mataki * bin/vc/hts_engine_API/: COPYING, HTS_engine.h, HTS_hidden.h, HTS_misc.c, HTS_pstream.c, HTS_sstream.c: update source code and COPYING based on hts_engine_API-1.08. 2013-12-18 13:13 mataki * NEWS: update NEWS for version 3.7. 2013-12-18 12:58 mataki * bin/rmse/rmse.c: fix indentation of usage(). 2013-12-17 11:36 mataki * NEWS: update NEWS for version 3.7. 2013-12-17 10:49 mataki * bin/: decimate/decimate.c, interpolate/interpolate.c: fix usage() and macro name. 2013-12-16 23:42 mataki * script/: glogsp.in, grlogsp.in: fix usage. 2013-12-16 19:57 mataki * bin/sopr/sopr.c: re-add constant semitone. 2013-12-16 18:01 mataki * COPYING, README, configure.ac, bin/acep/_acep.c, bin/acep/acep.c, bin/acorr/_acorr.c, bin/acorr/acorr.c, bin/agcep/_agcep.c, bin/agcep/agcep.c, bin/amcep/_amcep.c, bin/amcep/amcep.c, bin/average/_average.c, bin/average/average.c, bin/b2mc/_b2mc.c, bin/b2mc/b2mc.c, bin/bcp/bcp.c, bin/bcut/bcut.c, bin/c2acr/_c2acr.c, bin/c2acr/c2acr.c, bin/c2ir/_c2ir.c, bin/c2ir/c2ir.c, bin/c2sp/_c2sp.c, bin/c2sp/c2sp.c, bin/cat2/cat2.c, bin/cdist/cdist.c, bin/clip/_clip.c, bin/clip/clip.c, bin/da/da.h, bin/da/da.in, bin/da/dawrite.c, bin/da/winplay.c, bin/da/winplay.h, bin/dct/_dct.c, bin/dct/dct.c, bin/decimate/decimate.c, bin/delay/delay.c, bin/delta/delta.c, bin/df2/_df2.c, bin/df2/df2.c, bin/dfs/_dfs.c, bin/dfs/dfs.c, bin/dmp/dmp.c, bin/ds/ds.c, bin/dtw/dtw.c, bin/echo2/echo2.c, bin/excite/excite.c, bin/extract/extract.c, bin/fd/fd.c, bin/fft/_fft.c, bin/fft/fft.c, bin/fft2/_fft2.c, bin/fft2/fft2.c, bin/fftcep/_fftcep.c, bin/fftcep/fftcep.c, bin/fftr/_fftr.c, bin/fftr/fftr.c, bin/fftr2/_fftr2.c, bin/fftr2/fftr2.c, bin/fig+fdrw/fdrw.c, bin/fig+fdrw/fig.c, bin/fig+fdrw/fig.h, bin/fig+fdrw/fig0.c, bin/fig+fdrw/fig1.c, bin/fig+fdrw/plot.c, bin/fig+fdrw/plot.h, bin/fig+fdrw/plsub.c, bin/frame/frame.c, bin/freqt/_freqt.c, bin/freqt/freqt.c, bin/gc2gc/_gc2gc.c, bin/gc2gc/gc2gc.c, bin/gcep/_gcep.c, bin/gcep/gcep.c, bin/glsadf/_glsadf.c, bin/glsadf/glsadf.c, bin/gmm/_gmm.c, bin/gmm/gmm.c, bin/gmm/gmmp.c, bin/gnorm/_gnorm.c, bin/gnorm/gnorm.c, bin/grpdelay/_grpdelay.c, bin/grpdelay/grpdelay.c, bin/histogram/_histogram.c, bin/histogram/histogram.c, bin/idct/idct.c, bin/ifft/_ifft.c, bin/ifft/ifft.c, bin/ifft2/_ifft2.c, bin/ifft2/ifft2.c, bin/ifftr/_ifftr.c, bin/ifftr/ifftr.c, bin/ignorm/_ignorm.c, bin/ignorm/ignorm.c, bin/impulse/impulse.c, bin/imsvq/_imsvq.c, bin/imsvq/imsvq.c, bin/interpolate/interpolate.c, bin/ivq/_ivq.c, bin/ivq/ivq.c, bin/lbg/_lbg.c, bin/lbg/lbg.c, bin/levdur/_levdur.c, bin/levdur/levdur.c, bin/linear_intpl/linear_intpl.c, bin/lmadf/_lmadf.c, bin/lmadf/lmadf.c, bin/lpc/_lpc.c, bin/lpc/lpc.c, bin/lpc2c/_lpc2c.c, bin/lpc2c/lpc2c.c, bin/lpc2lsp/_lpc2lsp.c, bin/lpc2lsp/lpc2lsp.c, bin/lpc2par/_lpc2par.c, bin/lpc2par/lpc2par.c, bin/lsp2lpc/_lsp2lpc.c, bin/lsp2lpc/lsp2lpc.c, bin/lsp2sp/_lsp2sp.c, bin/lsp2sp/lsp2sp.c, bin/lspcheck/_lspcheck.c, bin/lspcheck/lspcheck.c, bin/lspdf/_lspdf.c, bin/lspdf/lspdf.c, bin/ltcdf/_ltcdf.c, bin/ltcdf/ltcdf.c, bin/mc2b/_mc2b.c, bin/mc2b/mc2b.c, bin/mcep/_mcep.c, bin/mcep/mcep.c, bin/merge/merge.c, bin/mfcc/_mfcc.c, bin/mfcc/mfcc.c, bin/mgc2mgc/_mgc2mgc.c, bin/mgc2mgc/mgc2mgc.c, bin/mgc2sp/_mgc2sp.c, bin/mgc2sp/mgc2sp.c, bin/mgcep/_mgcep.c, bin/mgcep/mgcep.c, bin/mglsadf/_mglsadf.c, bin/mglsadf/mglsadf.c, bin/minmax/minmax.c, bin/mlpg/_mlpg.c, bin/mlpg/mlpg.c, bin/mlsacheck/mlsacheck.c, bin/mlsadf/_mlsadf.c, bin/mlsadf/mlsadf.c, bin/msvq/_msvq.c, bin/msvq/msvq.c, bin/nan/nan.c, bin/norm0/_norm0.c, bin/norm0/norm0.c, bin/nrand/_nrand.c, bin/nrand/nrand.c, bin/par2lpc/_par2lpc.c, bin/par2lpc/par2lpc.c, bin/pca/pca.c, bin/pca/pcas.c, bin/phase/_phase.c, bin/phase/phase.c, bin/pitch/pitch.c, bin/pitch/snack/COPYING, bin/pitch/snack/jkGetF0.c, bin/pitch/snack/jkGetF0.h, bin/pitch/snack/sigproc.c, bin/pitch/swipe/COPYING, bin/pitch/swipe/swipe.c, bin/pitch/swipe/vector.c, bin/pitch/swipe/vector.h, bin/poledf/_poledf.c, bin/poledf/poledf.c, bin/psgr/dict.c, bin/psgr/eps.c, bin/psgr/plot.c, bin/psgr/psgr.c, bin/psgr/psgr.h, bin/ramp/ramp.c, bin/rawtowav/rawtowav.c, bin/reverse/_reverse.c, bin/reverse/reverse.c, bin/rmse/_rmse.c, bin/rmse/rmse.c, bin/root_pol/_root_pol.c, bin/root_pol/root_pol.c, bin/sin/sin.c, bin/smcep/_smcep.c, bin/smcep/smcep.c, bin/snr/snr.c, bin/sopr/sopr.c, bin/spec/spec.c, bin/step/step.c, bin/swab/swab.c, bin/symmetrize/symmetrize.c, bin/train/train.c, bin/transpose/_transpose.c, bin/transpose/transpose.c, bin/uels/_uels.c, bin/uels/uels.c, bin/ulaw/_ulaw.c, bin/ulaw/ulaw.c, bin/us/us.c, bin/us/us16.in, bin/us/uscd.in, bin/vopr/vopr.c, bin/vq/_vq.c, bin/vq/vq.c, bin/vstat/vstat.c, bin/vsum/vsum.c, bin/window/_window.c, bin/window/window.c, bin/x2x/x2x.c, bin/xgr/config.h, bin/xgr/gcdata.h, bin/xgr/plot.c, bin/xgr/window.c, bin/xgr/xgr.c, bin/xgr/xgr.h, bin/zcross/_zcross.c, bin/zcross/zcross.c, bin/zerodf/_zerodf.c, bin/zerodf/zerodf.c, include/SPTK.h, lib/agexp.c, lib/cholesky.c, lib/fileio.c, lib/fillz.c, lib/getfp.c, lib/getmem.c, lib/gexp.c, lib/glog.c, lib/invert.c, lib/matrix.c, lib/movem.c, lib/mseq.c, lib/theq.c, lib/toeplitz.c, script/bell.in, script/glogsp.in, script/grlogsp.in, script/gseries.in, script/gwave.in, script/mgc2mgclsp.in, script/mgclsp2mgc.in, script/raw2wav.in, script/wav2raw.in: update all documents for version 3.7. 2013-12-15 16:36 mataki * bin/gmm/_gmm.c, bin/lsp2sp/_lsp2sp.c, include/SPTK.h: fix the problem of multiple definition of constant macros. 2013-12-15 02:30 mataki * bin/da/Makefile.am: fix Makefile.am for correct installation. 2013-12-14 22:11 mataki * configure.ac: fix configure.ac to specify TARNAME explicitly. 2013-12-14 20:30 mataki * bin/vc/Makefile.am, bin/Makefile.mak, bin/vc/_vc.c, lib/Makefile.am: fix source code, Makefile.am and Makefile.mak to compile vc command. 2013-12-13 18:19 mataki * bin/gmm/Makefile.am: remove gmm.h. 2013-12-13 18:02 mataki * bin/gmm/gmmp.c: add -f option to specify full covariance. 2013-12-11 16:20 mataki * bin/vc/vc.c: remove unnecessary local variable. 2013-12-11 14:27 mataki * bin/vc/hts_engine_API/HTS_sstream.c: remove '#else' directives. 2013-12-10 20:40 mataki * bin/vc/: _vc.c, vc.c: fix order of arguments for getmem(). 2013-12-10 20:24 mataki * bin/vc/vc.c: fix source code to avoid memory leak bug. 2013-12-10 20:11 mataki * bin/vc/vc.c: fix source code to avoid memory leak. 2013-12-10 19:15 mataki * bin/vc/: Makefile.am, hts_engine_API/HTS_engine.h, hts_engine_API/HTS_hidden.h, hts_engine_API/HTS_label.c, hts_engine_API/HTS_misc.c, hts_engine_API/HTS_model.c, hts_engine_API/HTS_pstream.c, hts_engine_API/HTS_sstream.c: remove HTS_label.c and HTS_model.c. 2013-12-10 18:36 mataki * bin/vc/.cvsignore: fix .cvsignore. 2013-12-10 17:51 mataki * bin/vc/hts_engine_API/COPYING: add COPYING for vc command. 2013-12-10 17:49 mataki * bin/vc/: .cvsignore, hts_engine_API/HTS_engine.h, hts_engine_API/HTS_hidden.h: add vc command. 2013-12-10 17:44 mataki * bin/vc/: .cvsignore, _vc.c: fix comment part of _vc.c to insert rcs_id and fix .cvsignore to add hts_engine_API. 2013-12-10 17:36 mataki * configure.ac, bin/Makefile.am, bin/decimate/decimate.c, bin/lpc2lsp/lpc2lsp.c, bin/lsp2lpc/lsp2lpc.c, bin/vc/.cvsignore, bin/vc/Makefile.am, bin/vc/_vc.c, bin/vc/vc.c, bin/vc/hts_engine_API/HTS_label.c, bin/vc/hts_engine_API/HTS_misc.c, bin/vc/hts_engine_API/HTS_model.c, bin/vc/hts_engine_API/HTS_pstream.c, bin/vc/hts_engine_API/HTS_sstream.c, include/SPTK.h: add vc command. 2013-12-10 17:09 mataki * bin/gmm/_gmm.c, bin/gmm/gmm.c, bin/gmm/gmmp.c, include/SPTK.h, bin/gmm/gmm.h: remove gmm.h. 2013-12-10 15:11 mataki * bin/gmm/_gmm.c, bin/gmm/gmm.c, bin/gmm/gmmp.c, include/SPTK.h: - integrate fillz_gmm() and fillz_gmmf() into fillz_GMM(). - integrate log_wgd() and log_wgdf() into new log_wgd(). - use 'TR' to specify value of 'full' as member of GMM structure. 2013-12-09 18:04 mataki * bin/gmm/_gmm.c, bin/gmm/gmm.c, bin/gmm/gmmp.c, include/SPTK.h: fix GMM structure and its related modules to remove redundant arguments. 2013-12-09 14:37 uratec * script/: mgc2mgclsp.in, mgclsp2mgc.in: Change log gain option for mgc2mgclsp and mgclsp2mgc 2013-12-09 14:33 uratec * bin/: gcep/gcep.c, mgcep/mgcep.c: Fix source code format 2013-12-02 13:11 mataki * bin/gmm/_gmm.c: fix load_GMM() to set number of mixtures. 2013-11-26 13:46 artk0816 * script/mgc2mgclsp.in: modify mgc2mgclsp about -h option 2013-11-26 11:06 mataki * bin/da/Makefile.am, bin/da/da.in, bin/rawtowav/Makefile.am, bin/us/Makefile.am, script/Makefile.am, script/raw2wav.in: put all .sh files, dawrite and rawtowav into "install_dir/share/SPTK". 2013-11-26 10:49 artk0816 * bin/mlsacheck/mlsacheck.c: add options for modification by scaling and specifying threshold to mlsacheck 2013-11-22 14:36 mataki * bin/: dct/dct.c, idct/idct.c: fix typo. 2013-11-18 21:11 mataki * bin/da/Makefile.am, bin/da/da.in, bin/rawtowav/Makefile.am, script/raw2wav.in: make rawtowav and dawrite hidden binaries. 2013-11-18 20:47 artk0816 * script/mgc2mgclsp.in: add mgc2mgclsp to -d, -n and -p options. 2013-11-18 19:00 mataki * bin/merge/merge.c: apply patch code provided by Giulio Paci. 2013-11-15 16:16 mataki * bin/us/Makefile.am: Apply patch code provided by Giulio Paci. 2013-11-15 16:05 mataki * configure.ac: Apply patch code provided by Giulio Paci except that 'no-installinfo' and 'no-installman' are removed. This is because these options are disallowed by GNU standards. 2013-11-15 15:22 mataki * bin/: acep/Makefile.am, acorr/Makefile.am, agcep/Makefile.am, amcep/Makefile.am, average/Makefile.am, b2mc/Makefile.am, bcp/Makefile.am, bcut/Makefile.am, c2acr/Makefile.am, c2ir/Makefile.am, c2sp/Makefile.am, cat2/Makefile.am, cdist/Makefile.am, clip/Makefile.am, da/Makefile.am, dct/Makefile.am, decimate/Makefile.am, delay/Makefile.am, delta/Makefile.am, df2/Makefile.am, dfs/Makefile.am, dmp/Makefile.am, ds/Makefile.am, dtw/Makefile.am, echo2/Makefile.am, excite/Makefile.am, extract/Makefile.am, fd/Makefile.am, fft/Makefile.am, fft2/Makefile.am, fftcep/Makefile.am, fftr/Makefile.am, fftr2/Makefile.am, fig+fdrw/Makefile.am, frame/Makefile.am, freqt/Makefile.am, gc2gc/Makefile.am, gcep/Makefile.am, glsadf/Makefile.am, gmm/Makefile.am, gnorm/Makefile.am, grpdelay/Makefile.am, histogram/Makefile.am, idct/Makefile.am, ifft/Makefile.am, ifft2/Makefile.am, ifftr/Makefile.am, ignorm/Makefile.am, impulse/Makefile.am, imsvq/Makefile.am, interpolate/Makefile.am, ivq/Makefile.am, lbg/Makefile.am, levdur/Makefile.am, linear_intpl/Makefile.am, lmadf/Makefile.am, lpc/Makefile.am, lpc2c/Makefile.am, lpc2lsp/Makefile.am, lpc2par/Makefile.am, lsp2lpc/Makefile.am, lspcheck/Makefile.am, lspdf/Makefile.am, ltcdf/Makefile.am, mc2b/Makefile.am, mcep/Makefile.am, merge/Makefile.am, mfcc/Makefile.am, mgc2mgc/Makefile.am, mgc2sp/Makefile.am, mgcep/Makefile.am, mglsadf/Makefile.am, minmax/Makefile.am, mlpg/Makefile.am, mlsacheck/Makefile.am, mlsadf/Makefile.am, msvq/Makefile.am, nan/Makefile.am, norm0/Makefile.am, nrand/Makefile.am, par2lpc/Makefile.am, pca/Makefile.am, phase/Makefile.am, pitch/Makefile.am, poledf/Makefile.am, psgr/Makefile.am, ramp/Makefile.am, rawtowav/Makefile.am, reverse/Makefile.am, rmse/Makefile.am, root_pol/Makefile.am, sin/Makefile.am, smcep/Makefile.am, snr/Makefile.am, sopr/Makefile.am, spec/Makefile.am, step/Makefile.am, swab/Makefile.am, symmetrize/Makefile.am, train/Makefile.am, transpose/Makefile.am, uels/Makefile.am, ulaw/Makefile.am, vopr/Makefile.am, vq/Makefile.am, vstat/Makefile.am, vsum/Makefile.am, window/Makefile.am, x2x/Makefile.am, xgr/Makefile.am, zcross/Makefile.am, zerodf/Makefile.am: apply patch code provided by Giulio Paci. 2013-11-12 13:17 artk0816 * script/gseries.in: fix gseries.in to allow input data to exceed range of short. 2013-11-12 13:16 artk0816 * script/gwave.in: fix gwave.in to allow input data to exceed range of short. 2013-10-17 15:09 mataki * bin/delta/delta.c: fix get_coef() to calculate regression coefficients from regression polynomial of arbitrary order. 2013-09-10 11:52 artk0816 * bin/lsp2sp/Makefile.in: [no log message] 2013-09-10 11:42 artk0816 * bin/lsp2sp/.cvsignore: Add command 'LSP2SP' that calculates the spectrum from the line spectral pairs(LSP). 2013-09-09 15:50 artk0816 * configure.ac, bin/Makefile.am, bin/lsp2sp/Makefile.am, bin/lsp2sp/Makefile.in, bin/lsp2sp/_lsp2sp.c, bin/lsp2sp/lsp2sp.c, include/SPTK.h, lib/Makefile.am: Add command 'LSP2SP' that calculates the spectrum from the line spectral pairs(LSP). 2013-09-07 17:20 mataki * lib/getmem.c: change variable name in ddgetmem(). 2013-09-07 17:03 mataki * include/SPTK.h, lib/getmem.c: add ddgetmem() to allocate a double type matrix. 2013-09-06 12:50 artk0816 * script/: gseries.in, gwave.in: Fix the error that arises when input data is over the range of type 'short'. 2013-09-05 19:23 mataki * bin/gmm/_gmm.c, bin/gmm/gmm.c, bin/gmm/gmmp.c, include/SPTK.h: - add -M, -c1, and -c2 options to specify the structure of the covariace matrix. - add alloc_gmm(), load_gmm(), save_gmm(), and free_gmm() in _gmm.c . 2013-09-04 10:45 artk0816 * bin/: lpc2lsp/lpc2lsp.c, lsp2lpc/lsp2lpc.c: Change -l option into -L option 2013-09-04 10:16 artk0816 * bin/vsum/vsum.c: Conform VSUM's options to VSTAT's -l, -n, and -t option. 2013-08-23 15:04 mataki * bin/symmetrize/symmetrize.c: fix source code to use freadf and fwritef. 2013-08-16 08:15 artk0816 * bin/: sopr/sopr.c, rmse/rmse.c: fix source code not to use capital letter in variable name 2013-08-16 06:42 mataki * bin/delta/delta.c: fix source code not to use capital letter in variable name. 2013-08-15 00:37 artk0816 * bin/sopr/sopr.c: add -p -POWX -LOGX option 2013-08-14 11:05 artk0816 * bin/rmse/rmse.c: change rmse 2013-08-13 13:46 mataki * bin/delta/delta.c: fix source code not to use capital letter at the beginning of variable name. 2013-08-12 17:20 mataki * bin/delta/delta.c: -fix a bug that all static features in output are 0 in all frames containing magic number. -fix souce code not to use calloc and malloc. 2013-06-13 11:35 uratec * bin/pitch/snack/jkGetF0.c: Fix a downsampling error in snack F0 estimator. 2013-06-12 07:35 mataki * script/wav2raw.in: fix source code not to read unnecessary chunks. 2013-05-07 10:25 mataki * bin/spec/spec.c: fix typo. 2013-05-06 15:35 mataki * bin/lspcheck/lspcheck.c: Add a few options to check gain value. 2013-04-30 14:30 mataki * bin/pitch/swipe/: swipe.c, vector.c: Merge patch code by Pieter Scholtz : Fix memory leak of 'SWIPE. 2013-04-22 17:26 mataki * bin/fd/fd.c: fix source code to use isprint(). 2013-04-22 15:52 mataki * bin/c2ir/c2ir.c: fix '-L' option name; from '-L' to '-l'. 2013-03-24 15:54 okdtmhr * bin/: smcep/_smcep.c, smcep/smcep.c, uels/_uels.c, uels/uels.c: unify the description of periodogram 2013-03-24 15:19 okdtmhr * bin/mgcep/: _mgcep.c, mgcep.c: unify the description of periodogram 2013-03-24 15:14 okdtmhr * bin/mcep/: _mcep.c, mcep.c: unify the description of periodogram 2013-03-24 15:05 okdtmhr * bin/gcep/: _gcep.c, gcep.c: unify the description of periodogram 2013-03-23 15:20 mataki * bin/fd/fd.c: fix default data type. 2013-02-27 09:45 okdtmhr * script/grlogsp.in: add the type of scale 2013-02-27 09:39 okdtmhr * script/glogsp.in: add the type of scale 2013-02-27 09:13 okdtmhr * bin/sopr/sopr.c: enable to use semitone 2013-02-27 09:06 okdtmhr * bin/interpolate/interpolate.c: enable to use vector with -l option 2013-02-27 08:57 okdtmhr * bin/decimate/decimate.c: enable to use vector with -l option 2013-02-27 00:46 uratec * bin/mlsacheck/mlsacheck.c: Fix option parsing part in mlsacheck. 2013-02-20 13:03 mataki * include/SPTK.h, bin/rawtowav/rawtowav.c, lib/fileio.c: add new fuction fwrite_little_endian() and fix rawtowav.c to use it. 2013-02-19 18:41 mataki * bin/mlsacheck/mlsacheck.c: remove unnecessary memory allocation. 2013-02-15 17:13 mataki * bin/rawtowav/rawtowav.c: fix source code to make WAVE header properly on both 32bit and 64bit machine. 2013-02-15 12:12 mataki * bin/mlsacheck/mlsacheck.c: bug fix for stabilization process. 2013-02-15 11:50 mataki * script/: glogsp.in, grlogsp.in, gseries.in, gwave.in, mgc2mgclsp.in, mgclsp2mgc.in: fix scripts to accept file name containing white space. 2013-02-13 17:35 mataki * script/raw2wav.in: fix script to accept samping frequency written in floating point. 2013-02-03 00:10 mataki * script/raw2wav.in: fix a bug when -n option is specified. 2013-02-03 00:03 mataki * bin/dfs/dfs.c: fix a bug when -a and/or -b option is not specified. 2013-01-18 17:06 mataki * bin/transpose/: _transpose.c, transpose.c: fix source codes not to use rewind(). 2013-01-16 21:06 mataki * script/wav2raw.in: fix script to read extra format in "fmt " chunk. 2013-01-15 20:54 okdtmhr * bin/vstat/vstat.c: Error which happen when inputted from stdin is corrected. 2013-01-15 18:53 mataki * script/: raw2wav.in, wav2raw.in: remove trailing whitespace from source scripts and fix them to accept input filename containing whitespace. 2013-01-10 21:24 mataki * bin/rawtowav/rawtowav.c: fix source code not to break RIFF header on both 32bit and 64bit machine. 2013-01-10 20:48 mataki * script/raw2wav.in: fix script not to accept too large sampling frequency. 2013-01-10 14:51 mataki * bin/mlsacheck/mlsacheck.c: fix a bug in calculating gain factor. 2013-01-08 20:24 mataki * bin/dfs/dfs.c: fix indent of source code. 2013-01-08 20:20 mataki * bin/dfs/dfs.c: fix source code to remove limitation of the order of filter coefficients. 2013-01-03 14:55 okdtmhr * bin/symmetrize/symmetrize.c: Error which happen when inputted from stdin is corrected. 2012-12-24 23:08 mataki * script/: raw2wav.in, wav2raw.in: fix usage. 2012-12-24 12:44 mataki * NEWS: fix NEWS for SPTK-3.6. 2012-12-24 12:34 mataki * script/: Makefile.am, gimp.in, gseries.in: rename 'gimp' to 'gseries'. 2012-12-24 11:23 mataki * script/raw2wav.in: change sampling frequency in Hz into sampling frequency in kHz. 2012-12-23 21:51 mataki * bin/bcut/bcut.c: fix a bug for int 3byte. 2012-12-23 20:15 mataki * bin/mfcc/mfcc.c, script/wav2raw.in: fix usage. 2012-12-23 20:12 mataki * bin/Makefile.mak: Unify linefeed code of bin/Makefile.mak into . 2012-12-23 20:08 mataki * NEWS: fix NEWS for SPTK-3.6. 2012-12-23 15:35 mataki * ChangeLog: remove ChangeLog. 2012-12-23 12:24 mataki * ChangeLog: update ChangeLog. 2012-12-23 12:17 mataki * bin/pitch/swipe/COPYING: revert copyright. 2012-12-22 21:30 mataki * ChangeLog: update ChangeLog. 2012-12-22 21:25 mataki * bin/pitch/swipe/: swipe.c, vector.c, vector.h: revert copyright. 2012-12-22 21:09 mataki * ChangeLog: update ChangeLog for SPTK-3.6 release. 2012-12-22 20:58 mataki * bin/transpose/transpose.c: fix indent. 2012-12-22 18:54 okdtmhr * bin/psgr/psgr.h: enlarge the margin of bounding box. 2012-12-22 17:49 okdtmhr * script/gwave.in: scale of graph is corrected and problem with plotting points of nine or less number is corrected. 2012-12-22 17:11 okdtmhr * script/gimp.in: refine source code and scale of figure is corrected 2012-12-22 16:21 mataki * NEWS: update NEWS for SPTK-3.6 release. 2012-12-22 15:28 mataki * script/wav2raw.in: fix usage. 2012-12-22 10:22 mataki * bin/: ifftr/.cvsignore, transpose/.cvsignore: add .cvsignore. 2012-12-21 20:27 mataki * COPYING, README, configure.ac, bin/acep/acep.c, bin/acorr/_acorr.c, bin/acorr/acorr.c, bin/agcep/_agcep.c, bin/agcep/agcep.c, bin/amcep/_amcep.c, bin/amcep/amcep.c, bin/average/_average.c, bin/average/average.c, bin/b2mc/_b2mc.c, bin/b2mc/b2mc.c, bin/bcp/bcp.c, bin/bcut/bcut.c, bin/c2acr/_c2acr.c, bin/c2acr/c2acr.c, bin/c2ir/_c2ir.c, bin/c2ir/c2ir.c, bin/c2sp/_c2sp.c, bin/c2sp/c2sp.c, bin/cat2/cat2.c, bin/cdist/cdist.c, bin/clip/_clip.c, bin/clip/clip.c, bin/da/da.h, bin/da/da.in, bin/da/dawrite.c, bin/da/winplay.c, bin/da/winplay.h, bin/dct/_dct.c, bin/dct/dct.c, bin/decimate/decimate.c, bin/delay/delay.c, bin/delta/delta.c, bin/df2/_df2.c, bin/df2/df2.c, bin/dfs/_dfs.c, bin/dfs/dfs.c, bin/dmp/dmp.c, bin/ds/ds.c, bin/echo2/echo2.c, bin/excite/excite.c, bin/extract/extract.c, bin/fd/fd.c, bin/fft/_fft.c, bin/fft/fft.c, bin/fft2/_fft2.c, bin/fft2/fft2.c, bin/fftcep/_fftcep.c, bin/fftcep/fftcep.c, bin/fftr/_fftr.c, bin/fftr/fftr.c, bin/fftr2/_fftr2.c, bin/fftr2/fftr2.c, bin/fig+fdrw/fdrw.c, bin/fig+fdrw/fig.c, bin/fig+fdrw/fig.h, bin/fig+fdrw/fig0.c, bin/fig+fdrw/fig1.c, bin/fig+fdrw/plot.c, bin/fig+fdrw/plot.h, bin/fig+fdrw/plsub.c, bin/frame/frame.c, bin/freqt/_freqt.c, bin/freqt/freqt.c, bin/gc2gc/_gc2gc.c, bin/gc2gc/gc2gc.c, bin/gcep/_gcep.c, bin/gcep/gcep.c, bin/glsadf/_glsadf.c, bin/glsadf/glsadf.c, bin/gmm/_gmm.c, bin/gmm/gmm.h, bin/gmm/gmmp.c, bin/gnorm/_gnorm.c, bin/gnorm/gnorm.c, bin/grpdelay/_grpdelay.c, bin/grpdelay/grpdelay.c, bin/histogram/_histogram.c, bin/histogram/histogram.c, bin/idct/idct.c, bin/ifft/_ifft.c, bin/ifft/ifft.c, bin/ifft2/_ifft2.c, bin/ifft2/ifft2.c, bin/ifftr/_ifftr.c, bin/ignorm/_ignorm.c, bin/ignorm/ignorm.c, bin/impulse/impulse.c, bin/imsvq/_imsvq.c, bin/imsvq/imsvq.c, bin/interpolate/interpolate.c, bin/ivq/_ivq.c, bin/ivq/ivq.c, bin/lbg/_lbg.c, bin/levdur/_levdur.c, bin/levdur/levdur.c, bin/linear_intpl/linear_intpl.c, bin/lmadf/_lmadf.c, bin/lmadf/lmadf.c, bin/lpc/_lpc.c, bin/lpc/lpc.c, bin/lpc2c/_lpc2c.c, bin/lpc2c/lpc2c.c, bin/lpc2lsp/_lpc2lsp.c, bin/lpc2lsp/lpc2lsp.c, bin/lpc2par/_lpc2par.c, bin/lpc2par/lpc2par.c, bin/lsp2lpc/_lsp2lpc.c, bin/lsp2lpc/lsp2lpc.c, bin/lspdf/_lspdf.c, bin/lspdf/lspdf.c, bin/ltcdf/_ltcdf.c, bin/ltcdf/ltcdf.c, bin/mc2b/_mc2b.c, bin/mc2b/mc2b.c, bin/mcep/_mcep.c, bin/mcep/mcep.c, bin/merge/merge.c, bin/mfcc/_mfcc.c, bin/mfcc/mfcc.c, bin/mgc2mgc/_mgc2mgc.c, bin/mgc2mgc/mgc2mgc.c, bin/mgc2sp/_mgc2sp.c, bin/mgc2sp/mgc2sp.c, bin/mgcep/_mgcep.c, bin/mgcep/mgcep.c, bin/mglsadf/_mglsadf.c, bin/mglsadf/mglsadf.c, bin/mlpg/_mlpg.c, bin/mlpg/mlpg.c, bin/mlsadf/_mlsadf.c, bin/mlsadf/mlsadf.c, bin/msvq/_msvq.c, bin/msvq/msvq.c, bin/nan/nan.c, bin/norm0/_norm0.c, bin/norm0/norm0.c, bin/nrand/_nrand.c, bin/nrand/nrand.c, bin/par2lpc/_par2lpc.c, bin/par2lpc/par2lpc.c, bin/pca/pcas.c, bin/phase/_phase.c, bin/phase/phase.c, bin/pitch/snack/COPYING, bin/pitch/snack/jkGetF0.h, bin/pitch/snack/sigproc.c, bin/pitch/swipe/COPYING, bin/pitch/swipe/swipe.c, bin/pitch/swipe/vector.c, bin/pitch/swipe/vector.h, bin/poledf/_poledf.c, bin/poledf/poledf.c, bin/psgr/dict.c, bin/psgr/eps.c, bin/psgr/plot.c, bin/psgr/psgr.c, bin/psgr/psgr.h, bin/ramp/ramp.c, bin/rawtowav/rawtowav.c, bin/reverse/_reverse.c, bin/rmse/_rmse.c, bin/rmse/rmse.c, bin/root_pol/_root_pol.c, bin/root_pol/root_pol.c, bin/sin/sin.c, bin/smcep/_smcep.c, bin/smcep/smcep.c, bin/snr/snr.c, bin/sopr/sopr.c, bin/spec/spec.c, bin/step/step.c, bin/swab/swab.c, bin/symmetrize/symmetrize.c, bin/train/train.c, bin/transpose/_transpose.c, bin/transpose/transpose.c, bin/uels/_uels.c, bin/uels/uels.c, bin/ulaw/_ulaw.c, bin/ulaw/ulaw.c, bin/us/us.c, bin/us/us16.in, bin/us/uscd.in, bin/vq/_vq.c, bin/vq/vq.c, bin/vstat/vstat.c, bin/vsum/vsum.c, bin/window/_window.c, bin/window/window.c, bin/x2x/x2x.c, bin/xgr/config.h, bin/xgr/gcdata.h, bin/xgr/plot.c, bin/xgr/window.c, bin/xgr/xgr.c, bin/xgr/xgr.h, bin/zcross/_zcross.c, bin/zcross/zcross.c, bin/zerodf/_zerodf.c, bin/zerodf/zerodf.c, include/SPTK.h: update copyright and remove warinings when compiling with CFLAGS='-Wall -O2'. 2012-12-21 19:04 mataki * bin/lspcheck/: _lspcheck.c, lspcheck.c: clean source code. 2012-12-21 18:44 mataki * script/bell.in, script/gimp.in, script/glogsp.in, script/grlogsp.in, script/gwave.in, script/mgc2mgclsp.in, script/mgclsp2mgc.in, script/raw2wav.in, script/wav2raw.in, lib/agexp.c, lib/cholesky.c, lib/fileio.c, lib/fillz.c, lib/getfp.c, lib/getmem.c, lib/gexp.c, lib/glog.c, lib/matrix.c, lib/movem.c, lib/mseq.c, lib/theq.c, lib/toeplitz.c: fix copyright. 2012-12-21 16:25 mataki * bin/mlsacheck/mlsacheck.c: remove redundant for-loop. 2012-12-21 01:59 okdtmhr * bin/spec/spec.c: fix sorce code to remove warnings when CFLAGS='-Wall -O2'. fix sorce code to output usage when value of -e or -E isn't suitable. 2012-12-20 18:23 okdtmhr * bin/vstat/vstat.c: fix -o 4 option so that an arithmetic mean might be outputted when the number of vectors is even number. 2012-12-18 21:41 mataki * bin/: bcut/bcut.c, glsadf/glsadf.c, gmm/gmm.c, mglsadf/mglsadf.c, pca/pca.c, psgr/eps.c, vstat/vstat.c, x2x/x2x.c: fix source code to remove warnings when CFLAGS='-Wall -O2'. 2012-12-18 21:06 mataki * bin/: bcp/bcp.c, bcut/bcut.c, merge/merge.c, swab/swab.c: fix all indent in source codes by using 'indent -kr -nut -i 3 -l 80' command. 2012-12-18 13:24 uratec * bin/minmax/minmax.c: Add output format option for minmax. 2012-12-17 14:21 mataki * bin/lspcheck/: _lspcheck.c, lspcheck.c: remove unnecessary argument. 2012-12-17 13:32 mataki * bin/: dmp/dmp.c, fd/fd.c, x2x/x2x.c: fix a bug of x2x and modify source codes to accept string specifying ascii output format without space in front of '%'. 2012-12-17 13:06 mataki * bin/dct/Makefile.am: add _dct.c. 2012-12-16 17:37 okdtmhr * bin/: mfcc/mfcc.c, df2/df2.c: change option name which defines sampling frequency 2012-12-16 15:05 mataki * lib/Makefile.mak: add invert.obj and remove _pitch.obj. 2012-12-16 14:46 okdtmhr * script/gimp.in: add -magic and -MAGIC option. And scale of figure is corrected. 2012-12-16 07:56 okdtmhr * bin/symmetrize/symmetrize.c: revise usage and description of command 2012-12-16 07:36 okdtmhr * bin/transpose/: _transpose.c, transpose.c: revise usage and example of output 2012-12-16 05:16 okdtmhr * bin/vstat/vstat.c: corrected so that warning might be outputted. 2012-12-15 22:47 mataki * bin/mlsacheck/mlsacheck.c: fix source code to remove warning messages. 2012-12-15 21:46 mataki * bin/mlsacheck/mlsacheck.c: fix help message. 2012-12-15 10:56 mataki * bin/lspcheck/: _lspcheck.c, lspcheck.c: clean source code and fix output format of ascii report. 2012-12-14 20:16 mataki * bin/mlsacheck/mlsacheck.c: fix source code not to output ascii report of coefficient values. 2012-12-09 23:57 mataki * bin/Makefile.mak: enable to compile on Windows. 2012-12-09 23:56 mataki * bin/pitch/: snack/jkGetF0.c, swipe/swipe.c, swipe/vector.c: fix source code to be enable to compile on Windows. 2012-12-08 15:12 mataki * bin/mlsacheck/mlsacheck.c: modify source code not to output unnecessary ascii report of unstable frame. 2012-11-12 02:26 okdtmhr * bin/vstat/vstat.c: add output type(median) 2012-11-12 00:36 okdtmhr * script/: Makefile.am, gimp.in: add gimp command 2012-11-12 00:00 okdtmhr * bin/smcep/smcep.c: change the name of F option and the specifying method of T option 2012-11-09 18:22 mataki * bin/dtw/dtw.c: remove unnecessary semicolon. 2012-11-08 15:12 mataki * bin/vopr/vopr.c: fix usage and comment. 2012-11-07 17:29 mataki * bin/vopr/vopr.c: add options for relational opretors, arithmetic/geometric mean and ceiling/flooring (taking smaller/bigger value) 2012-11-06 19:17 mataki * bin/mlsacheck/mlsacheck.c: fix problem that unnecessary ascii report for unstable frame is output. 2012-11-06 19:08 mataki * bin/mlsacheck/.cvsignore: add .cvsignore. 2012-11-05 12:40 mataki * bin/reverse/reverse.c: remove limit of block size. 2012-10-24 18:59 okdtmhr * bin/symmetrize/symmetrize.c: modify usage 2012-10-11 08:04 mataki * bin/mlsacheck/mlsacheck.c: fix a bug for an infinite loop suggested by Maria Astrinaki of Faculte Polytechnique de Mons. 2012-10-04 18:46 mataki * bin/gmm/gmmp.c: bug fix for checking number of inputs. 2012-10-04 18:15 mataki * bin/gmm/gmmp.c: bug fix for checking number of inputs. 2012-10-04 01:29 okdtmhr * bin/smcep/smcep.c: add T option and F option 2012-10-04 01:03 okdtmhr * configure.ac, bin/Makefile.am, bin/Makefile.mak: add symmetrize command 2012-10-04 00:55 okdtmhr * bin/symmetrize/: .cvsignore, Makefile.am, symmetrize.c: add symmetrize command 2012-09-13 20:26 mataki * bin/mlsacheck/Makefile.am, bin/mlsacheck/mlsacheck.c, configure.ac, bin/Makefile.am, bin/Makefile.mak, bin/lspcheck/lspcheck.c: add mlsacheck command. 2012-09-13 14:47 mataki * bin/dtw/dtw.c: fix a bug suggested by Takashi Nose of Tokyo Institute of Technology, Japan. 2012-09-09 18:26 okdtmhr * bin/: bcp/bcp.c, bcut/bcut.c, dmp/dmp.c, fd/fd.c, merge/merge.c, swab/swab.c, x2x/x2x.c: modified usage 2012-09-09 17:50 okdtmhr * bin/transpose/: Makefile.am, _transpose.c, transpose.c: add transpose command 2012-09-09 17:43 okdtmhr * bin/Makefile.am, bin/Makefile.mak, lib/Makefile.am, lib/Makefile.mak, configure.ac: add transpose command 2012-08-23 01:18 uratec * bin/pitch/: pitch.c, snack/jkGetF0.c, swipe/swipe.c: Fix the pitch comand. 2012-08-22 20:14 mataki * bin/pitch/: pitch.c, snack/jkGetF0.c: add -T option to specify voiced/unvoiced threshold for RAPT algorithm. 2012-08-20 21:36 mataki * bin/: pca/pca.c, pca/pcas.c, gmm/gmm.c, lbg/lbg.c: modify source code to read input data from sequencially 2012-08-18 18:24 okdtmhr * lib/Makefile.mak: add _dct.obj as a module 2012-08-18 15:18 okdtmhr * bin/: bcp/bcp.c, bcut/bcut.c, dmp/dmp.c, fd/fd.c, merge/merge.c, swab/swab.c, x2x/x2x.c: modified usage 2012-08-13 17:21 mataki * ChangeLog, bin/dct/_dct.c, bin/dct/dct.c, bin/delta/delta.c, bin/dtw/dtw.c, bin/fft/fft.c, bin/fftr/fftr.c, bin/gcep/_gcep.c, bin/gcep/gcep.c, bin/gmm/_gmm.c, bin/gmm/gmm.c, bin/idct/idct.c, bin/ifft/ifft.c, bin/ifft2/ifft2.c, bin/lspcheck/lspcheck.c, bin/mcep/_mcep.c, bin/mcep/mcep.c, bin/mfcc/_mfcc.c, bin/mfcc/mfcc.c, bin/mgcep/_mgcep.c, bin/mgcep/mgcep.c, bin/pca/pcas.c, bin/pitch/pitch.c, bin/smcep/_smcep.c, bin/smcep/smcep.c, bin/snr/snr.c, bin/sopr/sopr.c, bin/spec/spec.c, bin/uels/_uels.c, bin/uels/uels.c, bin/vstat/vstat.c, bin/xgr/gcdata.h, bin/xgr/plot.c, include/SPTK.h, lib/invert.c: Unify linefeed code of all source code into . Fix all indent in all source code by using 'indent -kr -nut -i 3 -l 80' command. 2012-08-13 17:11 mataki * configure.ac, bin/Makefile.am, bin/Makefile.mak, bin/ifftr/Makefile.am, bin/ifftr/_ifftr.c, bin/ifftr/ifftr.c, lib/Makefile.am, lib/Makefile.mak, lib/ifftr.c: add ifftr command. 2012-07-13 17:36 okdtmhr * bin/sopr/sopr.c, script/mgc2mgclsp.in, script/mgclsp2mgc.in: Merge patch code by Giulio Paci:Fix -h option 2012-07-09 21:13 mataki * bin/pca/: pca.c, pcas.c: fix typo. 2012-07-02 20:36 mataki * bin/: da/Makefile.am, ds/Makefile.am, us/Makefile.am: change install directory for low pass filter coefficients; from $(DESTDIR)$(libdir) to $(datarootdir)/SPTK 2012-06-27 20:29 mataki * bin/: lbg/lbg.c, gmm/gmm.c: change option name for specifying initial codebook/gmm filename. 2012-06-27 19:56 mataki * bin/window/Makefile.am, bin/window/_window.c, lib/Makefile.am, lib/window.c: move lib/window.c to bin/window/_window.c 2012-06-27 19:16 mataki * bin/gmm/_gmm.c: fix memory leak bug when training full covariance GMM 2012-06-26 11:16 mataki * bin/x2x/x2x.c: fix output format for +fa and +da (%f -> %g). 2012-06-11 18:29 okdtmhr * bin/: dtw/dtw.c, pitch/pitch.c, psgr/eps.c: A variable is initialized. 2012-06-09 18:56 okdtmhr * include/SPTK.h: change some prototype declarations 2012-06-09 18:54 okdtmhr * bin/idct/idct.c: remove definition of dft function 2012-06-09 18:53 okdtmhr * bin/dct/: _dct.c, dct.c: change some function to share these 2012-06-09 18:50 okdtmhr * bin/pitch/swipe/: swipe.c, vector.c, vector.h: add proto type declaration, remove unused variables 2012-06-09 18:47 okdtmhr * bin/: mcep/_mcep.c, mcep/mcep.c, mgcep/_mgcep.c, mgcep/mgcep.c, smcep/_smcep.c, smcep/smcep.c, gcep/_gcep.c, gcep/gcep.c, uels/_uels.c, uels/uels.c, spec/spec.c: change usage appropriately 2012-06-08 16:34 mataki * bin/us/Makefile.am: modify Makefile.am to revert to SPTK-3.5. 2012-06-07 16:02 okdtmhr * include/SPTK.h: add proto type declaration of dct function 2012-06-07 16:01 okdtmhr * bin/mfcc/_mfcc.c: remove definition of dct function 2012-06-07 16:00 okdtmhr * bin/dct/_dct.c: add definition of dct function 2012-06-07 08:36 okdtmhr * bin/psgr/plot.c: comment out some functions 2012-06-07 08:08 okdtmhr * lib/Makefile.am: add _dct.c to Makefile.am 2012-06-07 08:04 okdtmhr * include/SPTK.h: add proto type declaration 2012-06-07 08:00 okdtmhr * script/wav2raw.in: this version can convert left and right sound from stereo wav file 2012-06-07 07:49 okdtmhr * bin/mfcc/: _mfcc.c, mfcc.c: change dct function,move definition of function 2012-06-07 07:41 okdtmhr * bin/dct/: _dct.c, dct.c: divide dct.c into two files; dct.c _dct.c 2012-06-07 07:32 okdtmhr * bin/idct/idct.c: change dft function to static 2012-06-06 21:10 mataki * bin/: acep/Makefile.am, acorr/Makefile.am, agcep/Makefile.am, amcep/Makefile.am, average/Makefile.am, b2mc/Makefile.am, bcp/Makefile.am, bcut/Makefile.am, c2acr/Makefile.am, c2ir/Makefile.am, c2sp/Makefile.am, cat2/Makefile.am, cdist/Makefile.am, clip/Makefile.am, da/Makefile.am, dct/Makefile.am, decimate/Makefile.am, delay/Makefile.am, delta/Makefile.am, df2/Makefile.am, dfs/Makefile.am, dmp/Makefile.am, ds/Makefile.am, dtw/Makefile.am, echo2/Makefile.am, excite/Makefile.am, extract/Makefile.am, fd/Makefile.am, fft/Makefile.am, fft2/Makefile.am, fftcep/Makefile.am, fftr/Makefile.am, fftr2/Makefile.am, fig+fdrw/Makefile.am, frame/Makefile.am, freqt/Makefile.am, gc2gc/Makefile.am, gcep/Makefile.am, glsadf/Makefile.am, gmm/Makefile.am, gnorm/Makefile.am, grpdelay/Makefile.am, histogram/Makefile.am, idct/Makefile.am, ifft/Makefile.am, ifft2/Makefile.am, ignorm/Makefile.am, impulse/Makefile.am, imsvq/Makefile.am, interpolate/Makefile.am, ivq/Makefile.am, lbg/Makefile.am, levdur/Makefile.am, linear_intpl/Makefile.am, lmadf/Makefile.am, lpc/Makefile.am, lpc2c/Makefile.am, lpc2lsp/Makefile.am, lpc2par/Makefile.am, lsp2lpc/Makefile.am, lspcheck/Makefile.am, lspdf/Makefile.am, ltcdf/Makefile.am, mc2b/Makefile.am, mcep/Makefile.am, merge/Makefile.am, mfcc/Makefile.am, mgc2mgc/Makefile.am, mgc2sp/Makefile.am, mgcep/Makefile.am, mglsadf/Makefile.am, minmax/Makefile.am, mlpg/Makefile.am, mlsadf/Makefile.am, msvq/Makefile.am, nan/Makefile.am, norm0/Makefile.am, nrand/Makefile.am, par2lpc/Makefile.am, pca/Makefile.am, phase/Makefile.am, pitch/Makefile.am, poledf/Makefile.am, psgr/Makefile.am, ramp/Makefile.am, rawtowav/Makefile.am, reverse/Makefile.am, rmse/Makefile.am, root_pol/Makefile.am, sin/Makefile.am, smcep/Makefile.am, snr/Makefile.am, sopr/Makefile.am, spec/Makefile.am, step/Makefile.am, swab/Makefile.am, train/Makefile.am, uels/Makefile.am, ulaw/Makefile.am, us/Makefile.am, vopr/Makefile.am, vq/Makefile.am, vstat/Makefile.am, vsum/Makefile.am, window/Makefile.am, x2x/Makefile.am, xgr/Makefile.am, zcross/Makefile.am, zerodf/Makefile.am: change build directory for libSPTK.a 2012-06-05 20:37 mataki * bin/x2x/x2x.c: bug fix for +fa, +da, and +dea option. 2012-06-05 18:40 okdtmhr * bin/spec/spec.c: add -E option; floor periodgram in db 2012-06-05 18:39 okdtmhr * bin/smcep/_smcep.c: change error message 2012-06-05 18:35 okdtmhr * bin/uels/: _uels.c, uels.c: add -E option; floor periodgram in db 2012-06-05 18:30 okdtmhr * bin/gcep/: _gcep.c, gcep.c: add -E option; floor periodgram in db 2012-06-05 18:25 okdtmhr * bin/smcep/: _smcep.c, smcep.c: add -E option; floor periodgram in db 2012-06-05 18:16 okdtmhr * bin/mgcep/: _mgcep.c, mgcep.c: add -E option; floor periodgram in db 2012-06-05 18:05 okdtmhr * include/SPTK.h: change proto type declaration of mcep, mgcep, gcep, smcep and uels 2012-06-05 17:42 okdtmhr * bin/mcep/: _mcep.c, mcep.c: add -E option; floor periodgram in db 2012-06-05 08:46 okdtmhr * bin/xgr/: gcdata.h, plot.c: remove unused function and so on 2012-06-05 08:25 okdtmhr * bin/: fft/fft.c, fftr/fftr.c, ifft/ifft.c, ifft2/ifft2.c: move fft function into main function 2012-06-05 08:00 okdtmhr * bin/vstat/vstat.c: remove warning in usage 2012-06-05 07:53 okdtmhr * bin/: snr/snr.c, sopr/sopr.c, swab/swab.c: remove unused variables 2012-06-05 07:51 okdtmhr * bin/lspcheck/lspcheck.c: add proto type declaration 2012-06-05 07:45 okdtmhr * bin/mlpg/mlpg.c: change functions name, remove unused variables 2012-06-05 03:36 okdtmhr * bin/pca/pca.c: remove unused variables 2012-06-05 03:30 okdtmhr * bin/dtw/dtw.c: change function name, remove unused variables 2012-06-05 03:17 okdtmhr * bin/da/winplay.c: comment out "rcs_id" 2012-06-05 03:08 okdtmhr * bin/bcut/bcut.c: remove unused variables 2012-06-05 02:49 okdtmhr * bin/gmm/_gmm.c: [no log message] 2012-06-03 12:55 mataki * bin/mfcc/_mfcc.c: move bin/window/_window.c to lib/window.c 2012-06-03 12:46 mataki * bin/mfcc/_mfcc.c, bin/window/Makefile.am, bin/window/_window.c, lib/Makefile.am, lib/window.c: move bin/window/_window.c to lib/window.c 2012-05-22 20:41 mataki * bin/gmm/gmm.c: add -g option to specify GMM initial parameter file 2012-05-17 18:52 mataki * bin/x2x/x2x.c: Fix a bug suggested by Heiga Zen of Google UK Ltd. 2012-05-17 15:42 mataki * bin/delta/delta.c, include/SPTK.h, lib/Makefile.am, lib/invert.c: add invert.c to calculate inverse matrix 2012-05-17 15:22 mataki * bin/mfcc/_mfcc.c: rename function and remove warning messages 2012-05-17 15:16 mataki * bin/pca/pcas.c: remove unused variable 2012-05-17 15:09 mataki * bin/pitch/: pitch.c, snack/jkGetF0.c, snack/jkGetF0.h, snack/sigproc.c, swipe/swipe.c, swipe/vector.c: remove specific algorithm dependent code from pitch.c and remove warnings in compilation. 2012-05-17 14:02 mataki * bin/: gmm/gmmp.c, pca/pcas.c: remove unused variables 2012-05-17 11:59 mataki * bin/: gmm/gmmp.c, pca/pcas.c: modify source code to read input data sequencially 2012-05-07 18:07 mataki * bin/mgc2mgc/mgc2mgc.c: Merged patch code by Heiga Zen of Google UK Ltd. 2011-12-21 00:27 uratec * AUTHORS, README, bin/lpc2lsp/lpc2lsp.c, bin/lsp2lpc/lsp2lpc.c, bin/lspcheck/lspcheck.c: Modify documents. 2011-12-20 11:45 mataki * ChangeLog, bin/Makefile.am, bin/pitch/Makefile.am: Include COPYING and header file for pitch command in the distribution. 2011-12-20 11:33 mataki * ChangeLog, bin/Makefile.am: include COPYING and header file for pitch command in the distribution. 2011-12-19 21:47 mataki * ChangeLog, NEWS, bin/pitch/pitch.c: Fix NEWS and pitch.c for layout of help message. 2011-12-19 15:14 mataki * ChangeLog: update ChangeLog for SPTK-3.5. 2011-12-19 15:00 mataki * NEWS, README, configure.ac, bin/bcp/bcp.c, bin/delta/delta.c, bin/dtw/dtw.c, bin/frame/frame.c, bin/lpc2lsp/lpc2lsp.c, bin/lsp2lpc/lsp2lpc.c, bin/lspcheck/lspcheck.c, bin/merge/merge.c, bin/mfcc/_mfcc.c, bin/pitch/pitch.c, bin/psgr/psgr.c, bin/sopr/sopr.c, include/SPTK.h, script/wav2raw.in: Update all documents to SPTK-3.5. Unify linefeed code of all source code into . Fix all indent in all source code by using 'indent -kr -nut -i 3 -l 80' command. 2011-12-12 21:51 mataki * bin/pca/: pca.c, pcas.c: fix bug for fprintf, suggested by Junichi Yamagishi, University of Edinburgh. 2011-12-12 13:49 sawada11 * bin/pitch/pitch.c: Modify -s option (Hz -> kHz, int -> float) 2011-12-12 13:47 sawada11 * bin/: lspcheck/lspcheck.c, lspcheck/_lspcheck.c, lsp2lpc/lsp2lpc.c, lpc2lsp/lpc2lsp.c: Change sample frequency data type (int -> float) 2011-12-10 13:08 mataki * bin/: excite/excite.c, fig+fdrw/fig1.c, nrand/nrand.c, pitch/pitch.c: bug fix. 2011-12-09 20:38 mataki * configure.ac, bin/Makefile.am, bin/Makefile.mak, bin/dtw/.cvsignore, bin/dtw/Makefile.am, bin/dtw/dtw.c: add dtw command. 2011-12-09 15:39 sawada11 * bin/frame/frame.c: Fix bug 2011-12-08 17:43 mataki * bin/: mfcc/mfcc.c, df2/df2.c: Change unit for sampling frequency: Hz -> kHz. 2011-12-07 21:28 uratec * include/SPTK.h, lib/Makefile.am: remove an old source. 2011-12-07 19:21 uratec * bin/pitch/_pitch.c: remove an old source. 2011-12-07 18:22 mataki * bin/psgr/eps.c: add '#include ' for function 'strcpy'. 2011-12-06 18:29 sawada11 * bin/pitch/: pitch.c, snack/jkGetF0.c: Correspond to the lack of the number of frame in snack 2011-11-30 13:21 sawada11 * bin/frame/frame.c: Fix bug 2011-11-29 19:23 sawada11 * script/Makefile.am: add mgc2mgclsp and mgclsp2mgc command 2011-11-29 19:08 sawada11 * script/mgclsp2mgc.in: add mgclsp2mgc command 2011-11-29 19:07 sawada11 * script/mgc2mgclsp.in: add mgc2mgclsp command 2011-11-28 21:21 mataki * bin/pitch/swipe/swipe.h: Remove swipe.h. This file is not needed. 2011-11-28 19:01 mataki * bin/pitch/swipe/: COPYING, swipe.c, swipe.h, vector.c, vector.h: Update version of swipe: ver1.4. 2011-11-23 13:20 mataki * bin/pitch/snack/jkGetF0.c: Fix the code; from malloc to fgetmem 2011-11-22 22:37 mataki * bin/pitch/snack/jkGetF0.c: delete irregular new line in the SPTK license. 2011-11-22 22:32 mataki * bin/pitch/snack/jkGetF0.c: Fix the problem for inplict declaration functions. 2011-11-18 15:53 sawada11 * bin/mfcc/: .cvsignore, _mfcc.c, mfcc.c: add .cvsignore file in mfcc 2011-11-07 10:43 sawada11 * bin/pitch/pitch.c: Fix bug 2011-11-04 14:05 sawada11 * bin/pitch/: Makefile.am, pitch.c: add SWIPE algorithm for pitch estimation in pitch command 2011-11-04 14:02 sawada11 * bin/pitch/swipe/COPYING: add COPYING for SWIPE algorithm (pitch command) 2011-11-04 14:00 sawada11 * bin/pitch/swipe/: swipe.c, vector.c, vector.h: add SWIPE algorithm for pitch estimation in pitch command 2011-10-31 18:33 mataki * bin/pitch/snack/: jkGetF0.c, jkGetF0.h, sigproc.c: Add RCS ID. 2011-10-31 18:24 mataki * bin/pitch/: pitch.c, snack/jkGetF0.c: Modify jkGetF0.c to check input parameters and to output error messages according to the original of jkGetF0.c 2011-10-30 13:11 mataki * bin/delta/delta.c: bug fix for input from stdin. 2011-10-28 18:52 mataki * bin/pitch/pitch.c: Remove -l option for specifying frame length. 2011-10-28 18:46 mataki * bin/pitch/snack/COPYING: Modify COPYING for snack. 2011-10-28 18:40 uratec * README: Modify readme for copyright of snack. 2011-10-28 18:38 mataki * bin/delta/delta.c: Bug fix for calculation of regression coefficients (-R option) and Fix the know problem to read input from stdin. -t option is removed. 2011-10-27 22:19 mataki * bin/pitch/: Makefile.am, pitch.c, snack/COPYING, snack/jkGetF0.c, snack/jkGetF0.h, snack/sigproc.c: Integrate getf0 into pitch command. 2011-10-26 12:34 mataki * bin/merge/merge.c: fix a bug when insert file name is not specified. 2011-10-03 17:50 mataki * bin/sopr/sopr.c: Fix a small bug for -magic option. 2011-10-03 14:14 mataki * bin/sopr/sopr.c: Fix a bug suggested by Keiichiro Oura, Nagoya Institute of Technology. 2011-09-09 18:42 mataki * bin/pca/.cvsignore: Change command name : from pcap to pcas. 2011-09-05 10:28 sawada11 * bin/mfcc/_mfcc.c: Bug fixed 2011-09-05 10:27 sawada11 * bin/mfcc/mfcc.c: modify -a option (default value:0.0 -> 0.97) 2011-08-23 17:54 sawada11 * configure.ac, bin/Makefile.am, bin/Makefile.mak: add mfcc function 2011-08-23 17:51 sawada11 * bin/mfcc/Makefile.am, bin/mfcc/_mfcc.c, bin/mfcc/mfcc.c, include/SPTK.h, lib/Makefile.am, lib/Makefile.mak: add mfcc function 2011-08-10 15:12 mataki * bin/mgc2mgc/mgc2mgc.c: remove redundant fprintf. 2011-08-10 14:10 mataki * bin/mgc2mgc/mgc2mgc.c: remove redundant fprintf. 2011-07-28 18:22 mataki * bin/x2x/x2x.c: bug fix to avoid infinite loop when non-numerical character is input (+type1=a) 2011-07-28 17:59 mataki * bin/x2x/x2x.c: bug fix to skip non-numerical character for input when type1=a (ascii) is specified. 2011-06-16 15:19 mataki * bin/bcp/bcp.c: Fix help message. 2011-06-08 11:39 mataki * bin/delta/delta.c: Bug fix to output magic number 2011-06-06 21:01 mataki * script/wav2raw.in: Fixed code to deal with IEEE float format. 2011-06-06 14:11 mataki * bin/delta/delta.c: Add -R and -M option to skip the magic number during the delta calculation. 2011-06-05 23:35 mataki * bin/idct/idct.c: fix a bug. 2011-05-31 13:46 sawada11 * script/glogsp.in: Bug fixing for -c option 2011-05-31 13:40 sawada11 * bin/psgr/psgr.c: modified -p option (default: A4 -> FALSE) 2011-05-31 13:34 sawada11 * script/grlogsp.in: add running spectrum position (-O option) 2011-04-28 21:43 mataki * script/wav2raw.in: bug fixed. 2011-04-28 16:53 mataki * ChangeLog: Update ChangeLog for SPTK-3.4.1 2011-04-28 08:24 uratec * NEWS, README: Modify indent of text. 2011-04-28 01:24 mataki * ChangeLog, NEWS, README, script/wav2raw.in: fix documents for SPTK 3.4.1 2011-04-27 22:46 mataki * COPYING, ChangeLog, NEWS, README, configure.ac, bin/acep/_acep.c, bin/acep/acep.c, bin/acorr/_acorr.c, bin/acorr/acorr.c, bin/agcep/_agcep.c, bin/agcep/agcep.c, bin/amcep/_amcep.c, bin/amcep/amcep.c, bin/average/_average.c, bin/average/average.c, bin/b2mc/_b2mc.c, bin/b2mc/b2mc.c, bin/bcp/bcp.c, bin/bcut/bcut.c, bin/c2acr/_c2acr.c, bin/c2acr/c2acr.c, bin/c2ir/_c2ir.c, bin/c2ir/c2ir.c, bin/c2sp/_c2sp.c, bin/c2sp/c2sp.c, bin/cat2/cat2.c, bin/cdist/cdist.c, bin/clip/_clip.c, bin/clip/clip.c, bin/da/da.h, bin/da/da.in, bin/da/dawrite.c, bin/da/winplay.c, bin/da/winplay.h, bin/dct/dct.c, bin/decimate/decimate.c, bin/delay/delay.c, bin/delta/delta.c, bin/df2/_df2.c, bin/df2/df2.c, bin/dfs/_dfs.c, bin/dfs/dfs.c, bin/dmp/dmp.c, bin/ds/ds.c, bin/echo2/echo2.c, bin/excite/excite.c, bin/extract/extract.c, bin/fd/fd.c, bin/fft/_fft.c, bin/fft/fft.c, bin/fft2/_fft2.c, bin/fft2/fft2.c, bin/fftcep/_fftcep.c, bin/fftcep/fftcep.c, bin/fftr/_fftr.c, bin/fftr/fftr.c, bin/fftr2/_fftr2.c, bin/fftr2/fftr2.c, bin/fig+fdrw/fdrw.c, bin/fig+fdrw/fig.c, bin/fig+fdrw/fig.h, bin/fig+fdrw/fig0.c, bin/fig+fdrw/fig1.c, bin/fig+fdrw/plot.c, bin/fig+fdrw/plot.h, bin/fig+fdrw/plsub.c, bin/frame/frame.c, bin/freqt/_freqt.c, bin/freqt/freqt.c, bin/gc2gc/_gc2gc.c, bin/gc2gc/gc2gc.c, bin/gcep/_gcep.c, bin/gcep/gcep.c, bin/glsadf/_glsadf.c, bin/glsadf/glsadf.c, bin/gmm/_gmm.c, bin/gmm/gmm.c, bin/gmm/gmm.h, bin/gmm/gmmp.c, bin/gnorm/_gnorm.c, bin/gnorm/gnorm.c, bin/grpdelay/_grpdelay.c, bin/grpdelay/grpdelay.c, bin/histogram/_histogram.c, bin/histogram/histogram.c, bin/idct/idct.c, bin/ifft/_ifft.c, bin/ifft/ifft.c, bin/ifft2/_ifft2.c, bin/ifft2/ifft2.c, bin/ignorm/_ignorm.c, bin/ignorm/ignorm.c, bin/impulse/impulse.c, bin/imsvq/_imsvq.c, bin/imsvq/imsvq.c, bin/interpolate/interpolate.c, bin/ivq/_ivq.c, bin/ivq/ivq.c, bin/lbg/_lbg.c, bin/lbg/lbg.c, bin/levdur/_levdur.c, bin/levdur/levdur.c, bin/linear_intpl/linear_intpl.c, bin/lmadf/_lmadf.c, bin/lmadf/lmadf.c, bin/lpc/_lpc.c, bin/lpc/lpc.c, bin/lpc2c/_lpc2c.c, bin/lpc2c/lpc2c.c, bin/lpc2lsp/_lpc2lsp.c, bin/lpc2lsp/lpc2lsp.c, bin/lpc2par/_lpc2par.c, bin/lpc2par/lpc2par.c, bin/lsp2lpc/_lsp2lpc.c, bin/lsp2lpc/lsp2lpc.c, bin/lspcheck/_lspcheck.c, bin/lspcheck/lspcheck.c, bin/lspdf/_lspdf.c, bin/lspdf/lspdf.c, bin/ltcdf/_ltcdf.c, bin/ltcdf/ltcdf.c, bin/mc2b/_mc2b.c, bin/mc2b/mc2b.c, bin/mcep/_mcep.c, bin/mcep/mcep.c, bin/merge/merge.c, bin/mgc2mgc/_mgc2mgc.c, bin/mgc2mgc/mgc2mgc.c, bin/mgc2sp/_mgc2sp.c, bin/mgc2sp/mgc2sp.c, bin/mgcep/_mgcep.c, bin/mgcep/mgcep.c, bin/mglsadf/_mglsadf.c, bin/mglsadf/mglsadf.c, bin/minmax/minmax.c, bin/mlpg/_mlpg.c, bin/mlpg/mlpg.c, bin/mlsadf/_mlsadf.c, bin/mlsadf/mlsadf.c, bin/msvq/_msvq.c, bin/msvq/msvq.c, bin/nan/nan.c, bin/norm0/_norm0.c, bin/norm0/norm0.c, bin/nrand/_nrand.c, bin/nrand/nrand.c, bin/par2lpc/_par2lpc.c, bin/par2lpc/par2lpc.c, bin/pca/pca.c, bin/pca/pcas.c, bin/phase/_phase.c, bin/phase/phase.c, bin/pitch/_pitch.c, bin/pitch/pitch.c, bin/poledf/_poledf.c, bin/poledf/poledf.c, bin/psgr/dict.c, bin/psgr/eps.c, bin/psgr/plot.c, bin/psgr/psgr.c, bin/psgr/psgr.h, bin/ramp/ramp.c, bin/rawtowav/rawtowav.c, bin/reverse/_reverse.c, bin/reverse/reverse.c, bin/rmse/_rmse.c, bin/rmse/rmse.c, bin/root_pol/_root_pol.c, bin/root_pol/root_pol.c, bin/sin/sin.c, bin/smcep/_smcep.c, bin/smcep/smcep.c, bin/snr/snr.c, bin/sopr/sopr.c, bin/spec/spec.c, bin/step/step.c, bin/swab/swab.c, bin/train/train.c, bin/uels/_uels.c, bin/uels/uels.c, bin/ulaw/_ulaw.c, bin/ulaw/ulaw.c, bin/us/us.c, bin/us/us16.in, bin/us/uscd.in, bin/vopr/vopr.c, bin/vq/_vq.c, bin/vq/vq.c, bin/vstat/vstat.c, bin/vsum/vsum.c, bin/window/_window.c, bin/window/window.c, bin/x2x/x2x.c, bin/xgr/config.h, bin/xgr/gcdata.h, bin/xgr/plot.c, bin/xgr/window.c, bin/xgr/xgr.c, bin/xgr/xgr.h, bin/zcross/_zcross.c, bin/zcross/zcross.c, bin/zerodf/_zerodf.c, bin/zerodf/zerodf.c, include/SPTK.h, lib/agexp.c, lib/cholesky.c, lib/fileio.c, lib/fillz.c, lib/getfp.c, lib/getmem.c, lib/gexp.c, lib/glog.c, lib/ifftr.c, lib/matrix.c, lib/movem.c, lib/mseq.c, lib/theq.c, lib/toeplitz.c, script/bell.in, script/glogsp.in, script/grlogsp.in, script/gwave.in, script/raw2wav.in: Update all documents to SPTK-3.4.1. Unify linefeed code of all source code to . Fix all indent in all source code by using 'indent -kr -nut -i 3 -l 80' command. 2011-04-26 22:41 mataki * bin/bcp/bcp.c, bin/bcut/bcut.c, bin/da/da.in, bin/dmp/dmp.c, bin/fd/fd.c, bin/frame/frame.c, bin/merge/merge.c, bin/rawtowav/rawtowav.c, bin/snr/snr.c, bin/swab/swab.c, bin/us/us16.in, bin/us/uscd.in, script/gwave.in, script/raw2wav.in, script/wav2raw.in: fix input/output data type 2011-04-26 21:05 mataki * configure.ac, bin/Makefile.am, bin/Makefile.mak: add idct command. 2011-04-26 20:58 mataki * bin/idct/: .cvsignore, Makefile.am, idct.c: add idct command. 2011-02-22 15:42 sawada11 * bin/x2x/x2x.c: modify help message 2011-02-21 16:38 sawada11 * bin/: dct/dct.c, delta/delta.c: Bug fixing 2011-02-17 21:46 mataki * bin/: da/dawrite.c, ifft/ifft.c, ifft2/ifft2.c, minmax/minmax.c, nan/nan.c, x2x/x2x.c: Fix a bug suggested by Heiga Zen of Toshiba Research Europe Ltd. Cambridge Research Laboratory. 2011-02-17 21:39 mataki * bin/sopr/sopr.c: modify the behavior when specifying -magic and -MAGIC option and the new two constants, cent and octave are added. 2011-02-16 18:45 mataki * bin/Makefile.mak: substitute pcas.c for pcap.c 2011-02-16 18:20 mataki * bin/pca/pcas.c: substitute pcas.c for pcap.c 2011-02-16 18:17 mataki * bin/pca/: Makefile.am, pcap.c: remove pcap.c for pcas.c 2010-12-14 10:16 uratec * AUTHORS, README: Add 'Akira Tamamori' to AUTHORS and README. Update configure for building reference. 2010-12-11 02:28 uratec * ChangeLog, NEWS, bin/b2mc/_b2mc.c, bin/c2acr/_c2acr.c, bin/c2ir/_c2ir.c, bin/mc2b/_mc2b.c, bin/poledf/_poledf.c, bin/ulaw/_ulaw.c, lib/Makefile.lib.in: Remove old file (Makefile.lib.in) 2010-12-11 01:53 uratec * Makefile.mak, bin/Makefile.mak, lib/Makefile.mak: Fix double-compile for nmake. 2010-12-10 19:44 mataki * COPYING, ChangeLog, NEWS, README, configure.ac, bin/acep/_acep.c, bin/acep/acep.c, bin/acorr/_acorr.c, bin/acorr/acorr.c, bin/agcep/_agcep.c, bin/agcep/agcep.c, bin/amcep/_amcep.c, bin/amcep/amcep.c, bin/average/_average.c, bin/average/average.c, bin/b2mc/b2mc.c, bin/bcp/bcp.c, bin/bcut/bcut.c, bin/c2acr/c2acr.c, bin/c2ir/c2ir.c, bin/c2sp/_c2sp.c, bin/c2sp/c2sp.c, bin/cat2/cat2.c, bin/cdist/cdist.c, bin/clip/_clip.c, bin/clip/clip.c, bin/da/da.h, bin/da/da.in, bin/da/dawrite.c, bin/da/winplay.c, bin/da/winplay.h, bin/dct/dct.c, bin/decimate/decimate.c, bin/delay/delay.c, bin/delta/delta.c, bin/df2/_df2.c, bin/df2/df2.c, bin/dfs/_dfs.c, bin/dfs/dfs.c, bin/dmp/dmp.c, bin/ds/ds.c, bin/echo2/echo2.c, bin/excite/excite.c, bin/extract/extract.c, bin/fd/fd.c, bin/fft/_fft.c, bin/fft/fft.c, bin/fft2/_fft2.c, bin/fft2/fft2.c, bin/fftcep/_fftcep.c, bin/fftcep/fftcep.c, bin/fftr/_fftr.c, bin/fftr/fftr.c, bin/fftr2/_fftr2.c, bin/fftr2/fftr2.c, bin/fig+fdrw/fdrw.c, bin/fig+fdrw/fig.c, bin/fig+fdrw/fig.h, bin/fig+fdrw/fig0.c, bin/fig+fdrw/fig1.c, bin/fig+fdrw/plot.c, bin/fig+fdrw/plot.h, bin/fig+fdrw/plsub.c, bin/frame/frame.c, bin/freqt/_freqt.c, bin/freqt/freqt.c, bin/gc2gc/_gc2gc.c, bin/gc2gc/gc2gc.c, bin/gcep/_gcep.c, bin/glsadf/_glsadf.c, bin/glsadf/glsadf.c, bin/gmm/_gmm.c, bin/gmm/gmm.c, bin/gmm/gmm.h, bin/gmm/gmmp.c, bin/gnorm/_gnorm.c, bin/gnorm/gnorm.c, bin/grpdelay/_grpdelay.c, bin/grpdelay/grpdelay.c, bin/histogram/_histogram.c, bin/histogram/histogram.c, bin/ifft/_ifft.c, bin/ifft/ifft.c, bin/ifft2/_ifft2.c, bin/ifft2/ifft2.c, bin/ignorm/_ignorm.c, bin/ignorm/ignorm.c, bin/impulse/impulse.c, bin/imsvq/_imsvq.c, bin/imsvq/imsvq.c, bin/interpolate/interpolate.c, bin/ivq/_ivq.c, bin/ivq/ivq.c, bin/lbg/_lbg.c, bin/lbg/lbg.c, bin/levdur/_levdur.c, bin/levdur/levdur.c, bin/linear_intpl/linear_intpl.c, bin/lpc/_lpc.c, bin/lpc/lpc.c, bin/lpc2c/_lpc2c.c, bin/lpc2c/lpc2c.c, bin/lpc2lsp/_lpc2lsp.c, bin/lpc2lsp/lpc2lsp.c, bin/lpc2par/_lpc2par.c, bin/lpc2par/lpc2par.c, bin/lsp2lpc/_lsp2lpc.c, bin/lsp2lpc/lsp2lpc.c, bin/lspcheck/_lspcheck.c, bin/lspcheck/lspcheck.c, bin/lspdf/_lspdf.c, bin/lspdf/lspdf.c, bin/ltcdf/_ltcdf.c, bin/ltcdf/ltcdf.c, bin/mc2b/mc2b.c, bin/mcep/_mcep.c, bin/mcep/mcep.c, bin/merge/merge.c, bin/mgc2mgc/_mgc2mgc.c, bin/mgc2mgc/mgc2mgc.c, bin/mgc2sp/_mgc2sp.c, bin/mgc2sp/mgc2sp.c, bin/mgcep/_mgcep.c, bin/mgcep/mgcep.c, bin/mglsadf/_mglsadf.c, bin/mglsadf/mglsadf.c, bin/minmax/minmax.c, bin/mlpg/_mlpg.c, bin/mlpg/mlpg.c, bin/msvq/_msvq.c, bin/msvq/msvq.c, bin/nan/nan.c, bin/norm0/_norm0.c, bin/norm0/norm0.c, bin/nrand/_nrand.c, bin/nrand/nrand.c, bin/par2lpc/_par2lpc.c, bin/par2lpc/par2lpc.c, bin/pca/pca.c, bin/pca/pcap.c, bin/phase/_phase.c, bin/phase/phase.c, bin/pitch/_pitch.c, bin/pitch/pitch.c, bin/poledf/poledf.c, bin/psgr/dict.c, bin/psgr/eps.c, bin/psgr/plot.c, bin/psgr/psgr.c, bin/psgr/psgr.h, bin/ramp/ramp.c, bin/rawtowav/rawtowav.c, bin/reverse/_reverse.c, bin/reverse/reverse.c, bin/rmse/_rmse.c, bin/rmse/rmse.c, bin/root_pol/_root_pol.c, bin/root_pol/root_pol.c, bin/sin/sin.c, bin/smcep/_smcep.c, bin/smcep/smcep.c, bin/snr/snr.c, bin/sopr/sopr.c, bin/spec/spec.c, bin/step/step.c, bin/train/train.c, bin/uels/_uels.c, bin/ulaw/ulaw.c, bin/us/us.c, bin/us/us16.in, bin/us/uscd.in, bin/vopr/vopr.c, bin/vq/_vq.c, bin/vq/vq.c, bin/vstat/vstat.c, bin/vsum/vsum.c, bin/window/_window.c, bin/window/window.c, bin/x2x/x2x.c, bin/xgr/config.h, bin/xgr/gcdata.h, bin/xgr/plot.c, bin/xgr/window.c, bin/xgr/xgr.c, bin/xgr/xgr.h, bin/zcross/_zcross.c, bin/zcross/zcross.c, bin/zerodf/_zerodf.c, bin/zerodf/zerodf.c, include/SPTK.h, lib/agexp.c, lib/cholesky.c, lib/fillz.c, lib/getfp.c, lib/getmem.c, lib/gexp.c, lib/glog.c, lib/ifftr.c, lib/matrix.c, lib/movem.c, lib/mseq.c, lib/theq.c, lib/toeplitz.c, script/bell.in: Update all documents to SPTK-3.4. Unify linefeed code of all source code to . Fix all indent in all source code by using 'indent -kr -nut -i 3 -l 80' command. 2010-12-10 17:22 sawada11 * bin/sopr/sopr.c: fix help message 2010-12-09 13:47 mataki * lib/fileio.c: Fixed a source code for double I/O compilation 2010-12-08 17:09 mataki * bin/Makefile.mak: Fixed some indentations (from SPACE to TAB). 2010-12-08 16:57 mataki * Makefile.mak, bin/Makefile.mak: Fixed Makefile.mak for double I/O compilation 2010-12-07 22:06 sawada11 * bin/sopr/sopr.c: add -magic and -MAGIC option (for magic number) 2010-12-05 22:04 mataki * include/SPTK.h, lib/fileio.c: Fixed sources for double I/O compilation 2010-11-29 16:38 mataki * script/wav2raw.in: a bug of macro for path is fixed. 2010-11-24 20:11 mataki * bin/mglsadf/_mglsadf.c: Fix a bug suggested by Heiga Zen of Toshiba Research Europe Ltd. Cambridge Research Laboratory : delete unnecessary fprintf() 2010-11-24 18:27 mataki * bin/mglsadf/mglsadf.c: Fix a bug suggested by Heiga Zen of Toshiba Research Europe Ltd. Cambridge Research Laboratory: inverse filtering in mglsadf 2010-11-19 17:00 sawada11 * bin/x2x/x2x.c: Bug fixing 2010-10-26 18:00 mataki * bin/: da/dawrite.c, dct/dct.c, pca/pca.c, pca/pcap.c, rawtowav/rawtowav.c, x2x/x2x.c: Fix the sources for wrapping function of SPTK 2010-10-12 19:16 sawada11 * script/: glogsp.in, grlogsp.in, gwave.in: Bug fixing for -F option 2010-10-12 19:08 sawada11 * bin/fig+fdrw/: fdrw.c, fig.c, fig0.c, plot.c, plot.h, plsub.c: Bug fixing for the maximum drawing area 2010-10-12 19:04 sawada11 * bin/psgr/: psgr.c, eps.c: Bug fixing for making bounding box 2010-10-12 18:54 sawada11 * bin/x2x/x2x.c: add new data type and modify -o option 2010-10-08 19:30 mataki * bin/Makefile.mak: Add fig.exe and fdrw.exe 2010-10-06 19:20 mataki * bin/: da/dawrite.c, dct/dct.c, delta/delta.c, gmm/_gmm.c, gmm/gmm.c, mlpg/mlpg.c, rawtowav/rawtowav.c: Modified source files for wrapper function of SPTK 2010-09-01 21:07 mataki * bin/fig+fdrw/plot.c: Modified for compilation in Windows 2010-09-01 21:01 mataki * bin/gmm/gmm.c: Add -s option for specifying seed 2010-09-01 14:57 mataki * bin/vstat/: Makefile.am, _vstat.c, vstat.c: Remove _vstat.c 2010-09-01 14:47 mataki * include/SPTK.h: Remove tool routine functions for vstat 2010-09-01 14:45 mataki * lib/: Makefile.am, Makefile.mak: Remove _vstat.c and _vstat.obj 2010-08-31 20:59 mataki * bin/lbg/_lbg.c: Modified the source for centroid update 2010-08-31 20:43 mataki * bin/lbg/lbg.c: Modified the comment and help 2010-08-31 19:54 mataki * include/SPTK.h: Add modules for vstat and lbg is modified 2010-08-31 19:45 mataki * bin/vstat/_vstat.c: Add -o 3 option for confidence interval 2010-08-31 19:40 mataki * bin/vstat/vstat.c: Add -o 3 option for confidence interval 2010-08-31 18:21 sawada11 * bin/x2x/x2x.c: add -o (clipping) and -w (warning) option 2010-08-31 18:12 mataki * bin/vstat/Makefile.am: vstat: Add -o 3 option for confidence interval 2010-08-31 17:58 mataki * lib/: Makefile.mak, Makefile.am: vstat: Add -o 3 option for confidence interval 2010-08-26 16:07 mataki * bin/Makefile.mak: Add dct.exe and gmmp.exe 2010-08-25 22:01 mataki * lib/Makefile.mak: Fix a bug for compilation using Visual Studio C++ 2010-08-25 21:50 mataki * bin/Makefile.mak: Fix a bug for compilation using Visual Studio C++ 2010-08-25 21:38 mataki * bin/Makefile.mak: Fix a bug for compilation using Visual Studio C++ 2010-08-06 19:34 mataki * bin/mgcep/_mgcep.c: Fix a bug suggested by Takashi Nose of Tokyo Institute of Technology:_mgcep.c 2010-08-06 19:31 mataki * bin/mcep/_mcep.c: Fix a bug suggested by Takashi Nose of Tokyo Institute of Technology: _mcep.c 2010-08-06 19:29 mataki * bin/mcep/_mcep.c: Fix a bug suggested by Takashi Nose of Tokyo Institute of Technology:_mcep.c 2010-07-01 14:26 sawada11 * script/: glogsp.in, grlogsp.in, gwave.in: add -F option 2010-07-01 14:10 sawada11 * bin/psgr/eps.c: Bug fixing about bounding box 2010-07-01 14:08 sawada11 * bin/psgr/psgr.c: add papersize (A0,A1,A2,B0,B1,B2,B3) 2010-06-30 20:23 mataki * bin/lbg/: lbg.c, _lbg.c: Add -S option for specifying seed and -k option 2010-06-29 13:17 mataki * bin/sopr/sopr.c: Merge patch code by Heiga Zen of Toshiba Research Europe Ltd. Cambridge ResearchLaboratory: sopr.c.patch 2010-06-21 14:06 mataki * include/SPTK.h: Add new option -m of lbg command for specifying minimum number of train vector for each cell 2010-06-21 13:52 mataki * bin/lbg/_lbg.c: Add new option for specifying minimum number of train vector for each cell 2010-06-21 13:49 mataki * bin/lbg/lbg.c: Add new option -m for specifying minimum number of train vector for each cell 2010-05-20 17:15 mataki * bin/mgc2sp/mgc2sp.c: Add -o 3 option. 2010-05-19 20:05 mataki * bin/spec/spec.c: Add -o 3 option. 2010-04-28 20:39 mataki * bin/mlpg/mlpg.c: Modified mlpg.c by applying patch 2010-04-23 18:31 sawada11 * bin/train/train.c: floating-point support (-p option) 2010-04-12 18:25 uratec * bin/fig+fdrw/fdrw.c, bin/fig+fdrw/fig0.c, bin/gmm/_gmm.c, bin/gmm/gmm.c, include/SPTK.h: Fix all indent in all source code by using 'indent -kr -nut -i 3 -l 80' command. 2010-04-03 13:50 mataki * bin/sopr/sopr.c: The commit date is modefied. 2010-04-03 13:36 mataki * bin/sopr/sopr.c: Substitute macro LOG2(x) for log2(x). 2010-04-02 14:51 senzaimin * include/SPTK.h: add functions for full covariance. 2010-04-02 14:47 senzaimin * bin/gmm/_gmm.c: add -f option. (full covariance) 2010-04-02 14:46 senzaimin * bin/gmm/gmm.c: add -f option. ( full covariance ) 2010-04-02 14:41 senzaimin * bin/fig+fdrw/: fig.c, fig0.c, fdrw.c: Bug fixing. ( -F option ) 2010-04-01 21:27 uratec * bin/lmadf/lmadf.c, bin/mlsadf/mlsadf.c, bin/swab/swab.c, bin/x2x/x2x.c, script/raw2wav.in, script/wav2raw.in: Add i3 option to raw2wav. Re-check *.c (using indent -kr -nut -i 3 -l 80). 2010-04-01 13:41 mataki * bin/x2x/x2x.c: Change the specification of output '+a' option when specifying the column number 2010-03-30 15:14 mataki * bin/swab/swab.c: Add some descriptions for +i3 and +i option in the usage 2010-03-30 15:03 mataki * bin/swab/swab.c: Add +i3 and +i options. 2010-03-25 22:03 uratec * bin/: gcep/gcep.c, lmadf/_lmadf.c, lmadf/lmadf.c, mlsadf/_mlsadf.c, mlsadf/mlsadf.c, uels/uels.c, x2x/x2x.c: Change the appearance of *.c by using 'indent -kr -nut -i 3 -l 80' command. 2010-03-25 21:40 mataki * script/wav2raw.in: Modefication for linear PCM and other format 2010-03-25 18:03 mataki * script/wav2raw.in: The implimentation of wav2raw is revised. 2010-03-23 16:44 mataki * script/Makefile.am: Add description for wav2raw. 2010-03-23 16:41 mataki * script/wav2raw.in: Source file for wav2raw.sh 2010-03-23 15:31 tatsuyaito * bin/lmadf/_lmadf.c, bin/lmadf/lmadf.c, bin/mlsadf/_mlsadf.c, bin/mlsadf/mlsadf.c, include/SPTK.h: Mar.23.2010 transpose filter for mlsadf lmadf updated 2010-03-20 11:40 mataki * bin/x2x/x2x.c: short modefication for x2x.c 2010-03-19 12:27 mataki * bin/x2x/x2x.c: New option i3(integer, 3byte) is added. 2010-03-08 10:50 senzaimin * bin/uels/uels.c: Bug fixing. 2010-03-08 10:48 senzaimin * bin/gcep/gcep.c: Bug fixing 2010-02-23 16:43 senzaimin * script/raw2wav.in: add "set path", "set sptkver", and "set cvsid". 2009-12-25 03:22 uratec * ChangeLog, NEWS, bin/agcep/agcep.c, bin/average/average.c, bin/da/dawrite.c, bin/decimate/decimate.c, bin/extract/extract.c, bin/gc2gc/gc2gc.c, bin/glsadf/glsadf.c, bin/gnorm/gnorm.c, bin/grpdelay/grpdelay.c, bin/ignorm/ignorm.c, bin/impulse/impulse.c, bin/lmadf/lmadf.c, bin/lpc2lsp/lpc2lsp.c, bin/lpc2par/lpc2par.c, bin/lsp2lpc/lsp2lpc.c, bin/lspcheck/lspcheck.c, bin/mgc2mgc/mgc2mgc.c, bin/mgc2sp/mgc2sp.c, bin/mgcep/mgcep.c, bin/mglsadf/mglsadf.c, bin/mlsadf/mlsadf.c, bin/par2lpc/par2lpc.c, bin/reverse/reverse.c, bin/root_pol/root_pol.c, bin/sopr/sopr.c: Re-fix all indent in all source codes. Merge patch code by Heiga Zen of Toshiba Research Europe Ltd. Cambridge Research Laboratory: Add LOG2 and POW2 options to sopr command. 2009-12-16 22:12 uratec * ChangeLog, Makefile.mak, NEWS, README, configure.ac, bin/Makefile.mak, bin/acep/_acep.c, bin/acep/acep.c, bin/acorr/_acorr.c, bin/acorr/acorr.c, bin/agcep/_agcep.c, bin/agcep/agcep.c, bin/amcep/_amcep.c, bin/amcep/amcep.c, bin/average/_average.c, bin/average/average.c, bin/b2mc/_b2mc.c, bin/b2mc/b2mc.c, bin/bcp/bcp.c, bin/bcut/bcut.c, bin/c2acr/_c2acr.c, bin/c2acr/c2acr.c, bin/c2ir/_c2ir.c, bin/c2ir/c2ir.c, bin/c2sp/_c2sp.c, bin/c2sp/c2sp.c, bin/cat2/cat2.c, bin/cdist/cdist.c, bin/clip/_clip.c, bin/clip/clip.c, bin/da/da.h, bin/da/da.in, bin/da/dawrite.c, bin/da/winplay.c, bin/da/winplay.h, bin/dct/dct.c, bin/decimate/decimate.c, bin/delay/delay.c, bin/delta/delta.c, bin/df2/_df2.c, bin/df2/df2.c, bin/dfs/_dfs.c, bin/dfs/dfs.c, bin/dmp/dmp.c, bin/ds/ds.c, bin/echo2/echo2.c, bin/excite/excite.c, bin/extract/extract.c, bin/fd/fd.c, bin/fft/_fft.c, bin/fft/fft.c, bin/fft2/_fft2.c, bin/fft2/fft2.c, bin/fftcep/_fftcep.c, bin/fftcep/fftcep.c, bin/fftr/_fftr.c, bin/fftr/fftr.c, bin/fftr2/_fftr2.c, bin/fftr2/fftr2.c, bin/fig+fdrw/fdrw.c, bin/fig+fdrw/fig.c, bin/fig+fdrw/fig.h, bin/fig+fdrw/fig0.c, bin/fig+fdrw/fig1.c, bin/fig+fdrw/plot.c, bin/fig+fdrw/plot.h, bin/fig+fdrw/plsub.c, bin/frame/frame.c, bin/freqt/_freqt.c, bin/freqt/freqt.c, bin/gc2gc/_gc2gc.c, bin/gc2gc/gc2gc.c, bin/gcep/_gcep.c, bin/gcep/gcep.c, bin/glsadf/_glsadf.c, bin/glsadf/glsadf.c, bin/gmm/_gmm.c, bin/gmm/gmm.c, bin/gmm/gmm.h, bin/gmm/gmmp.c, bin/gnorm/_gnorm.c, bin/gnorm/gnorm.c, bin/grpdelay/_grpdelay.c, bin/grpdelay/grpdelay.c, bin/histogram/_histogram.c, bin/histogram/histogram.c, bin/ifft/_ifft.c, bin/ifft/ifft.c, bin/ifft2/_ifft2.c, bin/ifft2/ifft2.c, bin/ignorm/_ignorm.c, bin/ignorm/ignorm.c, bin/impulse/impulse.c, bin/imsvq/_imsvq.c, bin/imsvq/imsvq.c, bin/interpolate/interpolate.c, bin/ivq/_ivq.c, bin/ivq/ivq.c, bin/lbg/_lbg.c, bin/lbg/lbg.c, bin/levdur/_levdur.c, bin/levdur/levdur.c, bin/linear_intpl/linear_intpl.c, bin/lmadf/_lmadf.c, bin/lmadf/lmadf.c, bin/lpc/_lpc.c, bin/lpc/lpc.c, bin/lpc2c/_lpc2c.c, bin/lpc2c/lpc2c.c, bin/lpc2lsp/_lpc2lsp.c, bin/lpc2lsp/lpc2lsp.c, bin/lpc2par/_lpc2par.c, bin/lpc2par/lpc2par.c, bin/lsp2lpc/_lsp2lpc.c, bin/lsp2lpc/lsp2lpc.c, bin/lspcheck/_lspcheck.c, bin/lspcheck/lspcheck.c, bin/lspdf/_lspdf.c, bin/lspdf/lspdf.c, bin/ltcdf/_ltcdf.c, bin/ltcdf/ltcdf.c, bin/mc2b/_mc2b.c, bin/mc2b/mc2b.c, bin/mcep/_mcep.c, bin/mcep/mcep.c, bin/merge/merge.c, bin/mgc2mgc/_mgc2mgc.c, bin/mgc2mgc/mgc2mgc.c, bin/mgc2sp/_mgc2sp.c, bin/mgc2sp/mgc2sp.c, bin/mgcep/_mgcep.c, bin/mgcep/mgcep.c, bin/mglsadf/_mglsadf.c, bin/mglsadf/mglsadf.c, bin/minmax/minmax.c, bin/mlpg/_mlpg.c, bin/mlpg/mlpg.c, bin/mlsadf/_mlsadf.c, bin/mlsadf/mlsadf.c, bin/msvq/_msvq.c, bin/msvq/msvq.c, bin/nan/nan.c, bin/norm0/_norm0.c, bin/norm0/norm0.c, bin/nrand/_nrand.c, bin/nrand/nrand.c, bin/par2lpc/_par2lpc.c, bin/par2lpc/par2lpc.c, bin/pca/pca.c, bin/pca/pcap.c, bin/phase/_phase.c, bin/phase/phase.c, bin/pitch/_pitch.c, bin/pitch/pitch.c, bin/poledf/_poledf.c, bin/poledf/poledf.c, bin/psgr/dict.c, bin/psgr/eps.c, bin/psgr/plot.c, bin/psgr/psgr.c, bin/psgr/psgr.h, bin/ramp/ramp.c, bin/rawtowav/rawtowav.c, bin/reverse/_reverse.c, bin/reverse/reverse.c, bin/rmse/_rmse.c, bin/rmse/rmse.c, bin/root_pol/_root_pol.c, bin/root_pol/root_pol.c, bin/sin/sin.c, bin/smcep/_smcep.c, bin/smcep/smcep.c, bin/snr/snr.c, bin/sopr/sopr.c, bin/spec/spec.c, bin/step/step.c, bin/swab/swab.c, bin/train/train.c, bin/uels/_uels.c, bin/uels/uels.c, bin/ulaw/_ulaw.c, bin/ulaw/ulaw.c, bin/us/us.c, bin/us/us16.in, bin/us/uscd.in, bin/vopr/vopr.c, bin/vq/_vq.c, bin/vq/vq.c, bin/vstat/vstat.c, bin/vsum/vsum.c, bin/window/_window.c, bin/window/window.c, bin/x2x/x2x.c, bin/xgr/config.h, bin/xgr/gcdata.h, bin/xgr/plot.c, bin/xgr/window.c, bin/xgr/xgr.c, bin/xgr/xgr.h, bin/zcross/_zcross.c, bin/zcross/zcross.c, bin/zerodf/_zerodf.c, bin/zerodf/zerodf.c, include/SPTK.h, lib/Makefile.am, lib/Makefile.lib.in, lib/agexp.c, lib/cholesky.c, lib/fileio.c, lib/fillz.c, lib/getfp.c, lib/getmem.c, lib/gexp.c, lib/glog.c, lib/ifftr.c, lib/matrix.c, lib/movem.c, lib/mseq.c, lib/theq.c, lib/toeplitz.c, script/bell.in, script/glogsp.in, script/grlogsp.in: Update all documents to SPTK-3.3. Unify linefeed code of all source code to . Fix all indent in all source code by using 'indent -kr -nut -i 3 -l 80' command. 2009-12-16 20:30 senzaimin * bin/gmm/_gmm.c: This file is the same as ver1.1. 2009-12-16 19:44 senzaimin * bin/gmm/gmm.c: This file is the same as v1.3. 2009-12-16 16:39 uratec * ChangeLog, INSTALL, NEWS, README, configure.ac, bin/Makefile.am, bin/Makefile.mak, bin/delta/.cvsignore, bin/iglsadf/.cvsignore, bin/iglsadf/Makefile.am, bin/iglsadf/_iglsadf.c, bin/iglsadf/iglsadf.c, bin/imglsadf/.cvsignore, bin/imglsadf/Makefile.am, bin/imglsadf/_imglsadf.c, bin/imglsadf/imglsadf.c: remove imglsadf and iglsadf commands. update all documents to 2009 version. 2009-12-16 15:46 tatsuyaito * include/SPTK.h: Dec.16.2009 SPTK.h updated 2009-12-16 15:40 tatsuyaito * bin/lmadf/: _lmadf.c, lmadf.c: Dec.16.2009 lmadf (lmadf.c _lmadf.c lmadf.tex) updated 2009-12-16 15:39 tatsuyaito * bin/mlsadf/: _mlsadf.c, mlsadf.c: Dec.16.2009 mlsadf (mlsadf.c _mlsadf.c mlsadf.tex) updated 2009-12-16 14:15 tatsuyaito * bin/glsadf/: _glsadf.c, glsadf.c: Dec.16.2009 glsadf (glsadf.c _glsadf.c glsadf.tex) updated 2009-12-16 14:14 tatsuyaito * bin/mglsadf/: _mglsadf.c, mglsadf.c: Dec.16.2009 mglsadf (mglsadf.c _mglsadf.c mglsadf.tex) updated 2009-12-03 14:32 uratec * .cvsignore, script/.cvsignore: add *.sh and *.pl to .cvsignore 2009-12-03 14:29 uratec * bin/rawtowav/.cvsignore: add .cvsignore to rawtowav directory. 2009-12-03 14:22 mataki * bin/pca/pcap.c: commit test for mailing list 2009-12-03 14:21 uratec * bin/dct/Makefile.in: remove Makefile.in if dct directory. 2009-12-03 14:07 mataki * bin/pca/pcap.c: commit test for mailing list 2009-12-03 14:00 mataki * bin/pca/pcap.c: commit test for mailing list(not for bug fix) 2009-12-02 13:42 mataki * bin/pca/pca.c: for commit mail test(not for bug fix) 2009-12-02 13:20 mataki * bin/pca/pca.c: for commit mail test(not for bug fix) 2009-12-02 07:44 mataki * bin/pca/.cvsignore: add pca/pcap command. 2009-12-02 07:09 mataki * bin/pca/pca.c: modification of a little bug of pca.c 2009-12-02 06:22 mataki * configure.ac: add bin/pca/Makefile 2009-12-02 06:03 mataki * bin/Makefile.mak: little modification for compiling pca and pcap 2009-12-02 06:00 mataki * bin/pca/Makefile.am: For compilation of pca and pcap 2009-12-02 05:57 mataki * bin/Makefile.am: little modification for compiling pca and pcap 2009-12-02 05:55 mataki * bin/Makefile.mak: little modificaion for compiling pca and pcap 2009-12-02 03:49 uratec * COPYING: update COPYING for version 3.3 2009-12-02 03:46 uratec * AUTHORS: update AUTHORS for version 3.3. 2009-11-17 01:25 mataki * bin/pca/pca.c: [no log message] 2009-11-16 22:40 mataki * bin/pca/pca.c: [no log message] 2009-11-13 21:58 senzaimin * bin/gmm/gmm.c, bin/gmm/_gmm.c, include/SPTK.h: [no log message] 2009-11-02 19:00 tatsuyaito * bin/dct/dct.c: nov.2.2009 dct updated 2009-10-28 20:15 senzaimin * bin/lspcheck/_lspcheck.c: [no log message] 2009-10-28 20:11 senzaimin * bin/lspcheck/lspcheck.c: [no log message] 2009-10-28 17:37 mataki * bin/pca/pcap.c: [no log message] 2009-10-28 17:23 mataki * bin/pca/pca.c: [no log message] 2009-10-28 00:24 senzaimin * bin/mcep/mcep.c: [no log message] 2009-10-14 19:18 mataki * bin/pca/pca.c: [no log message] 2009-10-08 14:43 uratec * bin/mlsadf/mlsadf.c: Bug fix suggested by Ranniery Maia: Inverse filter in mlsadf 2009-09-30 16:37 senzaimin * bin/rawtowav/Makefile.in: [no log message] 2009-09-30 16:23 senzaimin * bin/Makefile.mak: [no log message] 2009-09-30 16:19 senzaimin * bin/Makefile.am: [no log message] 2009-09-30 16:13 senzaimin * configure.ac: [no log message] 2009-09-30 15:57 mataki * bin/pca/pca.c: Principal component analysis 2009-09-30 15:45 mataki * bin/pca/pcap.c: [no log message] 2009-09-30 15:44 senzaimin * script/Makefile.am: [no log message] 2009-09-30 15:37 senzaimin * script/raw2wav.in: [no log message] 2009-09-30 15:30 senzaimin * bin/rawtowav/: Makefile.am, Makefile.in: [no log message] 2009-09-30 15:23 senzaimin * bin/rawtowav/rawtowav.c: [no log message] 2009-09-29 18:20 mataki * bin/pca/pca.c: modified the configuration of the output. 2009-09-11 16:19 tatsuyaito * bin/dct/dct.c: Sep.11.2009 dct updated 2009-09-11 16:17 tatsuyaito * bin/: lmadf/lmadf.c, glsadf/glsadf.c, mglsadf/mglsadf.c: Sep.11.2009 lmadf,glsadf,mglsadf -v option updated 2009-08-21 18:51 mataki * bin/pca/: Makefile, Makefile.in, Makefile.am, pca.o: [no log message] 2009-08-21 15:25 mataki * bin/pca/: Makefile.in, Makefile.am: [no log message] 2009-08-21 15:20 mataki * bin/pca/Makefile: [no log message] 2009-08-21 15:19 mataki * bin/pca/pca.o: object file for pca.c 2009-08-21 15:16 mataki * bin/pca/pca.c: PCA : Principal component analysis 2009-04-16 13:55 uratec * bin/fftcep/fftcep.c: Fix suggested by Akira Tamamori: Bug fix for file input in fftcep.c 2008-11-18 08:33 uratec * bin/dct/.cvsignore: add dct binary file name into src/bin/dct/.cvsignore 2008-11-16 23:16 s_sako * bin/dct/dct.c: fix the declaration of dct_create_table() 2008-11-14 17:05 s_sako * ChangeLog: update for v3.2 2008-11-14 16:18 uratec * INSTALL, README: change release date from 11/12 to 11/14. remove "0) Enter 'src' directory." in INSTALL, src/README, and README. 2008-11-13 16:49 s_sako * AUTHORS, NEWS, README: update for v3.2 2008-11-13 16:22 tatsuyaito * bin/dct/dct.c: Nov.13.2008 dct updated 2008-11-13 14:50 uratec * bin/dct/dct.c: remove fillz(y,size). 2008-11-13 14:10 s_sako * bin/da/winplay.c: fix for build under win32 2008-11-13 12:28 s_sako * lib/Makefile.mak: add macro HAVE_STRING_H 2008-11-13 12:25 s_sako * bin/da/Makefile.am: add winplay.c winplay.h 2008-11-13 10:44 tatsuyaito * bin/dct/dct.c: Nov.13.2008 dct updated 2008-11-13 02:10 tatsuyaito * README: Nov.12.2008 README updated 2008-11-12 22:52 tatsuyaito * bin/dct/dct.c: Nov.12.2008 FeatureRequest [ReqNo.1849934] 'dct' 2008-11-12 20:18 uratec * README: change release date from 11/11 to 11/12. change Zen-san's information in README and index.html add Toru-san's information to index.html 2008-11-12 20:13 tatsuyaito * bin/dct/dct.c: Nov.10.2008 FeatureRequest [ReqNo.1849934] 'dct' 2008-11-12 19:58 s_sako * bin/interpolate/interpolate.c: set the initial value of padinput 2008-11-12 19:49 s_sako * Makefile.am: add Makefile.mak 2008-11-12 14:02 s_sako * bin/gmm/Makefile.am: add gmm.h 2008-11-11 22:26 uratec * bin/dct/.cvsignore: add .cvsignore for dct. 2008-11-11 19:27 uratec * bin/dct/dct.c: remove all '//' comments. change format (indent -kr -nut -i 3 -l 71) 2008-11-11 19:15 uratec * README: change README for version 3.2 2008-11-11 18:45 s_sako * configure.ac, bin/Makefile.am: add dct 2008-11-10 09:49 tatsuyaito * bin/dct/: Makefile.am, Makefile.in, dct.c: Nov.10.2008 FeatureRequest [ReqNo.1849934] 'dct' 2008-11-07 22:39 tatsuyaito * bin/da/dawrite.c: Nov.07.2008 BUGFIX [ReqNo.1869026] 'dawrite with OSSv4' 2008-11-07 00:40 tatsuyaito * bin/: agcep/agcep.c, gc2gc/gc2gc.c, gcep/gcep.c, glsadf/glsadf.c, gnorm/gnorm.c, iglsadf/iglsadf.c, ignorm/ignorm.c, imglsadf/imglsadf.c, lpc2par/lpc2par.c, mgc2mgc/mgc2mgc.c, mgc2sp/mgc2sp.c, mgcep/mgcep.c, mglsadf/mglsadf.c: Nov.07.2008 BUGFIX [ReqNo.1572567] 'mgcep -g 1' 2008-10-20 16:35 uratec * README: modify README 2008-07-02 16:06 heigazen * bin/delta/delta.c, bin/mlpg/Makefile.am, bin/mlpg/_mlpg.c, bin/mlpg/mlpg.c, include/SPTK.h, lib/Makefile.am, lib/Makefile.mak: Split common functions between delta.c and mlpg.c to _mlpg.c. 2008-07-02 15:54 heigazen * lib/: Makefile.am, Makefile.mak: Add _gmm.c. 2008-07-02 15:54 heigazen * include/SPTK.h: Add _gmm.c functions. 2008-07-02 15:53 heigazen * bin/gmm/: Makefile.am, _gmm.c, gmm.c, gmmp.c: Split common functions between gmm.c and gmmp.c to _gmm.c. 2008-06-30 18:38 heigazen * AUTHORS, README, configure.ac: Change the contact address of SPTK-WG from dsp-cmnd@... to the Tracker page of the SPTK SourceForge page. 2008-06-30 18:34 heigazen * bin/gmm/: .cvsignore, Makefile.am, gmm.c, gmm.h, gmmp.c: Add gmmp command, move some definitions to gmm.h. 2008-06-26 16:50 heigazen * configure.ac, bin/Makefile.am, bin/delta/.cvsignore, bin/delta/Makefile.am, bin/delta/delta.c: Add delta command. 2008-06-26 16:46 heigazen * bin/Makefile.mak: Add delta and gmm. 2008-06-26 16:07 heigazen * bin/mlpg/mlpg.c: Cast to double. 2008-06-25 16:44 heigazen * bin/gmm/.cvsignore, bin/gmm/Makefile.am, bin/gmm/gmm.c, include/SPTK.h, .cvsignore, configure.ac, bin/Makefile.am: Add command 'gmm' provided by Miyajima-san. 2008-06-25 15:38 heigazen * Makefile.am: Add more info. 2008-06-16 14:47 heigazen * lib/Makefile.lib.in, lib/agexp.c, lib/cholesky.c, lib/fileio.c, lib/fillz.c, lib/getfp.c, lib/getmem.c, lib/gexp.c, lib/glog.c, lib/ifftr.c, lib/matrix.c, lib/movem.c, lib/mseq.c, lib/theq.c, lib/toeplitz.c, include/SPTK.h, script/bell.in, script/glogsp.in, script/grlogsp.in, script/gwave.in, bin/average/_average.c, bin/average/average.c, bin/clip/_clip.c, bin/clip/clip.c, bin/fftr/_fftr.c, bin/fftr/fftr.c, bin/histogram/_histogram.c, bin/histogram/histogram.c, bin/ifft/_ifft.c, bin/ifft/ifft.c, bin/lpc2lsp/_lpc2lsp.c, bin/lpc2lsp/lpc2lsp.c, bin/xgr/config.h, bin/xgr/gcdata.h, bin/xgr/plot.c, bin/xgr/window.c, bin/xgr/xgr.c, bin/xgr/xgr.h, bin/excite/excite.c, bin/fft2/_fft2.c, bin/fft2/fft2.c, bin/gc2gc/_gc2gc.c, bin/gc2gc/gc2gc.c, bin/impulse/impulse.c, bin/lpc2c/_lpc2c.c, bin/lpc2c/lpc2c.c, bin/ltcdf/_ltcdf.c, bin/ltcdf/ltcdf.c, bin/merge/merge.c, bin/phase/_phase.c, bin/phase/phase.c, bin/psgr/dict.c, bin/psgr/eps.c, bin/psgr/plot.c, bin/psgr/psgr.c, bin/psgr/psgr.h, bin/agcep/_agcep.c, bin/agcep/agcep.c, bin/bcut/bcut.c, bin/cat2/cat2.c, bin/dfs/_dfs.c, bin/dfs/dfs.c, bin/ds/ds.c, bin/lpc/_lpc.c, bin/lpc/lpc.c, bin/lsp2lpc/_lsp2lpc.c, bin/lsp2lpc/lsp2lpc.c, bin/us/us.c, bin/us/us16.in, bin/us/uscd.in, bin/window/_window.c, bin/window/window.c, bin/fft/_fft.c, bin/fft/fft.c, bin/gcep/_gcep.c, bin/gcep/gcep.c, bin/imglsadf/_imglsadf.c, bin/imglsadf/imglsadf.c, bin/msvq/_msvq.c, bin/msvq/msvq.c, bin/nan/nan.c, bin/pitch/_pitch.c, bin/pitch/pitch.c, bin/sopr/sopr.c, bin/spec/spec.c, bin/b2mc/_b2mc.c, bin/b2mc/b2mc.c, bin/fftr2/_fftr2.c, bin/fftr2/fftr2.c, bin/fig+fdrw/fdrw.c, bin/fig+fdrw/fig.c, bin/fig+fdrw/fig.h, bin/fig+fdrw/fig0.c, bin/fig+fdrw/fig1.c, bin/fig+fdrw/plot.c, bin/fig+fdrw/plot.h, bin/fig+fdrw/plsub.c, bin/lbg/_lbg.c, bin/lbg/lbg.c, bin/lspdf/_lspdf.c, bin/lspdf/lspdf.c, bin/mgcep/_mgcep.c, bin/mgcep/mgcep.c, bin/ramp/ramp.c, bin/step/step.c, bin/ulaw/_ulaw.c, bin/ulaw/ulaw.c, bin/vq/_vq.c, bin/vq/vq.c, bin/df2/_df2.c, bin/df2/df2.c, bin/dmp/dmp.c, bin/echo2/echo2.c, bin/grpdelay/_grpdelay.c, bin/grpdelay/grpdelay.c, bin/mc2b/_mc2b.c, bin/mc2b/mc2b.c, bin/mgc2mgc/_mgc2mgc.c, bin/mgc2mgc/mgc2mgc.c, bin/norm0/_norm0.c, bin/norm0/norm0.c, bin/train/train.c, bin/vopr/vopr.c, bin/zerodf/zerodf.c, bin/cdist/cdist.c, bin/mgc2sp/_mgc2sp.c, bin/mgc2sp/mgc2sp.c, bin/nrand/_nrand.c, bin/nrand/nrand.c, bin/poledf/_poledf.c, bin/poledf/poledf.c, bin/rmse/_rmse.c, bin/rmse/rmse.c, bin/smcep/_smcep.c, bin/smcep/smcep.c, bin/snr/snr.c, bin/vsum/vsum.c, bin/x2x/x2x.c, bin/zerodf/_zerodf.c, bin/c2sp/_c2sp.c, bin/c2sp/c2sp.c, bin/imsvq/_imsvq.c, bin/imsvq/imsvq.c, bin/ivq/_ivq.c, bin/ivq/ivq.c, bin/levdur/_levdur.c, bin/levdur/levdur.c, bin/linear_intpl/linear_intpl.c, bin/lpc2par/_lpc2par.c, bin/lpc2par/lpc2par.c, bin/mcep/_mcep.c, bin/mcep/mcep.c, bin/mlpg/mlpg.c, bin/par2lpc/_par2lpc.c, bin/par2lpc/par2lpc.c, bin/acorr/_acorr.c, bin/acorr/acorr.c, bin/ignorm/_ignorm.c, bin/ignorm/ignorm.c, bin/root_pol/_root_pol.c, bin/root_pol/root_pol.c, bin/amcep/_amcep.c, bin/amcep/amcep.c, bin/c2acr/_c2acr.c, bin/c2acr/c2acr.c, bin/freqt/_freqt.c, bin/freqt/freqt.c, bin/glsadf/_glsadf.c, bin/glsadf/glsadf.c, bin/gnorm/_gnorm.c, bin/gnorm/gnorm.c, bin/ifft2/_ifft2.c, bin/ifft2/ifft2.c, bin/reverse/_reverse.c, bin/reverse/reverse.c, bin/sin/sin.c, bin/swab/swab.c, bin/vstat/vstat.c, bin/acep/_acep.c, bin/acep/acep.c, bin/fd/fd.c, bin/interpolate/interpolate.c, bin/lmadf/_lmadf.c, bin/lmadf/lmadf.c, bin/mlsadf/_mlsadf.c, bin/mlsadf/mlsadf.c, bin/uels/_uels.c, bin/uels/uels.c, bin/bcp/bcp.c, bin/c2ir/_c2ir.c, bin/c2ir/c2ir.c, bin/da/da.h, bin/da/da.in, bin/da/dawrite.c, bin/da/winplay.c, bin/da/winplay.h, bin/decimate/decimate.c, bin/extract/extract.c, bin/fftcep/_fftcep.c, bin/fftcep/fftcep.c, bin/frame/frame.c, bin/iglsadf/_iglsadf.c, bin/iglsadf/iglsadf.c, bin/lspcheck/_lspcheck.c, bin/lspcheck/lspcheck.c, bin/mglsadf/_mglsadf.c, bin/mglsadf/mglsadf.c, bin/minmax/minmax.c, bin/zcross/_zcross.c, bin/zcross/zcross.c, bin/delay/delay.c: Replace license. 2008-06-16 14:08 heigazen * README: Add Toru-san. 2008-06-16 14:00 heigazen * NEWS, README: Update for version 3.2. 2008-06-16 14:00 heigazen * INSTALL: Add description about Windows. 2008-06-16 14:00 heigazen * COPYING: Update COPYING. 2008-06-16 13:59 heigazen * AUTHORS: Add Toru-san. 2008-06-16 13:59 heigazen * Makefile.mak: Update version number. 2008-06-16 12:15 heigazen * configure.ac: Update version numbers. 2008-05-13 15:14 heigazen * bin/gcep/_gcep.c, bin/gcep/gcep.c, bin/mcep/_mcep.c, bin/mgcep/_mgcep.c, bin/pitch/_pitch.c, bin/smcep/_smcep.c, bin/smcep/smcep.c, bin/uels/_uels.c, bin/uels/uels.c, include/SPTK.h: Support various input format (e.g., windowed sequence, power spectra, amplitude spectra). 2008-05-12 13:58 heigazen * bin/mlpg/mlpg.c: Fix bug: regression window calculation for the 2nd dynamic features was incorrect. 2008-02-26 02:16 heigazen * bin/mcep/mcep.c: Fix input length bug. 2007-12-13 19:36 heigazen * bin/mcep/_mcep.c: flng/2 -> f2. 2007-11-30 14:18 heigazen * bin/nrand/nrand.c: Add options to specify mean, variance and standard deviation of Gaussian noise. 2007-11-12 11:17 heigazen * include/SPTK.h: Update prototype definition of mcep(). 2007-11-12 11:03 heigazen * .cvsignore: Update .cvsignore. 2007-11-12 11:02 heigazen * lib/: Makefile.am, Makefile.mak: Remove sp2mgc. 2007-11-12 11:02 heigazen * bin/vstat/vstat.c: Fix bug: -i option was not supported. 2007-10-18 02:16 heigazen * bin/Makefile.am, bin/Makefile.mak, bin/mcep/_mcep.c, bin/mcep/mcep.c, bin/mgcep/mgcep.c, bin/sp2mc/.cvsignore, bin/sp2mc/Makefile.am, bin/sp2mc/_sp2mc.c, bin/sp2mc/sp2mc.c, configure.ac: Merge sp2mc to mcep. 2007-10-18 00:47 heigazen * bin/mgcep/mgcep.c: Change the input format option to '-q'. 2007-10-17 23:28 heigazen * configure.ac: Fix the previous commit: sqr -> sqrt. 2007-10-17 23:24 heigazen * configure.ac: Remove sp2mgc. 2007-10-17 23:23 heigazen * configure.ac: Output an error message if libm or required functions are not find. 2007-10-17 14:03 heigazen * bin/mgcep/: _mgcep.c, mgcep.c: Fix comments. 2007-10-17 13:57 heigazen * bin/Makefile.am, bin/Makefile.mak, bin/mgcep/_mgcep.c, bin/mgcep/mgcep.c, bin/sp2mgc/.cvsignore, bin/sp2mgc/Makefile.am, bin/sp2mgc/_sp2mgc.c, bin/sp2mgc/sp2mgc.c, include/SPTK.h: Merge sp2mgc to mgcep. 2007-10-17 03:24 heigazen * bin/xgr/plot.c: Use memset() if HAVE_MEMSET is defined. Otherwise, use bzero(). 2007-10-16 11:20 heigazen * bin/: average/_average.c, average/average.c, clip/_clip.c, clip/clip.c, ifft/_ifft.c, lpc2lsp/_lpc2lsp.c, lpc2lsp/lpc2lsp.c, xgr/plot.c, xgr/window.c, xgr/xgr.c, fft2/_fft2.c, fft2/fft2.c, fftr/_fftr.c, fftr/fftr.c, histogram/_histogram.c, histogram/histogram.c, ifft/ifft.c, impulse/impulse.c, lpc2c/lpc2c.c, agcep/_agcep.c, agcep/agcep.c, cat2/cat2.c, dfs/_dfs.c, dfs/dfs.c, ds/ds.c, excite/excite.c, gc2gc/_gc2gc.c, gc2gc/gc2gc.c, lpc2c/_lpc2c.c, lsp2lpc/_lsp2lpc.c, lsp2lpc/lsp2lpc.c, merge/merge.c, phase/_phase.c, phase/phase.c, window/_window.c, window/window.c, bcut/bcut.c, lpc/_lpc.c, lpc/lpc.c, psgr/eps.c, psgr/psgr.c, sp2mgc/_sp2mgc.c, us/us.c, gcep/_gcep.c, gcep/gcep.c, msvq/_msvq.c, msvq/msvq.c, pitch/_pitch.c, pitch/pitch.c, spec/spec.c, b2mc/_b2mc.c, fft/_fft.c, fft/fft.c, fftr2/_fftr2.c, fftr2/fftr2.c, imglsadf/_imglsadf.c, imglsadf/imglsadf.c, mgcep/_mgcep.c, mgcep/mgcep.c, nan/nan.c, sopr/sopr.c, b2mc/b2mc.c, fig+fdrw/fdrw.c, fig+fdrw/fig.c, ramp/ramp.c, step/step.c, ulaw/_ulaw.c, ulaw/ulaw.c, lspdf/lspdf.c, lspdf/_lspdf.c, lbg/_lbg.c, lbg/lbg.c, mc2b/_mc2b.c, norm0/_norm0.c, norm0/norm0.c, train/train.c, vopr/vopr.c, vq/_vq.c, vq/vq.c, dmp/dmp.c, echo2/echo2.c, grpdelay/_grpdelay.c, grpdelay/grpdelay.c, mc2b/mc2b.c, mgc2mgc/mgc2mgc.c, df2/_df2.c, df2/df2.c, mgc2mgc/_mgc2mgc.c, zerodf/_zerodf.c, zerodf/zerodf.c, cdist/cdist.c, mgc2sp/_mgc2sp.c, mgc2sp/mgc2sp.c, poledf/poledf.c, vsum/vsum.c, nrand/_nrand.c, nrand/nrand.c, rmse/_rmse.c, rmse/rmse.c, smcep/_smcep.c, smcep/smcep.c, x2x/x2x.c, lpc2par/_lpc2par.c, lpc2par/lpc2par.c, snr/snr.c, c2sp/c2sp.c, imsvq/_imsvq.c, imsvq/imsvq.c, ivq/_ivq.c, ivq/ivq.c, levdur/_levdur.c, levdur/levdur.c, c2sp/_c2sp.c, ignorm/_ignorm.c, ignorm/ignorm.c, linear_intpl/linear_intpl.c, ltcdf/ltcdf.c, mcep/_mcep.c, mcep/mcep.c, mlpg/mlpg.c, par2lpc/_par2lpc.c, par2lpc/par2lpc.c, acorr/_acorr.c, acorr/acorr.c, amcep/_amcep.c, amcep/amcep.c, freqt/_freqt.c, freqt/freqt.c, reverse/_reverse.c, reverse/reverse.c, root_pol/_root_pol.c, root_pol/root_pol.c, sin/sin.c, glsadf/glsadf.c, gnorm/_gnorm.c, gnorm/gnorm.c, ifft2/_ifft2.c, ifft2/ifft2.c, swab/swab.c, vstat/vstat.c, acep/_acep.c, acep/acep.c, c2acr/_c2acr.c, c2acr/c2acr.c, glsadf/_glsadf.c, lmadf/_lmadf.c, lmadf/lmadf.c, mlsadf/_mlsadf.c, mlsadf/mlsadf.c, bcp/bcp.c, fd/fd.c, interpolate/interpolate.c, mglsadf/_mglsadf.c, mglsadf/mglsadf.c, minmax/minmax.c, uels/_uels.c, uels/uels.c, c2ir/c2ir.c, da/da.h, da/dawrite.c, extract/extract.c, fftcep/_fftcep.c, fftcep/fftcep.c, iglsadf/_iglsadf.c, iglsadf/iglsadf.c, zcross/_zcross.c, zcross/zcross.c, decimate/decimate.c, delay/delay.c, frame/frame.c, lspcheck/lspcheck.c: Arrange spaces for macros. Wrap strrchr() by rindex() if string.h does not exist. 2007-10-16 11:19 heigazen * bin/sp2mc/.cvsignore: Add .cvsignore. 2007-10-16 11:17 heigazen * configure.ac: Add sp2mc. 2007-10-11 16:48 heigazen * bin/Makefile.mak: Add definitions. 2007-10-11 16:36 heigazen * lib/: cholesky.c, ifftr.c, matrix.c, toeplitz.c: Fix indent. 2007-10-11 16:36 heigazen * lib/fileio.c: Fix indent, add comments. 2007-10-11 14:58 heigazen * bin/: sp2mgc/sp2mgc.c, sp2mc/sp2mc.c: Fix inconsistency between reference manual and source code. 2007-10-10 17:40 heigazen * bin/Makefile.am, bin/sp2mc/Makefile.am, bin/sp2mc/_sp2mc.c, bin/sp2mc/sp2mc.c, include/SPTK.h, bin/Makefile.mak: Add command sp2mc. 2007-10-10 03:44 heigazen * bin/Makefile.mak: Fix for psgr. 2007-10-10 03:40 heigazen * bin/psgr/: plot.c: Small fix. 2007-10-10 03:39 heigazen * bin/psgr/: eps.c, plot.c, psgr.h: Add static to local functions. 2007-10-10 03:28 heigazen * bin/psgr/plot.c: Add static to local functions. 2007-10-10 02:35 heigazen * bin/: fft/fft.c, fftr/fftr.c: Remove #ifdef AOP. 2007-10-09 19:16 heigazen * Makefile.mak, bin/Makefile.mak, include/Makefile.mak, lib/Makefile.mak: Update comments in Makefile.mak. 2007-10-09 19:06 heigazen * bin/: average/average.c, clip/clip.c, fftr/fftr.c, gcep/gcep.c, lpc2c/lpc2c.c, phase/phase.c, reverse/reverse.c, sp2mgc/sp2mgc.c, imsvq/imsvq.c, excite/excite.c, bcut/bcut.c, dfs/dfs.c, glsadf/glsadf.c, lpc/lpc.c, merge/merge.c, par2lpc/par2lpc.c, pitch/pitch.c, spec/spec.c, swab/swab.c, vstat/vstat.c, window/window.c, c2acr/c2acr.c, acep/acep.c, agcep/agcep.c, ifft/ifft.c, mc2b/mc2b.c, mlsadf/mlsadf.c, nan/nan.c, fd/fd.c, fftr2/fftr2.c, gc2gc/gc2gc.c, interpolate/interpolate.c, lmadf/lmadf.c, lsp2lpc/lsp2lpc.c, mcep/mcep.c, mgcep/mgcep.c, sopr/sopr.c, fig+fdrw/fdrw.c, grpdelay/grpdelay.c, lspdf/lspdf.c, mglsadf/mglsadf.c, minmax/minmax.c, uels/uels.c, ulaw/ulaw.c, bcp/bcp.c, c2ir/c2ir.c, extract/extract.c, fft/fft.c, ifft2/ifft2.c, norm0/norm0.c, root_pol/root_pol.c, vopr/vopr.c, vq/vq.c, zcross/zcross.c, dmp/dmp.c, fftcep/fftcep.c, histogram/histogram.c, imglsadf/imglsadf.c, mgc2mgc/mgc2mgc.c, zerodf/zerodf.c, cdist/cdist.c, frame/frame.c, lspcheck/lspcheck.c, vsum/vsum.c, b2mc/b2mc.c, freqt/freqt.c, lpc2lsp/lpc2lsp.c, mgc2sp/mgc2sp.c, msvq/msvq.c, poledf/poledf.c, decimate/decimate.c, df2/df2.c, iglsadf/iglsadf.c, ignorm/ignorm.c, lbg/lbg.c, rmse/rmse.c, smcep/smcep.c, x2x/x2x.c, amcep/amcep.c, c2sp/c2sp.c, fft2/fft2.c, gnorm/gnorm.c, ivq/ivq.c, levdur/levdur.c, linear_intpl/linear_intpl.c, lpc2par/lpc2par.c, ltcdf/ltcdf.c, snr/snr.c, acorr/acorr.c, delay/delay.c: Use "rt" or "rb" instead of "r" and "wt" or "wb" instead of "w" to open file poinsters for WIN32 environment. 2007-10-09 19:05 heigazen * lib/fileio.c: Add _setmode( _fileno(fp), _O_TEXT ) to freada() for WIN32 environment. 2007-10-09 18:34 heigazen * bin/psgr/: plot.c, psgr.h: Rename clip() to clipping() to avoid confliction with clip.c:clip(). 2007-10-09 18:31 heigazen * bin/: cat2/cat2.c, psgr/psgr.c: Include SPTK.h. 2007-10-09 18:11 heigazen * bin/: ds/ds.c, fig+fdrw/fig.c: Use getfp() instead of fopen(). 2007-10-09 18:06 heigazen * Makefile.mak, bin/Makefile.mak, bin/da/da.h, bin/da/dawrite.c, bin/da/winplay.c, bin/da/winplay.h: Apply patch provided by Jong-Jin Kim of ETRI: Now da command supports Windows 2000/XP/Vista. 2007-10-09 17:51 heigazen * bin/: us/us.c, psgr/psgr.c, mlpg/mlpg.c: Use getfp() instead of fopen(). 2007-10-09 15:31 heigazen * bin/us/us.c: Apply patch provided by Jong-Jin Kim of ETRI: Do not include strings.h on WIN32 environment. 2007-10-09 15:29 heigazen * bin/nan/nan.c: Apply patch provided by Jong-Jin Kim of ETRI: Use _isnan() instead of isnan() and !finite() instead of isinf() on WIN32 environment. 2007-10-09 15:29 heigazen * lib/theq.c, bin/levdur/_levdur.c: Apply patch provided by Jong-Jin Kim of ETRI: Use _isnan() instead of isnan() on WIN32 environment. 2007-10-09 13:33 heigazen * bin/gcep/_gcep.c, bin/gcep/gcep.c, bin/smcep/_smcep.c, bin/smcep/smcep.c, bin/levdur/levdur.c, bin/lpc/_lpc.c, bin/lpc/lpc.c, bin/mcep/_mcep.c, bin/mcep/mcep.c, bin/mgcep/_mgcep.c, bin/mgcep/mgcep.c, bin/sp2mgc/_sp2mgc.c, bin/sp2mgc/sp2mgc.c, include/SPTK.h: Tracker 1808271: Add option to give minimum value of the determinant of the normal matrix for theq() and levdur(). 2007-10-09 12:29 heigazen * bin/interpolate/interpolate.c: Add -d option to pad input data by the copy of input data rather than 0. 2007-10-09 12:05 heigazen * lib/fileio.c: Remove spaces at the end of file, they cause a warning on gcc. 2007-10-09 11:50 heigazen * bin/mlpg/mlpg.c: Fix typo: DOULBE -> DOUBLE. 2007-10-09 02:46 heigazen * lib/theq.c: Output error message if determinant of the normal matrix is too small. 2007-10-09 01:49 heigazen * bin/: average/_average.c, average/average.c, clip/_clip.c, clip/clip.c, fftr/_fftr.c, fftr/fftr.c, histogram/_histogram.c, histogram/histogram.c, ifft/_ifft.c, ifft/ifft.c, lpc2lsp/_lpc2lsp.c, lpc2lsp/lpc2lsp.c, agcep/_agcep.c, agcep/agcep.c, dfs/_dfs.c, dfs/dfs.c, excite/excite.c, fft2/_fft2.c, fft2/fft2.c, gc2gc/_gc2gc.c, gc2gc/gc2gc.c, impulse/impulse.c, lpc/_lpc.c, lpc/lpc.c, lpc2c/_lpc2c.c, lpc2c/lpc2c.c, lsp2lpc/_lsp2lpc.c, lsp2lpc/lsp2lpc.c, phase/_phase.c, phase/phase.c, sp2mgc/_sp2mgc.c, sp2mgc/sp2mgc.c, window/_window.c, window/window.c, fft/_fft.c, fft/fft.c, fftr2/_fftr2.c, fftr2/fftr2.c, gcep/_gcep.c, gcep/gcep.c, imglsadf/_imglsadf.c, imglsadf/imglsadf.c, mgcep/_mgcep.c, mgcep/mgcep.c, msvq/_msvq.c, pitch/_pitch.c, pitch/pitch.c, sopr/sopr.c, spec/spec.c, b2mc/_b2mc.c, b2mc/b2mc.c, fig+fdrw/fdrw.c, fig+fdrw/fig.c, lbg/_lbg.c, lspdf/_lspdf.c, lspdf/lspdf.c, norm0/_norm0.c, norm0/norm0.c, ramp/ramp.c, step/step.c, train/train.c, ulaw/_ulaw.c, ulaw/ulaw.c, vopr/vopr.c, cdist/cdist.c, df2/_df2.c, df2/df2.c, echo2/echo2.c, grpdelay/_grpdelay.c, grpdelay/grpdelay.c, mc2b/_mc2b.c, mc2b/mc2b.c, mgc2mgc/_mgc2mgc.c, mgc2mgc/mgc2mgc.c, mgc2sp/_mgc2sp.c, mgc2sp/mgc2sp.c, poledf/poledf.c, vsum/vsum.c, zerodf/_zerodf.c, zerodf/zerodf.c, c2sp/_c2sp.c, c2sp/c2sp.c, levdur/_levdur.c, levdur/levdur.c, linear_intpl/linear_intpl.c, ltcdf/ltcdf.c, mcep/_mcep.c, mcep/mcep.c, mlpg/mlpg.c, nrand/_nrand.c, nrand/nrand.c, rmse/_rmse.c, rmse/rmse.c, smcep/_smcep.c, smcep/smcep.c, acorr/_acorr.c, acorr/acorr.c, amcep/_amcep.c, amcep/amcep.c, freqt/_freqt.c, freqt/freqt.c, ignorm/_ignorm.c, ignorm/ignorm.c, lpc2par/_lpc2par.c, par2lpc/_par2lpc.c, par2lpc/par2lpc.c, reverse/_reverse.c, reverse/reverse.c, root_pol/_root_pol.c, root_pol/root_pol.c, sin/sin.c, acep/_acep.c, acep/acep.c, c2acr/_c2acr.c, c2acr/c2acr.c, glsadf/_glsadf.c, glsadf/glsadf.c, gnorm/_gnorm.c, gnorm/gnorm.c, ifft2/_ifft2.c, ifft2/ifft2.c, lmadf/_lmadf.c, lmadf/lmadf.c, mlsadf/_mlsadf.c, mlsadf/mlsadf.c, vstat/vstat.c, c2ir/c2ir.c, fftcep/_fftcep.c, fftcep/fftcep.c, iglsadf/_iglsadf.c, iglsadf/iglsadf.c, interpolate/interpolate.c, lspcheck/lspcheck.c, mglsadf/_mglsadf.c, mglsadf/mglsadf.c, minmax/minmax.c, uels/_uels.c, uels/uels.c, zcross/_zcross.c, zcross/zcross.c, decimate/decimate.c, delay/delay.c, vq/_vq.c: #include -> #if defined(WIN32) #include "SPTK.h" #else #include #endif 2007-10-09 01:45 heigazen * bin/: extract/extract.c, da/dawrite.c, dmp/dmp.c, imsvq/_imsvq.c, imsvq/imsvq.c, ivq/_ivq.c, ivq/ivq.c, nan/nan.c, snr/snr.c, x2x/x2x.c, bcp/bcp.c, fd/fd.c, frame/frame.c, merge/merge.c, swab/swab.c, bcut/bcut.c, lbg/lbg.c, lpc2par/lpc2par.c, msvq/msvq.c, vq/vq.c: Relplace fread() by freadx() and fwrite() by fwritex(). #include -> #if defined(WIN32) #include "SPTK.h" #else #include #endif 2007-10-09 01:38 heigazen * bin/: ds/ds.c, us/us.c: Remove freada(). 2007-10-09 01:34 heigazen * include/SPTK.h: Add freada(), fwritex(), and freadx(). 2007-10-09 01:30 heigazen * lib/: cholesky.c, ifftr.c, matrix.c, toeplitz.c: Use #if defined(WIN32) #include "SPTK.h" #else #include #endif to support VC++. 2007-10-09 01:28 heigazen * lib/fileio.c: Move freada() from us.c and ds.c. Add freadx() and fwritex() to wrap fread and fwrite(). Add #if defined(WIN32) #include #include #include "SPTK.h" _setmode( _fileno(fp), _OBINARY ); to support VC++. 2007-10-08 20:49 heigazen * Makefile.mak, bin/Makefile.mak, include/Makefile.mak, lib/Makefile.mak: Add Makefile.mak for VC++ provided by Jong-Jin Kim of ETRI. 2007-10-06 03:21 heigazen * bin/xgr/plot.c: Add brackets. 2007-10-05 23:38 heigazen * bin/fftr2/fftr2.c: Fix bug: fwritef rather than fwrite should be used. 2007-10-04 02:16 heigazen * bin/xgr/gcdata.h: Fix the previous fix. 2007-10-04 02:03 heigazen * bin/xgr/gcdata.h: Remove unused variables. 2007-10-04 01:51 heigazen * bin/xgr/window.c: Comment out unused variable. 2007-10-04 01:50 heigazen * bin/xgr/plot.c: Comment out unused functions. 2007-10-04 01:39 heigazen * bin/minmax/minmax.c: Initialize variables to avoid warnings reported by gcc on IA-64. 2007-10-02 05:17 heigazen * README: Update README. 2007-10-02 05:05 heigazen * README: Add Gil-san. 2007-10-01 16:13 s_sako * configure.ac: set default prefix to /usr/local/SPTK 2007-10-01 11:15 heigazen * bin/nan/nan.c: Fix typo. 2007-10-01 03:37 heigazen * bin/zcross/zcross.c, bin/fft/fft.c, bin/fftcep/fftcep.c, bin/imglsadf/imglsadf.c, bin/lpc2c/lpc2c.c, bin/lpc2par/lpc2par.c, bin/mgc2sp/mgc2sp.c, bin/phase/phase.c, bin/snr/snr.c, bin/sopr/sopr.c, bin/vopr/vopr.c, script/glogsp.in, script/gwave.in, bin/ds/ds.c, bin/mlpg/mlpg.c, bin/window/window.c, bin/xgr/xgr.c: Fix many typo in help messages. 2007-10-01 01:20 heigazen * bin/average/average.c, bin/fftr/fftr.c, bin/impulse/impulse.c, bin/lpc2c/lpc2c.c, bin/excite/excite.c, bin/merge/merge.c, bin/phase/phase.c, bin/cat2/cat2.c, bin/dfs/dfs.c, bin/ds/ds.c, lib/getfp.c, lib/getmem.c, lib/matrix.c, lib/theq.c, bin/window/_window.c, bin/bcut/bcut.c, bin/us/us.c, bin/us/us16.in, bin/us/uscd.in, bin/lpc/lpc.c, bin/pitch/pitch.c, bin/psgr/psgr.c, bin/spec/spec.c, bin/agcep/agcep.c, bin/gcep/_gcep.c, bin/fft/_fft.c, bin/fft/fft.c, bin/gcep/gcep.c, bin/nan/nan.c, bin/sopr/sopr.c, bin/fftr2/fftr2.c, bin/gc2gc/gc2gc.c, bin/mgcep/_mgcep.c, bin/mgcep/mgcep.c, bin/lspdf/lspdf.c, bin/ramp/ramp.c, bin/step/step.c, bin/dmp/dmp.c, bin/norm0/norm0.c, bin/train/train.c, bin/ulaw/ulaw.c, bin/vopr/vopr.c, bin/vq/vq.c, bin/echo2/echo2.c, bin/imglsadf/imglsadf.c, bin/cdist/cdist.c, bin/histogram/histogram.c, bin/mgc2mgc/mgc2mgc.c, bin/msvq/msvq.c, bin/vsum/vsum.c, bin/zerodf/zerodf.c, bin/b2mc/b2mc.c, bin/lpc2lsp/lpc2lsp.c, bin/mgc2sp/mgc2sp.c, bin/poledf/poledf.c, bin/smcep/_smcep.c, bin/smcep/smcep.c, bin/c2sp/c2sp.c, bin/df2/df2.c, bin/fft2/fft2.c, bin/ivq/ivq.c, bin/lbg/lbg.c, bin/levdur/levdur.c, bin/lpc2par/lpc2par.c, bin/rmse/rmse.c, bin/snr/snr.c, bin/x2x/x2x.c, bin/linear_intpl/linear_intpl.c, bin/ltcdf/ltcdf.c, bin/mcep/_mcep.c, bin/mcep/mcep.c, script/glogsp.in, script/grlogsp.in, script/gwave.in, bin/acorr/acorr.c, bin/mlpg/mlpg.c, bin/root_pol/_root_pol.c, bin/root_pol/root_pol.c, bin/glsadf/glsadf.c, bin/imsvq/imsvq.c, bin/par2lpc/par2lpc.c, bin/reverse/reverse.c, bin/sin/sin.c, bin/sp2mgc/sp2mgc.c, bin/swab/swab.c, bin/vstat/vstat.c, bin/acep/acep.c, bin/c2acr/c2acr.c, bin/lmadf/lmadf.c, bin/mc2b/mc2b.c, bin/mlsadf/mlsadf.c, bin/uels/_uels.c, bin/uels/uels.c, bin/fd/fd.c, bin/grpdelay/grpdelay.c, bin/interpolate/interpolate.c, bin/lsp2lpc/lsp2lpc.c, bin/mglsadf/mglsadf.c, bin/minmax/minmax.c, bin/bcp/bcp.c, bin/c2ir/c2ir.c, bin/da/da.in, bin/da/dawrite.c, bin/extract/extract.c, bin/fftcep/fftcep.c, bin/xgr/xgr.c, bin/zcross/zcross.c, bin/amcep/amcep.c, bin/decimate/decimate.c, bin/frame/frame.c, bin/freqt/freqt.c, bin/gnorm/gnorm.c, bin/iglsadf/iglsadf.c, bin/ignorm/ignorm.c, bin/lspcheck/lspcheck.c, bin/delay/delay.c: Fix error messages. 2007-09-30 16:34 heigazen * bin/levdur/_levdur.c: Check rmd using isnan(). 2007-09-30 16:33 heigazen * bin/: root_pol/_root_pol.c, mlpg/mlpg.c: Update error messages. 2007-09-30 02:28 heigazen * bin/mgcep/_mgcep.c: Fix bug: the final argument of newton() should be j rather than i. 2007-09-30 01:48 heigazen * lib/theq.c: Check det using isnan(). 2007-09-30 01:46 heigazen * bin/sp2mgc/_sp2mgc.c: Fix bug: the final argument of newton() should be j rather than i. 2007-09-28 19:22 s_sako * configure.ac: configure check for solaris+gcc 2007-09-28 17:24 heigazen * script/bell.in, script/glogsp.in, script/grlogsp.in, script/gwave.in, bin/da/da.in, bin/fig+fdrw/fdrw.c, bin/fig+fdrw/fig.c, bin/us/us16.in, bin/us/uscd.in: Fix help messages. 2007-09-28 12:26 s_sako * bin/fig+fdrw/: fig0.c, fig1.c, plot.h: rename gettxt() to gettxt_fig() 2007-09-28 12:14 s_sako * bin/: ds/Makefile.am, us/Makefile.am: add *_CPPFLAGS 2007-09-27 14:57 s_sako * bin/ds/Makefile.am: add lpfcoef.3to2 2007-09-27 12:36 heigazen * bin/: acorr/acorr.c, c2ir/c2ir.c, fft/fft.c, fft2/fft2.c, fftr2/fftr2.c, grpdelay/grpdelay.c, minmax/minmax.c, mlpg/mlpg.c, xgr/xgr.c, cat2/cat2.c, ds/ds.c, fftr/fftr.c, histogram/histogram.c, nan/nan.c, zcross/zcross.c: Fix format of error messages. 2007-09-27 12:29 heigazen * .cvsignore: Update .cvsignore. 2007-09-26 23:29 heigazen * .cvsignore: Update .cvsignore. 2007-09-26 23:28 heigazen * bin/da/: Makefile.am, da.in, dawrite.c: Support double compile. 2007-09-26 23:15 heigazen * bin/snr/snr.c: Add +d option to the comments. 2007-09-24 02:46 heigazen * bin/us/us.c: fwite() -> fwritef(). 2007-09-24 02:24 heigazen * configure.ac: Add AM_PROG_CC_C_O to support Cygwin. 2007-09-24 01:35 heigazen * bin/acep/.cvsignore: Update .cvsignore. 2007-09-24 01:30 heigazen * .cvsignore, bin/acep/.cvsignore, bin/acorr/.cvsignore, bin/agcep/.cvsignore, bin/amcep/.cvsignore, bin/average/.cvsignore, bin/b2mc/.cvsignore, bin/bcp/.cvsignore, bin/bcut/.cvsignore, bin/c2acr/.cvsignore, bin/c2ir/.cvsignore, bin/c2sp/.cvsignore, bin/cat2/.cvsignore, bin/cdist/.cvsignore, bin/clip/.cvsignore, bin/da/.cvsignore, bin/decimate/.cvsignore, bin/delay/.cvsignore, bin/df2/.cvsignore, bin/dfs/.cvsignore, bin/dmp/.cvsignore, bin/ds/.cvsignore, bin/echo2/.cvsignore, bin/excite/.cvsignore, bin/extract/.cvsignore, bin/fd/.cvsignore, bin/fft/.cvsignore, bin/fft2/.cvsignore, bin/fftcep/.cvsignore, bin/fftr/.cvsignore, bin/fftr2/.cvsignore, bin/fig+fdrw/.cvsignore, bin/frame/.cvsignore, bin/freqt/.cvsignore, bin/gc2gc/.cvsignore, bin/gcep/.cvsignore, bin/glsadf/.cvsignore, bin/gnorm/.cvsignore, bin/grpdelay/.cvsignore, bin/histogram/.cvsignore, bin/ifft/.cvsignore, bin/ifft2/.cvsignore, bin/iglsadf/.cvsignore, bin/ignorm/.cvsignore, bin/imglsadf/.cvsignore, bin/impulse/.cvsignore, bin/imsvq/.cvsignore, bin/interpolate/.cvsignore, bin/ivq/.cvsignore, bin/lbg/.cvsignore, bin/levdur/.cvsignore, bin/linear_intpl/.cvsignore, bin/lmadf/.cvsignore, bin/lpc/.cvsignore, bin/lpc2c/.cvsignore, bin/lpc2lsp/.cvsignore, bin/lpc2par/.cvsignore, bin/lsp2lpc/.cvsignore, bin/lspcheck/.cvsignore, bin/lspdf/.cvsignore, bin/ltcdf/.cvsignore, bin/mc2b/.cvsignore, bin/mcep/.cvsignore, bin/merge/.cvsignore, bin/mgc2mgc/.cvsignore, bin/mgc2sp/.cvsignore, bin/mgcep/.cvsignore, bin/mglsadf/.cvsignore, bin/minmax/.cvsignore, bin/mlpg/.cvsignore, bin/mlsadf/.cvsignore, bin/msvq/.cvsignore, bin/nan/.cvsignore, bin/norm0/.cvsignore, bin/nrand/.cvsignore, bin/par2lpc/.cvsignore, bin/phase/.cvsignore, bin/pitch/.cvsignore, bin/poledf/.cvsignore, bin/psgr/.cvsignore, bin/ramp/.cvsignore, bin/reverse/.cvsignore, bin/rmse/.cvsignore, bin/root_pol/.cvsignore, bin/sin/.cvsignore, bin/smcep/.cvsignore, bin/snr/.cvsignore, bin/sopr/.cvsignore, bin/sp2mgc/.cvsignore, bin/spec/.cvsignore, bin/step/.cvsignore, bin/swab/.cvsignore, bin/train/.cvsignore, bin/uels/.cvsignore, bin/ulaw/.cvsignore, bin/us/.cvsignore, bin/vopr/.cvsignore, bin/vq/.cvsignore, bin/vstat/.cvsignore, bin/vsum/.cvsignore, bin/window/.cvsignore, bin/x2x/.cvsignore, bin/xgr/.cvsignore, bin/zcross/.cvsignore, bin/zerodf/.cvsignore, lib/.cvsignore, script/.cvsignore: Update .cvsignore. 2007-09-24 01:23 heigazen * bin/: da/Makefile.am, da/da.in, us/Makefile.am, us/us16.in, us/uscd.in: bindir -> binpath, libdir -> libpath. 2007-09-24 00:08 heigazen * configure.ac, bin/acep/acep.c, bin/acorr/acorr.c, bin/agcep/agcep.c, bin/amcep/amcep.c, bin/average/average.c, bin/b2mc/b2mc.c, bin/c2acr/c2acr.c, bin/c2ir/c2ir.c, bin/c2sp/c2sp.c, bin/cdist/cdist.c, bin/clip/clip.c, bin/decimate/decimate.c, bin/delay/delay.c, bin/df2/df2.c, bin/dfs/dfs.c, bin/ds/ds.c, bin/excite/excite.c, bin/extract/extract.c, bin/fft/fft.c, bin/fft2/fft2.c, bin/fftcep/fftcep.c, bin/fftr/fftr.c, bin/fftr2/fftr2.c, bin/fig+fdrw/fdrw.c, bin/freqt/freqt.c, bin/gc2gc/gc2gc.c, bin/gcep/gcep.c, bin/glsadf/glsadf.c, bin/gnorm/gnorm.c, bin/grpdelay/grpdelay.c, bin/histogram/histogram.c, bin/ifft/ifft.c, bin/ifft2/ifft2.c, bin/iglsadf/iglsadf.c, bin/ignorm/ignorm.c, bin/imglsadf/imglsadf.c, bin/impulse/impulse.c, bin/imsvq/imsvq.c, bin/interpolate/interpolate.c, bin/ivq/ivq.c, bin/lbg/lbg.c, bin/levdur/levdur.c, bin/linear_intpl/linear_intpl.c, bin/lmadf/lmadf.c, bin/lpc/lpc.c, bin/lpc2c/lpc2c.c, bin/lpc2lsp/lpc2lsp.c, bin/lpc2par/lpc2par.c, bin/lsp2lpc/lsp2lpc.c, bin/lspcheck/lspcheck.c, bin/lspdf/lspdf.c, bin/ltcdf/ltcdf.c, bin/mc2b/mc2b.c, bin/mcep/mcep.c, bin/mgc2mgc/mgc2mgc.c, bin/mgc2sp/mgc2sp.c, bin/mgcep/mgcep.c, bin/mglsadf/mglsadf.c, bin/minmax/minmax.c, bin/mlsadf/mlsadf.c, bin/msvq/msvq.c, bin/nan/nan.c, bin/norm0/norm0.c, bin/nrand/nrand.c, bin/par2lpc/par2lpc.c, bin/phase/phase.c, bin/pitch/pitch.c, bin/poledf/poledf.c, bin/ramp/ramp.c, bin/reverse/reverse.c, bin/rmse/rmse.c, bin/root_pol/root_pol.c, bin/sin/sin.c, bin/smcep/smcep.c, bin/sopr/sopr.c, bin/sp2mgc/sp2mgc.c, bin/spec/spec.c, bin/step/step.c, bin/train/train.c, bin/uels/uels.c, bin/ulaw/ulaw.c, bin/us/us.c, bin/vopr/vopr.c, bin/vq/vq.c, bin/vstat/vstat.c, bin/vsum/vsum.c, bin/window/window.c, bin/zcross/zcross.c, bin/zerodf/zerodf.c: Use -DFORMAT=\"double\" instead of char *FORMAT="double". 2007-09-23 22:54 heigazen * configure.ac: Fix for double compile. 2007-09-23 22:38 heigazen * bin/: acep/acep.c, acorr/acorr.c, agcep/agcep.c, amcep/amcep.c, average/average.c, b2mc/b2mc.c, bcp/bcp.c, bcut/bcut.c, c2acr/c2acr.c, c2ir/c2ir.c, c2sp/c2sp.c, cat2/cat2.c, cdist/cdist.c, clip/clip.c, da/dawrite.c, decimate/decimate.c, delay/delay.c, df2/df2.c, dfs/dfs.c, dmp/dmp.c, ds/ds.c, echo2/echo2.c, excite/excite.c, extract/extract.c, fd/fd.c, fft/fft.c, fft2/fft2.c, fftcep/fftcep.c, fftr/fftr.c, fftr2/fftr2.c, fig+fdrw/fdrw.c, fig+fdrw/fig.c, frame/frame.c, freqt/freqt.c, gc2gc/gc2gc.c, gcep/gcep.c, glsadf/glsadf.c, gnorm/gnorm.c, grpdelay/grpdelay.c, histogram/histogram.c, ifft/ifft.c, ifft2/ifft2.c, iglsadf/iglsadf.c, ignorm/ignorm.c, imglsadf/imglsadf.c, impulse/impulse.c, imsvq/imsvq.c, interpolate/interpolate.c, ivq/ivq.c, lbg/lbg.c, levdur/levdur.c, linear_intpl/linear_intpl.c, lmadf/lmadf.c, lpc/lpc.c, lpc2c/lpc2c.c, lpc2lsp/lpc2lsp.c, lpc2par/lpc2par.c, lsp2lpc/lsp2lpc.c, lspcheck/lspcheck.c, lspdf/lspdf.c, ltcdf/ltcdf.c, mc2b/mc2b.c, mcep/mcep.c, merge/merge.c, mgc2mgc/mgc2mgc.c, mgc2sp/mgc2sp.c, mgcep/mgcep.c, mglsadf/mglsadf.c, minmax/minmax.c, mlpg/mlpg.c, mlsadf/mlsadf.c, msvq/msvq.c, nan/nan.c, norm0/norm0.c, nrand/nrand.c, par2lpc/par2lpc.c, phase/phase.c, pitch/pitch.c, poledf/poledf.c, psgr/psgr.c, ramp/ramp.c, reverse/reverse.c, rmse/rmse.c, root_pol/root_pol.c, sin/sin.c, smcep/smcep.c, snr/snr.c, sopr/sopr.c, sp2mgc/sp2mgc.c, spec/spec.c, step/step.c, swab/swab.c, train/train.c, uels/uels.c, ulaw/ulaw.c, us/us.c, vopr/vopr.c, vq/vq.c, vstat/vstat.c, vsum/vsum.c, window/window.c, x2x/x2x.c, xgr/xgr.c, zcross/zcross.c, zerodf/zerodf.c: SPTK_VERSION -> PACKAGE_VERSION. 2007-09-23 22:15 heigazen * script/: glogsp.in, grlogsp.in, gwave.in: Fixes for double compile. 2007-09-23 22:05 heigazen * bin/us/: Makefile.am, us16.in, uscd.in: Fixes for double compile. 2007-09-23 21:42 heigazen * script/: Makefile.am, glogsp.in, grlogsp.in, gwave.in: Fix for double compile. 2007-09-23 14:49 heigazen * script/: Makefile.am, glogsp.in, grlogsp.in, gwave.in: Some fixes to support automake. 2007-09-23 12:05 heigazen * configure.ac: Substitute @use_double@ by 'yes' or 'no'.. 2007-09-23 11:52 heigazen * script/grlogsp.in: Fix the previous fix. 2007-09-23 11:46 heigazen * script/: Makefile.am, glogsp.in, grlogsp.in, gwave.in: Support double compile. 2007-09-23 11:01 heigazen * configure.ac: Fix a bug: LINUX -> FreeBSD in $host switch. 2007-09-23 04:27 s_sako * script/Makefile.am: patch to use automake 2007-09-23 04:17 s_sako * script/Makefile.am, script/bell.in, script/glogsp.in, script/grlogsp.in, script/gwave.in, bin/da/Makefile.am, bin/da/da.in, bin/us/Makefile.am, bin/us/us16.in, bin/us/uscd.in, configure.ac: patch to use automake 2007-09-23 03:31 s_sako * config.guess, config.sub, configure, install-sh: patch to use automake 2007-09-23 03:05 s_sako * Makefile.am: patch to use automake 2007-09-23 02:57 s_sako * Makefile.in, bin/delay/Makefile.in, bin/xgr/Makefile.in, include/Makefile.in, bin/gnorm/Makefile.in, bin/imsvq/Makefile.in, bin/lpc2c/Makefile.in, bin/lpc2lsp/Makefile.in, bin/lspcheck/Makefile.in, bin/mcep/Makefile.in, bin/mgcep/Makefile.in, bin/norm0/Makefile.in, bin/Makefile.in, bin/acep/Makefile.in, bin/amcep/Makefile.in, bin/cat2/Makefile.in, bin/clip/Makefile.in, bin/frame/Makefile.in, bin/glsadf/Makefile.in, bin/vq/Makefile.in, bin/freqt/Makefile.in, bin/mc2b/Makefile.in, bin/mglsadf/Makefile.in, bin/mlpg/Makefile.in, bin/us/Makefile.in, bin/average/Makefile.in, bin/echo2/Makefile.in, bin/lspdf/Makefile.in, bin/ltcdf/Makefile.in, bin/mgc2sp/Makefile.in, bin/sp2mgc/Makefile.in, bin/df2/Makefile.in, bin/ifft2/Makefile.in, bin/pitch/Makefile.in, bin/vopr/Makefile.in, bin/bcp/Makefile.in, bin/fftr/Makefile.in, bin/interpolate/Makefile.in, bin/lsp2lpc/Makefile.in, bin/window/Makefile.in, bin/zcross/Makefile.in, bin/ds/Makefile.in, bin/ifft/Makefile.in, bin/lbg/Makefile.in, bin/mlsadf/Makefile.in, bin/nan/Makefile.in, bin/c2acr/Makefile.in, bin/fft/Makefile.in, bin/nrand/Makefile.in, bin/phase/Makefile.in, bin/train/Makefile.in, bin/acorr/Makefile.in, bin/fftcep/Makefile.in, bin/par2lpc/Makefile.in, bin/smcep/Makefile.in, bin/gc2gc/Makefile.in, bin/msvq/Makefile.in, bin/reverse/Makefile.in, bin/step/Makefile.in, bin/impulse/Makefile.in, bin/ivq/Makefile.in, bin/mgc2mgc/Makefile.in, bin/snr/Makefile.in, bin/iglsadf/Makefile.in, bin/linear_intpl/Makefile.in, bin/root_pol/Makefile.in, bin/x2x/Makefile.in, bin/decimate/Makefile.in, bin/fft2/Makefile.in, bin/fig+fdrw/Makefile.in, bin/lpc/Makefile.in, bin/dfs/Makefile.in, bin/fd/Makefile.in, bin/lmadf/Makefile.in, bin/psgr/Makefile.in, bin/sopr/Makefile.in, bin/gcep/Makefile.in, bin/ramp/Makefile.in, bin/rmse/Makefile.in, bin/fftr2/Makefile.in, bin/imglsadf/Makefile.in, bin/swab/Makefile.in, bin/b2mc/Makefile.in, bin/dmp/Makefile.in, bin/extract/Makefile.in, bin/grpdelay/Makefile.in, bin/lpc2par/Makefile.in, bin/merge/Makefile.in, bin/zerodf/Makefile.in, bin/agcep/Makefile.in, bin/bcut/Makefile.in, bin/c2ir/Makefile.in, bin/excite/Makefile.in, bin/histogram/Makefile.in, bin/minmax/Makefile.in, bin/sin/Makefile.in, bin/uels/Makefile.in, bin/vstat/Makefile.in, bin/vsum/Makefile.in, bin/da/Makefile.in, bin/ignorm/Makefile.in, bin/poledf/Makefile.in, bin/spec/Makefile.in, bin/ulaw/Makefile.in, bin/c2sp/Makefile.in, bin/cdist/Makefile.in, bin/levdur/Makefile.in, lib/Makefile.in, script/Makefile.in: patch to use automake 2007-09-23 02:49 s_sako * script/.cvsignore, script/bell.in, script/bell.sh, script/glogsp.in, script/glogsp.sh, script/grlogsp.in, script/grlogsp.sh, script/gwave.in, script/gwave.sh, bin/da/.cvsignore, bin/da/da.in, bin/da/da.sh, bin/us/.cvsignore, bin/us/us16.in, bin/us/us16.sh, bin/us/uscd.in, bin/us/uscd.sh: patch to use automake 2007-09-23 02:43 s_sako * include/Makefile.am, bin/delay/Makefile.am, bin/gnorm/Makefile.am, bin/imsvq/Makefile.am, bin/lpc2c/Makefile.am, bin/lpc2lsp/Makefile.am, bin/lspcheck/Makefile.am, bin/mcep/Makefile.am, bin/mgcep/Makefile.am, bin/norm0/Makefile.am, bin/xgr/Makefile.am, bin/Makefile.am, bin/acep/Makefile.am, bin/amcep/Makefile.am, bin/cat2/Makefile.am, bin/clip/Makefile.am, bin/frame/Makefile.am, bin/glsadf/Makefile.am, bin/mc2b/Makefile.am, bin/mglsadf/Makefile.am, bin/vq/Makefile.am, bin/average/Makefile.am, bin/echo2/Makefile.am, bin/freqt/Makefile.am, bin/lspdf/Makefile.am, bin/ltcdf/Makefile.am, bin/mgc2sp/Makefile.am, bin/mlpg/Makefile.am, bin/us/Makefile.am, bin/bcp/Makefile.am, bin/df2/Makefile.am, bin/fftr/Makefile.am, bin/ifft2/Makefile.am, bin/interpolate/Makefile.am, bin/lsp2lpc/Makefile.am, bin/pitch/Makefile.am, bin/sp2mgc/Makefile.am, bin/vopr/Makefile.am, bin/ds/Makefile.am, bin/fft/Makefile.am, bin/ifft/Makefile.am, bin/lbg/Makefile.am, bin/mlsadf/Makefile.am, bin/nan/Makefile.am, bin/nrand/Makefile.am, bin/phase/Makefile.am, bin/window/Makefile.am, bin/zcross/Makefile.am, bin/acorr/Makefile.am, bin/c2acr/Makefile.am, bin/fftcep/Makefile.am, bin/par2lpc/Makefile.am, bin/smcep/Makefile.am, bin/train/Makefile.am, bin/gc2gc/Makefile.am, bin/ivq/Makefile.am, bin/msvq/Makefile.am, bin/reverse/Makefile.am, bin/step/Makefile.am, bin/impulse/Makefile.am, bin/mgc2mgc/Makefile.am, bin/snr/Makefile.am, bin/x2x/Makefile.am, bin/linear_intpl/Makefile.am, bin/root_pol/Makefile.am, bin/fft2/Makefile.am, bin/iglsadf/Makefile.am, bin/lpc/Makefile.am, bin/decimate/Makefile.am, bin/dfs/Makefile.am, bin/fd/Makefile.am, bin/fig+fdrw/Makefile.am, bin/lmadf/Makefile.am, bin/psgr/Makefile.am, bin/rmse/Makefile.am, bin/sopr/Makefile.am, bin/gcep/Makefile.am, bin/imglsadf/Makefile.am, bin/ramp/Makefile.am, bin/extract/Makefile.am, bin/fftr2/Makefile.am, bin/grpdelay/Makefile.am, bin/lpc2par/Makefile.am, bin/swab/Makefile.am, bin/dmp/Makefile.am, bin/merge/Makefile.am, bin/zerodf/Makefile.am, bin/b2mc/Makefile.am, bin/bcut/Makefile.am, bin/vsum/Makefile.am, bin/agcep/Makefile.am, bin/histogram/Makefile.am, bin/sin/Makefile.am, bin/vstat/Makefile.am, bin/excite/Makefile.am, bin/minmax/Makefile.am, bin/c2ir/Makefile.am, bin/da/Makefile.am, bin/ignorm/Makefile.am, bin/uels/Makefile.am, bin/ulaw/Makefile.am, bin/c2sp/Makefile.am, bin/cdist/Makefile.am, bin/levdur/Makefile.am, bin/poledf/Makefile.am, bin/spec/Makefile.am, lib/Makefile.am, script/Makefile.am, AUTHORS, COPYING, NEWS, README, ChangeLog, INSTALL: patch to use automake 2007-09-23 02:23 s_sako * .cvsignore, configure.ac, config/.cvsignore, include/.cvsignore, bin/.cvsignore, bin/clip/.cvsignore, bin/delay/.cvsignore, bin/gnorm/.cvsignore, bin/imsvq/.cvsignore, bin/lpc2c/.cvsignore, bin/lpc2lsp/.cvsignore, bin/lspcheck/.cvsignore, bin/mcep/.cvsignore, bin/mgcep/.cvsignore, bin/norm0/.cvsignore, bin/xgr/.cvsignore, bin/acep/.cvsignore, bin/amcep/.cvsignore, bin/cat2/.cvsignore, bin/frame/.cvsignore, bin/freqt/.cvsignore, bin/glsadf/.cvsignore, bin/mc2b/.cvsignore, bin/mglsadf/.cvsignore, bin/mlpg/.cvsignore, bin/us/.cvsignore, bin/vq/.cvsignore, bin/average/.cvsignore, bin/df2/.cvsignore, bin/echo2/.cvsignore, bin/ifft2/.cvsignore, bin/lspdf/.cvsignore, bin/ltcdf/.cvsignore, bin/mgc2sp/.cvsignore, bin/pitch/.cvsignore, bin/sp2mgc/.cvsignore, bin/bcp/.cvsignore, bin/ds/.cvsignore, bin/fftr/.cvsignore, bin/ifft/.cvsignore, bin/interpolate/.cvsignore, bin/lbg/.cvsignore, bin/lsp2lpc/.cvsignore, bin/mlsadf/.cvsignore, bin/nan/.cvsignore, bin/vopr/.cvsignore, bin/window/.cvsignore, bin/zcross/.cvsignore, bin/acorr/.cvsignore, bin/c2acr/.cvsignore, bin/fft/.cvsignore, bin/fftcep/.cvsignore, bin/nrand/.cvsignore, bin/par2lpc/.cvsignore, bin/phase/.cvsignore, bin/reverse/.cvsignore, bin/smcep/.cvsignore, bin/train/.cvsignore, bin/gc2gc/.cvsignore, bin/impulse/.cvsignore, bin/ivq/.cvsignore, bin/linear_intpl/.cvsignore, bin/mgc2mgc/.cvsignore, bin/msvq/.cvsignore, bin/snr/.cvsignore, bin/step/.cvsignore, bin/x2x/.cvsignore, bin/decimate/.cvsignore, bin/fft2/.cvsignore, bin/fig+fdrw/.cvsignore, bin/iglsadf/.cvsignore, bin/lmadf/.cvsignore, bin/lpc/.cvsignore, bin/root_pol/.cvsignore, bin/sopr/.cvsignore, bin/dfs/.cvsignore, bin/fd/.cvsignore, bin/psgr/.cvsignore, bin/ramp/.cvsignore, bin/rmse/.cvsignore, bin/extract/.cvsignore, bin/fftr2/.cvsignore, bin/gcep/.cvsignore, bin/grpdelay/.cvsignore, bin/imglsadf/.cvsignore, bin/lpc2par/.cvsignore, bin/merge/.cvsignore, bin/swab/.cvsignore, bin/zerodf/.cvsignore, bin/agcep/.cvsignore, bin/b2mc/.cvsignore, bin/bcut/.cvsignore, bin/dmp/.cvsignore, bin/histogram/.cvsignore, bin/sin/.cvsignore, bin/vstat/.cvsignore, bin/vsum/.cvsignore, bin/c2ir/.cvsignore, bin/da/.cvsignore, bin/excite/.cvsignore, bin/ignorm/.cvsignore, bin/minmax/.cvsignore, bin/uels/.cvsignore, bin/ulaw/.cvsignore, bin/c2sp/.cvsignore, bin/cdist/.cvsignore, bin/levdur/.cvsignore, bin/poledf/.cvsignore, bin/spec/.cvsignore, lib/.cvsignore: patch to use automake 2007-09-22 22:08 heigazen * bin/lbg/lbg.c: Fix bug: DOUBLE compile doesn't work properly. 2007-09-22 22:01 heigazen * bin/fig+fdrw/: fig0.c, fig1.c, plot.c, plot.h, plsub.c: Fix bug: DOUBLE compile doesn't work properly. 2007-09-22 00:18 heigazen * bin/: average/average.c, clip/clip.c, fftr/fftr.c, gcep/gcep.c, ds/ds.c, fig+fdrw/fdrw.c, fig+fdrw/fig.c, merge/merge.c, phase/phase.c, reverse/reverse.c, sin/sin.c, sp2mgc/sp2mgc.c, vstat/vstat.c, window/window.c, bcut/bcut.c, dfs/dfs.c, glsadf/glsadf.c, pitch/pitch.c, spec/spec.c, swab/swab.c, us/us.c, acep/acep.c, agcep/agcep.c, c2acr/c2acr.c, mlsadf/mlsadf.c, nan/nan.c, gc2gc/gc2gc.c, ifft/ifft.c, lmadf/lmadf.c, mc2b/mc2b.c, mcep/mcep.c, mgcep/mgcep.c, sopr/sopr.c, fd/fd.c, fftr2/fftr2.c, grpdelay/grpdelay.c, lsp2lpc/lsp2lpc.c, mglsadf/mglsadf.c, step/step.c, uels/uels.c, lspdf/lspdf.c, ramp/ramp.c, root_pol/root_pol.c, ulaw/ulaw.c, xgr/xgr.c, bcp/bcp.c, c2ir/c2ir.c, da/dawrite.c, echo2/echo2.c, extract/extract.c, ifft2/ifft2.c, train/train.c, vopr/vopr.c, vq/vq.c, zcross/zcross.c, dmp/dmp.c, imglsadf/imglsadf.c, mgc2mgc/mgc2mgc.c, fftcep/fftcep.c, histogram/histogram.c, vsum/vsum.c, zerodf/zerodf.c, lpc2lsp/lpc2lsp.c, lspcheck/lspcheck.c, mgc2sp/mgc2sp.c, msvq/msvq.c, smcep/smcep.c, x2x/x2x.c, df2/df2.c, iglsadf/iglsadf.c, nrand/nrand.c, rmse/rmse.c, ignorm/ignorm.c, lbg/lbg.c, snr/snr.c, amcep/amcep.c, ivq/ivq.c, lpc2par/lpc2par.c, c2sp/c2sp.c, fft2/fft2.c, gnorm/gnorm.c, levdur/levdur.c, linear_intpl/linear_intpl.c, ltcdf/ltcdf.c, mlpg/mlpg.c, acorr/acorr.c, delay/delay.c: Fix inconsistencies between help messages & header comments. 2007-09-21 23:46 heigazen * bin/: fig+fdrw/fig.h, fig+fdrw/fig0.c, fig+fdrw/fig1.c, fig+fdrw/plot.c, fig+fdrw/plsub.c, psgr/eps.c, psgr/plot.c, xgr/plot.c, xgr/window.c: Fix comments. 2007-09-21 01:50 heigazen * script/: Makefile.in, glogsp.sh, grlogsp.sh, gwave.sh: Support DOUBLE compile. 2007-09-21 01:35 heigazen * lib/getfp.c: char -> char * 2007-09-21 01:34 heigazen * lib/: getmem.c, fileio.c: Fix typo. 2007-09-21 01:29 heigazen * bin/levdur/_levdur.c: Fix rmd checking. 2007-09-21 01:24 heigazen * lib/theq.c: Add "static" and "const". 2007-09-20 15:57 heigazen * bin/zcross/zcross.c, bin/fftr/fftr.c, bin/histogram/histogram.c, bin/ifft2/ifft2.c, bin/lspcheck/lspcheck.c, bin/phase/phase.c, bin/pitch/pitch.c, bin/reverse/reverse.c, bin/smcep/smcep.c, bin/vopr/vopr.c, script/bell.sh, script/glogsp.sh, script/grlogsp.sh, bin/c2ir/c2ir.c, bin/fft2/fft2.c, bin/fftr2/fftr2.c, bin/grpdelay/grpdelay.c, bin/ifft/ifft.c, bin/root_pol/root_pol.c: Fix inconsistencies between reference manual & help messages. 2007-09-19 23:35 heigazen * bin/us/us.c: Small fixes. 2007-09-19 23:30 heigazen * bin/: us/Makefile.in, us/us.c, us/uscd.sh, snr/snr.c: Support DOUBLE compilation. 2007-09-19 18:06 heigazen * bin/fig+fdrw/: fdrw.c, fig.c, fig0.c, fig1.c, plot.c, plot.h, plsub.c: Use double instead of float. 2007-09-19 17:46 heigazen * bin/nan/nan.c: Use standard C99. 2007-09-19 17:45 heigazen * bin/nan/Makefile.in: Add -std=c99. 2007-09-19 04:56 heigazen * bin/minmax/minmax.c: Store data numbers only if option '-d' is specified. 2007-09-18 12:52 heigazen * bin/da/dawrite.c, bin/fd/fd.c, include/SPTK.h, lib/fillz.c, lib/movem.c, lib/theq.c: Use size_t instead of int. 2007-09-18 12:38 heigazen * bin/xgr/plot.c: m_flg -> mono_flg. 2007-09-18 11:01 heigazen * bin/sp2mgc/sp2mgc.c: Use size_t instead of int. 2007-09-18 10:57 heigazen * bin/: dmp/dmp.c, frame/frame.c: Use size_t instead of int. 2007-09-18 10:53 heigazen * bin/: swab/swab.c, bcut/bcut.c: Use size_t instead of int. 2007-09-18 04:22 heigazen * lib/getmem.c: Use size_t instead of int. Remove prototype definitions. 2007-09-18 04:14 heigazen * lib/fileio.c, include/SPTK.h: Use size_t instead of int. 2007-09-18 04:05 heigazen * bin/linear_intpl/linear_intpl.c: Add -i and -j options. 2007-09-18 04:01 heigazen * bin/merge/merge.c: Use size_t instead of int. 2007-09-18 03:55 heigazen * bin/x2x/x2x.c: Use size_t instead of int. 2007-09-18 03:51 heigazen * bin/xgr/xgr.c: Rename m_flg -> mono_flg. 2007-09-18 03:43 heigazen * bin/fig+fdrw/fig0.c: Add (). 2007-09-18 03:43 heigazen * bin/fig+fdrw/fig1.c: 1 & 2 -> 1.0 & 2.0 2007-09-18 02:46 heigazen * bin/acorr/_acorr.c: Modify initialization. 2007-09-18 02:29 heigazen * lib/theq.c: Remove prototype definitions. 2007-09-16 02:45 heigazen * bin/step/step.c: Add -v option to specify step value. 2007-09-16 02:28 heigazen * bin/ramp/ramp.c: Fix a comment. 2007-09-16 02:15 heigazen * bin/window/: window.c, _window.c: Modify casting. 2007-09-16 01:58 heigazen * bin/window/_window.c: Change initialization. 2007-09-15 23:49 heigazen * bin/x2x/x2x.c: N/A -> %%g 2007-09-15 23:43 heigazen * bin/us/: us16.sh, uscd.sh: Update help messages. 2007-09-15 23:41 heigazen * bin/us/us16.sh: uscd -> us16 2007-09-15 23:40 heigazen * bin/us/us.c: Small fix. 2007-09-15 23:26 heigazen * bin/nan/nan.c: Remove -d option. 2007-09-15 23:24 heigazen * bin/mlsadf/mlsadf.c: Update comment. 2007-09-15 23:22 heigazen * bin/merge/merge.c: Update help message. 2007-09-15 23:14 heigazen * bin/lpc2lsp/lpc2lsp.c: Fix a bug. 2007-09-15 23:12 heigazen * bin/linear_intpl/linear_intpl.c: Update comment. 2007-09-15 23:07 heigazen * bin/interpolate/interpolate.c: Update message. 2007-09-15 00:04 heigazen * bin/lspdf/lspdf.c: Fix bug: option '-l' doesn't work. 2007-09-14 21:30 heigazen * bin/lspdf/lspdf.c: break in switch was missing. 2007-09-12 17:37 heigazen * bin/clip/Makefile.in, bin/clip/_clip.c, bin/clip/clip.c, bin/fftr/Makefile.in, bin/fftr/_fftr.c, bin/fftr/fftr.c, bin/ifft/Makefile.in, bin/ifft/_ifft.c, bin/ifft/ifft.c, bin/lpc2c/Makefile.in, bin/lpc2c/_lpc2c.c, bin/lpc2c/lpc2c.c, bin/lpc2lsp/Makefile.in, bin/lpc2lsp/_lpc2lsp.c, bin/lpc2lsp/lpc2lsp.c, bin/phase/Makefile.in, bin/phase/_phase.c, bin/phase/phase.c, bin/xgr/Makefile.in, bin/xgr/config.h, bin/xgr/gcdata.h, bin/xgr/plot.c, bin/xgr/window.c, bin/xgr/xgr.c, bin/xgr/xgr.h, bin/cat2/Makefile.in, bin/cat2/cat2.c, bin/gc2gc/Makefile.in, bin/gc2gc/_gc2gc.c, bin/gc2gc/gc2gc.c, bin/gcep/Makefile.in, bin/gcep/_gcep.c, bin/gcep/gcep.c, bin/grpdelay/Makefile.in, bin/grpdelay/_grpdelay.c, bin/grpdelay/grpdelay.c, bin/merge/Makefile.in, bin/merge/merge.c, bin/poledf/Makefile.in, bin/poledf/_poledf.c, bin/poledf/poledf.c, bin/psgr/Makefile.in, bin/psgr/dict.c, bin/psgr/eps.c, bin/psgr/plot.c, bin/psgr/psgr.c, bin/psgr/psgr.h, bin/xgr/tills/till1.dat, bin/xgr/tills/till11.dat, bin/xgr/tills/till13.dat, bin/xgr/tills/till14.dat, bin/xgr/tills/till15.dat, bin/xgr/tills/till2.dat, bin/xgr/tills/till5.dat, bin/xgr/tills/till6.dat, bin/xgr/tills/till7.dat, bin/xgr/tills/till8.dat, bin/agcep/Makefile.in, bin/agcep/_agcep.c, bin/agcep/agcep.c, bin/gnorm/Makefile.in, bin/gnorm/_gnorm.c, bin/gnorm/gnorm.c, bin/xgr/marks/mark0.dat, bin/xgr/marks/mark1.dat, bin/xgr/marks/mark10.dat, bin/xgr/marks/mark11.dat, bin/xgr/marks/mark12.dat, bin/xgr/marks/mark13.dat, bin/xgr/marks/mark14.dat, bin/xgr/marks/mark15.dat, bin/xgr/marks/mark2.dat, bin/xgr/marks/mark3.dat, bin/xgr/marks/mark4.dat, bin/xgr/marks/mark5.dat, bin/xgr/marks/mark6.dat, bin/xgr/marks/mark7.dat, bin/xgr/marks/mark8.dat, bin/xgr/marks/mark9.dat, bin/xgr/tills/till0.dat, bin/xgr/tills/till10.dat, bin/xgr/tills/till12.dat, bin/xgr/tills/till16.dat, bin/xgr/tills/till3.dat, bin/xgr/tills/till4.dat, bin/xgr/tills/till9.dat, lib/Makefile.in, lib/Makefile.lib.in, lib/agexp.c, lib/cholesky.c, lib/fileio.c, lib/fillz.c, lib/getfp.c, lib/getmem.c, lib/gexp.c, lib/glog.c, lib/ifftr.c, lib/matrix.c, lib/movem.c, lib/mseq.c, lib/theq.c, lib/toeplitz.c, bin/acorr/Makefile.in, bin/acorr/_acorr.c, bin/acorr/acorr.c, bin/fftr2/Makefile.in, bin/fftr2/_fftr2.c, bin/fftr2/fftr2.c, bin/frame/Makefile.in, bin/frame/frame.c, bin/lspdf/Makefile.in, bin/lspdf/_lspdf.c, bin/lspdf/lspdf.c, bin/mcep/Makefile.in, bin/mcep/_mcep.c, bin/mcep/mcep.c, bin/mglsadf/Makefile.in, bin/mglsadf/_mglsadf.c, bin/mglsadf/mglsadf.c, bin/sopr/Makefile.in, bin/sopr/sopr.c, bin/sp2mgc/Makefile.in, bin/sp2mgc/_sp2mgc.c, bin/sp2mgc/sp2mgc.c, bin/b2mc/Makefile.in, bin/b2mc/_b2mc.c, bin/b2mc/b2mc.c, bin/impulse/Makefile.in, bin/impulse/impulse.c, bin/mc2b/Makefile.in, bin/mc2b/_mc2b.c, bin/mc2b/mc2b.c, bin/mgcep/Makefile.in, bin/mgcep/_mgcep.c, bin/mgcep/mgcep.c, bin/smcep/Makefile.in, bin/smcep/_smcep.c, bin/smcep/smcep.c, bin/spec/Makefile.in, bin/spec/spec.c, bin/step/Makefile.in, bin/step/step.c, bin/amcep/Makefile.in, bin/amcep/_amcep.c, bin/amcep/amcep.c, bin/fft/Makefile.in, bin/fft/_fft.c, bin/fft/fft.c, bin/fig+fdrw/Makefile.in, bin/fig+fdrw/fdrw.c, bin/fig+fdrw/fig.c, bin/fig+fdrw/fig.h, bin/fig+fdrw/fig0.c, bin/fig+fdrw/fig1.c, bin/fig+fdrw/plot.c, bin/fig+fdrw/plot.h, bin/fig+fdrw/plsub.c, bin/norm0/Makefile.in, bin/norm0/_norm0.c, bin/norm0/norm0.c, bin/train/Makefile.in, bin/train/train.c, bin/ulaw/Makefile.in, bin/ulaw/_ulaw.c, bin/ulaw/ulaw.c, bin/window/Makefile.in, bin/window/_window.c, bin/window/window.c, bin/df2/Makefile.in, bin/df2/_df2.c, bin/df2/df2.c, bin/lspcheck/Makefile.in, bin/lspcheck/_lspcheck.c, bin/lspcheck/lspcheck.c, bin/ltcdf/Makefile.in, bin/ltcdf/_ltcdf.c, bin/ltcdf/ltcdf.c, bin/us/Makefile.in, bin/us/us.c, bin/us/us16.sh, bin/us/uscd.sh, bin/vsum/Makefile.in, bin/vsum/vsum.c, bin/zerodf/Makefile.in, bin/zerodf/_zerodf.c, bin/zerodf/zerodf.c, include/Makefile.in, include/SPTK.h, bin/cdist/Makefile.in, bin/cdist/cdist.c, bin/histogram/Makefile.in, bin/histogram/_histogram.c, bin/histogram/histogram.c, bin/ignorm/Makefile.in, bin/ignorm/_ignorm.c, bin/ignorm/ignorm.c, bin/lbg/_lbg.c, bin/lbg/lbg.c, bin/lsp2lpc/Makefile.in, bin/lsp2lpc/_lsp2lpc.c, bin/lsp2lpc/lsp2lpc.c, bin/mlpg/Makefile.in, bin/mlpg/mlpg.c, bin/nrand/Makefile.in, bin/nrand/_nrand.c, bin/nrand/nrand.c, bin/x2x/Makefile.in, bin/x2x/x2x.c, bin/c2sp/Makefile.in, bin/c2sp/_c2sp.c, bin/c2sp/c2sp.c, bin/imsvq/Makefile.in, bin/imsvq/_imsvq.c, bin/imsvq/imsvq.c, bin/ivq/Makefile.in, bin/ivq/_ivq.c, bin/ivq/ivq.c, bin/lbg/Makefile.in, bin/linear_intpl/Makefile.in, bin/linear_intpl/linear_intpl.c, bin/lpc2par/Makefile.in, bin/lpc2par/_lpc2par.c, bin/lpc2par/lpc2par.c, bin/root_pol/Makefile.in, bin/root_pol/_root_pol.c, bin/root_pol/root_pol.c, bin/snr/Makefile.in, bin/snr/snr.c, bin/lmadf/Makefile.in, bin/lmadf/_lmadf.c, bin/lmadf/lmadf.c, script/Makefile.in, script/bell.sh, script/glogsp.sh, script/grlogsp.sh, script/gwave.sh, bin/acep/Makefile.in, bin/acep/_acep.c, bin/acep/acep.c, bin/average/Makefile.in, bin/average/_average.c, bin/average/average.c, bin/fd/Makefile.in, bin/fd/fd.c, bin/fftcep/Makefile.in, bin/fftcep/_fftcep.c, bin/fftcep/fftcep.c, bin/ifft2/Makefile.in, bin/ifft2/_ifft2.c, bin/ifft2/ifft2.c, bin/msvq/Makefile.in, bin/msvq/_msvq.c, bin/msvq/msvq.c, bin/par2lpc/Makefile.in, bin/par2lpc/_par2lpc.c, bin/par2lpc/par2lpc.c, bin/swab/Makefile.in, bin/swab/swab.c, bin/zcross/Makefile.in, bin/zcross/_zcross.c, bin/zcross/zcross.c, bin/da/Makefile.in, bin/da/da.h, bin/da/da.sh, bin/da/dawrite.c, bin/delay/Makefile.in, bin/delay/delay.c, bin/levdur/Makefile.in, bin/levdur/_levdur.c, bin/levdur/levdur.c, bin/minmax/Makefile.in, bin/minmax/minmax.c, bin/rmse/Makefile.in, bin/rmse/_rmse.c, bin/rmse/rmse.c, bin/uels/Makefile.in, bin/uels/_uels.c, bin/uels/uels.c, bin/c2ir/Makefile.in, bin/c2ir/_c2ir.c, bin/c2ir/c2ir.c, bin/decimate/Makefile.in, bin/decimate/decimate.c, bin/freqt/Makefile.in, bin/freqt/_freqt.c, bin/freqt/freqt.c, bin/iglsadf/Makefile.in, bin/iglsadf/_iglsadf.c, bin/iglsadf/iglsadf.c, bin/interpolate/Makefile.in, bin/interpolate/interpolate.c, bin/mgc2mgc/Makefile.in, bin/mgc2mgc/_mgc2mgc.c, bin/mgc2mgc/mgc2mgc.c, bin/ramp/Makefile.in, bin/ramp/ramp.c, bin/vq/Makefile.in, bin/vq/_vq.c, bin/vq/vq.c, bin/bcut/Makefile.in, bin/bcut/bcut.c, bin/c2acr/Makefile.in, bin/c2acr/_c2acr.c, bin/c2acr/c2acr.c, bin/dfs/Makefile.in, bin/dfs/_dfs.c, bin/dfs/dfs.c, bin/dmp/Makefile.in, bin/dmp/dmp.c, bin/ds/Makefile.in, bin/ds/ds.c, bin/excite/Makefile.in, bin/excite/excite.c, bin/fft2/Makefile.in, bin/fft2/_fft2.c, bin/fft2/fft2.c, bin/mgc2sp/Makefile.in, bin/mgc2sp/_mgc2sp.c, bin/mgc2sp/mgc2sp.c, bin/vstat/Makefile.in, bin/vstat/vstat.c, bin/lpc/Makefile.in, bin/lpc/_lpc.c, bin/lpc/lpc.c, bin/pitch/Makefile.in, bin/pitch/_pitch.c, bin/pitch/pitch.c, bin/echo2/Makefile.in, bin/echo2/echo2.c, bin/imglsadf/Makefile.in, bin/imglsadf/_imglsadf.c, bin/imglsadf/imglsadf.c, bin/nan/Makefile.in, bin/nan/nan.c, bin/sin/Makefile.in, bin/sin/sin.c, bin/vopr/Makefile.in, bin/vopr/vopr.c, Makefile.in, bin/Makefile.in, bin/bcp/Makefile.in, bin/bcp/bcp.c, bin/extract/Makefile.in, bin/extract/extract.c, bin/glsadf/Makefile.in, bin/glsadf/_glsadf.c, bin/glsadf/glsadf.c, bin/mlsadf/Makefile.in, bin/mlsadf/_mlsadf.c, bin/mlsadf/mlsadf.c, bin/reverse/Makefile.in, bin/reverse/_reverse.c, bin/reverse/reverse.c: Update license. 2007-09-12 16:01 heigazen * bin/mglsadf/mglsadf.c: Update comments. 2007-09-12 15:54 heigazen * bin/: iglsadf/iglsadf.c, imglsadf/imglsadf.c: Update comments. 2007-09-12 15:53 heigazen * bin/gnorm/gnorm.c: Small update. 2007-09-12 15:51 heigazen * bin/glsadf/glsadf.c: Add comments. 2007-09-12 15:43 heigazen * configure.ac: Update copyright. 2007-09-12 15:42 heigazen * script/: bell.sh, glogsp.sh, grlogsp.sh, gwave.sh: Arrange spaces. 2007-09-12 15:28 heigazen * bin/us/: uscd.sh, us16.sh: Arrange spaces. 2007-09-12 15:20 heigazen * bin/da/da.sh: Replace tab by spaces. Add x86_64 into switches. 2007-09-12 14:51 heigazen * lib/Makefile.lib.in: Add license. 2007-09-11 17:33 heigazen * bin/: mgc2sp/mgc2sp.c, gc2gc/gc2gc.c, gnorm/gnorm.c, ignorm/ignorm.c, mgc2mgc/mgc2mgc.c, mgcep/mgcep.c, sp2mgc/sp2mgc.c: If g>1.0 then g=-1/g. 2007-09-11 17:25 heigazen * bin/imglsadf/imglsadf.c: Arrange spaces. 2007-09-11 16:46 heigazen * bin/: agcep/agcep.c, glsadf/glsadf.c, iglsadf/iglsadf.c: Update gamma handling. 2007-09-11 15:30 heigazen * bin/: lspdf/lspdf.c, glsadf/glsadf.c, mglsadf/mglsadf.c: Include math.h. 2007-09-11 15:26 heigazen * bin/fig+fdrw/plot.h: Add prototype definition of function join(). 2007-09-11 13:42 heigazen * bin/us/uscd.sh: Update usage message. 2007-09-11 13:42 heigazen * bin/us/us16.sh: Set default input/output format to float. Update usage message. 2007-09-11 12:53 heigazen * bin/lpc/lpc.c: Fix a small bug. 2007-09-11 07:42 heigazen * bin/glsadf/glsadf.c: Fix typo. 2007-09-11 07:41 heigazen * bin/glsadf/glsadf.c: Call lmadf() if g==0. 2007-09-11 07:41 heigazen * bin/mglsadf/mglsadf.c: Call mlsadf() if g==0. 2007-09-11 03:22 heigazen * bin/: mlsadf/_mlsadf.c, mlsadf/mlsadf.c, acep/_acep.c, acep/acep.c, amcep/_amcep.c, amcep/amcep.c, lmadf/_lmadf.c, lmadf/lmadf.c: pade -> Pade. Update error message when pade != 4 or 5. 2007-09-11 03:10 heigazen * bin/: clip/clip.c, fftr/fftr.c, gcep/gcep.c, impulse/impulse.c, lpc2c/lpc2c.c, reverse/reverse.c, sp2mgc/sp2mgc.c, phase/phase.c, excite/excite.c, imsvq/imsvq.c, sin/sin.c, vstat/vstat.c, ds/ds.c, par2lpc/par2lpc.c, window/window.c, glsadf/glsadf.c, lpc/lpc.c, pitch/pitch.c, spec/spec.c, c2acr/c2acr.c, gc2gc/gc2gc.c, ifft/ifft.c, lmadf/lmadf.c, mc2b/mc2b.c, mlsadf/mlsadf.c, nan/nan.c, sopr/sopr.c, fftr2/fftr2.c, interpolate/interpolate.c, lsp2lpc/lsp2lpc.c, mcep/mcep.c, mgcep/mgcep.c, c2ir/c2ir.c, fig+fdrw/fdrw.c, grpdelay/grpdelay.c, mglsadf/mglsadf.c, minmax/minmax.c, ramp/ramp.c, root_pol/root_pol.c, step/step.c, uels/uels.c, ulaw/ulaw.c, vq/vq.c, extract/extract.c, fft/fft.c, ifft2/ifft2.c, imglsadf/imglsadf.c, norm0/norm0.c, train/train.c, vopr/vopr.c, zcross/zcross.c, cdist/cdist.c, fftcep/fftcep.c, histogram/histogram.c, lspcheck/lspcheck.c, mgc2mgc/mgc2mgc.c, poledf/poledf.c, vsum/vsum.c, zerodf/zerodf.c, b2mc/b2mc.c, decimate/decimate.c, freqt/freqt.c, mgc2sp/mgc2sp.c, msvq/msvq.c, smcep/smcep.c, df2/df2.c, iglsadf/iglsadf.c, ignorm/ignorm.c, ivq/ivq.c, lbg/lbg.c, lpc2par/lpc2par.c, nrand/nrand.c, rmse/rmse.c, c2sp/c2sp.c, fft2/fft2.c, gnorm/gnorm.c, levdur/levdur.c, linear_intpl/linear_intpl.c, ltcdf/ltcdf.c, delay/delay.c: Tracker:Bugs 1572611. Output proper help messages when compiled with '-DDOUBLE' option. 2007-09-11 03:03 heigazen * bin/dfs/dfs.c: Fix typo. Output proper help messages when compiled with '-DDOUBLE' option. 2007-09-11 02:19 heigazen * bin/: da/dawrite.c, fig+fdrw/fig.c: Replace exit() in main() by return(). 2007-09-11 02:19 heigazen * bin/: lpc2lsp/lpc2lsp.c, lspdf/lspdf.c: Add description about '-l' option to the comment. 2007-09-11 02:10 heigazen * bin/da/Makefile.in, bin/da/da.sh, bin/us/Makefile.in, bin/us/us16.sh, bin/us/uscd.sh, script/Makefile.in, script/bell.sh, script/glogsp.sh, script/grlogsp.sh, script/gwave.sh: Modify shell scripts to output SPTK version and CVS info in its help message. 2007-09-10 23:21 heigazen * bin/: psgr/plot.c, psgr/psgr.h, fig+fdrw/fdrw.c, fig+fdrw/fig.c, fig+fdrw/fig0.c, fig+fdrw/plot.h, fig+fdrw/plsub.c, psgr/psgr.c, xgr/plot.c, xgr/xgr.c, xgr/xgr.h: Fix for Tracker:Bugs 1572619. Corners of curved lines become sharp. 2007-09-10 21:52 heigazen * include/SPTK.h: Remove prototype definitions of functions which are called from their files. only. 2007-09-10 21:49 heigazen * bin/: average/average.c, clip/_clip.c, clip/clip.c, fftr/fftr.c, ifft/_ifft.c, ifft/ifft.c, lpc2lsp/_lpc2lsp.c, lpc2lsp/lpc2lsp.c, agcep/_agcep.c, agcep/agcep.c, cat2/cat2.c, excite/excite.c, fft2/_fft2.c, fft2/fft2.c, fftr/_fftr.c, gc2gc/_gc2gc.c, gc2gc/gc2gc.c, impulse/impulse.c, lpc2c/_lpc2c.c, lpc2c/lpc2c.c, ltcdf/_ltcdf.c, ltcdf/ltcdf.c, merge/merge.c, phase/_phase.c, phase/phase.c, bcut/bcut.c, dfs/_dfs.c, dfs/dfs.c, ds/ds.c, lsp2lpc/_lsp2lpc.c, lsp2lpc/lsp2lpc.c, sp2mgc/_sp2mgc.c, sp2mgc/sp2mgc.c, us/us.c, us/us16.sh, window/_window.c, window/window.c, fft/_fft.c, fft/fft.c, fftr2/_fftr2.c, fftr2/fftr2.c, gcep/_gcep.c, gcep/gcep.c, imglsadf/_imglsadf.c, imglsadf/imglsadf.c, lpc/_lpc.c, lpc/lpc.c, mgcep/_mgcep.c, mgcep/mgcep.c, msvq/_msvq.c, msvq/msvq.c, nan/nan.c, pitch/_pitch.c, pitch/pitch.c, sopr/sopr.c, spec/spec.c, lbg/_lbg.c, lbg/lbg.c, lspdf/_lspdf.c, lspdf/lspdf.c, ramp/ramp.c, step/step.c, train/train.c, ulaw/_ulaw.c, ulaw/ulaw.c, vq/_vq.c, vq/vq.c, df2/_df2.c, df2/df2.c, dmp/dmp.c, echo2/echo2.c, grpdelay/_grpdelay.c, grpdelay/grpdelay.c, histogram/histogram.c, mc2b/_mc2b.c, mc2b/mc2b.c, mgc2mgc/_mgc2mgc.c, mgc2mgc/mgc2mgc.c, norm0/_norm0.c, norm0/norm0.c, vopr/vopr.c, vsum/vsum.c, zerodf/_zerodf.c, zerodf/zerodf.c, b2mc/b2mc.c, cdist/cdist.c, lpc2par/_lpc2par.c, lpc2par/lpc2par.c, mgc2sp/_mgc2sp.c, mgc2sp/mgc2sp.c, nrand/_nrand.c, nrand/nrand.c, poledf/_poledf.c, poledf/poledf.c, rmse/_rmse.c, rmse/rmse.c, smcep/_smcep.c, smcep/smcep.c, snr/snr.c, x2x/x2x.c, c2sp/_c2sp.c, c2sp/c2sp.c, ignorm/_ignorm.c, ignorm/ignorm.c, imsvq/_imsvq.c, imsvq/imsvq.c, ivq/_ivq.c, ivq/ivq.c, levdur/_levdur.c, levdur/levdur.c, linear_intpl/linear_intpl.c, mcep/_mcep.c, mcep/mcep.c, mlpg/mlpg.c, par2lpc/_par2lpc.c, par2lpc/par2lpc.c, acorr/acorr.c, root_pol/_root_pol.c, root_pol/root_pol.c, freqt/_freqt.c, freqt/freqt.c, glsadf/_glsadf.c, glsadf/glsadf.c, gnorm/_gnorm.c, gnorm/gnorm.c, ifft2/_ifft2.c, ifft2/ifft2.c, reverse/_reverse.c, reverse/reverse.c, sin/sin.c, swab/swab.c, vstat/vstat.c, acep/_acep.c, acep/acep.c, bcp/bcp.c, c2acr/c2acr.c, c2ir/_c2ir.c, c2ir/c2ir.c, fd/fd.c, interpolate/interpolate.c, lmadf/_lmadf.c, lmadf/lmadf.c, lspcheck/_lspcheck.c, lspcheck/lspcheck.c, mglsadf/_mglsadf.c, mglsadf/mglsadf.c, minmax/minmax.c, mlsadf/_mlsadf.c, mlsadf/mlsadf.c, uels/_uels.c, uels/uels.c, extract/extract.c, fftcep/_fftcep.c, fftcep/fftcep.c, iglsadf/_iglsadf.c, iglsadf/iglsadf.c, zcross/_zcross.c, zcross/zcross.c, amcep/amcep.c, decimate/decimate.c, delay/delay.c, frame/frame.c: Fix tabs in comments. Replace exit() in main() by return(). Declare 'static' if this function is not called from other files. 2007-09-10 11:48 heigazen * bin/: acep/acep.c, acorr/acorr.c, agcep/agcep.c, amcep/amcep.c, average/average.c: Fix the previous modification: Change help message when SPTK is compiled with -DDOUBLE option. 2007-09-10 11:31 heigazen * bin/lpc2lsp/lpc2lsp.c: Fix typo. 2007-09-10 10:54 heigazen * bin/xgr/README.jis: Remove README.jis. 2007-09-08 14:49 heigazen * bin/levdur/_levdur.c: Bug fix: Tracker bug 1572612 2007-09-08 03:19 heigazen * bin/: smcep/smcep.c, gcep/gcep.c, mcep/mcep.c, mgcep/mgcep.c, uels/uels.c: Remove the previous fix. 2007-09-08 03:13 heigazen * bin/lpc/lpc.c: Fix the previous fix. 2007-09-08 02:36 heigazen * bin/: mcep/_mcep.c, uels/_uels.c: exit(0) -> exit(1) because this is erronous exit. 2007-09-08 02:27 heigazen * bin/: gcep/gcep.c, sp2mgc/sp2mgc.c: g>1.0 -> g>=1.0 2007-09-08 02:18 heigazen * bin/delay/delay.c: Fix the previous fix. 2007-09-07 15:32 heigazen * bin/us/uscd.sh: Remove --h option. 2007-09-07 15:25 heigazen * bin/: acep/acep.c, acorr/acorr.c, agcep/agcep.c, amcep/amcep.c, average/average.c: Output proper help message when they are compiled with '-DDOUBLE' option. 2007-09-07 15:13 heigazen * bin/us/uscd.sh: Change default input/output format to float. 2007-09-07 14:50 heigazen * bin/: mgc2sp/mgc2sp.c, agcep/agcep.c, glsadf/glsadf.c, iglsadf/iglsadf.c, imglsadf/imglsadf.c, mgc2mgc/mgc2mgc.c, mglsadf/mglsadf.c: Check gamma to avoid zero division. 2007-09-05 17:00 heigazen * bin/lsp2lpc/lsp2lpc.c: Add '-l' option. 2007-09-04 22:39 heigazen * bin/: lsp2lpc/lsp2lpc.c, lpc2lsp/lpc2lsp.c, lspdf/lspdf.c: Support log gain for LSPs. 2007-08-10 23:19 heigazen * bin/lsp2lpc/lsp2lpc.c: Add option '-l' to regard input as log gain and output linear one. 2007-08-10 23:17 heigazen * bin/lpc2lsp/lpc2lsp.c: Minor fix. 2007-08-10 21:17 heigazen * bin/lpc2lsp/lpc2lsp.c: Add option '-l' to output log gain instead of linear one. 2007-08-09 16:00 heigazen * bin/merge/merge.c: Fix bug: return value of main function always becomes 1. 2007-08-08 14:19 heigazen * bin/vstat/vstat.c: Add option '-i' to output inverse covariance instead of covariance matrix. 2007-08-07 16:20 heigazen * bin/sp2mgc/.cvsignore: Add Makefile to .cvsignore. 2007-08-07 16:17 heigazen * configure, configure.ac, bin/sp2mgc/.cvsignore, bin/sp2mgc/Makefile.in, bin/sp2mgc/_sp2mgc.c, bin/sp2mgc/sp2mgc.c, include/SPTK.h: Add sp2mgc. 2007-08-07 15:13 heigazen * configure, configure.ac, bin/mgcep2/.cvsignore, bin/mgcep2/Makefile.in, bin/mgcep2/_mgcep2.c, bin/mgcep2/mgcep2.c, bin/rndpg/.cvsignore, bin/rndpg/Makefile.in, bin/rndpg/rndpg.c, bin/srcnv/.cvsignore, bin/srcnv/Makefile.in, bin/srcnv/lpfcoef.2to3f, bin/srcnv/lpfcoef.2to3s, bin/srcnv/lpfcoef.3to4, bin/srcnv/lpfcoef.4to5, bin/srcnv/lpfcoef.5to7, bin/srcnv/lpfcoef.5to8, bin/srcnv/srcnv.c, bin/ccp/.cvsignore, bin/ccp/Makefile.in, bin/ccp/ccp.c: Remove unused programs. 2007-08-07 15:10 heigazen * Makefile.in: Small fix. 2007-08-07 15:09 heigazen * script/: bell.sh, glogsp.sh, grlogsp.sh, gwave.sh: Add CVS tags. 2007-08-07 15:08 heigazen * lib/.cvsignore: Add libSPTK.a to .cvsignore. 2007-08-07 15:08 heigazen * lib/theq.c: Add static to local functions. Re-order functions. 2007-08-07 15:07 heigazen * lib/matrix.c: Add static to local functions. 2007-08-07 15:03 heigazen * include/SPTK.h: List functions in bin/_*.c. Add structure "complex" to SPTK.h. Remove char *BOOL[]. 2007-08-07 15:00 heigazen * bin/us/.cvsignore: Add us to .cvsignore. 2007-08-07 15:00 heigazen * bin/us/: us16.sh, uscd.sh: Add CVS tag. 2007-08-07 15:00 heigazen * bin/us/us.c: Add CVS tag. Fix prototype definitions. 2007-08-07 14:58 heigazen * bin/xgr/.cvsignore: Add xgr to .cvsignore. 2007-08-07 14:57 heigazen * bin/xgr/: plot.c, window.c, xgr.c: Cleanup source code. 2007-08-07 14:56 heigazen * bin/xgr/xgr.h: Add CVS tag. Remove prototype definitions for static functions. 2007-08-07 14:55 heigazen * bin/xgr/: config.h, gcdata.h: Add CVS tag. 2007-08-07 14:55 heigazen * bin/psgr/.cvsignore: Add psgr to .cvsignore. 2007-08-07 14:53 heigazen * bin/psgr/: plot.c, psgr.c: Cleanup source code. 2007-08-07 14:47 heigazen * bin/psgr/eps.c: Cleanup source code. 2007-08-07 14:44 heigazen * bin/psgr/dict.c: Add CVS tag. 2007-08-07 14:43 heigazen * bin/fig+fdrw/.cvsignore: Add fdrw and fig to .cvsignore. 2007-08-07 14:42 heigazen * bin/fig+fdrw/plsub.c: Cleanup source code. Remove register variables. 2007-08-07 14:42 heigazen * bin/fig+fdrw/plot.h: Add CVS Id. Remove prototype definitions for functions in stdlib.h and math.h. 2007-08-07 14:36 heigazen * bin/fig+fdrw/plot.c: Remove register variables. Include math.h and stdlib.h. 2007-08-07 14:29 heigazen * bin/fig+fdrw/fig1.c: Cleanup source code. Remove register variables. 2007-08-07 14:28 heigazen * bin/fig+fdrw/fig0.c: Cleanup source code. Remove register variables. Fix bug: add final argument for mak(). 2007-08-07 14:25 heigazen * bin/fig+fdrw/fig.h: Add CVS Id. Remove prototype definitions in math.h. 2007-08-07 14:24 heigazen * bin/fig+fdrw/fig.c: Cleanup source code. 2007-08-07 14:08 heigazen * bin/fig+fdrw/: fdrw.c, fig.c: Add char *BOOL[]. Cleanup source code. Remove register variables. 2007-08-07 14:06 heigazen * bin/fft2/.cvsignore: Add fft2 to .cvsignore. 2007-08-07 14:04 heigazen * bin/: vopr/.cvsignore, vopr/vopr.c, vq/.cvsignore, vq/_vq.c, vq/vq.c, vstat/.cvsignore, vstat/vstat.c, vsum/.cvsignore, vsum/vsum.c, window/.cvsignore, window/_window.c, window/window.c, x2x/.cvsignore, x2x/x2x.c, root_pol/.cvsignore, root_pol/_root_pol.c, root_pol/root_pol.c, ramp/.cvsignore, ramp/ramp.c, rmse/.cvsignore, rmse/_rmse.c, rmse/rmse.c, rndpg/.cvsignore, rndpg/rndpg.c, sopr/.cvsignore, sopr/sopr.c, spec/.cvsignore, spec/spec.c, step/.cvsignore, step/step.c, swab/.cvsignore, swab/swab.c, uels/.cvsignore, uels/_uels.c, uels/uels.c, reverse/.cvsignore, reverse/_reverse.c, reverse/reverse.c, sin/.cvsignore, sin/sin.c, smcep/.cvsignore, smcep/_smcep.c, smcep/smcep.c, snr/.cvsignore, snr/snr.c, train/.cvsignore, train/train.c, ulaw/.cvsignore, ulaw/_ulaw.c, ulaw/ulaw.c: Cleanup source code. 2007-08-07 14:01 heigazen * bin/: mgcep/.cvsignore, mgcep/_mgcep.c, mgcep/mgcep.c, lbg/.cvsignore, lbg/_lbg.c, lbg/lbg.c, linear_intpl/.cvsignore, linear_intpl/linear_intpl.c, lpc2c/.cvsignore, lpc2c/_lpc2c.c, lpc2c/lpc2c.c, lpc2lsp/.cvsignore, lpc2lsp/_lpc2lsp.c, lpc2lsp/lpc2lsp.c, lspcheck/.cvsignore, lspcheck/_lspcheck.c, lspcheck/lspcheck.c, lspdf/.cvsignore, lspdf/_lspdf.c, lspdf/lspdf.c, mc2b/.cvsignore, mc2b/_mc2b.c, mc2b/mc2b.c, minmax/.cvsignore, minmax/minmax.c, mlsadf/.cvsignore, mlsadf/_mlsadf.c, mlsadf/mlsadf.c, par2lpc/.cvsignore, par2lpc/_par2lpc.c, par2lpc/par2lpc.c, interpolate/.cvsignore, interpolate/interpolate.c, ivq/.cvsignore, ivq/_ivq.c, ivq/ivq.c, lsp2lpc/.cvsignore, lsp2lpc/_lsp2lpc.c, lsp2lpc/lsp2lpc.c, ltcdf/.cvsignore, ltcdf/_ltcdf.c, ltcdf/ltcdf.c, merge/.cvsignore, merge/merge.c, mgc2mgc/.cvsignore, mgc2mgc/_mgc2mgc.c, mgc2mgc/mgc2mgc.c, mgc2sp/.cvsignore, mgc2sp/_mgc2sp.c, mgc2sp/mgc2sp.c, msvq/.cvsignore, msvq/_msvq.c, msvq/msvq.c, nrand/.cvsignore, nrand/_nrand.c, nrand/nrand.c, pitch/.cvsignore, pitch/_pitch.c, pitch/pitch.c, imsvq/.cvsignore, imsvq/_imsvq.c, imsvq/imsvq.c, levdur/.cvsignore, levdur/_levdur.c, levdur/levdur.c, lmadf/.cvsignore, lmadf/_lmadf.c, lmadf/lmadf.c, lpc/.cvsignore, lpc/_lpc.c, lpc/lpc.c, mglsadf/.cvsignore, mglsadf/_mglsadf.c, mglsadf/mglsadf.c, nan/.cvsignore, nan/nan.c, phase/.cvsignore, phase/_phase.c, phase/phase.c, lpc2par/.cvsignore, lpc2par/_lpc2par.c, lpc2par/lpc2par.c, mcep/.cvsignore, mcep/_mcep.c, mcep/mcep.c, mlpg/.cvsignore, mlpg/mlpg.c, norm0/.cvsignore, norm0/_norm0.c, norm0/norm0.c, poledf/.cvsignore, poledf/_poledf.c, poledf/poledf.c, zcross/.cvsignore, zcross/_zcross.c, zcross/zcross.c, zerodf/.cvsignore, zerodf/_zerodf.c, zerodf/zerodf.c: Cleanup source code. 2007-08-07 13:58 heigazen * bin/impulse/: .cvsignore, impulse.c: Cleanup source code. 2007-08-07 13:57 heigazen * bin/imglsadf/: .cvsignore, imglsadf.c: Add char *BOOL[]. Add imglsadf to .cvsignore. 2007-08-07 13:56 heigazen * bin/ignorm/: .cvsignore, _ignorm.c: Add ignorm to .cvsignore. 2007-08-07 13:55 heigazen * bin/iglsadf/: .cvsignore, _iglsadf.c, iglsadf.c: Add char *BOOL[]. Add iglsadf to .cvsignore. Include SPTK.h 2007-08-07 13:54 heigazen * bin/ifft2/: .cvsignore, _ifft2.c: Add ifft2 to .cvsignore. 2007-08-07 13:54 heigazen * bin/ifft/: .cvsignore, _ifft.c: Add ifft to .cvsignore. 2007-08-07 13:53 heigazen * bin/histogram/: .cvsignore, _histogram.c: Add histogram to .cvsignore. 2007-08-07 13:45 heigazen * bin/grpdelay/: .cvsignore, _grpdelay.c: Add grpdelay to .cvsignore. 2007-08-07 13:44 heigazen * bin/gnorm/: .cvsignore, _gnorm.c: Add gnorm to .cvsignore. 2007-08-07 13:44 heigazen * bin/glsadf/.cvsignore: Add glsadf to .cvsignore. 2007-08-07 13:43 heigazen * bin/: gcep/.cvsignore, gcep/_gcep.c, gcep/gcep.c, glsadf/glsadf.c: Add char *BOOL[]. 2007-08-07 13:21 heigazen * bin/gc2gc/: .cvsignore, _gc2gc.c, gc2gc.c: Add char *BOOL[]. Add gc2gc to .cvsignore. 2007-08-07 13:20 heigazen * bin/freqt/: .cvsignore, _freqt.c: Add final line. Add frame to .cvsignore. 2007-08-07 13:19 heigazen * bin/frame/: .cvsignore, frame.c: Add char *BOOL[]. Add frame to .cvsignore. 2007-08-07 13:19 heigazen * bin/fftr2/: .cvsignore, _fftr2.c: Add fftr2 to .cvsignore. Remove redundunt spaces. Add final line. 2007-08-07 13:18 heigazen * bin/fftr/.cvsignore: Add fftr to .cvsignore. 2007-08-07 13:18 heigazen * bin/fftr/_fftr.c: Add final line. 2007-08-07 13:17 heigazen * bin/fftcep/.cvsignore: Add fftcep to .cvsignore. 2007-08-07 13:16 heigazen * bin/fft2/_fft2.c: Remove redundunt spaces. 2007-08-07 13:15 heigazen * bin/fft/.cvsignore: Add fft to .cvsignore. 2007-08-07 13:13 heigazen * bin/: delay/delay.c, echo2/echo2.c, excite/excite.c: Add char *BOOL[]. 2007-08-07 13:13 heigazen * bin/da/: da.h, da.sh, dawrite.c: Add CVS Information to .sh files. Add Boolean definition and char *BOOL[]. 2007-08-07 13:11 heigazen * bin/: clip/_clip.c, df2/_df2.c, dfs/_dfs.c: Include SPTK.h. 2007-08-07 13:11 heigazen * bin/cdist/cdist.c: Add char *BOOL. 2007-08-07 13:09 heigazen * bin/c2sp/: .cvsignore, c2sp.c: Add c2sp to .cvsignore. Output CVS Information. Add char *BOOL. 2007-08-07 13:08 heigazen * bin/c2acr/: .cvsignore, _c2acr.c, c2acr.c: Output CVS information. Add c2acr to .cvsignore. 2007-08-07 13:06 heigazen * bin/: bcp/bcp.c, bcut/bcut.c, c2ir/_c2ir.c, c2ir/c2ir.c: Output CVS information. 2007-08-07 13:06 heigazen * bin/b2mc/: _b2mc.c, b2mc.c: Output CVS information. Include SPTK.h. 2007-08-07 13:05 heigazen * bin/average/: .cvsignore, _average.c, average.c: Add average to .cvsignore. Output CVS Information. 2007-08-07 13:04 heigazen * bin/amcep/: .cvsignore, _amcep.c, amcep.c: Add amcep to .cvsignore. Add char *BOOL. Output CVS Information. 2007-08-07 13:03 heigazen * bin/agcep/: .cvsignore, _agcep.c, agcep.c: Add agcep to .cvsignore. Add char *BOOL. Output CVS Information. 2007-08-07 13:01 heigazen * bin/acorr/: .cvsignore, _acorr.c, acorr.c: Add acorr to .cvsignore. Output CVS information. Include SPTK.h in _acorr.c. 2007-08-07 12:50 heigazen * bin/acep/: .cvsignore, acep.c: Add acep to .cvsignore. Add char *BOOL. 2007-08-06 17:53 kyo_n * bin/us/uscd.sh: uscd$B$N%X%k%W$,$*$+$7$$$H$$$&LdBj$K4X$7$F(B --h$B%*%W%7%g%s$G$b%X%k%W$,8+$l$k$h$&$K$7$^$7$?!#(B uscd$B$NF~=PNO$NLdBj$K4X$7$F(B $B0z?t$,(Bfloat$B7?$N>l9g$bBP1~$G$-$k$h$&$KJQ99$7$^$7$?!#(B 2007-08-02 17:35 heigazen * lib/agexp.c, lib/cholesky.c, lib/fileio.c, lib/getfp.c, lib/getmem.c, lib/gexp.c, lib/glog.c, lib/ifftr.c, lib/matrix.c, lib/movem.c, lib/mseq.c, lib/toeplitz.c, bin/lpc2c/.cvsignore, bin/lspcheck/.cvsignore, lib/.cvsignore, lib/fillz.c, lib/theq.c, bin/lpc2c/_lpc2c.c, bin/mc2b/.cvsignore, bin/minmax/.cvsignore, bin/vq/.cvsignore, bin/fig+fdrw/fdrw.c, bin/fig+fdrw/fig.c, bin/fig+fdrw/fig0.c, bin/fig+fdrw/fig1.c, bin/lspdf/.cvsignore, bin/lspdf/_lspdf.c, bin/mgc2mgc/.cvsignore, bin/vstat/.cvsignore, bin/vstat/vstat.c, bin/fig+fdrw/.cvsignore, bin/ivq/.cvsignore, bin/nrand/.cvsignore, bin/smcep/.cvsignore, bin/smcep/_smcep.c, bin/smcep/smcep.c, bin/lsp2lpc/.cvsignore, bin/lsp2lpc/_lsp2lpc.c, bin/mgcep/.cvsignore, bin/mgcep/_mgcep.c, bin/mlsadf/.cvsignore, bin/mlsadf/mlsadf.c, bin/vsum/.cvsignore, bin/x2x/.cvsignore, bin/x2x/x2x.c, bin/lmadf/.cvsignore, bin/lmadf/lmadf.c, bin/ltcdf/.cvsignore, bin/mglsadf/.cvsignore, bin/nan/.cvsignore, bin/sin/.cvsignore, bin/sin/sin.c, bin/phase/.cvsignore, bin/reverse/.cvsignore, bin/levdur/.cvsignore, bin/levdur/_levdur.c, bin/mcep/.cvsignore, bin/mcep/_mcep.c, bin/ccp/.cvsignore, bin/linear_intpl/.cvsignore, bin/pitch/_pitch.c, bin/window/.cvsignore, bin/window/_window.c, bin/msvq/.cvsignore, bin/pitch/.cvsignore, bin/ulaw/.cvsignore, bin/ulaw/_ulaw.c, bin/xgr/.cvsignore, bin/xgr/plot.c, bin/xgr/window.c, bin/imsvq/.cvsignore, bin/imsvq/_imsvq.c, bin/lpc2par/.cvsignore, bin/merge/.cvsignore, bin/poledf/.cvsignore, bin/snr/.cvsignore, bin/lpc2lsp/_lpc2lsp.c, bin/rmse/.cvsignore, bin/rmse/_rmse.c, bin/rmse/rmse.c, bin/rndpg/.cvsignore, bin/rndpg/rndpg.c, bin/lbg/.cvsignore, bin/lpc2lsp/.cvsignore, bin/step/.cvsignore, bin/spec/spec.c, bin/mgc2sp/.cvsignore, bin/mgc2sp/mgc2sp.c, bin/ramp/.cvsignore, bin/sopr/.cvsignore, bin/sopr/sopr.c, bin/spec/.cvsignore, bin/swab/.cvsignore, bin/interpolate/.cvsignore, bin/mgcep2/.cvsignore, bin/mgcep2/_mgcep2.c, bin/train/.cvsignore, bin/train/train.c, bin/uels/.cvsignore, bin/uels/_uels.c, bin/us/.cvsignore, include/SPTK.h, bin/impulse/.cvsignore, bin/par2lpc/.cvsignore, include/.cvsignore, .cvsignore, bin/mlpg/.cvsignore, bin/root_pol/.cvsignore, bin/vopr/.cvsignore, bin/zcross/.cvsignore, script/.cvsignore, bin/.cvsignore, bin/norm0/.cvsignore, bin/psgr/.cvsignore, bin/srcnv/.cvsignore, bin/zerodf/.cvsignore: Cleanup source codes. Add .cvsinore. 2007-08-02 17:05 heigazen * bin/: ignorm/.cvsignore, ignorm/_ignorm.c, ignorm/ignorm.c, imglsadf/.cvsignore, imglsadf/_imglsadf.c, imglsadf/imglsadf.c: Cleanup source codes. Add .cvsinore. 2007-08-01 16:36 heigazen * bin/ifft/: ifft.c, _ifft.c: Cleanup source codes. 2007-08-01 16:36 heigazen * bin/: ifft2/.cvsignore, ifft2/_ifft2.c, ifft2/ifft2.c, iglsadf/.cvsignore, iglsadf/_iglsadf.c, iglsadf/iglsadf.c, lpc/.cvsignore, lpc/_lpc.c, lpc/lpc.c: Cleanup source codes. Add .cvsinore. 2007-07-25 14:36 heigazen * include/SPTK.h: List proto-types of SPTK functions in libSPTK.a (from acep to ifft). 2007-07-25 14:35 heigazen * bin/: histogram/.cvsignore, histogram/_histogram.c, histogram/histogram.c, ifft/.cvsignore, ifft/_ifft.c, ifft/ifft.c: Cleanup source codes. Add .cvsinore. 2007-07-25 13:56 heigazen * bin/: gcep/.cvsignore, gcep/_gcep.c, gcep/gcep.c, glsadf/.cvsignore, glsadf/_glsadf.c, glsadf/glsadf.c, gnorm/.cvsignore, gnorm/_gnorm.c, gnorm/gnorm.c, grpdelay/.cvsignore, grpdelay/_grpdelay.c, grpdelay/grpdelay.c: Cleanup source codes. Add .cvsinore. 2007-07-24 19:15 heigazen * bin/: frame/.cvsignore, frame/frame.c, freqt/.cvsignore, freqt/_freqt.c, freqt/freqt.c, gc2gc/.cvsignore, gc2gc/_gc2gc.c, gc2gc/gc2gc.c: Cleanup source codes. Add .cvsinore. 2007-07-24 15:13 heigazen * bin/: fftr2/.cvsignore, fftr2/_fftr2.c, fftr2/fftr2.c, fftr/.cvsignore, fftr/_fftr.c, fftr/fftr.c: Cleanup source codes. Add .cvsinore. 2007-07-24 14:39 heigazen * bin/fftcep/: .cvsignore, _fftcep.c, fftcep.c: Cleanup source codes. Add .cvsinore. 2007-07-24 14:31 heigazen * bin/fft2/: .cvsignore, _fft2.c, fft2.c: Cleanup source codes. Add .cvsinore. 2007-07-24 14:06 heigazen * bin/fft/: .cvsignore, _fft.c, fft.c: Cleanup source codes. Add .cvsinore. 2007-07-24 13:51 heigazen * bin/fd/: .cvsignore, fd.c: Cleanup source codes. Add .cvsinore. 2007-07-24 13:34 heigazen * bin/extract/: .cvsignore, extract.c: Cleanup source codes. Add .cvsinore. 2007-07-24 13:30 heigazen * bin/excite/: .cvsignore, excite.c: Cleanup source codes. Add .cvsinore. 2007-07-24 12:03 heigazen * bin/echo2/: .cvsignore, echo2.c: Cleanup source codes. Add .cvsinore. 2007-07-24 11:58 heigazen * bin/ds/: .cvsignore, ds.c, lpfcoef.3to2: Cleanup source codes. Add .cvsinore. Add 3:2 downsampling filter. 2007-07-24 11:23 heigazen * bin/dmp/: .cvsignore, dmp.c: Cleanup source codes. Add .cvsinore. 2007-07-24 11:15 heigazen * bin/dfs/: dfs.c, _dfs.c, .cvsignore: Cleanup source codes. Add .cvsinore. 2007-07-24 11:06 heigazen * bin/df2/: .cvsignore, _df2.c, df2.c: Cleanup source codes. Add .cvsinore. 2007-07-23 16:44 heigazen * bin/delay/: .cvsignore, delay.c: Cleanup source codes. 2007-07-23 16:40 heigazen * bin/decimate/: .cvsignore, decimate.c: Cleanup source codes. 2007-07-23 14:15 heigazen * bin/da/: .cvsignore, da.h, dawrite.c: Cleanup source codes. 2007-07-23 13:30 heigazen * bin/clip/: .cvsignore, _clip.c, clip.c: Cleanup source codes. 2007-07-23 13:18 heigazen * bin/: cat2/cat2.c, cdist/.cvsignore, cdist/cdist.c: Cleanup source codes. 2007-07-23 13:13 heigazen * bin/cat2/.cvsignore: Add .cvsignore. 2007-07-23 13:12 heigazen * bin/cat2/cat2.c: Cleanup source codes. 2007-07-23 11:34 mr_alex * bin/clip/_clip.c: register int --> int 2007-07-23 11:34 mr_alex * bin/: da/dawrite.c, ccp/ccp.c: register char --> char 2007-07-23 11:33 mr_alex * bin/fd/fd.c: register FILE --> FILE 2007-07-23 11:30 mr_alex * bin/: ifft/_ifft.c, histogram/_histogram.c: register int --> int 2007-07-23 11:27 mr_alex * bin/: lspcheck/_lspcheck.c, lpc2c/_lpc2c.c, imglsadf/_imglsadf.c: register int --> int 2007-07-23 11:24 mr_alex * bin/: mglsadf/_mglsadf.c, lspdf/_lspdf.c: register int --> int 2007-07-23 11:20 mr_alex * bin/: rmse/_rmse.c, poledf/_poledf.c, mlsadf/_mlsadf.c: register int --> int 2007-07-23 11:19 mr_alex * bin/smcep/_smcep.c: register int --> register 2007-07-23 11:09 mr_alex * bin/vq/_vq.c: register int --> int 2007-07-20 18:10 heigazen * bin/c2sp/: .cvsignore, _c2sp.c, c2sp.c: Cleanup source codes. 2007-07-20 18:02 heigazen * bin/c2ir/: .cvsignore, c2ir.c, _c2ir.c: Cleanup source codes. 2007-07-20 17:52 heigazen * bin/c2acr/c2acr.c: Update rcs_id 2007-07-20 17:51 heigazen * bin/c2acr/: .cvsignore, _c2acr.c, c2acr.c: Cleanup source codes. 2007-07-20 17:39 heigazen * bin/bcp/.cvsignore: Add cvsignore. 2007-07-20 17:38 heigazen * bin/bcut/.cvsignore: Update cvsignore 2007-07-20 17:38 heigazen * bin/bcut/bcut.c: Cleanup source codes. 2007-07-20 17:32 heigazen * bin/bcp/bcp.c: Cleanup source codes. 2007-07-20 17:14 heigazen * bin/b2mc/: .cvsignore, _b2mc.c, b2mc.c: Cleanup source codes. 2007-07-20 17:06 heigazen * bin/average/: .cvsignore, _average.c, average.c: Cleanup source codes. 2007-07-20 16:58 heigazen * bin/: amcep/.cvsignore, amcep/_amcep.c, amcep/amcep.c, acorr/acorr.c: Cleanup source codes. 2007-07-20 16:38 heigazen * bin/: acorr/_acorr.c, acorr/acorr.c, acorr/.cvsignore, agcep/.cvsignore, agcep/_agcep.c, agcep/agcep.c: Cleanup source codes. 2007-07-20 16:01 heigazen * bin/acep/: _acep.c, acep.c, .cvsignore: Cleanup source code. Fix bug: pd rather than PADEORD should be used to allocate memory. 2007-07-20 11:49 heigazen * bin/mcep/Makefile, bin/mcep/Makefile.in, .cvsignore, Makefile, Makefile.in, config.guess, config.sub, configure, configure.ac, install-sh, bin/acep/Makefile, bin/acep/Makefile.in, bin/ltcdf/Makefile, bin/ltcdf/Makefile.in, bin/mlpg/Makefile, bin/mlpg/Makefile.in, bin/spec/Makefile, bin/spec/Makefile.in, bin/us/Makefile, bin/us/Makefile.in, bin/vopr/Makefile, bin/vopr/Makefile.in, bin/zerodf/Makefile, bin/zerodf/Makefile.in, lib/Makefile, lib/Makefile.in, lib/Makefile.lib, lib/Makefile.lib.in, bin/b2mc/Makefile, bin/b2mc/Makefile.in, bin/dfs/Makefile, bin/dfs/Makefile.in, bin/mc2b/Makefile, bin/mc2b/Makefile.in, bin/fft2/Makefile, bin/fft2/Makefile.in, bin/imglsadf/Makefile, bin/impulse/Makefile, bin/impulse/Makefile.in, bin/ulaw/Makefile, bin/ulaw/Makefile.in, bin/x2x/Makefile, bin/x2x/Makefile.in, bin/bcut/Makefile, bin/bcut/Makefile.in, bin/cat2/Makefile, bin/cat2/Makefile.in, bin/clip/Makefile, bin/clip/Makefile.in, bin/fftcep/Makefile, bin/fftcep/Makefile.in, bin/fftr2/Makefile, bin/fftr2/Makefile.in, bin/gc2gc/Makefile, bin/gc2gc/Makefile.in, bin/imglsadf/Makefile.in, bin/linear_intpl/Makefile, bin/linear_intpl/Makefile.in, bin/merge/Makefile, bin/merge/Makefile.in, bin/minmax/Makefile, bin/minmax/Makefile.in, bin/c2sp/Makefile, bin/c2sp/Makefile.in, bin/fd/Makefile, bin/fd/Makefile.in, bin/glsadf/Makefile, bin/glsadf/Makefile.in, bin/ifft/Makefile, bin/ifft/Makefile.in, bin/lpc/Makefile, bin/lpc/Makefile.in, bin/mgc2sp/Makefile, bin/mgc2sp/Makefile.in, bin/par2lpc/Makefile, bin/par2lpc/Makefile.in, bin/dmp/Makefile, bin/dmp/Makefile.in, bin/frame/Makefile, bin/frame/Makefile.in, bin/gnorm/Makefile, bin/gnorm/Makefile.in, bin/imsvq/Makefile, bin/imsvq/Makefile.in, bin/smcep/Makefile, bin/smcep/Makefile.in, bin/decimate/Makefile, bin/mgcep/Makefile, bin/mgcep/Makefile.in, bin/nrand/Makefile, bin/nrand/Makefile.in, bin/decimate/Makefile.in, bin/train/Makefile.in, bin/average/Makefile, bin/average/Makefile.in, bin/c2acr/Makefile, bin/c2acr/Makefile.in, bin/delay/Makefile, bin/delay/Makefile.in, bin/gcep/Makefile, bin/gcep/Makefile.in, bin/iglsadf/Makefile, bin/iglsadf/Makefile.in, bin/lpc2c/Makefile, bin/lpc2c/Makefile.in, bin/train/Makefile, bin/acorr/Makefile, bin/acorr/Makefile.in, bin/da/Makefile, bin/da/Makefile.in, bin/pitch/Makefile, bin/pitch/Makefile.in, bin/psgr/Makefile, bin/psgr/Makefile.in, bin/ramp/Makefile, bin/ramp/Makefile.in, bin/rndpg/Makefile, bin/root_pol/Makefile, bin/root_pol/Makefile.in, bin/sin/Makefile, bin/sin/Makefile.in, bin/srcnv/Makefile, bin/srcnv/Makefile.in, bin/step/Makefile, bin/step/Makefile.in, bin/vq/Makefile, bin/vq/Makefile.in, script/Makefile, script/Makefile.in, bin/cdist/Makefile, bin/cdist/Makefile.in, bin/fig+fdrw/Makefile, bin/fig+fdrw/Makefile.in, bin/lbg/Makefile, bin/lbg/Makefile.in, bin/lspdf/Makefile, bin/lspdf/Makefile.in, bin/rndpg/Makefile.in, bin/vstat/Makefile, bin/vstat/Makefile.in, bin/histogram/Makefile, bin/histogram/Makefile.in, bin/ignorm/Makefile, bin/ignorm/Makefile.in, bin/snr/Makefile, bin/snr/Makefile.in, bin/vsum/Makefile, bin/vsum/Makefile.in, bin/window/Makefile, bin/window/Makefile.in, include/Makefile, include/Makefile.in, bin/c2ir/Makefile, bin/c2ir/Makefile.in, bin/excite/Makefile, bin/excite/Makefile.in, bin/lpc2par/Makefile, bin/lpc2par/Makefile.in, bin/mgc2mgc/Makefile, bin/mgc2mgc/Makefile.in, bin/norm0/Makefile, bin/norm0/Makefile.in, bin/reverse/Makefile, bin/reverse/Makefile.in, bin/bcp/Makefile, bin/bcp/Makefile.in, bin/echo2/Makefile, bin/echo2/Makefile.in, bin/extract/Makefile.in, bin/fft/Makefile, bin/fft/Makefile.in, bin/msvq/Makefile, bin/msvq/Makefile.in, bin/nan/Makefile, bin/nan/Makefile.in, bin/poledf/Makefile, bin/poledf/Makefile.in, bin/amcep/Makefile.in, bin/ccp/Makefile, bin/ccp/Makefile.in, bin/extract/Makefile, bin/fftr/Makefile, bin/fftr/Makefile.in, bin/levdur/Makefile, bin/levdur/Makefile.in, bin/lpc2lsp/Makefile, bin/lpc2lsp/Makefile.in, bin/sopr/Makefile, bin/sopr/Makefile.in, bin/Makefile, bin/Makefile.in, bin/amcep/Makefile, bin/ds/Makefile, bin/ds/Makefile.in, bin/ifft2/Makefile, bin/ifft2/Makefile.in, bin/mgcep2/Makefile, bin/mgcep2/Makefile.in, bin/mlsadf/Makefile, bin/mlsadf/Makefile.in, bin/uels/Makefile, bin/uels/Makefile.in, bin/xgr/Makefile, bin/xgr/Makefile.in, bin/df2/Makefile, bin/df2/Makefile.in, bin/interpolate/Makefile, bin/interpolate/Makefile.in, bin/ivq/Makefile, bin/ivq/Makefile.in, bin/lmadf/Makefile, bin/lmadf/Makefile.in, bin/lspcheck/Makefile, bin/lspcheck/Makefile.in, bin/phase/Makefile, bin/phase/Makefile.in, bin/rmse/Makefile, bin/zcross/Makefile, bin/zcross/Makefile.in, bin/rmse/Makefile.in, bin/agcep/Makefile, bin/agcep/Makefile.in, bin/freqt/Makefile, bin/freqt/Makefile.in, bin/grpdelay/Makefile, bin/grpdelay/Makefile.in, bin/lsp2lpc/Makefile.in, bin/swab/Makefile, bin/swab/Makefile.in, bin/lsp2lpc/Makefile, bin/mglsadf/Makefile, bin/mglsadf/Makefile.in: Support configure script. 2007-07-19 18:57 heigazen * include/SPTK.h: Bug fix 2007-07-19 18:57 heigazen * lib/getmem.c: unsigned size -> unsigned int size 2007-07-19 15:25 heigazen * include/SPTK.h: Fix prototype declarations. 2007-07-19 15:18 heigazen * bin/sopr/Makefile, bin/bcp/Makefile, bin/fd/Makefile, bin/fft/Makefile, bin/gcep/Makefile, bin/histogram/Makefile, bin/impulse/Makefile, bin/merge/Makefile, bin/mgcep2/Makefile, bin/mglsadf/Makefile, bin/ulaw/Makefile, bin/window/Makefile, lib/Makefile, bin/Makefile, bin/clip/Makefile, bin/glsadf/Makefile, bin/grpdelay/Makefile, bin/linear_intpl/Makefile, bin/mlsadf/Makefile, bin/nan/Makefile, bin/ramp/Makefile, bin/rmse/Makefile, bin/smcep/Makefile, bin/uels/Makefile, bin/acorr/Makefile, bin/c2ir/Makefile, bin/df2/Makefile, bin/excite/Makefile, bin/extract/Makefile, bin/imsvq/Makefile, bin/rndpg/Makefile, bin/vq/Makefile, bin/dmp/Makefile, bin/lpc/Makefile, include/Makefile, bin/amcep/Makefile, bin/c2acr/Makefile, bin/fft2/Makefile, bin/fftr/Makefile, bin/iglsadf/Makefile, bin/nrand/Makefile, bin/sin/Makefile, bin/snr/Makefile, bin/srcnv/Makefile, bin/cat2/Makefile, bin/cdist/Makefile, bin/da/Makefile, bin/freqt/Makefile, bin/ltcdf/Makefile, bin/mcep/Makefile, bin/mgc2sp/Makefile, bin/train/Makefile, bin/vstat/Makefile, script/Makefile, bin/gnorm/Makefile, bin/ignorm/Makefile, bin/lspcheck/Makefile, bin/minmax/Makefile, bin/par2lpc/Makefile, bin/phase/Makefile, bin/reverse/Makefile, bin/swab/Makefile, bin/vsum/Makefile, Makefile, bin/echo2/Makefile, bin/ifft/Makefile, bin/lpc2par/Makefile, bin/mlpg/Makefile, bin/norm0/Makefile, bin/pitch/Makefile, bin/agcep/Makefile, bin/fftr2/Makefile, bin/ifft2/Makefile, bin/levdur/Makefile, bin/msvq/Makefile, bin/zerodf/Makefile, bin/acep/Makefile, bin/bcut/Makefile, bin/c2sp/Makefile, bin/dfs/Makefile, bin/ds/Makefile, bin/fftcep/Makefile, bin/lsp2lpc/Makefile, bin/mgc2mgc/Makefile, bin/mgcep/Makefile, bin/spec/Makefile, bin/decimate/Makefile, bin/frame/Makefile, bin/imglsadf/Makefile, bin/lmadf/Makefile, bin/lpc2lsp/Makefile, bin/lspdf/Makefile, bin/psgr/Makefile, bin/root_pol/Makefile, bin/step/Makefile, bin/us/Makefile, bin/vopr/Makefile, bin/xgr/Makefile, bin/zcross/Makefile, bin/average/Makefile, bin/b2mc/Makefile, bin/ccp/Makefile, bin/delay/Makefile, bin/fig+fdrw/Makefile, bin/gc2gc/Makefile, bin/interpolate/Makefile, bin/ivq/Makefile, bin/mc2b/Makefile, bin/poledf/Makefile, bin/lbg/Makefile, bin/lpc2c/Makefile, bin/x2x/Makefile: Cleanup Makefile 2007-07-19 03:24 heigazen * bin/mcep/: Makefile, _mcep.c, mcep.c: Cleanup source codes. 2007-07-19 03:00 heigazen * bin/mgcep/: Makefile, _mgcep.c, mgcep.c: Make source codes clear. 2007-04-12 17:59 kyo_n * lib/glog.c: ---------------------------------------------------------------------- $B%F%9%H$G$9(B 2007-01-13 16:01 s_sako * bin/: psgr/plot.c, psgr/psgr.h, xgr/plot.c, xgr/xgr.h: fix prototype declaration 2007-01-13 15:59 s_sako * bin/root_pol/root_pol.c: add missing prototype declarations 2007-01-13 15:15 s_sako * bin/smcep/_smcep.c: avoid re-defining M_PI 2007-01-13 15:13 s_sako * bin/dmp/dmp.c: remove unexpexted string(F12?) on dmp.c:98(F12?) 2007-01-13 15:06 s_sako * bin/: amcep/_amcep.c, mgcep/_mgcep.c, mgcep2/_mgcep2.c, nrand/_nrand.c, smcep/_smcep.c, uels/_uels.c: add missing prototype declarations 2007-01-13 14:47 s_sako * bin/: average/_average.c, gnorm/_gnorm.c, histogram/_histogram.c, ifft/_ifft.c, ignorm/_ignorm.c, ivq/_ivq.c, par2lpc/_par2lpc.c: add: #include 2006-12-21 16:23 mr_alex * bin/: acep/Makefile, acep/acep.c, acorr/acorr.c, agcep/agcep.c, amcep/amcep.c, average/average.c, b2mc/b2mc.c, bcp/bcp.c, bcut/bcut.c, c2acr/c2acr.c, c2ir/c2ir.c, c2sp/c2sp.c, cat2/cat2.c, ccp/ccp.c, cdist/cdist.c, clip/clip.c, da/dawrite.c, decimate/decimate.c, delay/delay.c, df2/df2.c, dfs/dfs.c, dmp/dmp.c, ds/ds.c, echo2/echo2.c, excite/excite.c, extract/extract.c, fd/fd.c, fft/fft.c, fft2/fft2.c, fftcep/fftcep.c, fftr/fftr.c, fftr2/fftr2.c, fig+fdrw/fdrw.c, fig+fdrw/fig.c, frame/frame.c, freqt/freqt.c, gc2gc/gc2gc.c, gcep/gcep.c, glsadf/glsadf.c, gnorm/gnorm.c, grpdelay/grpdelay.c, histogram/histogram.c, ifft/ifft.c, ifft2/ifft2.c, ignorm/ignorm.c, imglsadf/imglsadf.c, impulse/impulse.c, interpolate/interpolate.c, ivq/ivq.c, lbg/lbg.c, levdur/levdur.c, linear_intpl/linear_intpl.c, lmadf/lmadf.c, lpc/lpc.c, lpc2c/lpc2c.c, lpc2lsp/lpc2lsp.c, lpc2par/lpc2par.c, lsp2lpc/lsp2lpc.c, lspcheck/lspcheck.c, lspdf/lspdf.c, ltcdf/ltcdf.c, mc2b/mc2b.c, mcep/mcep.c, merge/merge.c, mgc2mgc/mgc2mgc.c, mgc2sp/mgc2sp.c, mgcep/_mgcep.c, mgcep/mgcep.c, mgcep2/mgcep2.c, mglsadf/mglsadf.c, minmax/minmax.c, mlpg/mlpg.c, mlsadf/mlsadf.c, msvq/msvq.c, nan/nan.c, norm0/norm0.c, nrand/nrand.c, par2lpc/par2lpc.c, phase/phase.c, pitch/pitch.c, poledf/poledf.c, psgr/psgr.c, ramp/ramp.c, reverse/reverse.c, rmse/rmse.c, rndpg/rndpg.c, root_pol/root_pol.c, sin/sin.c, smcep/smcep.c, snr/snr.c, sopr/sopr.c, spec/spec.c, srcnv/srcnv.c, step/step.c, swab/swab.c, train/train.c, uels/Makefile, uels/_uels.c, uels/uels.c, ulaw/ulaw.c, us/us.c, vopr/vopr.c, vq/vq.c, vstat/vstat.c, vsum/vsum.c, window/window.c, x2x/x2x.c, xgr/xgr.c, zcross/zcross.c, zerodf/zerodf.c: $B%P!<%8%g%sHV9f$rJ8;zNs$H$7$F=PNO$9$k$h$&$K$7$^$7$?(B 2006-12-19 22:02 mr_alex * bin/: Makefile, acep/Makefile, acep/acep.c, acorr/acorr.c, agcep/agcep.c, amcep/amcep.c, average/average.c, b2mc/b2mc.c, bcp/bcp.c, bcut/bcut.c, c2acr/c2acr.c, c2ir/c2ir.c, c2sp/c2sp.c, cat2/cat2.c, ccp/ccp.c, cdist/cdist.c, clip/clip.c, da/dawrite.c, decimate/decimate.c, delay/delay.c, df2/df2.c, dfs/dfs.c, dmp/dmp.c, ds/ds.c, echo2/echo2.c, excite/excite.c, extract/extract.c, fd/fd.c, fft/fft.c, fft2/fft2.c, fftcep/fftcep.c, fftr/fftr.c, fftr2/fftr2.c, fig+fdrw/fdrw.c, fig+fdrw/fig.c, frame/frame.c, freqt/freqt.c, gc2gc/gc2gc.c, gcep/gcep.c, glsadf/glsadf.c, gnorm/gnorm.c, grpdelay/grpdelay.c, histogram/histogram.c, ifft/ifft.c, ifft2/ifft2.c, iglsadf/iglsadf.c, ignorm/ignorm.c, imglsadf/imglsadf.c, impulse/impulse.c, imsvq/imsvq.c, interpolate/interpolate.c, ivq/ivq.c, lbg/lbg.c, levdur/levdur.c, linear_intpl/linear_intpl.c, lmadf/lmadf.c, lpc/lpc.c, lpc2c/lpc2c.c, lpc2lsp/lpc2lsp.c, lpc2par/lpc2par.c, lsp2lpc/lsp2lpc.c, lspcheck/lspcheck.c, lspdf/lspdf.c, ltcdf/ltcdf.c, mc2b/mc2b.c, mcep/_mcep.c, mcep/mcep.c, merge/merge.c, mgc2mgc/mgc2mgc.c, mgc2sp/mgc2sp.c, mgcep/mgcep.c, mgcep2/mgcep2.c, mglsadf/mglsadf.c, minmax/minmax.c, mlpg/mlpg.c, mlsadf/mlsadf.c, msvq/msvq.c, nan/nan.c, norm0/norm0.c, nrand/nrand.c, par2lpc/par2lpc.c, phase/phase.c, pitch/pitch.c, poledf/poledf.c, psgr/psgr.c, ramp/ramp.c, reverse/reverse.c, rmse/rmse.c, rndpg/rndpg.c, root_pol/root_pol.c, sin/sin.c, smcep/smcep.c, snr/snr.c, sopr/sopr.c, spec/spec.c, srcnv/srcnv.c, step/step.c, swab/swab.c, train/train.c, uels/Makefile, uels/_uels.c, uels/uels.c, ulaw/ulaw.c, us/us.c, vopr/vopr.c, vq/vq.c, vstat/vstat.c, vsum/vsum.c, window/window.c, x2x/x2x.c, xgr/xgr.c, zcross/zcross.c, zerodf/zerodf.c: $B%X%k%W%a%C%;!<%8$K%P!<%8%g%sHV9f$r$$$l$^$7$?(B 2006-12-15 20:06 mr_alex * bin/: Makefile, acep/Makefile, acep/_acep.c, agcep/_agcep.c, agcep/agcep.c, amcep/_amcep.c, amcep/amcep.c, average/_average.c, average/average.c, b2mc/b2mc.c, bcp/bcp.c, bcut/bcut.c, c2acr/_c2acr.c, c2acr/c2acr.c, c2ir/_c2ir.c, c2ir/c2ir.c, c2sp/c2sp.c, cat2/cat2.c, ccp/ccp.c, cdist/cdist.c, clip/clip.c, decimate/decimate.c, delay/delay.c, df2/df2.c, dfs/dfs.c, dmp/dmp.c, echo2/echo2.c, excite/excite.c, extract/extract.c, fd/Makefile, fd/fd.c, fft/_fft.c, fft/fft.c, fft2/_fft2.c, fft2/fft2.c, fftcep/_fftcep.c, fftcep/fftcep.c, fftr/_fftr.c, fftr/fftr.c, fftr2/fftr2.c, fig+fdrw/Makefile, fig+fdrw/fdrw.c, fig+fdrw/fig.c, fig+fdrw/fig0.c, fig+fdrw/fig1.c, fig+fdrw/plot.c, fig+fdrw/plot.h, fig+fdrw/plsub.c, frame/frame.c, freqt/_freqt.c, freqt/freqt.c, gc2gc/_gc2gc.c, gc2gc/gc2gc.c, gcep/gcep.c, glsadf/glsadf.c, gnorm/_gnorm.c, gnorm/gnorm.c, grpdelay/_grpdelay.c, grpdelay/grpdelay.c, histogram/_histogram.c, ifft/Makefile, ifft/_ifft.c, ifft/ifft.c, iglsadf/iglsadf.c, ignorm/_ignorm.c, ignorm/ignorm.c, imglsadf/imglsadf.c, impulse/impulse.c, imsvq/_imsvq.c, imsvq/imsvq.c, interpolate/interpolate.c, ivq/_ivq.c, lbg/_lbg.c, lbg/lbg.c, levdur/_levdur.c, levdur/levdur.c, linear_intpl/linear_intpl.c, lmadf/lmadf.c, lpc/_lpc.c, lpc/lpc.c, lpc2c/lpc2c.c, lpc2lsp/_lpc2lsp.c, lpc2lsp/lpc2lsp.c, lpc2par/_lpc2par.c, lpc2par/lpc2par.c, lsp2lpc/_lsp2lpc.c, lsp2lpc/lsp2lpc.c, lspcheck/lspcheck.c, lspdf/lspdf.c, ltcdf/ltcdf.c, mc2b/mc2b.c, mcep/mcep.c, merge/merge.c, mgc2mgc/_mgc2mgc.c, mgc2mgc/mgc2mgc.c, mgc2sp/_mgc2sp.c, mgc2sp/mgc2sp.c, mgcep/mgcep.c, mgcep2/mgcep2.c, mglsadf/_mglsadf.c, mglsadf/mglsadf.c, minmax/minmax.c, mlpg/mlpg.c, mlsadf/mlsadf.c, msvq/_msvq.c, msvq/msvq.c, nan/nan.c, norm0/norm0.c, nrand/nrand.c, par2lpc/_par2lpc.c, par2lpc/par2lpc.c, phase/_phase.c, phase/phase.c, pitch/pitch.c, poledf/poledf.c, psgr/Makefile, psgr/dict.c, psgr/eps.c, psgr/plot.c, psgr/psgr.c, psgr/psgr.h, ramp/ramp.c, reverse/reverse.c, rmse/rmse.c, sin/sin.c, smcep/smcep.c, snr/snr.c, sopr/sopr.c, spec/spec.c, srcnv/srcnv.c, step/step.c, swab/swab.c, train/train.c, uels/_uels.c, uels/uels.c, ulaw/ulaw.c, us/us.c, vopr/vopr.c, vstat/vstat.c, vsum/vsum.c, window/window.c, x2x/x2x.c, xgr/Makefile, xgr/plot.c, xgr/window.c, xgr/xgr.c, xgr/xgr.h, zcross/_zcross.c, zcross/zcross.c, zerodf/_zerodf.c, zerodf/zerodf.c: ANSI$B2=$r:FEY$d$jD>$7$^$7$?(B 2006-12-13 21:36 mr_alex * bin/uels/_uels.c: for (i=0; il9gJ,$1$r$7$^$7$?(B 2006-12-11 16:16 mr_alex * bin/: Makefile, agcep/_agcep.c, agcep/agcep.c, amcep/_amcep.c, amcep/amcep.c, average/_average.c, average/average.c, b2mc/_b2mc.c, b2mc/b2mc.c, bcp/bcp.c, bcut/bcut.c, c2acr/_c2acr.c, c2acr/c2acr.c, c2ir/_c2ir.c, c2ir/c2ir.c, c2sp/_c2sp.c, c2sp/c2sp.c, ccp/ccp.c, cdist/cdist.c, clip/_clip.c, clip/clip.c, da/dawrite.c, decimate/decimate.c, delay/Makefile, df2/_df2.c, df2/df2.c, dfs/_dfs.c, dfs/dfs.c, dmp/dmp.c, ds/ds.c, echo2/echo2.c, excite/excite.c, extract/extract.c, fd/fd.c, fft/_fft.c, fft/fft.c, fft2/_fft2.c, fft2/fft2.c, fftcep/_fftcep.c, fftcep/fftcep.c, fftr/_fftr.c, fftr/fftr.c, fftr2/_fftr2.c, fftr2/fftr2.c, fig+fdrw/fdrw.c, fig+fdrw/fig.c, fig+fdrw/fig1.c, fig+fdrw/plot.c, fig+fdrw/plsub.c, frame/frame.c, freqt/_freqt.c, freqt/freqt.c, gc2gc/_gc2gc.c, gc2gc/gc2gc.c, gcep/_gcep.c, gcep/gcep.c, glsadf/_glsadf.c, glsadf/glsadf.c, gnorm/_gnorm.c, gnorm/gnorm.c, grpdelay/_grpdelay.c, grpdelay/grpdelay.c, histogram/_histogram.c, histogram/histogram.c, ifft/_ifft.c, ifft/ifft.c, ifft2/_ifft2.c, ifft2/ifft2.c, iglsadf/_iglsadf.c, iglsadf/iglsadf.c, ignorm/_ignorm.c, ignorm/ignorm.c, imglsadf/_imglsadf.c, imglsadf/imglsadf.c, impulse/impulse.c, imsvq/_imsvq.c, imsvq/imsvq.c, interpolate/interpolate.c, ivq/_ivq.c, ivq/ivq.c, lbg/_lbg.c, lbg/lbg.c, levdur/_levdur.c, levdur/levdur.c, linear_intpl/linear_intpl.c, lmadf/_lmadf.c, lmadf/lmadf.c, lpc/_lpc.c, lpc/lpc.c, lpc2c/_lpc2c.c, lpc2c/lpc2c.c, lpc2lsp/lpc2lsp.c, lpc2par/_lpc2par.c, lpc2par/lpc2par.c, lsp2lpc/_lsp2lpc.c, lsp2lpc/lsp2lpc.c, lspcheck/_lspcheck.c, lspcheck/lspcheck.c, lspdf/_lspdf.c, lspdf/lspdf.c, ltcdf/_ltcdf.c, ltcdf/ltcdf.c, mc2b/_mc2b.c, mc2b/mc2b.c, mcep/_mcep.c, mcep/mcep.c, merge/merge.c, mgc2mgc/_mgc2mgc.c, mgc2mgc/mgc2mgc.c, mgc2sp/_mgc2sp.c, mgc2sp/mgc2sp.c, mgcep/_mgcep.c, mgcep/mgcep.c, mgcep2/_mgcep2.c, mgcep2/mgcep2.c, mglsadf/_mglsadf.c, mglsadf/mglsadf.c, minmax/minmax.c, mlpg/mlpg.c, mlsadf/_mlsadf.c, mlsadf/mlsadf.c, msvq/_msvq.c, msvq/msvq.c, nan/Makefile, norm0/_norm0.c, norm0/norm0.c, nrand/_nrand.c, nrand/nrand.c, par2lpc/_par2lpc.c, par2lpc/par2lpc.c, phase/_phase.c, phase/phase.c, pitch/_pitch.c, pitch/pitch.c, poledf/_poledf.c, poledf/poledf.c, psgr/eps.c, psgr/plot.c, psgr/psgr.c, ramp/ramp.c, reverse/_reverse.c, reverse/reverse.c, rmse/_rmse.c, rmse/rmse.c, rndpg/rndpg.c, root_pol/_root_pol.c, root_pol/root_pol.c, sin/sin.c, smcep/_smcep.c, smcep/smcep.c, snr/snr.c, sopr/sopr.c, spec/spec.c, srcnv/srcnv.c, step/step.c, swab/swab.c, train/train.c, uels/_uels.c, uels/uels.c, ulaw/_ulaw.c, ulaw/ulaw.c, us/us.c, vopr/vopr.c, vq/_vq.c, vq/vq.c, vstat/vstat.c, vsum/vsum.c, window/_window.c, window/window.c, x2x/x2x.c, xgr/plot.c, xgr/window.c, xgr/xgr.c, zcross/_zcross.c, zcross/zcross.c, zerodf/_zerodf.c, zerodf/zerodf.c: Chenged KR to ANSI 2006-12-11 16:05 mr_alex * bin/acorr/: _acorr.c, acorr.c: KR to ANSI 2006-12-11 15:59 mr_alex * lib/: Makefile, Makefile.lib, agexp.c, cholesky.c, fileio.c, fillz.c, getfp.c, getmem.c, gexp.c, glog.c, ifftr.c, matrix.c, movem.c, mseq.c, theq.c, toeplitz.c: $B%i%$%V%i%j$N(BANSI$B2=$r9T$$$^$7$?(B 2006-12-11 15:50 mr_alex * bin/acep/acep.c: $B%F%9%H$G$9(B- 2006-12-07 17:29 mr_alex * bin/nan/nan.c: $B%X%k%W%a%C%;!<%8$r=$@5$7$^$7$?!#(B 2006-12-07 13:01 mr_alex * bin/nan/nan.c: nan()$B$r(Bnan_tmp()$B$HJQ99$7$^$7$?(B - 2006-12-06 17:42 mr_alex * bin/mgcep/mgcep.c: if (g >1) $B$r(B if(g>=1)$B$H$7$^$7$?(B 2006-12-06 17:37 mr_alex * bin/nan/Makefile: nan$B4X?t$rE,Ev$K(Bnan2$B$HJQ99$7$^$7$?!#(B $B$3$N$h$&$JBP1~$G$h$m$7$$$G$7$g$&$+(B? 2006-11-04 14:34 mr_alex * bin/fftcep/fftcep.c: case 'e': eps = atof(*++argv); --argc; break; $B$N%Q%C%A$rEv$F$^$7$?(B 2006-11-04 14:27 mr_alex * bin/pitch/pitch.c: < m = freq / 10 * 25; --- > m = (freq * 25) / 10; $B$H$7$^$7$?!#(B 2006-11-04 14:27 mr_alex * bin/pitch/_pitch.c: < x[i] /= l * i; --- > x[i] /= l; x[i] *= i; $B$H$7$^$7$?!#(B 2006-11-04 14:15 mr_alex * bin/mgcep/mgcep.c: if( g >1 ) $B$r(B if( g>=1)$B$H$7$^$7$?(B 2006-10-23 09:30 s_sako * bin/dmp/dmp.c: fix: +l option does not work 2006-10-14 15:50 mr_alex * bin/delay/delay.c: $B:G=i$N(BSPTK$B$N%3%a%s%HItJ,$rDI2C(B 2006-10-14 15:39 mr_alex * bin/delay/delay.c: $B%(%i!<%a%C%;!<%8$K%3%^%s%IL>$r=PNO$9$k$h$&$KJQ99(B 2006-10-14 15:07 mr_alex * bin/delay/delay.c: start$B$,(Bleng$B0J2<$G$J$$>l9g!"%(%i!<$r$O$$$F=*N;$9$k$h$&$KJQ99$7$^$7$?(B 2006-10-14 14:09 mr_alex * bin/acep/_acep.c: tau $B$r(Bdouble$B7?$G@k8@$7$^$7$?(B 2006-10-06 21:16 mr_alex * bin/mcep/_mcep.c: [no log message] 2006-10-06 13:47 mr_alex * bin/cat2/cat2.c: [no log message] 2006-06-22 11:02 sako * bin/da/Makefile, bin/us/Makefile, script/Makefile: sako : makefile 2003-03-28 22:24 masuko * bin/da/Makefile, bin/us/Makefile, script/Makefile: Modify symbolic links. 2002-12-25 19:06 sako * script/Makefile: fix 2.0->3.0 ./src/script/Makefile 2002-12-25 19:06 sako * include/Makefile: fix 2.0->3.0 ./src/include/Makefile 2002-12-25 19:06 sako * Makefile: fix 2.0->3.0 ./src/Makefile 2002-12-25 19:06 sako * lib/Makefile: fix 2.0->3.0 ./src/lib/Makefile 2002-12-25 19:06 sako * bin/zerodf/Makefile: fix 2.0->3.0 ./src/bin/zerodf/Makefile 2002-12-25 19:06 sako * bin/zcross/Makefile: fix 2.0->3.0 ./src/bin/zcross/Makefile 2002-12-25 19:06 sako * bin/xgr/Makefile: fix 2.0->3.0 ./src/bin/xgr/Makefile 2002-12-25 19:06 sako * bin/x2x/Makefile: fix 2.0->3.0 ./src/bin/x2x/Makefile 2002-12-25 19:06 sako * bin/window/Makefile: fix 2.0->3.0 ./src/bin/window/Makefile 2002-12-25 19:06 sako * bin/vsum/Makefile: fix 2.0->3.0 ./src/bin/vsum/Makefile 2002-12-25 19:06 sako * bin/vstat/Makefile: fix 2.0->3.0 ./src/bin/vstat/Makefile 2002-12-25 19:06 sako * bin/vq/Makefile: fix 2.0->3.0 ./src/bin/vq/Makefile 2002-12-25 19:06 sako * bin/vopr/Makefile: fix 2.0->3.0 ./src/bin/vopr/Makefile 2002-12-25 19:06 sako * bin/us/Makefile: fix 2.0->3.0 ./src/bin/us/Makefile 2002-12-25 19:06 sako * bin/ulaw/Makefile: fix 2.0->3.0 ./src/bin/ulaw/Makefile 2002-12-25 19:06 sako * bin/uels/Makefile: fix 2.0->3.0 ./src/bin/uels/Makefile 2002-12-25 19:06 sako * bin/train/Makefile: fix 2.0->3.0 ./src/bin/train/Makefile 2002-12-25 19:06 sako * bin/swab/Makefile: fix 2.0->3.0 ./src/bin/swab/Makefile 2002-12-25 19:06 sako * bin/step/Makefile: fix 2.0->3.0 ./src/bin/step/Makefile 2002-12-25 19:06 sako * bin/srcnv/Makefile: fix 2.0->3.0 ./src/bin/srcnv/Makefile 2002-12-25 19:06 sako * bin/spec/Makefile: fix 2.0->3.0 ./src/bin/spec/Makefile 2002-12-25 19:06 sako * bin/sopr/Makefile: fix 2.0->3.0 ./src/bin/sopr/Makefile 2002-12-25 19:06 sako * bin/snr/Makefile: fix 2.0->3.0 ./src/bin/snr/Makefile 2002-12-25 19:06 sako * bin/smcep/Makefile: fix 2.0->3.0 ./src/bin/smcep/Makefile 2002-12-25 19:06 sako * bin/sin/Makefile: fix 2.0->3.0 ./src/bin/sin/Makefile 2002-12-25 19:06 sako * bin/root_pol/Makefile: fix 2.0->3.0 ./src/bin/root_pol/Makefile 2002-12-25 19:06 sako * bin/rndpg/Makefile: fix 2.0->3.0 ./src/bin/rndpg/Makefile 2002-12-25 19:06 sako * bin/rmse/Makefile: fix 2.0->3.0 ./src/bin/rmse/Makefile 2002-12-25 19:06 sako * bin/reverse/Makefile: fix 2.0->3.0 ./src/bin/reverse/Makefile 2002-12-25 19:06 sako * bin/ramp/Makefile: fix 2.0->3.0 ./src/bin/ramp/Makefile 2002-12-25 19:06 sako * bin/psgr/Makefile: fix 2.0->3.0 ./src/bin/psgr/Makefile 2002-12-25 19:06 sako * bin/poledf/Makefile: fix 2.0->3.0 ./src/bin/poledf/Makefile 2002-12-25 19:06 sako * bin/pitch/Makefile: fix 2.0->3.0 ./src/bin/pitch/Makefile 2002-12-25 19:05 sako * bin/phase/Makefile: fix 2.0->3.0 ./src/bin/phase/Makefile 2002-12-25 19:05 sako * bin/par2lpc/Makefile: fix 2.0->3.0 ./src/bin/par2lpc/Makefile 2002-12-25 19:05 sako * bin/nrand/Makefile: fix 2.0->3.0 ./src/bin/nrand/Makefile 2002-12-25 19:05 sako * bin/norm0/Makefile: fix 2.0->3.0 ./src/bin/norm0/Makefile 2002-12-25 19:05 sako * bin/msvq/Makefile: fix 2.0->3.0 ./src/bin/msvq/Makefile 2002-12-25 19:05 sako * bin/mlsadf/Makefile: fix 2.0->3.0 ./src/bin/mlsadf/Makefile 2002-12-25 19:05 sako * bin/mlpg/Makefile: fix 2.0->3.0 ./src/bin/mlpg/Makefile 2002-12-25 19:05 sako * bin/minmax/Makefile: fix 2.0->3.0 ./src/bin/minmax/Makefile 2002-12-25 19:05 sako * bin/mglsadf/Makefile: fix 2.0->3.0 ./src/bin/mglsadf/Makefile 2002-12-25 19:05 sako * bin/mgcep2/Makefile: fix 2.0->3.0 ./src/bin/mgcep2/Makefile 2002-12-25 19:05 sako * bin/mgcep/Makefile: fix 2.0->3.0 ./src/bin/mgcep/Makefile 2002-12-25 19:05 sako * bin/mgc2sp/Makefile: fix 2.0->3.0 ./src/bin/mgc2sp/Makefile 2002-12-25 19:05 sako * bin/mgc2mgc/Makefile: fix 2.0->3.0 ./src/bin/mgc2mgc/Makefile 2002-12-25 19:05 sako * bin/merge/Makefile: fix 2.0->3.0 ./src/bin/merge/Makefile 2002-12-25 19:05 sako * bin/mcep/Makefile: fix 2.0->3.0 ./src/bin/mcep/Makefile 2002-12-25 19:05 sako * bin/mc2b/Makefile: fix 2.0->3.0 ./src/bin/mc2b/Makefile 2002-12-25 19:05 sako * bin/ltcdf/Makefile: fix 2.0->3.0 ./src/bin/ltcdf/Makefile 2002-12-25 19:05 sako * bin/lspdf/Makefile: fix 2.0->3.0 ./src/bin/lspdf/Makefile 2002-12-25 19:05 sako * bin/nan/Makefile: fix 2.0->3.0 ./src/bin/nan/Makefile 2002-12-25 19:05 sako * bin/lspcheck/Makefile: fix 2.0->3.0 ./src/bin/lspcheck/Makefile 2002-12-25 19:05 sako * bin/lsp2lpc/Makefile: fix 2.0->3.0 ./src/bin/lsp2lpc/Makefile 2002-12-25 19:05 sako * bin/lpc2par/Makefile: fix 2.0->3.0 ./src/bin/lpc2par/Makefile 2002-12-25 19:05 sako * bin/lpc2lsp/Makefile: fix 2.0->3.0 ./src/bin/lpc2lsp/Makefile 2002-12-25 19:05 sako * bin/lpc2c/Makefile: fix 2.0->3.0 ./src/bin/lpc2c/Makefile 2002-12-25 19:05 sako * bin/lpc/Makefile: fix 2.0->3.0 ./src/bin/lpc/Makefile 2002-12-25 19:05 sako * bin/lmadf/Makefile: fix 2.0->3.0 ./src/bin/lmadf/Makefile 2002-12-25 19:05 sako * bin/linear_intpl/Makefile: fix 2.0->3.0 ./src/bin/linear_intpl/Makefile 2002-12-25 19:05 sako * bin/levdur/Makefile: fix 2.0->3.0 ./src/bin/levdur/Makefile 2002-12-25 19:05 sako * bin/lbg/Makefile: fix 2.0->3.0 ./src/bin/lbg/Makefile 2002-12-25 19:05 sako * bin/ivq/Makefile: fix 2.0->3.0 ./src/bin/ivq/Makefile 2002-12-25 19:05 sako * bin/interpolate/Makefile: fix 2.0->3.0 ./src/bin/interpolate/Makefile 2002-12-25 19:05 sako * bin/imsvq/Makefile: fix 2.0->3.0 ./src/bin/imsvq/Makefile 2002-12-25 19:05 sako * bin/impulse/Makefile: fix 2.0->3.0 ./src/bin/impulse/Makefile 2002-12-25 19:04 sako * bin/imglsadf/Makefile: fix 2.0->3.0 ./src/bin/imglsadf/Makefile 2002-12-25 19:04 sako * bin/ignorm/Makefile: fix 2.0->3.0 ./src/bin/ignorm/Makefile 2002-12-25 19:04 sako * bin/iglsadf/Makefile: fix 2.0->3.0 ./src/bin/iglsadf/Makefile 2002-12-25 19:04 sako * bin/ifft2/Makefile: fix 2.0->3.0 ./src/bin/ifft2/Makefile 2002-12-25 19:04 sako * bin/ifft/Makefile: fix 2.0->3.0 ./src/bin/ifft/Makefile 2002-12-25 19:04 sako * bin/histogram/Makefile: fix 2.0->3.0 ./src/bin/histogram/Makefile 2002-12-25 19:04 sako * bin/grpdelay/Makefile: fix 2.0->3.0 ./src/bin/grpdelay/Makefile 2002-12-25 19:04 sako * bin/gnorm/Makefile: fix 2.0->3.0 ./src/bin/gnorm/Makefile 2002-12-25 19:04 sako * bin/glsadf/Makefile: fix 2.0->3.0 ./src/bin/glsadf/Makefile 2002-12-25 19:04 sako * bin/gcep/Makefile: fix 2.0->3.0 ./src/bin/gcep/Makefile 2002-12-25 19:04 sako * bin/gc2gc/Makefile: fix 2.0->3.0 ./src/bin/gc2gc/Makefile 2002-12-25 19:04 sako * bin/freqt/Makefile: fix 2.0->3.0 ./src/bin/freqt/Makefile 2002-12-25 19:04 sako * bin/frame/Makefile: fix 2.0->3.0 ./src/bin/frame/Makefile 2002-12-25 19:04 sako * bin/fig+fdrw/Makefile: fix 2.0->3.0 ./src/bin/fig+fdrw/Makefile 2002-12-25 19:04 sako * bin/fftr2/Makefile: fix 2.0->3.0 ./src/bin/fftr2/Makefile 2002-12-25 19:04 sako * bin/fftr/Makefile: fix 2.0->3.0 ./src/bin/fftr/Makefile 2002-12-25 19:04 sako * bin/fftcep/Makefile: fix 2.0->3.0 ./src/bin/fftcep/Makefile 2002-12-25 19:04 sako * bin/fft2/Makefile: fix 2.0->3.0 ./src/bin/fft2/Makefile 2002-12-25 19:04 sako * bin/fft/Makefile: fix 2.0->3.0 ./src/bin/fft/Makefile 2002-12-25 19:04 sako * bin/fd/Makefile: fix 2.0->3.0 ./src/bin/fd/Makefile 2002-12-25 19:04 sako * bin/extract/Makefile: fix 2.0->3.0 ./src/bin/extract/Makefile 2002-12-25 19:04 sako * bin/excite/Makefile: fix 2.0->3.0 ./src/bin/excite/Makefile 2002-12-25 19:04 sako * bin/echo2/Makefile: fix 2.0->3.0 ./src/bin/echo2/Makefile 2002-12-25 19:04 sako * bin/ds/Makefile: fix 2.0->3.0 ./src/bin/ds/Makefile 2002-12-25 19:04 sako * bin/dmp/Makefile: fix 2.0->3.0 ./src/bin/dmp/Makefile 2002-12-25 19:04 sako * bin/dfs/Makefile: fix 2.0->3.0 ./src/bin/dfs/Makefile 2002-12-25 19:04 sako * bin/df2/Makefile: fix 2.0->3.0 ./src/bin/df2/Makefile 2002-12-25 19:04 sako * bin/delay/Makefile: fix 2.0->3.0 ./src/bin/delay/Makefile 2002-12-25 19:04 sako * bin/decimate/Makefile: fix 2.0->3.0 ./src/bin/decimate/Makefile 2002-12-25 19:04 sako * bin/da/Makefile: fix 2.0->3.0 ./src/bin/da/Makefile 2002-12-25 19:04 sako * bin/clip/Makefile: fix 2.0->3.0 ./src/bin/clip/Makefile 2002-12-25 19:04 sako * bin/cdist/Makefile: fix 2.0->3.0 ./src/bin/cdist/Makefile 2002-12-25 19:04 sako * bin/ccp/Makefile: fix 2.0->3.0 ./src/bin/ccp/Makefile 2002-12-25 19:03 sako * bin/cat2/Makefile: fix 2.0->3.0 ./src/bin/cat2/Makefile 2002-12-25 19:03 sako * bin/c2sp/Makefile: fix 2.0->3.0 ./src/bin/c2sp/Makefile 2002-12-25 19:03 sako * bin/c2ir/Makefile: fix 2.0->3.0 ./src/bin/c2ir/Makefile 2002-12-25 19:03 sako * bin/c2acr/Makefile: fix 2.0->3.0 ./src/bin/c2acr/Makefile 2002-12-25 19:03 sako * bin/bcut/Makefile: fix 2.0->3.0 ./src/bin/bcut/Makefile 2002-12-25 19:03 sako * bin/bcp/Makefile: fix 2.0->3.0 ./src/bin/bcp/Makefile 2002-12-25 19:03 sako * bin/b2mc/Makefile: fix 2.0->3.0 ./src/bin/b2mc/Makefile 2002-12-25 19:03 sako * bin/average/Makefile: fix 2.0->3.0 ./src/bin/average/Makefile 2002-12-25 19:03 sako * bin/amcep/Makefile: fix 2.0->3.0 ./src/bin/amcep/Makefile 2002-12-25 19:03 sako * bin/agcep/Makefile: fix 2.0->3.0 ./src/bin/agcep/Makefile 2002-12-25 19:03 sako * bin/acorr/Makefile: fix 2.0->3.0 ./src/bin/acorr/Makefile 2002-12-25 19:03 sako * bin/Makefile: fix 2.0->3.0 ./src/bin/Makefile 2002-12-25 19:03 sako * bin/acep/Makefile: fix 2.0->3.0 ./src/bin/acep/Makefile 2002-12-25 14:35 sako * script/gwave.sh: src/script/gwave.sh 2002-12-25 14:35 sako * script/grlogsp.sh: src/script/grlogsp.sh 2002-12-25 14:34 sako * script/glogsp.sh: src/script/glogsp.sh 2002-12-25 14:34 sako * script/bell.sh: src/script/bell.sh 2002-12-25 14:34 sako * include/SPTK.h: src/include/SPTK.h 2002-12-25 14:34 sako * lib/toeplitz.c: src/lib/toeplitz.c 2002-12-25 14:34 sako * lib/theq.c: src/lib/theq.c 2002-12-25 14:34 sako * lib/mseq.c: src/lib/mseq.c 2002-12-25 14:34 sako * lib/movem.c: src/lib/movem.c 2002-12-25 14:34 sako * lib/matrix.c: src/lib/matrix.c 2002-12-25 14:34 sako * lib/ifftr.c: src/lib/ifftr.c 2002-12-25 14:34 sako * lib/glog.c: src/lib/glog.c 2002-12-25 14:34 sako * lib/gexp.c: src/lib/gexp.c 2002-12-25 14:34 sako * lib/getmem.c: src/lib/getmem.c 2002-12-25 14:34 sako * lib/getfp.c: src/lib/getfp.c 2002-12-25 14:34 sako * lib/fillz.c: src/lib/fillz.c 2002-12-25 14:34 sako * lib/fileio.c: src/lib/fileio.c 2002-12-25 14:34 sako * lib/cholesky.c: src/lib/cholesky.c 2002-12-25 14:34 sako * lib/agexp.c: src/lib/agexp.c 2002-12-25 14:34 sako * bin/zerodf/zerodf.c: src/bin/zerodf/zerodf.c 2002-12-25 14:34 sako * bin/zerodf/_zerodf.c: src/bin/zerodf/_zerodf.c 2002-12-25 14:34 sako * bin/zcross/zcross.c: src/bin/zcross/zcross.c 2002-12-25 14:34 sako * bin/zcross/_zcross.c: src/bin/zcross/_zcross.c 2002-12-25 14:34 sako * bin/xgr/tills/till9.dat: src/bin/xgr/tills/till9.dat 2002-12-25 14:34 sako * bin/xgr/tills/till8.dat: src/bin/xgr/tills/till8.dat 2002-12-25 14:34 sako * bin/xgr/tills/till7.dat: src/bin/xgr/tills/till7.dat 2002-12-25 14:34 sako * bin/xgr/tills/till6.dat: src/bin/xgr/tills/till6.dat 2002-12-25 14:34 sako * bin/xgr/tills/till5.dat: src/bin/xgr/tills/till5.dat 2002-12-25 14:34 sako * bin/xgr/tills/till4.dat: src/bin/xgr/tills/till4.dat 2002-12-25 14:34 sako * bin/xgr/tills/till3.dat: src/bin/xgr/tills/till3.dat 2002-12-25 14:34 sako * bin/xgr/tills/till2.dat: src/bin/xgr/tills/till2.dat 2002-12-25 14:34 sako * bin/xgr/tills/till16.dat: src/bin/xgr/tills/till16.dat 2002-12-25 14:34 sako * bin/xgr/tills/till15.dat: src/bin/xgr/tills/till15.dat 2002-12-25 14:34 sako * bin/xgr/tills/till14.dat: src/bin/xgr/tills/till14.dat 2002-12-25 14:34 sako * bin/xgr/tills/till13.dat: src/bin/xgr/tills/till13.dat 2002-12-25 14:34 sako * bin/xgr/tills/till12.dat: src/bin/xgr/tills/till12.dat 2002-12-25 14:34 sako * bin/xgr/tills/till11.dat: src/bin/xgr/tills/till11.dat 2002-12-25 14:34 sako * bin/xgr/tills/till10.dat: src/bin/xgr/tills/till10.dat 2002-12-25 14:34 sako * bin/xgr/tills/till1.dat: src/bin/xgr/tills/till1.dat 2002-12-25 14:33 sako * bin/xgr/tills/till0.dat: src/bin/xgr/tills/till0.dat 2002-12-25 14:33 sako * bin/xgr/xgr.h: src/bin/xgr/xgr.h 2002-12-25 14:33 sako * bin/xgr/xgr.c: src/bin/xgr/xgr.c 2002-12-25 14:33 sako * bin/xgr/window.c: src/bin/xgr/window.c 2002-12-25 14:33 sako * bin/xgr/plot.c: src/bin/xgr/plot.c 2002-12-25 14:33 sako * bin/xgr/gcdata.h: src/bin/xgr/gcdata.h 2002-12-25 14:33 sako * bin/xgr/config.h: src/bin/xgr/config.h 2002-12-25 14:33 sako * bin/xgr/marks/mark9.dat: src/bin/xgr/marks/mark9.dat 2002-12-25 14:33 sako * bin/xgr/marks/mark8.dat: src/bin/xgr/marks/mark8.dat 2002-12-25 14:33 sako * bin/xgr/marks/mark7.dat: src/bin/xgr/marks/mark7.dat 2002-12-25 14:33 sako * bin/xgr/marks/mark6.dat: src/bin/xgr/marks/mark6.dat 2002-12-25 14:33 sako * bin/xgr/marks/mark5.dat: src/bin/xgr/marks/mark5.dat 2002-12-25 14:33 sako * bin/xgr/marks/mark4.dat: src/bin/xgr/marks/mark4.dat 2002-12-25 14:33 sako * bin/xgr/marks/mark3.dat: src/bin/xgr/marks/mark3.dat 2002-12-25 14:33 sako * bin/xgr/marks/mark2.dat: src/bin/xgr/marks/mark2.dat 2002-12-25 14:33 sako * bin/xgr/marks/mark15.dat: src/bin/xgr/marks/mark15.dat 2002-12-25 14:33 sako * bin/xgr/marks/mark14.dat: src/bin/xgr/marks/mark14.dat 2002-12-25 14:33 sako * bin/xgr/marks/mark13.dat: src/bin/xgr/marks/mark13.dat 2002-12-25 14:33 sako * bin/xgr/marks/mark12.dat: src/bin/xgr/marks/mark12.dat 2002-12-25 14:33 sako * bin/xgr/marks/mark11.dat: src/bin/xgr/marks/mark11.dat 2002-12-25 14:33 sako * bin/xgr/marks/mark10.dat: src/bin/xgr/marks/mark10.dat 2002-12-25 14:33 sako * bin/xgr/marks/mark1.dat: src/bin/xgr/marks/mark1.dat 2002-12-25 14:33 sako * bin/xgr/marks/mark0.dat: src/bin/xgr/marks/mark0.dat 2002-12-25 14:33 sako * bin/x2x/x2x.c: src/bin/x2x/x2x.c 2002-12-25 14:33 sako * bin/window/window.c: src/bin/window/window.c 2002-12-25 14:33 sako * bin/window/_window.c: src/bin/window/_window.c 2002-12-25 14:33 sako * bin/vsum/vsum.c: src/bin/vsum/vsum.c 2002-12-25 14:33 sako * bin/vstat/vstat.c: src/bin/vstat/vstat.c 2002-12-25 14:33 sako * bin/vq/vq.c: src/bin/vq/vq.c 2002-12-25 14:33 sako * bin/vq/_vq.c: src/bin/vq/_vq.c 2002-12-25 14:33 sako * bin/vopr/vopr.c: src/bin/vopr/vopr.c 2002-12-25 14:33 sako * bin/us/uscd.sh: src/bin/us/uscd.sh 2002-12-25 14:33 sako * bin/us/us16.sh: src/bin/us/us16.sh 2002-12-25 14:33 sako * bin/us/us.c: src/bin/us/us.c 2002-12-25 14:33 sako * bin/ulaw/ulaw.c: src/bin/ulaw/ulaw.c 2002-12-25 14:32 sako * bin/ulaw/_ulaw.c: src/bin/ulaw/_ulaw.c 2002-12-25 14:32 sako * bin/uels/uels.c: src/bin/uels/uels.c 2002-12-25 14:32 sako * bin/uels/_uels.c: src/bin/uels/_uels.c 2002-12-25 14:32 sako * bin/train/train.c: src/bin/train/train.c 2002-12-25 14:32 sako * bin/swab/swab.c: src/bin/swab/swab.c 2002-12-25 14:32 sako * bin/step/step.c: src/bin/step/step.c 2002-12-25 14:32 sako * bin/srcnv/srcnv.c: src/bin/srcnv/srcnv.c 2002-12-25 14:32 sako * bin/spec/spec.c: src/bin/spec/spec.c 2002-12-25 14:32 sako * bin/sopr/sopr.c: src/bin/sopr/sopr.c 2002-12-25 14:32 sako * bin/snr/snr.c: src/bin/snr/snr.c 2002-12-25 14:32 sako * bin/smcep/smcep.c: src/bin/smcep/smcep.c 2002-12-25 14:32 sako * bin/smcep/_smcep.c: src/bin/smcep/_smcep.c 2002-12-25 14:32 sako * bin/sin/sin.c: src/bin/sin/sin.c 2002-12-25 14:32 sako * bin/root_pol/root_pol.c: src/bin/root_pol/root_pol.c 2002-12-25 14:32 sako * bin/root_pol/_root_pol.c: src/bin/root_pol/_root_pol.c 2002-12-25 14:32 sako * bin/rndpg/rndpg.c: src/bin/rndpg/rndpg.c 2002-12-25 14:32 sako * bin/rmse/rmse.c: src/bin/rmse/rmse.c 2002-12-25 14:32 sako * bin/rmse/_rmse.c: src/bin/rmse/_rmse.c 2002-12-25 14:32 sako * bin/reverse/reverse.c: src/bin/reverse/reverse.c 2002-12-25 14:32 sako * bin/reverse/_reverse.c: src/bin/reverse/_reverse.c 2002-12-25 14:32 sako * bin/ramp/ramp.c: src/bin/ramp/ramp.c 2002-12-25 14:32 sako * bin/psgr/psgr.h: src/bin/psgr/psgr.h 2002-12-25 14:32 sako * bin/psgr/psgr.c: src/bin/psgr/psgr.c 2002-12-25 14:32 sako * bin/psgr/plot.c: src/bin/psgr/plot.c 2002-12-25 14:32 sako * bin/psgr/eps.c: src/bin/psgr/eps.c 2002-12-25 14:32 sako * bin/psgr/dict.c: src/bin/psgr/dict.c 2002-12-25 14:32 sako * bin/poledf/poledf.c: src/bin/poledf/poledf.c 2002-12-25 14:32 sako * bin/poledf/_poledf.c: src/bin/poledf/_poledf.c 2002-12-25 14:32 sako * bin/pitch/pitch.c: src/bin/pitch/pitch.c 2002-12-25 14:32 sako * bin/pitch/_pitch.c: src/bin/pitch/_pitch.c 2002-12-25 14:32 sako * bin/phase/phase.c: src/bin/phase/phase.c 2002-12-25 14:32 sako * bin/phase/_phase.c: src/bin/phase/_phase.c 2002-12-25 14:32 sako * bin/par2lpc/par2lpc.c: src/bin/par2lpc/par2lpc.c 2002-12-25 14:32 sako * bin/par2lpc/_par2lpc.c: src/bin/par2lpc/_par2lpc.c 2002-12-25 14:32 sako * bin/nrand/nrand.c: src/bin/nrand/nrand.c 2002-12-25 14:32 sako * bin/nrand/_nrand.c: src/bin/nrand/_nrand.c 2002-12-25 14:32 sako * bin/norm0/norm0.c: src/bin/norm0/norm0.c 2002-12-25 14:31 sako * bin/norm0/_norm0.c: src/bin/norm0/_norm0.c 2002-12-25 14:31 sako * bin/msvq/msvq.c: src/bin/msvq/msvq.c 2002-12-25 14:31 sako * bin/msvq/_msvq.c: src/bin/msvq/_msvq.c 2002-12-25 14:31 sako * bin/mlsadf/mlsadf.c: src/bin/mlsadf/mlsadf.c 2002-12-25 14:31 sako * bin/mlsadf/_mlsadf.c: src/bin/mlsadf/_mlsadf.c 2002-12-25 14:31 sako * bin/mlpg/mlpg.c: src/bin/mlpg/mlpg.c 2002-12-25 14:31 sako * bin/minmax/minmax.c: src/bin/minmax/minmax.c 2002-12-25 14:31 sako * bin/mglsadf/mglsadf.c: src/bin/mglsadf/mglsadf.c 2002-12-25 14:31 sako * bin/mglsadf/_mglsadf.c: src/bin/mglsadf/_mglsadf.c 2002-12-25 14:31 sako * bin/mgcep2/mgcep2.c: src/bin/mgcep2/mgcep2.c 2002-12-25 14:31 sako * bin/mgcep2/_mgcep2.c: src/bin/mgcep2/_mgcep2.c 2002-12-25 14:31 sako * bin/mgcep/mgcep.c: src/bin/mgcep/mgcep.c 2002-12-25 14:31 sako * bin/mgcep/_mgcep.c: src/bin/mgcep/_mgcep.c 2002-12-25 14:31 sako * bin/mgc2sp/mgc2sp.c: src/bin/mgc2sp/mgc2sp.c 2002-12-25 14:31 sako * bin/mgc2sp/_mgc2sp.c: src/bin/mgc2sp/_mgc2sp.c 2002-12-25 14:31 sako * bin/mgc2mgc/mgc2mgc.c: src/bin/mgc2mgc/mgc2mgc.c 2002-12-25 14:31 sako * bin/mgc2mgc/_mgc2mgc.c: src/bin/mgc2mgc/_mgc2mgc.c 2002-12-25 14:31 sako * bin/merge/merge.c: src/bin/merge/merge.c 2002-12-25 14:31 sako * bin/mcep/mcep.c: src/bin/mcep/mcep.c 2002-12-25 14:31 sako * bin/mcep/_mcep.c: src/bin/mcep/_mcep.c 2002-12-25 14:31 sako * bin/mc2b/mc2b.c: src/bin/mc2b/mc2b.c 2002-12-25 14:31 sako * bin/mc2b/_mc2b.c: src/bin/mc2b/_mc2b.c 2002-12-25 14:31 sako * bin/ltcdf/ltcdf.c: src/bin/ltcdf/ltcdf.c 2002-12-25 14:31 sako * bin/ltcdf/_ltcdf.c: src/bin/ltcdf/_ltcdf.c 2002-12-25 14:31 sako * bin/lspdf/lspdf.c: src/bin/lspdf/lspdf.c 2002-12-25 14:31 sako * bin/lspdf/_lspdf.c: src/bin/lspdf/_lspdf.c 2002-12-25 14:31 sako * bin/nan/nan.c: src/bin/nan/nan.c 2002-12-25 14:31 sako * bin/lspcheck/lspcheck.c: src/bin/lspcheck/lspcheck.c 2002-12-25 14:31 sako * bin/lspcheck/_lspcheck.c: src/bin/lspcheck/_lspcheck.c 2002-12-25 14:31 sako * bin/lsp2lpc/lsp2lpc.c: src/bin/lsp2lpc/lsp2lpc.c 2002-12-25 14:31 sako * bin/lsp2lpc/_lsp2lpc.c: src/bin/lsp2lpc/_lsp2lpc.c 2002-12-25 14:31 sako * bin/lpc2par/lpc2par.c: src/bin/lpc2par/lpc2par.c 2002-12-25 14:31 sako * bin/lpc2par/_lpc2par.c: src/bin/lpc2par/_lpc2par.c 2002-12-25 14:31 sako * bin/lpc2lsp/lpc2lsp.c: src/bin/lpc2lsp/lpc2lsp.c 2002-12-25 14:31 sako * bin/lpc2lsp/_lpc2lsp.c: src/bin/lpc2lsp/_lpc2lsp.c 2002-12-25 14:31 sako * bin/lpc2c/lpc2c.c: src/bin/lpc2c/lpc2c.c 2002-12-25 14:30 sako * bin/lpc2c/_lpc2c.c: src/bin/lpc2c/_lpc2c.c 2002-12-25 14:30 sako * bin/lpc/lpc.c: src/bin/lpc/lpc.c 2002-12-25 14:30 sako * bin/lpc/_lpc.c: src/bin/lpc/_lpc.c 2002-12-25 14:30 sako * bin/lmadf/lmadf.c: src/bin/lmadf/lmadf.c 2002-12-25 14:30 sako * bin/lmadf/_lmadf.c: src/bin/lmadf/_lmadf.c 2002-12-25 14:30 sako * bin/linear_intpl/linear_intpl.c: src/bin/linear_intpl/linear_intpl.c 2002-12-25 14:30 sako * bin/levdur/levdur.c: src/bin/levdur/levdur.c 2002-12-25 14:30 sako * bin/levdur/_levdur.c: src/bin/levdur/_levdur.c 2002-12-25 14:30 sako * bin/lbg/lbg.c: src/bin/lbg/lbg.c 2002-12-25 14:30 sako * bin/lbg/_lbg.c: src/bin/lbg/_lbg.c 2002-12-25 14:30 sako * bin/ivq/ivq.c: src/bin/ivq/ivq.c 2002-12-25 14:30 sako * bin/ivq/_ivq.c: src/bin/ivq/_ivq.c 2002-12-25 14:30 sako * bin/interpolate/interpolate.c: src/bin/interpolate/interpolate.c 2002-12-25 14:30 sako * bin/imsvq/imsvq.c: src/bin/imsvq/imsvq.c 2002-12-25 14:30 sako * bin/imsvq/_imsvq.c: src/bin/imsvq/_imsvq.c 2002-12-25 14:30 sako * bin/impulse/impulse.c: src/bin/impulse/impulse.c 2002-12-25 14:30 sako * bin/imglsadf/imglsadf.c: src/bin/imglsadf/imglsadf.c 2002-12-25 14:30 sako * bin/imglsadf/_imglsadf.c: src/bin/imglsadf/_imglsadf.c 2002-12-25 14:30 sako * bin/ignorm/ignorm.c: src/bin/ignorm/ignorm.c 2002-12-25 14:30 sako * bin/ignorm/_ignorm.c: src/bin/ignorm/_ignorm.c 2002-12-25 14:30 sako * bin/iglsadf/iglsadf.c: src/bin/iglsadf/iglsadf.c 2002-12-25 14:30 sako * bin/iglsadf/_iglsadf.c: src/bin/iglsadf/_iglsadf.c 2002-12-25 14:30 sako * bin/ifft2/ifft2.c: src/bin/ifft2/ifft2.c 2002-12-25 14:30 sako * bin/ifft2/_ifft2.c: src/bin/ifft2/_ifft2.c 2002-12-25 14:30 sako * bin/ifft/ifft.c: src/bin/ifft/ifft.c 2002-12-25 14:30 sako * bin/ifft/_ifft.c: src/bin/ifft/_ifft.c 2002-12-25 14:30 sako * bin/histogram/histogram.c: src/bin/histogram/histogram.c 2002-12-25 14:30 sako * bin/histogram/_histogram.c: src/bin/histogram/_histogram.c 2002-12-25 14:30 sako * bin/grpdelay/grpdelay.c: src/bin/grpdelay/grpdelay.c 2002-12-25 14:30 sako * bin/grpdelay/_grpdelay.c: src/bin/grpdelay/_grpdelay.c 2002-12-25 14:30 sako * bin/gnorm/gnorm.c: src/bin/gnorm/gnorm.c 2002-12-25 14:30 sako * bin/gnorm/_gnorm.c: src/bin/gnorm/_gnorm.c 2002-12-25 14:30 sako * bin/glsadf/glsadf.c: src/bin/glsadf/glsadf.c 2002-12-25 14:30 sako * bin/glsadf/_glsadf.c: src/bin/glsadf/_glsadf.c 2002-12-25 14:30 sako * bin/gcep/gcep.c: src/bin/gcep/gcep.c 2002-12-25 14:30 sako * bin/gcep/_gcep.c: src/bin/gcep/_gcep.c 2002-12-25 14:30 sako * bin/gc2gc/gc2gc.c: src/bin/gc2gc/gc2gc.c 2002-12-25 14:29 sako * bin/gc2gc/_gc2gc.c: src/bin/gc2gc/_gc2gc.c 2002-12-25 14:29 sako * bin/freqt/freqt.c: src/bin/freqt/freqt.c 2002-12-25 14:29 sako * bin/freqt/_freqt.c: src/bin/freqt/_freqt.c 2002-12-25 14:29 sako * bin/frame/frame.c: src/bin/frame/frame.c 2002-12-25 14:29 sako * bin/fig+fdrw/plsub.c: src/bin/fig+fdrw/plsub.c 2002-12-25 14:29 sako * bin/fig+fdrw/plot.h: src/bin/fig+fdrw/plot.h 2002-12-25 14:29 sako * bin/fig+fdrw/plot.c: src/bin/fig+fdrw/plot.c 2002-12-25 14:29 sako * bin/fig+fdrw/fig1.c: src/bin/fig+fdrw/fig1.c 2002-12-25 14:29 sako * bin/fig+fdrw/fig0.c: src/bin/fig+fdrw/fig0.c 2002-12-25 14:29 sako * bin/fig+fdrw/fig.h: src/bin/fig+fdrw/fig.h 2002-12-25 14:29 sako * bin/fig+fdrw/fig.c: src/bin/fig+fdrw/fig.c 2002-12-25 14:29 sako * bin/fig+fdrw/fdrw.c: src/bin/fig+fdrw/fdrw.c 2002-12-25 14:29 sako * bin/fftr2/fftr2.c: src/bin/fftr2/fftr2.c 2002-12-25 14:29 sako * bin/fftr2/_fftr2.c: src/bin/fftr2/_fftr2.c 2002-12-25 14:29 sako * bin/fftr/fftr.c: src/bin/fftr/fftr.c 2002-12-25 14:29 sako * bin/fftr/_fftr.c: src/bin/fftr/_fftr.c 2002-12-25 14:29 sako * bin/fftcep/fftcep.c: src/bin/fftcep/fftcep.c 2002-12-25 14:29 sako * bin/fftcep/_fftcep.c: src/bin/fftcep/_fftcep.c 2002-12-25 14:29 sako * bin/fft2/fft2.c: src/bin/fft2/fft2.c 2002-12-25 14:29 sako * bin/fft2/_fft2.c: src/bin/fft2/_fft2.c 2002-12-25 14:29 sako * bin/fft/fft.c: src/bin/fft/fft.c 2002-12-25 14:29 sako * bin/fft/_fft.c: src/bin/fft/_fft.c 2002-12-25 14:29 sako * bin/fd/fd.c: src/bin/fd/fd.c 2002-12-25 14:29 sako * bin/extract/extract.c: src/bin/extract/extract.c 2002-12-25 14:29 sako * bin/excite/excite.c: src/bin/excite/excite.c 2002-12-25 14:29 sako * bin/echo2/echo2.c: src/bin/echo2/echo2.c 2002-12-25 14:29 sako * bin/ds/ds.c: src/bin/ds/ds.c 2002-12-25 14:29 sako * bin/dmp/dmp.c: src/bin/dmp/dmp.c 2002-12-25 14:29 sako * bin/dfs/dfs.c: src/bin/dfs/dfs.c 2002-12-25 14:29 sako * bin/dfs/_dfs.c: src/bin/dfs/_dfs.c 2002-12-25 14:29 sako * bin/df2/df2.c: src/bin/df2/df2.c 2002-12-25 14:29 sako * bin/df2/_df2.c: src/bin/df2/_df2.c 2002-12-25 14:29 sako * bin/delay/delay.c: src/bin/delay/delay.c 2002-12-25 14:29 sako * bin/decimate/decimate.c: src/bin/decimate/decimate.c 2002-12-25 14:29 sako * bin/da/dawrite.c: src/bin/da/dawrite.c 2002-12-25 14:29 sako * bin/da/da.sh: src/bin/da/da.sh 2002-12-25 14:29 sako * bin/da/da.h: src/bin/da/da.h 2002-12-25 14:28 sako * bin/clip/clip.c: src/bin/clip/clip.c 2002-12-25 14:28 sako * bin/clip/_clip.c: src/bin/clip/_clip.c 2002-12-25 14:28 sako * bin/cdist/cdist.c: src/bin/cdist/cdist.c 2002-12-25 14:28 sako * bin/ccp/ccp.c: src/bin/ccp/ccp.c 2002-12-25 14:28 sako * bin/cat2/cat2.c: src/bin/cat2/cat2.c 2002-12-25 14:28 sako * bin/c2sp/c2sp.c: src/bin/c2sp/c2sp.c 2002-12-25 14:28 sako * bin/c2sp/_c2sp.c: src/bin/c2sp/_c2sp.c 2002-12-25 14:28 sako * bin/c2ir/c2ir.c: src/bin/c2ir/c2ir.c 2002-12-25 14:28 sako * bin/c2ir/_c2ir.c: src/bin/c2ir/_c2ir.c 2002-12-25 14:28 sako * bin/c2acr/c2acr.c: src/bin/c2acr/c2acr.c 2002-12-25 14:28 sako * bin/c2acr/_c2acr.c: src/bin/c2acr/_c2acr.c 2002-12-25 14:28 sako * bin/bcut/bcut.c: src/bin/bcut/bcut.c 2002-12-25 14:28 sako * bin/bcp/bcp.c: src/bin/bcp/bcp.c 2002-12-25 14:28 sako * bin/b2mc/b2mc.c: src/bin/b2mc/b2mc.c 2002-12-25 14:28 sako * bin/b2mc/_b2mc.c: src/bin/b2mc/_b2mc.c 2002-12-25 14:28 sako * bin/average/average.c: src/bin/average/average.c 2002-12-25 14:28 sako * bin/average/_average.c: src/bin/average/_average.c 2002-12-25 14:28 sako * bin/amcep/amcep.c: src/bin/amcep/amcep.c 2002-12-25 14:28 sako * bin/amcep/_amcep.c: src/bin/amcep/_amcep.c 2002-12-25 14:28 sako * bin/agcep/agcep.c: src/bin/agcep/agcep.c 2002-12-25 14:28 sako * bin/agcep/_agcep.c: src/bin/agcep/_agcep.c 2002-12-25 14:28 sako * bin/acorr/acorr.c: src/bin/acorr/acorr.c 2002-12-25 14:28 sako * bin/acorr/_acorr.c: src/bin/acorr/_acorr.c 2002-12-25 14:28 sako * bin/acep/acep.c: src/bin/acep/acep.c 2002-12-25 14:28 sako * bin/acep/_acep.c: src/bin/acep/_acep.c 2002-07-10 22:45 masuko * Makefile, bin/da/da.h, bin/da/dawrite.c: FreeBSD is supported by da and dawrite. 2001-11-28 19:09 masuko * bin/poledf/poledf.c: do not call function poledf(t) when the order is equal to zero. 2001-06-18 21:43 yossie * bin/xgr/: plot.c, window.c: name confliction in window.c 2001-01-15 22:27 yossie * bin/mlsadf/mlsadf.c: add option -v for inverse filter 2001-01-15 12:30 yossie * bin/imglsadf/imglsadf.c: no 'break' in case 'k' 2000-12-25 15:09 masuko * bin/us/: lpfcoef.2to3f, lpfcoef.2to3s, lpfcoef.3to4, lpfcoef.4to5, lpfcoef.5to7: The precision of coefficients were improved. 2000-12-25 14:53 masuko * bin/rndpg/: Makefile, rndpg.c: Randomized parameter generation from p.d.f. sequence. 2000-12-25 14:47 masuko * Makefile: Add 'CC' definitions for some OSs. 2000-07-17 22:39 masuko * bin/da/dawrite.c: bug fix. 2000-07-11 18:58 masuko * bin/Makefile: [no log message] 2000-07-11 18:57 masuko * bin/us/Makefile: Ignore symbolic link error. 2000-07-05 23:28 yossie * bin/cat2/cat2.c: cat2: fgets != 0 2000-06-30 17:48 sako * bin/da/da.h: SPTK/src/bin/da/da.h 2000-06-30 17:47 sako * bin/da/dawrite.c: SPTK/src/bin/da/dawrite.c 2000-06-30 14:07 mtamura * bin/da/da.sh: [no log message] 2000-06-29 22:29 sako * bin/us/uscd.sh: commit SPTK/src/bin/us/uscd.sh 2000-06-29 21:35 masuko * bin/us/: us16.sh, uscd.sh: Change ccp to x2x. 2000-06-29 03:39 sako * bin/us/us16.sh: commit SPTK/src/bin/us/us16.sh 2000-06-25 02:54 sako * bin/cat2/cat2.c: add SPTK/src/bin/cat2/cat2.c 2000-06-25 02:54 sako * bin/cat2/Makefile: add SPTK/src/bin/cat2/Makefile 2000-06-25 02:53 sako * bin/us/us.c: commit SPTK/src/bin/us/us.c 2000-06-25 02:53 sako * bin/us/Makefile: commit SPTK/src/bin/us/Makefile 2000-06-25 02:51 sako * bin/us/uscd.sh: add SPTK/src/bin/us/uscd.sh 2000-06-25 02:50 sako * bin/da/da.sh: commit SPTK/src/bin/da/da.sh 2000-06-25 02:49 sako * bin/da/Makefile: commit SPTK/src/bin/da/Makefile 2000-06-23 23:51 yossie * script/grlogsp.sh: spell miss in grlogsp.sh 2000-06-23 13:28 masuko * bin/da/da.sh: Bug fix, etc. 2000-06-22 10:05 sako * bin/da/Makefile: fix SPTK/src/bin/da/Makefile 2000-06-22 10:04 sako * bin/da/: da.sh, dawrite.c: fix SPTK/src/bin/da/{da.sh,dawrite.c} 2000-06-22 10:03 sako * bin/da/da.c: remove da.c 2000-06-22 10:02 sako * bin/da/daplay.sh: remove daplay.sh 2000-06-21 17:18 yossie * bin/sopr/sopr.c: add operation for memory register to sopr 2000-06-17 23:02 yossie * bin/fd/fd.c: modify fd.c 2000-06-15 14:48 sako * bin/da/da.h: commit SPTK/src/bin/da/da.h 2000-06-15 14:48 sako * bin/da/da.c: commit SPTK/src/bin/da/da.c 2000-06-15 14:47 sako * bin/da/daplay.sh: commit SPTK/src/bin/da/daplay.sh 2000-06-14 15:38 sako * bin/da/daplay.sh: commit SPTK/src/bin/da/daplay.sh 2000-06-14 13:44 nankaku * bin/lbg/_lbg.c: [no log message] 2000-06-14 13:29 nankaku * bin/lbg/: _lbg.c, lbg.c: [no log message] 2000-06-08 19:47 masuko * Makefile: Comments for option DA_OSTYPE were modified. 2000-06-02 18:02 sako * bin/da/daplay.sh: commit daplay.sh 2000-06-02 17:03 sako * bin/da/daplay.sh: commit daplay.sh 2000-06-02 16:09 yossie * Makefile: modify Makefile 2000-06-02 16:07 yossie * Makefile: check and modify reference manual 2000-06-02 13:28 sako * bin/da/daplay.sh: commit SPTK/src/bin/da/daplay.sh 2000-05-24 13:56 sako * Makefile, bin/Makefile: commit SPTK/src/Makefile 2000-05-24 11:07 masuko * bin/da/daplay.sh: The command 'us' is used instead of 'srcnv'. 2000-05-24 11:04 masuko * bin/: ds/Makefile, srcnv/Makefile: [no log message] 2000-05-24 11:02 masuko * bin/us/: Makefile, lpfcoef.2to3f, lpfcoef.2to3s, lpfcoef.3to4, lpfcoef.4to5, lpfcoef.5to7, lpfcoef.5to8, us.c: Sampling rate conversion (up sampling). 2000-05-23 16:35 masuko * bin/da/Makefile: Modified OS-dependent rules. 2000-05-23 16:10 sako * bin/da/Makefile: commit work/src/bin/da/Makefile 2000-05-23 15:43 sako * bin/da/daplay.sh: move daplay.sh 2000-05-23 15:42 sako * script/daplay.sh: remove(move) SPTK/src/script/daplay.sh 2000-05-20 15:26 mtamura * bin/pitch/: _pitch.c, pitch.c: [no log message] 2000-05-20 14:51 mtamura * bin/pitch/pitch.c: [no log message] 2000-05-19 17:25 yossie * bin/srcnv/srcnv.c: change buffersize in srcnv.c 2000-05-19 16:45 mtamura * bin/pitch/pitch.c: [no log message] 2000-05-19 16:22 mtamura * bin/pitch/: pitch.c, _pitch.c: [no log message] 2000-05-19 13:40 mtamura * bin/icep/: icep.c, _icep.c, Makefile: [no log message] 2000-05-19 13:15 mtamura * bin/fftcep/fftcep.c: [no log message] 2000-05-19 13:07 mtamura * bin/fftcep/: Makefile, fftcep.c, _fftcep.c: [no log message] 2000-05-19 13:02 mtamura * bin/icep/Makefile: [no log message] 2000-05-19 11:33 yossie * bin/: cdist/cdist.c, df2/df2.c, dfs/dfs.c, fft/fft.c, fftr2/_fftr2.c, fig+fdrw/fdrw.c, ifft2/_ifft2.c, ifft2/ifft2.c, reverse/reverse.c: deleted double *calloc() 2000-05-19 10:58 yossie * bin/echo2/echo2.c: writed original code 2000-05-17 16:30 mtamura * script/daplay.sh: [no log message] 2000-05-15 16:41 sako * bin/: da/da_10.fir, da/da_12.fir, da/ss10snd.h, srcnv/coef.063-222-70, srcnv/coef.125-250-120, srcnv/coef.222-444-60, srcnv/coef.296-333-360: [no log message] 2000-05-15 16:40 sako * bin/da/Makefile: edit SPTK/src/bin/da/Makefile 2000-05-15 11:39 masuko * bin/zerodf/: _zerodf.c.patch, zerodf.c.patch: remove needless patch files for zerodf 2000-05-10 11:22 masuko * bin/mlpg/mlpg.c: An equation for second order regression coefficient are modified. 2000-05-01 19:52 masuko * bin/mlpg/mlpg.c: update mlpg.c 2000-04-29 00:50 sako * bin/srcnv/srcnv.c: edit SPTK/doc/ref/srcnv.tex 2000-04-20 19:55 masuko * bin/mlpg/mlpg.c: edit SPTK/src/bin/mlpg/mlpg.c 2000-04-20 05:13 sako * bin/da/: Makefile: SPTK/src/bin/da/Makefile 2000-04-20 05:11 sako * script/daplay.sh: SPTK/src/script/daplay.sh 2000-04-20 04:31 sako * script/daplay.sh: commit SPTK/src/script/daplay.sh 2000-04-20 04:11 sako * script/daplay.sh: commit SPTK/src/script/daplay.sh 2000-04-20 04:09 sako * bin/srcnv/: lpfcoef.3to4, lpfcoef.4to5, lpfcoef.5to7, lpfcoef.5to8, coef.063-222-70, coef.125-250-120, coef.222-444-60, coef.296-333-360: commit SPTK/src/bin/srcnv 2000-04-20 04:08 sako * bin/srcnv/: Makefile, lpfcoef.2to3f, lpfcoef.2to3s: commit SPTK/src/bin/srcnv/Makefile 2000-04-20 04:05 sako * bin/srcnv/srcnv.c: commit SPTK/src/bin/srcnv/srcnv.c 2000-04-20 03:56 sako * bin/da/da.h: add SPTK/src/bin/da/da.h 2000-04-20 03:56 sako * bin/da/da.c: add SPTK/src/bin/da/da.c 2000-04-19 09:20 sako * bin/da/da.h: add SPTK/src/bin/da/da.h 2000-04-18 22:06 sako * bin/da/: Makefile, da.c, da_10.fir, da_12.fir: edit SPTK/src/bin/da/* 2000-04-10 19:02 sako * bin/da/da.c: edit SPTK/doc/ref/da.tex 2000-04-10 17:59 sako * bin/x2x/x2x.c: edit SPTK/src/bin/x2x/x2x.c 2000-04-06 17:57 mtamura * bin/pitch/: pitch.c, _pitch.c: [no log message] 2000-04-03 16:14 mtamura * bin/pitch/: pitch.c, _pitch.c: [no log message] 2000-03-27 16:25 nankaku * bin/snr/snr.c: edit SPTK/src/bin/snr 2000-03-27 15:47 nankaku * bin/histogram/: _histogram.c, histogram.c: edit SPTK/src/bin/histogram 2000-03-02 14:38 develper * Makefile: edit SPTK/src/Makefile 2000-03-01 22:58 yossie * Makefile, bin/Makefile, bin/acep/Makefile, bin/acep/_acep.c, bin/acep/acep.c, bin/acorr/Makefile, bin/acorr/_acorr.c, bin/acorr/acorr.c, bin/lmadf/Makefile, bin/lmadf/_lmadf.c, bin/lmadf/lmadf.c, bin/gnorm/Makefile, bin/gnorm/_gnorm.c, bin/gnorm/gnorm.c, bin/iglsadf/Makefile, bin/iglsadf/_iglsadf.c, bin/iglsadf/iglsadf.c, bin/ignorm/Makefile, bin/ignorm/_ignorm.c, bin/ignorm/ignorm.c, bin/zerodf/Makefile, bin/zerodf/_zerodf.c, bin/zerodf/_zerodf.c.patch, bin/zerodf/zerodf.c, bin/zerodf/zerodf.c.patch, bin/agcep/Makefile, bin/agcep/_agcep.c, bin/agcep/agcep.c, bin/amcep/Makefile, bin/amcep/_amcep.c, bin/amcep/amcep.c, bin/b2mc/Makefile, bin/b2mc/_b2mc.c, bin/b2mc/b2mc.c, bin/mc2b/Makefile, bin/mc2b/_mc2b.c, bin/mc2b/mc2b.c, bin/mlsadf/Makefile, bin/mlsadf/_mlsadf.c, bin/mlsadf/mlsadf.c, bin/average/Makefile, bin/average/_average.c, bin/average/average.c, bin/bcp/Makefile, bin/bcp/bcp.c, bin/bcut/Makefile, bin/bcut/bcut.c, bin/c2acr/Makefile, bin/c2acr/_c2acr.c, bin/echo2/Makefile, bin/echo2/echo2.c, bin/fft/Makefile, bin/fft/_fft.c, bin/fft/fft.c, bin/fftr/Makefile, bin/fftr/_fftr.c, bin/fftr/fftr.c, bin/c2acr/c2acr.c, bin/c2ir/Makefile, bin/c2ir/_c2ir.c, bin/c2ir/c2ir.c, bin/c2sp/Makefile, bin/c2sp/_c2sp.c, bin/c2sp/c2sp.c, bin/ccp/Makefile, bin/ccp/ccp.c, bin/cdist/Makefile, bin/cdist/cdist.c, bin/clip/Makefile, bin/clip/_clip.c, bin/clip/clip.c, bin/da/Makefile, bin/da/da.c, bin/da/da_10.fir, bin/da/da_12.fir, bin/da/ss10snd.h, bin/decimate/Makefile, bin/decimate/decimate.c, bin/delay/Makefile, bin/delay/delay.c, bin/df2/Makefile, bin/df2/_df2.c, bin/df2/df2.c, bin/dfs/Makefile, bin/dfs/_dfs.c, bin/dfs/dfs.c, bin/dmp/Makefile, bin/dmp/dmp.c, bin/ds/Makefile, bin/ds/ds.c, bin/ds/lpfcoef.2to1, bin/ds/lpfcoef.4to3, bin/ds/lpfcoef.5to2dn, bin/ds/lpfcoef.5to2up, bin/excite/Makefile, bin/excite/excite.c, bin/nrand/Makefile, bin/nrand/_nrand.c, bin/nrand/nrand.c, bin/extract/Makefile, bin/extract/extract.c, bin/fd/Makefile, bin/fd/fd.c, bin/fig+fdrw/Makefile, bin/fig+fdrw/fdrw.c, bin/fig+fdrw/fig.c, bin/fig+fdrw/fig.h, bin/fig+fdrw/fig0.c, bin/fig+fdrw/fig1.c, bin/fig+fdrw/plot.c, bin/fig+fdrw/plot.h, bin/fig+fdrw/plsub.c, bin/fft2/Makefile, bin/fft2/_fft2.c, bin/fft2/fft2.c, bin/fftr2/Makefile, bin/fftr2/_fftr2.c, bin/fftr2/fftr2.c, bin/frame/Makefile, bin/frame/frame.c, bin/freqt/Makefile, bin/freqt/_freqt.c, bin/freqt/freqt.c, bin/gc2gc/Makefile, bin/gc2gc/_gc2gc.c, bin/gc2gc/gc2gc.c, bin/gcep/Makefile, bin/gcep/_gcep.c, bin/gcep/gcep.c, bin/glsadf/Makefile, bin/glsadf/_glsadf.c, bin/glsadf/glsadf.c, bin/grpdelay/Makefile, bin/grpdelay/_grpdelay.c, bin/grpdelay/grpdelay.c, bin/ifft/Makefile, bin/ifft/_ifft.c, bin/ifft/ifft.c, bin/poledf/Makefile, bin/poledf/_poledf.c, bin/poledf/poledf.c, bin/histogram/Makefile, bin/histogram/_histogram.c, bin/histogram/histogram.c, bin/icep/Makefile, bin/icep/_icep.c, bin/icep/icep.c, bin/ifft2/Makefile, bin/ifft2/_ifft2.c, bin/minmax/Makefile, bin/minmax/minmax.c, bin/x2x/Makefile, bin/x2x/x2x.c, bin/ifft2/ifft2.c, bin/imglsadf/Makefile, bin/imglsadf/_imglsadf.c, bin/imglsadf/imglsadf.c, bin/impulse/Makefile, bin/impulse/impulse.c, bin/imsvq/Makefile, bin/imsvq/_imsvq.c, bin/imsvq/imsvq.c, bin/ivq/Makefile, bin/ivq/_ivq.c, bin/ivq/ivq.c, bin/interpolate/Makefile, bin/interpolate/interpolate.c, bin/lbg/Makefile, bin/lbg/_lbg.c, bin/lbg/lbg.c, bin/levdur/Makefile, bin/levdur/_levdur.c, bin/levdur/levdur.c, bin/linear_intpl/Makefile, bin/linear_intpl/linear_intpl.c, bin/vq/Makefile, bin/vq/_vq.c, bin/vq/vq.c, bin/lpc/Makefile, bin/lpc/_lpc.c, bin/lpc/lpc.c, bin/lpc2c/Makefile, bin/lpc2c/_lpc2c.c, bin/lpc2c/lpc2c.c, bin/lpc2lsp/Makefile, bin/lpc2lsp/_lpc2lsp.c, bin/lpc2lsp/lpc2lsp.c, bin/nan/Makefile, bin/nan/nan.c, bin/lpc2par/Makefile, bin/lpc2par/_lpc2par.c, bin/lpc2par/lpc2par.c, bin/lsp2lpc/Makefile, bin/lsp2lpc/_lsp2lpc.c, bin/lsp2lpc/lsp2lpc.c, bin/lspcheck/Makefile, bin/lspcheck/_lspcheck.c, bin/lspcheck/lspcheck.c, bin/lspdf/Makefile, bin/lspdf/_lspdf.c, bin/lspdf/lspdf.c, bin/ltcdf/Makefile, bin/ltcdf/_ltcdf.c, bin/ltcdf/ltcdf.c, bin/mcep/Makefile, bin/mcep/_mcep.c, bin/mcep/mcep.c, bin/merge/Makefile, bin/merge/merge.c, bin/mgc2mgc/Makefile, bin/mgc2mgc/_mgc2mgc.c, bin/mgc2mgc/mgc2mgc.c, bin/mgc2sp/Makefile, bin/mgc2sp/_mgc2sp.c, bin/mgc2sp/mgc2sp.c, bin/mgcep/Makefile, bin/mgcep/_mgcep.c, bin/mgcep/mgcep.c, bin/mgcep2/Makefile, bin/mgcep2/_mgcep2.c, bin/mgcep2/mgcep2.c, bin/mglsadf/Makefile, bin/mglsadf/_mglsadf.c, bin/mglsadf/mglsadf.c, bin/mlpg/Makefile, bin/mlpg/mlpg.c, bin/msvq/Makefile, bin/msvq/_msvq.c, bin/msvq/msvq.c, bin/norm0/Makefile, bin/norm0/_norm0.c, bin/norm0/norm0.c, bin/par2lpc/Makefile, bin/par2lpc/_par2lpc.c, bin/par2lpc/par2lpc.c, bin/phase/Makefile, bin/phase/_phase.c, bin/phase/phase.c, bin/pitch/Makefile, bin/pitch/_pitch.c, bin/pitch/pitch.c, bin/psgr/Makefile, bin/psgr/dict.c, bin/psgr/eps.c, bin/psgr/plot.c, bin/psgr/psgr.c, bin/psgr/psgr.h, bin/ramp/Makefile, bin/ramp/ramp.c, bin/reverse/Makefile, bin/reverse/_reverse.c, bin/reverse/reverse.c, bin/rmse/Makefile, bin/rmse/_rmse.c, bin/rmse/rmse.c, bin/root_pol/Makefile, bin/root_pol/_root_pol.c, bin/root_pol/root_pol.c, bin/sin/Makefile, bin/sin/sin.c, bin/snr/Makefile, bin/snr/snr.c, bin/sopr/Makefile, bin/sopr/sopr.c, bin/spec/Makefile, bin/spec/spec.c, bin/step/Makefile, bin/step/step.c, bin/swab/Makefile, bin/swab/swab.c, bin/train/Makefile, bin/train/train.c, bin/uels/Makefile, bin/uels/_uels.c, bin/uels/uels.c, bin/ulaw/Makefile, bin/ulaw/_ulaw.c, bin/ulaw/ulaw.c, bin/vopr/Makefile, bin/vopr/vopr.c, bin/vstat/Makefile, bin/vstat/vstat.c, bin/vsum/Makefile, bin/vsum/vsum.c, bin/window/Makefile, bin/window/_window.c, bin/window/window.c, bin/xgr/Makefile, bin/xgr/README.jis, bin/xgr/config.h, bin/xgr/gcdata.h, bin/xgr/plot.c, bin/xgr/window.c, bin/xgr/xgr.c, bin/xgr/xgr.h, bin/xgr/marks/mark0.dat, bin/xgr/marks/mark1.dat, bin/xgr/marks/mark10.dat, bin/xgr/marks/mark11.dat, bin/xgr/marks/mark12.dat, bin/xgr/marks/mark13.dat, bin/xgr/marks/mark14.dat, bin/xgr/marks/mark15.dat, bin/xgr/marks/mark2.dat, bin/xgr/marks/mark3.dat, bin/xgr/marks/mark4.dat, bin/xgr/marks/mark5.dat, bin/xgr/marks/mark6.dat, bin/xgr/marks/mark7.dat, bin/xgr/marks/mark8.dat, bin/xgr/marks/mark9.dat, bin/xgr/tills/till0.dat, bin/xgr/tills/till1.dat, bin/xgr/tills/till10.dat, bin/xgr/tills/till11.dat, bin/xgr/tills/till12.dat, bin/xgr/tills/till13.dat, bin/xgr/tills/till14.dat, bin/xgr/tills/till15.dat, bin/xgr/tills/till16.dat, bin/xgr/tills/till2.dat, bin/xgr/tills/till3.dat, bin/xgr/tills/till4.dat, bin/xgr/tills/till5.dat, bin/xgr/tills/till6.dat, bin/xgr/tills/till7.dat, bin/xgr/tills/till8.dat, bin/xgr/tills/till9.dat, bin/zcross/Makefile, bin/smcep/Makefile, bin/smcep/_smcep.c, bin/smcep/smcep.c, bin/zcross/_zcross.c, bin/zcross/zcross.c, include/Makefile, include/SPTK.h, lib/Makefile, lib/Makefile.lib, lib/agexp.c, lib/cholesky.c, lib/fileio.c, lib/fillz.c, lib/getfp.c, lib/getmem.c, lib/gexp.c, lib/glog.c, lib/ifftr.c, lib/matrix.c, lib/movem.c, lib/mseq.c, lib/theq.c, lib/toeplitz.c, script/Makefile, script/bell.sh, script/glogsp.sh, script/grlogsp.sh, script/gwave.sh: Initial revision 2000-03-01 22:58 yossie * Makefile, bin/Makefile, bin/acep/Makefile, bin/acep/_acep.c, bin/acep/acep.c, bin/acorr/Makefile, bin/acorr/_acorr.c, bin/acorr/acorr.c, bin/lmadf/Makefile, bin/lmadf/_lmadf.c, bin/lmadf/lmadf.c, bin/gnorm/Makefile, bin/gnorm/_gnorm.c, bin/gnorm/gnorm.c, bin/iglsadf/Makefile, bin/iglsadf/_iglsadf.c, bin/iglsadf/iglsadf.c, bin/ignorm/Makefile, bin/ignorm/_ignorm.c, bin/ignorm/ignorm.c, bin/zerodf/Makefile, bin/zerodf/_zerodf.c, bin/zerodf/_zerodf.c.patch, bin/zerodf/zerodf.c, bin/zerodf/zerodf.c.patch, bin/agcep/Makefile, bin/agcep/_agcep.c, bin/agcep/agcep.c, bin/amcep/Makefile, bin/amcep/_amcep.c, bin/amcep/amcep.c, bin/b2mc/Makefile, bin/b2mc/_b2mc.c, bin/b2mc/b2mc.c, bin/mc2b/Makefile, bin/mc2b/_mc2b.c, bin/mc2b/mc2b.c, bin/mlsadf/Makefile, bin/mlsadf/_mlsadf.c, bin/mlsadf/mlsadf.c, bin/average/Makefile, bin/average/_average.c, bin/average/average.c, bin/bcp/Makefile, bin/bcp/bcp.c, bin/bcut/Makefile, bin/bcut/bcut.c, bin/c2acr/Makefile, bin/c2acr/_c2acr.c, bin/echo2/Makefile, bin/echo2/echo2.c, bin/fft/Makefile, bin/fft/_fft.c, bin/fft/fft.c, bin/fftr/Makefile, bin/fftr/_fftr.c, bin/fftr/fftr.c, bin/c2acr/c2acr.c, bin/c2ir/Makefile, bin/c2ir/_c2ir.c, bin/c2ir/c2ir.c, bin/c2sp/Makefile, bin/c2sp/_c2sp.c, bin/c2sp/c2sp.c, bin/ccp/Makefile, bin/ccp/ccp.c, bin/cdist/Makefile, bin/cdist/cdist.c, bin/clip/Makefile, bin/clip/_clip.c, bin/clip/clip.c, bin/da/Makefile, bin/da/da.c, bin/da/da_10.fir, bin/da/da_12.fir, bin/da/ss10snd.h, bin/decimate/Makefile, bin/decimate/decimate.c, bin/delay/Makefile, bin/delay/delay.c, bin/df2/Makefile, bin/df2/_df2.c, bin/df2/df2.c, bin/dfs/Makefile, bin/dfs/_dfs.c, bin/dfs/dfs.c, bin/dmp/Makefile, bin/dmp/dmp.c, bin/ds/Makefile, bin/ds/ds.c, bin/ds/lpfcoef.2to1, bin/ds/lpfcoef.4to3, bin/ds/lpfcoef.5to2dn, bin/ds/lpfcoef.5to2up, bin/excite/Makefile, bin/excite/excite.c, bin/nrand/Makefile, bin/nrand/_nrand.c, bin/nrand/nrand.c, bin/extract/Makefile, bin/extract/extract.c, bin/fd/Makefile, bin/fd/fd.c, bin/fig+fdrw/Makefile, bin/fig+fdrw/fdrw.c, bin/fig+fdrw/fig.c, bin/fig+fdrw/fig.h, bin/fig+fdrw/fig0.c, bin/fig+fdrw/fig1.c, bin/fig+fdrw/plot.c, bin/fig+fdrw/plot.h, bin/fig+fdrw/plsub.c, bin/fft2/Makefile, bin/fft2/_fft2.c, bin/fft2/fft2.c, bin/fftr2/Makefile, bin/fftr2/_fftr2.c, bin/fftr2/fftr2.c, bin/frame/Makefile, bin/frame/frame.c, bin/freqt/Makefile, bin/freqt/_freqt.c, bin/freqt/freqt.c, bin/gc2gc/Makefile, bin/gc2gc/_gc2gc.c, bin/gc2gc/gc2gc.c, bin/gcep/Makefile, bin/gcep/_gcep.c, bin/gcep/gcep.c, bin/glsadf/Makefile, bin/glsadf/_glsadf.c, bin/glsadf/glsadf.c, bin/grpdelay/Makefile, bin/grpdelay/_grpdelay.c, bin/grpdelay/grpdelay.c, bin/ifft/Makefile, bin/ifft/_ifft.c, bin/ifft/ifft.c, bin/poledf/Makefile, bin/poledf/_poledf.c, bin/poledf/poledf.c, bin/histogram/Makefile, bin/histogram/_histogram.c, bin/histogram/histogram.c, bin/icep/Makefile, bin/icep/_icep.c, bin/icep/icep.c, bin/ifft2/Makefile, bin/ifft2/_ifft2.c, bin/minmax/Makefile, bin/minmax/minmax.c, bin/x2x/Makefile, bin/x2x/x2x.c, bin/ifft2/ifft2.c, bin/imglsadf/Makefile, bin/imglsadf/_imglsadf.c, bin/imglsadf/imglsadf.c, bin/impulse/Makefile, bin/impulse/impulse.c, bin/imsvq/Makefile, bin/imsvq/_imsvq.c, bin/imsvq/imsvq.c, bin/ivq/Makefile, bin/ivq/_ivq.c, bin/ivq/ivq.c, bin/interpolate/Makefile, bin/interpolate/interpolate.c, bin/lbg/Makefile, bin/lbg/_lbg.c, bin/lbg/lbg.c, bin/levdur/Makefile, bin/levdur/_levdur.c, bin/levdur/levdur.c, bin/linear_intpl/Makefile, bin/linear_intpl/linear_intpl.c, bin/vq/Makefile, bin/vq/_vq.c, bin/vq/vq.c, bin/lpc/Makefile, bin/lpc/_lpc.c, bin/lpc/lpc.c, bin/lpc2c/Makefile, bin/lpc2c/_lpc2c.c, bin/lpc2c/lpc2c.c, bin/lpc2lsp/Makefile, bin/lpc2lsp/_lpc2lsp.c, bin/lpc2lsp/lpc2lsp.c, bin/nan/Makefile, bin/nan/nan.c, bin/lpc2par/Makefile, bin/lpc2par/_lpc2par.c, bin/lpc2par/lpc2par.c, bin/lsp2lpc/Makefile, bin/lsp2lpc/_lsp2lpc.c, bin/lsp2lpc/lsp2lpc.c, bin/lspcheck/Makefile, bin/lspcheck/_lspcheck.c, bin/lspcheck/lspcheck.c, bin/lspdf/Makefile, bin/lspdf/_lspdf.c, bin/lspdf/lspdf.c, bin/ltcdf/Makefile, bin/ltcdf/_ltcdf.c, bin/ltcdf/ltcdf.c, bin/mcep/Makefile, bin/mcep/_mcep.c, bin/mcep/mcep.c, bin/merge/Makefile, bin/merge/merge.c, bin/mgc2mgc/Makefile, bin/mgc2mgc/_mgc2mgc.c, bin/mgc2mgc/mgc2mgc.c, bin/mgc2sp/Makefile, bin/mgc2sp/_mgc2sp.c, bin/mgc2sp/mgc2sp.c, bin/mgcep/Makefile, bin/mgcep/_mgcep.c, bin/mgcep/mgcep.c, bin/mgcep2/Makefile, bin/mgcep2/_mgcep2.c, bin/mgcep2/mgcep2.c, bin/mglsadf/Makefile, bin/mglsadf/_mglsadf.c, bin/mglsadf/mglsadf.c, bin/mlpg/Makefile, bin/mlpg/mlpg.c, bin/msvq/Makefile, bin/msvq/_msvq.c, bin/msvq/msvq.c, bin/norm0/Makefile, bin/norm0/_norm0.c, bin/norm0/norm0.c, bin/par2lpc/Makefile, bin/par2lpc/_par2lpc.c, bin/par2lpc/par2lpc.c, bin/phase/Makefile, bin/phase/_phase.c, bin/phase/phase.c, bin/pitch/Makefile, bin/pitch/_pitch.c, bin/pitch/pitch.c, bin/psgr/Makefile, bin/psgr/dict.c, bin/psgr/eps.c, bin/psgr/plot.c, bin/psgr/psgr.c, bin/psgr/psgr.h, bin/ramp/Makefile, bin/ramp/ramp.c, bin/reverse/Makefile, bin/reverse/_reverse.c, bin/reverse/reverse.c, bin/rmse/Makefile, bin/rmse/_rmse.c, bin/rmse/rmse.c, bin/root_pol/Makefile, bin/root_pol/_root_pol.c, bin/root_pol/root_pol.c, bin/sin/Makefile, bin/sin/sin.c, bin/snr/Makefile, bin/snr/snr.c, bin/sopr/Makefile, bin/sopr/sopr.c, bin/spec/Makefile, bin/spec/spec.c, bin/step/Makefile, bin/step/step.c, bin/swab/Makefile, bin/swab/swab.c, bin/train/Makefile, bin/train/train.c, bin/uels/Makefile, bin/uels/_uels.c, bin/uels/uels.c, bin/ulaw/Makefile, bin/ulaw/_ulaw.c, bin/ulaw/ulaw.c, bin/vopr/Makefile, bin/vopr/vopr.c, bin/vstat/Makefile, bin/vstat/vstat.c, bin/vsum/Makefile, bin/vsum/vsum.c, bin/window/Makefile, bin/window/_window.c, bin/window/window.c, bin/xgr/Makefile, bin/xgr/README.jis, bin/xgr/config.h, bin/xgr/gcdata.h, bin/xgr/plot.c, bin/xgr/window.c, bin/xgr/xgr.c, bin/xgr/xgr.h, bin/xgr/marks/mark0.dat, bin/xgr/marks/mark1.dat, bin/xgr/marks/mark10.dat, bin/xgr/marks/mark11.dat, bin/xgr/marks/mark12.dat, bin/xgr/marks/mark13.dat, bin/xgr/marks/mark14.dat, bin/xgr/marks/mark15.dat, bin/xgr/marks/mark2.dat, bin/xgr/marks/mark3.dat, bin/xgr/marks/mark4.dat, bin/xgr/marks/mark5.dat, bin/xgr/marks/mark6.dat, bin/xgr/marks/mark7.dat, bin/xgr/marks/mark8.dat, bin/xgr/marks/mark9.dat, bin/xgr/tills/till0.dat, bin/xgr/tills/till1.dat, bin/xgr/tills/till10.dat, bin/xgr/tills/till11.dat, bin/xgr/tills/till12.dat, bin/xgr/tills/till13.dat, bin/xgr/tills/till14.dat, bin/xgr/tills/till15.dat, bin/xgr/tills/till16.dat, bin/xgr/tills/till2.dat, bin/xgr/tills/till3.dat, bin/xgr/tills/till4.dat, bin/xgr/tills/till5.dat, bin/xgr/tills/till6.dat, bin/xgr/tills/till7.dat, bin/xgr/tills/till8.dat, bin/xgr/tills/till9.dat, bin/zcross/Makefile, bin/smcep/Makefile, bin/smcep/_smcep.c, bin/smcep/smcep.c, bin/zcross/_zcross.c, bin/zcross/zcross.c, include/Makefile, include/SPTK.h, lib/Makefile, lib/Makefile.lib, lib/agexp.c, lib/cholesky.c, lib/fileio.c, lib/fillz.c, lib/getfp.c, lib/getmem.c, lib/gexp.c, lib/glog.c, lib/ifftr.c, lib/matrix.c, lib/movem.c, lib/mseq.c, lib/theq.c, lib/toeplitz.c, script/Makefile, script/bell.sh, script/glogsp.sh, script/grlogsp.sh, script/gwave.sh: Speech Signal Processing Toolkit SPTK-3.9/INSTALL0000644001051300105040000000047112442245162010116 00000000000000Installation Instructions ************************* 1. After unpacking the tar.gz file, cd to the SPTK directory. 2. Run configure script with appropriate options. % ./configure For detail, please see. % ./configure --help 3. Run make. % make 4. Install library and binary. % make install SPTK-3.9/NEWS0000644001051300105040000001417012637162365007576 00000000000000Version 3.9: * support full covariance for 'gmmp' command. * add -B, -c1 and -c2 option to 'gmmp' command to specify block size and structure of covariance matrix. * change temporary file path for csh. * bug fixes. Version 3.8: * add 'c2ndps' command for transform from cepstrum to negative derivative of phrase spectrum. * add 'mgclsp2sp' command for transform from LSP to spectrum. * add 'ndps2c' command for transform from negative derivative of phrase spectrum to cepstrum. * add 'wavjoin' command to save stereo wav file. * add 'wavsplit' command to load stereo wav file. * add -V option to 'dtw' command for loading DTW results. * add -e option to calculate inverse matrix stably for 'delta' and 'vc' commands. * support MAP estimation in 'gmm' command. * replace -i option to -q option for 'lsp2lpc,' 'lspcheck,' and 'mgclsp2mgc' commands. * change -c option of 'mlsacheck' command. * update swipe and hts_engine API. * bug fixes. Version 3.7: * add 'vc' command to perform GMM-based voice conversion. * add 'lsp2sp' command to transform LSP coefficients to spectrum. * add -R option to 'mlsacheck' command to specify threshold value. * add -f option to 'gmmp' command to specify full covariance matrix. * add -M, -c1 and -c2 option to 'gmm' command to specify block size and structure of covariance matrix. * add -n option to 'delta' command to specify order of regression polynomial. * add -magic and -MAGIC option to 'rmse' command to delete and substitute magic number. * add -n and -t option to 'rmse' command to specify order and number of vector, respectively. * add -POWX, -LOGX option, and new constant (semitone) to 'sopr' command. * add -l option to 'decimate' and 'interpolate' command to specify length of vector. * add -g and -G option to 'lspcheck' command to check value of gain. * add -L option to 'lspcheck' command to specify log gain. * add -n option to 'mgc2mgclsp' command to specify split number of unit circle. * add -p and -d to 'mgc2mgclsp' command to specify maximum number and end condition of interpolation. * add -x 16, 22, 24 and 48 option of 'glogsp' and 'grlogsp' command to specify more x-axis scales. * add filter coefficients for 7:4 down-sampling, 3:5 and 7:8 up-sampling. * unify option to specify log gain into -L option. * fix -c option of 'mlsacheck' command to specify the type of modification of filter coefficients. * bug fixes. Version 3.6: * add -o option to 'minmax' command to output maximum, minimum or both values. * add -o 4 option to 'vstat' command to output medians. * add options to 'vopr' command to deal with relational operators, arithmetic/geometric mean, and ceiling/flooring. * add -T option to 'smcep' command to specifiy emphasized frequency. * add -E option to 'gcep', 'mcep', 'mgcep', 'spec', 'smcep' and 'uels' command to specify floor in dB. * add -F option to 'gmm' command to read initial GMM parameter file. * add -L and -R option to 'wav2raw' command to deal with stereo wav file. * add 'gseries', 'ifftr', 'mlsacheck', 'symmetrize' and 'transpose' command. * change -f option of 'lbg' command into -F option. * unify option to specify sampling frequency into -s option. * fix 'x2x', 'dmp' and 'fd' command to read format string without space in front of '%'. * bug fixes. Version 3.5: * add 'dtw' command. * add 'mfcc' command. * add 'mgc2mgclsp' and 'mgclsp2mgc' command. * add two pitch extraction algorithm, 'RAPT' and 'SWIPE' to 'pitch' command. * add -R and -M option to 'delta' command, to skip the magic number during the calculation. * unify data type for sampling frequency into float in kHz. * fix options of 'psgr' and 'grlogsp' command to draw more large graph. * fix 'wav2raw' to deal with IEEE float format. * bug fixes. Version 3.4.1: * add 'idct' command. * remove all input/output data type except float from 'frame', 'snr', 'us16', and 'uscd' command. * add input/output data type to many commands. * show number of byte for all input/output data type in 'x2x' command. * rename 'pcap' command to 'pcas' command. * add new constant (octave and cent) to 'sopr' command. * bug fixes. Version 3.4: * add magic and MAGIC option to delete and substitute magic number to 'sopr' command. * add flooring and clipping option to 'sopr' command. * add clipping switch to 'x2x' command. * add i3, I3, le, LE, and de option to 'x2x' command. * add new paper size (A0, A1, A2, B0, B1, B2, B3) to 'psgr' command. * add option for scaling factor to 'fig', 'fdrw', 'glogsp', 'grlogsp', and 'gwave' command. * add option to select type of exception procedure to 'lbg' command. * add option to specify random seed for centroid update to 'lbg' command. * add option to specify minimum number of training vectors for each cell to 'lbg' command. * add option to specify maximum number of iteration for centroid update to 'lbg' command. * add output format for confidence interval via t-dist. to 'vstat' command. * add output format for squared format to 'spec' and 'mgc2sp' command. * add floating-point support of frame period to 'train' command. * add option to 'gmm' command, to specify random seed for initialization of GMM using LBG algorithm. * add full convariance switch to 'gmm' command. * add i and i3 (int and 3 byte int) option to 'swab' command. * add 'wav2raw' command. * bug fixes. Version 3.3: * add 'pca', 'pcap', and 'raw2wav' commands. * add FFT switch to 'dct' command. * add transpose filter to 'glsadf' command. * add inverse filter to 'glsadf', 'lmsadf', and 'mglsadf' commands. * add flooring value for GMM weight to 'gmm' command. * add LOG2 and POW2 option to 'sopr' command. * add option to extend the distance between two consecutive LSPs to 'lspcheck' command. * remove 'iglsadf' and 'imglsadf' commands. * bug fixes. Version 3.2: * released under the New and Simplified BSD license. * add 'gmm', 'delta', and 'dct' commands. * Command options are rearranged for improving consistency among related commands, e.g., mgcep, mglsa, etc. * support Windows (except 'xgr'). * bug fixes. Version 3.1: * change from K&R to ANSI C. * add several commands * release a Reference Manual written in English, and abandon Japanese manuals and web pages * bug fixes. SPTK-3.9/README0000644001051300105040000001573612635677720007774 00000000000000=============================================================================== Speech Signal Processing Toolkit (SPTK) version 3.9 release December 25, 2015 The Speech Signal Processing Toolkit (SPTK) is a suite of speech signal processing tools for UNIX environments. It has been being developed by the SPTK working group (see "Who we are" below) and some graduate students in Nagoya Institute of Technology (see "AUTHORS" in the same directory). ******************************************************************************* Copying ******************************************************************************* The SPTK is released under the Modified BSD license (see http://www.opensource.org/). Using and distributing this software is free (without restriction including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of this work, and to permit persons to whom this work is furnished to do so) subject to the conditions in the following license: /* ----------------------------------------------------------------- */ /* The Speech Signal Processing Toolkit (SPTK) */ /* developed by SPTK Working Group */ /* http://sp-tk.sourceforge.net/ */ /* ----------------------------------------------------------------- */ /* */ /* Copyright (c) 1984-2007 Tokyo Institute of Technology */ /* Interdisciplinary Graduate School of */ /* Science and Engineering */ /* */ /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or */ /* without modification, are permitted provided that the following */ /* conditions are met: */ /* */ /* - Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* - Redistributions in binary form must reproduce the above */ /* copyright notice, this list of conditions and the following */ /* disclaimer in the documentation and/or other materials provided */ /* with the distribution. */ /* - Neither the name of the SPTK working group nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */ /* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */ /* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */ /* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */ /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS */ /* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */ /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, */ /* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */ /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, */ /* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY */ /* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */ /* POSSIBILITY OF SUCH DAMAGE. */ /* ----------------------------------------------------------------- */ Although this software is free, we still offer no warranties and no maintenance. We will continue to endeavor to fix bugs and answer queries when can, but are not in a position to guarantee it. We will consider consultancy if desired, please contacts us for details. If you are using the hts_engine API in commercial environments, even though no license is required, we would be grateful if you let us know as it helps justify ourselves to our various sponsors. We also strongly encourage you to * refer to the use of SPTK in any publications that use this software * report bugs, where possible with bug fixes, that are found See also "COPYING" files in following directories for details. ./ ./bin/ds/titech ./bin/pitch/snack ./bin/pitch/swipe ./bin/us/titech ./bin/vc/hts_engine_API ******************************************************************************* Installation ******************************************************************************* See "INSTALL" in the same directory for details. ******************************************************************************* Documentation ******************************************************************************* Reference manual of SPTK is available at http://sp-tk.sourceforge.net/ ******************************************************************************* Acknowledgements ******************************************************************************* Takao Kobayashi Keiichi Tokuda Takashi Masuko Chiyomi Miyajima Masatsune Tamura Takayoshi Yoshimura Shinji Sako Yoshihiko Nankaku Fernando Gil Resende Junior Toshihiko Kato Gou Hirabayashi Naohiro Isshiki Noboru Miyazaki Toshio Kanno Kenji Chiba Toshiaki Fukada Satoshi Imai Tadashi Kitamura Heiga Zen Toru Takahashi Keiichiro Oura ******************************************************************************* Who we are ******************************************************************************* The SPTK working group is a voluntary group for developing the Speech Signal Processing Toolkit. Current members are Keiichi Tokuda http://www.sp.nitech.ac.jp/~tokuda/ (Produce and Design) Keiichiro Oura http://www.sp.nitech.ac.jp/~uratec/ (Main Maintainer) Akira Tamamori http://www.sp.nitech.ac.jp/~mataki/ Shinji Sako http://www.mmsp.nitech.ac.jp/~sako/ Heiga Zen Takashi Nose Toru Takahashi http://winnie.kuis.kyoto-u.ac.jp/~tall/ Junichi Yamagishi http://homepages.inf.ed.ac.uk/jyamagis/ Yoshihiko Nankaku http://www.sp.nitech.ac.jp/~nankaku/ and the members are dynamically changing. If you want to contact the SPTK working group, please use Tracker of the SPTK SourceForge page (http://sourceforge.net/projects/sp-tk/). =============================================================================== SPTK-3.9/Makefile.mak0000644001051300105040000000136212442245162011274 00000000000000INSTALLDIR = C:\SPTK\bin all: float float: cd lib nmake /f Makefile.mak cd .. cd bin nmake /f Makefile.mak cd .. double: cd lib nmake /f Makefile.mak DOUBLE=1 cd .. cd bin nmake /f Makefile.mak DOUBLE=1 cd .. clean: cd lib nmake /f Makefile.mak clean cd .. cd bin nmake /f Makefile.mak clean cd .. install:: @if not exist "$(INSTALLDIR)\lib" mkdir "$(INSTALLDIR)\lib" cd lib copy *.lib $(INSTALLDIR)\lib cd .. @if not exist "$(INSTALLDIR)\bin" mkdir "$(INSTALLDIR)\bin" cd bin copy *.exe $(INSTALLDIR)\bin cd .. @if not exist "$(INSTALLDIR)\include" mkdir "$(INSTALLDIR)\include" cd include copy *.h $(INSTALLDIR)\include cd .. SPTK-3.9/script/0000755001051300105040000000000012637167721010461 500000000000000SPTK-3.9/script/Makefile.am0000644001051300105040000000201512442245165012424 00000000000000bin_SCRIPTS = bell gseries glogsp grlogsp gwave mgc2mgclsp mgclsp2mgc raw2wav wav2raw EXTRA_DIST = bell.in gseries.in glogsp.in grlogsp.in gwave.in mgc2mgclsp.in mgclsp2mgc.in raw2wav.in wav2raw.in CLEANFILES = $(bin_SCRIPTS) replace_path = sed \ -e 's,[@]bindir[@],$(bindir),g' \ -e 's,[@]package_version[@],$(PACKAGE_VERSION),g' \ -e 's,[@]csh[@],$(CSH),' \ -e 's,[@]io_symbol[@],$(IO_SYMBOL),g' \ -e 's,[@]io_format[@],$(IO_FORMAT),g' bell: $(replace_path) < bell.in > $@ chmod +x $@ gseries: $(replace_path) < gseries.in > $@ chmod +x $@ glogsp: $(replace_path) < glogsp.in > $@ chmod +x $@ grlogsp: $(replace_path) < grlogsp.in > $@ chmod +x $@ gwave: $(replace_path) < gwave.in > $@ chmod +x $@ mgc2mgclsp: $(replace_path) < mgc2mgclsp.in > $@ chmod +x $@ mgclsp2mgc: $(replace_path) < mgclsp2mgc.in > $@ chmod +x $@ raw2wav: $(replace_path) < raw2wav.in > $@ chmod +x $@ wav2raw: $(replace_path) < wav2raw.in > $@ chmod +x $@ SPTK-3.9/script/Makefile.in0000644001051300105040000003573612637167423012463 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = script ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(bindir)" SCRIPTS = $(bin_SCRIPTS) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSH = @CSH@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IO_FORMAT = @IO_FORMAT@ IO_SYMBOL = @IO_SYMBOL@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ bin_SCRIPTS = bell gseries glogsp grlogsp gwave mgc2mgclsp mgclsp2mgc raw2wav wav2raw EXTRA_DIST = bell.in gseries.in glogsp.in grlogsp.in gwave.in mgc2mgclsp.in mgclsp2mgc.in raw2wav.in wav2raw.in CLEANFILES = $(bin_SCRIPTS) replace_path = sed \ -e 's,[@]bindir[@],$(bindir),g' \ -e 's,[@]package_version[@],$(PACKAGE_VERSION),g' \ -e 's,[@]csh[@],$(CSH),' \ -e 's,[@]io_symbol[@],$(IO_SYMBOL),g' \ -e 's,[@]io_format[@],$(IO_FORMAT),g' all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu script/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu script/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n' \ -e 'h;s|.*|.|' \ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) { files[d] = files[d] " " $$1; \ if (++n[d] == $(am__install_max)) { \ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ else { print "f", d "/" $$4, $$1 } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir) tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(SCRIPTS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binSCRIPTS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binSCRIPTS .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic cscopelist-am \ ctags-am distclean distclean-generic distdir dvi dvi-am html \ html-am info info-am install install-am install-binSCRIPTS \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am tags-am uninstall uninstall-am \ uninstall-binSCRIPTS .PRECIOUS: Makefile bell: $(replace_path) < bell.in > $@ chmod +x $@ gseries: $(replace_path) < gseries.in > $@ chmod +x $@ glogsp: $(replace_path) < glogsp.in > $@ chmod +x $@ grlogsp: $(replace_path) < grlogsp.in > $@ chmod +x $@ gwave: $(replace_path) < gwave.in > $@ chmod +x $@ mgc2mgclsp: $(replace_path) < mgc2mgclsp.in > $@ chmod +x $@ mgclsp2mgc: $(replace_path) < mgclsp2mgc.in > $@ chmod +x $@ raw2wav: $(replace_path) < raw2wav.in > $@ chmod +x $@ wav2raw: $(replace_path) < wav2raw.in > $@ chmod +x $@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: SPTK-3.9/script/bell.in0000644001051300105040000001071612633453604011646 00000000000000#!@csh@ -f # ----------------------------------------------------------------- # # The Speech Signal Processing Toolkit (SPTK) # # developed by SPTK Working Group # # http://sp-tk.sourceforge.net/ # # ----------------------------------------------------------------- # # # # Copyright (c) 1984-2007 Tokyo Institute of Technology # # Interdisciplinary Graduate School of # # Science and Engineering # # # # 1996-2015 Nagoya Institute of Technology # # Department of Computer Science # # # # All rights reserved. # # # # Redistribution and use in source and binary forms, with or # # without modification, are permitted provided that the following # # conditions are met: # # # # - Redistributions of source code must retain the above copyright # # notice, this list of conditions and the following disclaimer. # # - Redistributions in binary form must reproduce the above # # copyright notice, this list of conditions and the following # # disclaimer in the documentation and/or other materials provided # # with the distribution. # # - Neither the name of the SPTK working group nor the names of its # # contributors may be used to endorse or promote products derived # # from this software without specific prior written permission. # # # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND # # CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, # # INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS # # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, # # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED # # TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON # # ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, # # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY # # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # # POSSIBILITY OF SUCH DAMAGE. # # ----------------------------------------------------------------- # ######################################################################### # # # Bell # # # # 1996.6 K.Koishida # # # ######################################################################### set path = ( @bindir@ $path ) set sptkver = '@package_version@' set cvsid = '$Id: bell.in,v 1.12 2015/12/14 05:45:40 uratec Exp $' set cmnd = $0 set cmnd = $cmnd:t set no = 1 @ i = 0 while ($i < $#argv) @ i++ switch ($argv[$i]) case -h: set exit_status = 0 goto usage breaksw default: @ no = $argv[$i] breaksw endsw end goto main usage: echo2 '' echo2 " $cmnd - bell" echo2 '' echo2 ' usage:' echo2 " $cmnd [ option ] [ num ] > stdout" echo2 ' option:' echo2 ' -h : print this message' echo2 ' notice:' echo2 ' num : number of bell [1]' echo2 '' echo2 " SPTK: version $sptkver" echo2 " CVS Info: $cvsid" exit $exit_status main: if ( $no < 1 ) set no = 1 set i = 1 while ( $i < $no ) echo2 -n '' @ i++ sleep 1 end echo2 -n '' SPTK-3.9/script/gseries.in0000755001051300105040000003475212633453604012402 00000000000000#!@csh@ -f # ----------------------------------------------------------------- # # The Speech Signal Processing Toolkit (SPTK) # # developed by SPTK Working Group # # http://sp-tk.sourceforge.net/ # # ----------------------------------------------------------------- # # # # Copyright (c) 1984-2007 Tokyo Institute of Technology # # Interdisciplinary Graduate School of # # Science and Engineering # # # # 1996-2015 Nagoya Institute of Technology # # Department of Computer Science # # # # All rights reserved. # # # # Redistribution and use in source and binary forms, with or # # without modification, are permitted provided that the following # # conditions are met: # # # # - Redistributions of source code must retain the above copyright # # notice, this list of conditions and the following disclaimer. # # - Redistributions in binary form must reproduce the above # # copyright notice, this list of conditions and the following # # disclaimer in the documentation and/or other materials provided # # with the distribution. # # - Neither the name of the SPTK working group nor the names of its # # contributors may be used to endorse or promote products derived # # from this software without specific prior written permission. # # # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND # # CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, # # INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS # # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, # # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED # # TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON # # ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, # # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY # # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # # POSSIBILITY OF SUCH DAMAGE. # # ----------------------------------------------------------------- # ######################################################################### # # # Draw a discrete series # # # # 2012.11 T.Okada # # # ######################################################################### onintr clean set path = ( @bindir@ $path ) set sptkver = '@package_version@' set cvsid = '$Id: gseries.in,v 1.9 2015/12/14 05:45:40 uratec Exp $' set cmnd = $0 set cmnd = $cmnd:t set file @ start = 0 @ term = -1 @ numscreen = 5 @ numdata = 50 set ymax = 50 set pen = 1 set F = 1 set type = f set mtype = "\1" set magic = 0 set MAGIC = 0 set flagy2 = 0 set flagfile = 0 set flagnumdata = 0 set flagnumscreen = 0 set flagy = 0 set flagmagic = 0 set flagMAGIC = 0 set magic_count = 0 set MAGIC_count = 0 @ i = 0 while ($i < $#argv) @ i++ switch ("$argv[$i]") case -s: @ i++ set start = $argv[$i] breaksw case -e: @ i++ set term = $argv[$i] breaksw case -n: @ i++ @ numdata = $argv[$i] set flagnumdata = 1 breaksw case -i: @ i++ set numscreen = $argv[$i] set flagnumscreen = 1 breaksw case -y: @ i++ set ymax = $argv[$i] set flagy = 1 breaksw case -y2: @ i++ set ymin = $argv[$i] set flagy = 1 set flagy2 = 1 breaksw case -m: @ i++ set mtype = "\$argv[$i]" breaksw case -p: @ i++ set pen = $argv[$i] breaksw case -F: @ i++ set F = $argv[$i] breaksw case -magic: @ i++ set magic = $argv[$i] set flagmagic = 1 @ magic_count++ breaksw case -MAGIC: @ i++ set MAGIC = $argv[$i] set flagMAGIC = 1 @ MAGIC_count++ breaksw case +c: set type = c breaksw case +s: set type = s breaksw case +i3: set type = i3 breaksw case +i: set type = i breaksw case +l: set type = l breaksw case +le: set type = le breaksw case +C: set type = C breaksw case +S: set type = S breaksw case +I: set type = I breaksw case +I3: set type = I3 breaksw case +L: set type = L breaksw case +LE: set type = LE breaksw case +f: set type = f breaksw case +d: set type = d breaksw case +de: set type = de breaksw case -h: set exit_status = 0 goto usage breaksw default: set file = "$argv[$i]" set flagfile = 1 if ( ! -f "$file" ) then echo2 "${cmnd} : Cannot open file ${file}\!" set exit_status = 1 goto usage endif breaksw endsw end if ( $magic_count > 1 || $MAGIC_count > 1 ) then echo2 "${cmnd} : Can't specify -magic or -MAGIC option multiple times\!" set exit_status = 1 goto usage endif # when input stream is stdin if ("$file" == "") then rm -fr /tmp/sptk-gseries-$uid-$$ cat > /tmp/sptk-gseries-$uid-$$ set file=/tmp/sptk-gseries-$uid-$$ endif if ( ($start != 0) || ($term > 0) ) then if ( $flagmagic && $flagMAGIC ) then x2x +${type}f "$file" | sopr -magic $magic -MAGIC $MAGIC | x2x +f${type} > /tmp/$$ else if ( $flagmagic ) then if ( $term < 0 ) then set wctmp = `x2x +${type}a "$file" | wc -l` @ wctmp = `echo "$wctmp - 1" | bc -l` else set wctmp = `echo "$term" | bc -l` endif set mwc = `x2x +${type}f "$file" | bcut -s $start -e $wctmp | sopr -magic $magic | x2x +fa | wc -l` x2x +${type}f "$file" | bcut -s $start -e $wctmp | sopr -magic $magic | x2x +f${type} > /tmp/$$ @ reduced = `echo "$wctmp + 1 - $start - $mwc" | bc -l` @ term = `echo "$wctmp - $reduced + 1" | bc -l` set mterm = `echo "$mwc - 1" | bc -l` x2x +${type}f /tmp/$$ | bcp -S $start -l $mwc -s 0 -e $mterm -f 0 | x2x +f${type} > /tmp/$$-1 cat /tmp/$$-1 > /tmp/$$ else if ( $flagMAGIC ) then echo2 "${cmnd} : -MAGIC option need magic number\!" set exit_status = 1 goto usage else cat "$file" > /tmp/$$ endif else if ( $flagmagic && $flagMAGIC ) then x2x +${type}f "$file" | sopr -magic $magic -MAGIC $MAGIC | x2x +f${type} > /tmp/$$ else if ( $flagmagic ) then x2x +${type}f "$file" | sopr -magic $magic | x2x +f${type} > /tmp/$$ else if ( $flagMAGIC ) then echo2 "${cmnd} : -MAGIC option need magic number\!" set exit_status = 1 goto usage else cat "$file" > /tmp/$$ endif endif rm -fr /tmp/sptk-gseries-$uid-$$ set file = /tmp/$$ goto main usage: echo2 '' echo2 " $cmnd - draw a discrete series" echo2 '' echo2 ' usage:' echo2 " $cmnd [ options ] [ infile ] > stdout" echo2 ' options:' echo2 ' -F F : factor [1]' echo2 ' -s s : start point [0]' echo2 ' -e e : end point [EOF]' echo2 ' -n n : data number of one screen [N/A]' echo2 ' -i i : number of screen [5]' echo2 ' -y ymax : maximum amplitude [N/A]' echo2 ' -y2 ymin : minimum amplitude [-ymax]' echo2 ' -m mtype : mark type [1]' echo2 ' -p p : pen number [1]' echo2 ' -magic magic : remove magic number [N/A]' echo2 ' -MAGIC MAGIC : replace magic number by MAGIC [N/A]' echo2 ' +type : input data type [f]' echo2 ' c (char) C (unsigned char) ' echo2 ' s (short) S (unsigned short)' echo2 ' i3 (int, 3byte) I3 (unsigned int, 3byte)' echo2 ' i (int) I (unsigned int)' echo2 ' l (long) L (unsigned long)' echo2 ' le (long long) LE (unsigned long) ' echo2 ' f (float) d (double)' echo2 ' de (long double)' echo2 ' -h : print this message' echo2 ' infile:' echo2 ' impluse response [stdin]' echo2 ' stdout:' echo2 ' XY-plotter command' echo2 ' notice:' echo2 ' If options of amplitude are not used,' echo2 ' value of amplitude is automatically determined.' echo2 ' If -n option is not used,' echo2 ' entire impluse response is displayed.' echo2 ' Can not use -n option and -i option.' echo2 ' If -magic option is not given,' echo2 ' return error.' echo2 ' If -magic or -MAGIC option is given mutiple times,' echo2 ' return error.' echo2 '' echo2 " SPTK: version $sptkver" echo2 " CVS Info: $cvsid" echo2 '' exit $exit_status main: if ( $flagnumdata && $flagnumscreen ) then echo2 "${cmnd} : Cannot use -i and -n at the same time\!" set exit_status = 1 goto usage else if ( $flagnumscreen ) then if ( $term > 0 ) then @ wc = $term else set wc = ` x2x +${type}a $file | wc -l ` endif @ wc = $wc - $start @ allnumdata = $wc @ rest = $wc % $numscreen @ wc /= $numscreen if ($rest) @ wc++ @ numdata = $wc else if ( $flagnumdata ) then if ( $term > 0 ) then @ wc = $term else set wc = ` x2x +${type}a $file | wc -l ` endif @ wc = $wc - $start @ allnumdata = $wc @ rest = $wc % $numdata @ numscreen = $wc / $numdata if ($rest) @ numscreen++ else if ( $term > 0 ) then @ wc = $term else set wc = ` x2x +${type}a $file | wc -l ` endif @ wc = $wc - $start @ allnumdata = $wc @ rest = $wc % $numscreen @ wc /= $numscreen if ($rest) @ wc++ @ numdata = $wc endif if ( ! $flagy ) then set val = (`x2x +${type}f < $file | sopr -ABS | minmax -o 2 | x2x +fa`) set ymax = $val set ymin = -$val endif if ( ! $flagy2 ) then set ymin = -$ymax endif set width = 1.7 set height = 0.4 @ n1 = $numdata - 1 @ end = $start + $n1 set ox = `echo "20 * $F" | bc -l` set oy = `echo "225 * $F" | bc -l` @ xs = $start @ xe = $xs + $n1 if ( $numdata < 10 ) then @ dx = 1 else @ dx = $numdata / 10 endif set numscreentmp = $numscreen set count = `echo "$start" | bc -l` while ( $numscreen > 0 ) @ i = 0 set xscale = () set x = 0 while (1) @ x = $dx * $i + $xs if ( $x <= $xe - $dx ) then set xscale = ($xscale $x) @ i++ else set xscale = ($xscale $x) break endif end set xsw = `echo "$xs - 0.01" | bc -l` set xew = `echo "$xe + 0.01" | bc -l` @ tmp = $numscreen % 5 echo "x $xsw $xew" >! /tmp/$$-$tmp echo "y $ymin $ymax" >> /tmp/$$-$tmp echo "xscale $xscale" >> /tmp/$$-$tmp echo "yscale $ymin $ymax" >> /tmp/$$-$tmp echo "ygrid 0" >> /tmp/$$-$tmp if ( ($numscreen == 1) && ($numdata > ($allnumdata % $numscreentmp)) ) then @ end = $term endif foreach line (`x2x +${type}f < $file | bcut -s $start -e $end | x2x +fa`) echo "box $count 0 $count $line" >> /tmp/$$-$tmp echo "$count $line $mtype" >> /tmp/$$-$tmp @ count += 1 end fig -o $ox $oy -W $width -H $height -p $pen -F $F /tmp/$$-$tmp @ numscreen-- set oy = `echo "$oy - 50 * $F" | bc -l` @ xs += $numdata @ xe += $numdata @ start += $numdata @ end += $numdata end clean: /bin/rm -f /tmp/$$ set i = 4 while ( $i >= 0 ) /bin/rm -f /tmp/$$-$i @ i-- end SPTK-3.9/script/glogsp.in0000644001051300105040000003134112633453604012220 00000000000000#!@csh@ -f # ----------------------------------------------------------------- # # The Speech Signal Processing Toolkit (SPTK) # # developed by SPTK Working Group # # http://sp-tk.sourceforge.net/ # # ----------------------------------------------------------------- # # # # Copyright (c) 1984-2007 Tokyo Institute of Technology # # Interdisciplinary Graduate School of # # Science and Engineering # # # # 1996-2015 Nagoya Institute of Technology # # Department of Computer Science # # # # All rights reserved. # # # # Redistribution and use in source and binary forms, with or # # without modification, are permitted provided that the following # # conditions are met: # # # # - Redistributions of source code must retain the above copyright # # notice, this list of conditions and the following disclaimer. # # - Redistributions in binary form must reproduce the above # # copyright notice, this list of conditions and the following # # disclaimer in the documentation and/or other materials provided # # with the distribution. # # - Neither the name of the SPTK working group nor the names of its # # contributors may be used to endorse or promote products derived # # from this software without specific prior written permission. # # # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND # # CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, # # INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS # # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, # # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED # # TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON # # ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, # # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY # # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # # POSSIBILITY OF SUCH DAMAGE. # # ----------------------------------------------------------------- # ######################################################################### # # # Draw a Log Spectrum Graph # # # # 1988.5 K.Tokuda # # 1996.6 K.Koishida # # 2010.6 T.Sawada # # 2013.2 T.Okada # # # ######################################################################### set path = ( @bindir@ $path ) set sptkver = '@package_version@' set cvsid = '$Id: glogsp.in,v 1.24 2015/12/14 05:45:40 uratec Exp $' set cmnd = $0 set cmnd = $cmnd:t set h = 0.6 set w = 0.6 set F = 1 @ on = 1 @ x = 1 @ ymin = 0 @ ymax = 100 @ yscale = 20 set yy = ("" "") set p = 1 set ln = 1 @ g = 2 set file @ s = 0 @ l = 256 set help = 0 set xname = ( "Normalized frequency" \ "Normalized frequency (rad)" \ "" \ "Frequency (kHz)" \ "Frequency (kHz)" \ "Frequency (kHz)" \ "" \ "Frequency (kHz)" \ "" \ "Frequency (kHz)" \ "" "" "" "" "" \ "Frequency (kHz)" \ "" "" "" "" "" \ "Frequency (kHz)" \ "" \ "Frequency (kHz)" \ "" "" "" "" "" "" "" "" \ "" "" "" "" "" "" "" "" \ "" "" "" "" "" "" "" \ "Frequency (kHz)" ) set xs = ( "0 0.25 0.5" \ 0\ \'1.57\ \"\\pi/2\"\ \'3.14\ \"\\pi\" \ "" \ "0 1 2 3 4" \ "0 1 2 3 4 5" \ "0 2 4 6" \ "" \ "0 2 4 6 8" \ "" \ "0 2 4 6 8 10" \ "" "" "" "" "" \ "0 4 8 12 16" \ "" "" "" "" "" \ "0 11 22" \ "" \ "0 6 12 18 24" \ "" "" "" "" "" "" "" "" \ "" "" "" "" "" "" "" "" \ "" "" "" "" "" "" "" \ "0 16 32 48" ) set xx = ( "0 0.5" \ "0 3.14" \ "" \ "0 4" \ "0 5" \ "0 6" \ "" \ "0 8" \ "" \ "0 10" \ "" "" "" "" "" \ "0 16" \ "" "" "" "" "" \ "0 22" \ "" \ "0 24" \ "" "" "" "" "" "" "" "" \ "" "" "" "" "" "" "" "" \ "" "" "" "" "" "" "" \ "0 48" ) set xl = ( 0.5 \ 3.14 \ "" \ 4 \ 5 \ 6 \ "" \ 8 \ "" \ 10 \ "" "" "" "" "" \ 16 \ "" "" "" "" "" \ 22 \ "" \ 24 \ "" "" "" "" "" "" "" "" \ "" "" "" "" "" "" "" "" \ "" "" "" "" "" "" "" \ 48 ) set on_x = (40 125 40 125 40 125) set on_y = (205 205 120 120 35 35) @ i = 0 while ($i < $#argv) @ i++ switch ("$argv[$i]") case -F: @ i++ set F = $argv[$i] breaksw case -f: @ i++ set f = $argv[$i] breaksw case -v: set v = over breaksw case -H: @ i++ set h = $argv[$i] breaksw case -W: @ i++ set w = $argv[$i] breaksw case -o: @ i++ @ xo = $argv[$i] @ i++ @ yo = $argv[$i] breaksw case -O: @ i++ @ on = $argv[$i] breaksw case -x: @ i++ @ x = $argv[$i] breaksw case -y: @ i++ @ ymin = $argv[$i] @ i++ @ ymax = $argv[$i] breaksw case -ys: @ i++ @ yscale = $argv[$i] breaksw case -p: @ i++ set p = $argv[$i] breaksw case -ln: @ i++ set ln = $argv[$i] breaksw case -c: @ i++ set c = "$argv[$i]" breaksw case -g: @ i++ @ g = $argv[$i] breaksw case -s: @ i++ set s = $argv[$i] breaksw case -l: @ i++ @ l = $argv[$i] breaksw case -help: set help = 1 case -h: set exit_status = 0 goto usage breaksw default: set file = "$argv[$i]" if ( ! -f "$file" ) then echo2 "${cmnd} : Cannot open file ${file}\!" set exit_status = 1 goto usage endif breaksw endsw end # when input stream is stdin if ("$file" == "") then rm -fr /tmp/sptk-glogsp-$uid-$$ cat > /tmp/sptk-glogsp-$uid-$$ set file=/tmp/sptk-glogsp-$uid-$$ endif goto main usage: echo2 '' echo2 " $cmnd - draw a log spectrum graph" echo2 '' echo2 ' usage:' echo2 " $cmnd [ options ] [ infile ] > stdout" echo2 ' options:' echo2 ' -F F : factor [1] ' echo2 ' -O O : origin of graph [1] ' if ( $help ) then echo2 ' 1 ( 40, 205) ' echo2 ' 2 (125, 205) +--------+' echo2 ' 3 ( 40, 120) | 1 2 |' echo2 ' 4 (125, 120) | 3 4 |' echo2 ' 5 ( 40, 35) | 5 6 |' echo2 ' 6 (125, 35) +--------+' endif echo2 ' -x x : x scale [1]' if ( $help ) then echo2 ' 1 (Normalized frequency <0, 0.5>)' echo2 ' 2 (Normalized frequency <0, pi/2, pi>)' echo2 ' 4 (Frequency <0, 1, 2, 3, 4 kHz>)' echo2 ' 5 (Frequency <0, 1, 2, 3, 4, 5 kHz>)' echo2 ' 8 (Frequency <0, 2, 4, 6, 8 kHz>)' echo2 ' 10 (Frequency <0, 2, 4, 6, 8, 10 kHz>)' echo2 ' 16 (Frequency <0, 4, 8, 12, 16 kHz>)' echo2 ' 22 (Frequency <0, 11, 22 kHz>)' echo2 ' 24 (Frequency <0, 6, 12, 18, 24 kHz>)' echo2 ' 48 (Frequency <0, 16, 32, 48 kHz>)' endif echo2 ' -y ymin ymax : y scale [0 100]' echo2 ' -ys ys : Y-axis scaling factor [20]' echo2 ' -p p : pen no. [1]' echo2 ' -ln ln : line number [1]' echo2 ' -s s : start frame number [0]' echo2 ' -l l : frame length [256]' echo2 ' -c "c" : comment for the graph [""]' echo2 ' -h : print this message' echo2 ' -help : print help in detail' if ( $help ) then echo2 ' (level 2)' echo2 ' -W W : width of the graph <100mm> [0.6]' echo2 ' -H H : height of the graph <100mm> [0.6]' echo2 ' -v : over write mode [FALSE]' echo2 ' -o xo yo : origin of the graph [40, 205]' echo2 ' (if -o option exists, -O is not effective)' echo2 ' -g g : type of the graph [2]' echo2 ' 0 (no frame)' echo2 ' 1 (half frame)' echo2 ' 2 (with frame)' echo2 ' -f file : additional data file for fig [NULL]' endif echo2 ' infile:' echo2 " log spectrum (float) [stdin]" echo2 ' stdout:' echo2 ' XY-plotter command' echo2 '' echo2 " SPTK: version $sptkver" echo2 " CVS Info: $cvsid" echo2 '' exit $exit_status main: if (! $?xo) then @ xo = $on_x[$on] @ yo = $on_y[$on] endif set xo = `echo "$xo * $F"| bc -l` set yo = `echo "$yo * $F"| bc -l` @ yy[1] = $ymin @ yy[2] = $ymax set ys = ($ymin) @ i = 1 while (($ys[$i] + $yscale) <= $ymax) @ tmp = $ys[$i] + $yscale set ys = ($ys $tmp) @ i++ end @ lhi = $l / 2 + 1 @ s = $s * $lhi if ($?v) then set ee = "" else @ e = $s + $lhi - 1 set ee = "-e $e" endif bcut +f -s $s $ee "$file" |\ fdrw -W $w -H $h -o $xo $yo -g 0 -y $yy -n $lhi -p $p -m $ln -F $F if ($?c) then set yoc = `echo "$yo - 8 * $F" | bc -l` fig -W $w -H $h -o $xo $yoc -g 0 -F $F<< EOF xname "$c" EOF endif fig -W $w -H $h -o $xo $yo -g $g -F $F<< EOF x $xx[$x] y $yy xscale $xs[$x] xname "$xname[$x]" yscale $ys yname "Log magnitude (dB)" line 2 0 0 $xl[$x] 0 eod EOF if ($?f) then fig $f -W $w -H $h -o $xo $yo -g 0 -F $F endif rm -fr /tmp/sptk-glogsp-$uid-$$ SPTK-3.9/script/grlogsp.in0000644001051300105040000004056212633453604012407 00000000000000#!@csh@ -f # ----------------------------------------------------------------- # # The Speech Signal Processing Toolkit (SPTK) # # developed by SPTK Working Group # # http://sp-tk.sourceforge.net/ # # ----------------------------------------------------------------- # # # # Copyright (c) 1984-2007 Tokyo Institute of Technology # # Interdisciplinary Graduate School of # # Science and Engineering # # # # 1996-2015 Nagoya Institute of Technology # # Department of Computer Science # # # # All rights reserved. # # # # Redistribution and use in source and binary forms, with or # # without modification, are permitted provided that the following # # conditions are met: # # # # - Redistributions of source code must retain the above copyright # # notice, this list of conditions and the following disclaimer. # # - Redistributions in binary form must reproduce the above # # copyright notice, this list of conditions and the following # # disclaimer in the documentation and/or other materials provided # # with the distribution. # # - Neither the name of the SPTK working group nor the names of its # # contributors may be used to endorse or promote products derived # # from this software without specific prior written permission. # # # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND # # CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, # # INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS # # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, # # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED # # TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON # # ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, # # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY # # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # # POSSIBILITY OF SUCH DAMAGE. # # ----------------------------------------------------------------- # ######################################################################### # # # Draw a Running Log Spectrum Graph # # # # 1988.5 K.Tokuda # # 1996.6 K.Koishida # # 1998.7 M.Tamura # # 2010.6 T.Sawada # # 2013.2 T.Okada # # # ######################################################################### set path = ( @bindir@ $path ) set sptkver = '@package_version@' set cvsid = '$Id: grlogsp.in,v 1.24 2015/12/14 05:45:40 uratec Exp $' set cmnd = $0 set cmnd = $cmnd:t set h = 1.5 set w = 0.25 set z = 1 set F = 1 @ xo = 95 @ yo = 30 @ x = 1 @ ymin = -100 @ yscale = 100 set yy = ("" "") set p = 2 set ln = 1 set cs = 2 @ cy = -8 @ cyy = -14 @ cyyy = -20 @ g = 0 @ s = 0 @ l = 256 set trans = 0 set help = 0 set file set xname = ( "Normalized frequency" \ "Normalized frequency (rad)" \ "" \ "Frequency (kHz)" \ "Frequency (kHz)" \ "Frequency (kHz)" \ "" \ "Frequency (kHz)" \ "" \ "Frequency (kHz)" \ "" "" "" "" "" \ "Frequency (kHz)" \ "" "" "" "" "" \ "Frequency (kHz)" \ "" \ "Frequency (kHz)" \ "" "" "" "" "" "" "" "" \ "" "" "" "" "" "" "" "" \ "" "" "" "" "" "" "" \ "Frequency (kHz)" ) set xs = ( "0 0.25 0.5" \ 0\ \'1.57\ \"\\pi/2\"\ \'3.14\ \"\\pi\" \ "" \ "0 1 2 3 4" \ "0 1 2 3 4 5" \ "0 2 4 6" \ "" \ "0 2 4 6 8" \ "" \ "0 2 4 6 8 10" \ "" "" "" "" "" \ "0 4 8 12 16" \ "" "" "" "" "" \ "0 11 22" \ "" \ "0 6 12 18 24" \ "" "" "" "" "" "" "" "" \ "" "" "" "" "" "" "" "" \ "" "" "" "" "" "" "" \ "0 16 32 48" ) set xx = ( "0 0.5" \ "0 3.14" \ "" \ "0 4" \ "0 5" \ "0 6" \ "" \ "0 8" \ "" \ "0 10" \ "" "" "" "" "" \ "0 16" \ "" "" "" "" "" \ "0 22" \ "" \ "0 24" \ "" "" "" "" "" "" "" "" \ "" "" "" "" "" "" "" "" \ "" "" "" "" "" "" "" \ "0 48" ) set xl = ( 0.5 \ 3.14 \ "" \ 4 \ 5 \ 6 \ "" \ 8 \ "" \ 10 \ "" "" "" "" "" \ 16 \ "" "" "" "" "" \ 22 \ "" \ 24 \ "" "" "" "" "" "" "" "" \ "" "" "" "" "" "" "" "" \ "" "" "" "" "" "" "" \ 48 ) set on_x = (25 60 95 130 165 200 235 270 305 340) @ i = 0 while ($i < $#argv) @ i++ switch ("$argv[$i]") case -t: set trans = 1 breaksw case -f: @ i++ set f = $argv[$i] breaksw case -H: @ i++ set h = $argv[$i] breaksw case -W: @ i++ set w = $argv[$i] breaksw case -F: @ i++ set F = $argv[$i] breaksw case -o: @ i++ @ xo = $argv[$i] @ i++ @ yo = $argv[$i] breaksw case -O: @ i++ @ on = $argv[$i] breaksw case -x: @ i++ @ x = $argv[$i] breaksw case -y: @ i++ @ ymin = $argv[$i] breaksw case -yo: @ i++ @ yo = $argv[$i] breaksw case -yy: @ i++ @ yscale = $argv[$i] breaksw case -p: @ i++ set p = $argv[$i] breaksw case -ln: @ i++ set ln = $argv[$i] breaksw case -c: @ i++ set c = "$argv[$i]" breaksw case -c2: @ i++ set cc = "$argv[$i]" breaksw case -c3: @ i++ set ccc = "$argv[$i]" breaksw case -cy: @ i++ set cy = "$argv[$i]" breaksw case -cy2: @ i++ set cyy = "$argv[$i]" breaksw case -cy3: @ i++ set cyyy = "$argv[$i]" breaksw case -cs: @ i++ set cs = "$argv[$i]" breaksw case -g: @ i++ @ g = $argv[$i] breaksw case -s: @ i++ set s = $argv[$i] breaksw case -e: @ i++ set e = $argv[$i] breaksw case -l: @ i++ @ l = $argv[$i] breaksw case -n: @ i++ @ n = $argv[$i] breaksw case -z: @ i++ set z = $argv[$i] breaksw case -help: set help = 1 case -h: set exit_status = 0 goto usage breaksw default: set file = "$argv[$i]" if ( ! -f "$file" ) then echo2 "${cmnd} : Cannot open file ${file}\!" set exit_status = 1 goto usage endif breaksw endsw end # when input stream is stdin if ("$file" == "") then rm -fr /tmp/sptk-grlogsp-$uid-$$ cat > /tmp/sptk-grlogsp-$uid-$$ set file=/tmp/sptk-grlogsp-$uid-$$ endif goto main usage: echo2 '' echo2 " $cmnd - draw a running log spectrum graph" echo2 '' echo2 ' usage:' echo2 ' grlogsp.sh [ options ] [ infile ] > stdout' echo2 ' options:' echo2 ' -F F : factor [1] ' echo2 ' -t : transpose x and y axes [FALSE]' echo2 ' -O O : origin of graph [6] ' echo2 ' (if O is more than 6, drawing area is over A4 range)' if ( $help ) then echo2 ' 1 ( 25, yo) +----------------------+' echo2 ' 2 ( 60, yo) | |' echo2 ' 3 ( 95, yo) | |' echo2 ' 4 (130, yo) | 1 2 3 4 5 6 7 8 9 10 |' echo2 ' 5 (165, yo) +----------------------+' echo2 ' 6 (200, yo) ' echo2 ' 7 (235, yo) ' echo2 ' 8 (270, yo) ' echo2 ' 9 (305, yo) ' echo2 ' 10 (340, yo) ' echo2 ' (yo+100,x) if -t is specified' endif echo2 ' -x x : x scale [1]' if ( $help ) then echo2 ' 1 (Normalized frequency <0, 0.5>)' echo2 ' 2 (Normalized frequency <0, pi/2, pi>)' echo2 ' 4 (Frequency <0, 1, 2, 3, 4 kHz>)' echo2 ' 5 (Frequency <0, 1, 2, 3, 4, 5 kHz>)' echo2 ' 8 (Frequency <0, 2, 4, 6, 8 kHz>)' echo2 ' 10 (Frequency <0, 2, 4, 6, 8, 10 kHz>)' echo2 ' 16 (Frequency <0, 4, 8, 12, 16 kHz>)' echo2 ' 22 (Frequency <0, 11, 22 kHz>)' echo2 ' 24 (Frequency <0, 6, 12, 18, 24 kHz>)' echo2 ' 48 (Frequency <0, 16, 32, 48 kHz>)' endif echo2 ' -y ymin : y minimum [-100]' echo2 ' -yy yy : y scale [100]' echo2 ' -yo yo : y offset [30]' echo2 ' -p p : pen no. [2]' echo2 ' -ln ln : line number [1]' echo2 ' -s s : start frame number [0]' echo2 ' -e e : end frame number [EOF]' echo2 ' -n n : number of frame [EOF]' echo2 ' -l l : frame length [256]' echo2 ' -c "c" : comment for the graph [""]' echo2 ' -c2 "c2" : comment for the graph [""]' echo2 ' -c3 "c3" : comment for the graph [""]' echo2 ' -h : print this message' echo2 ' -help : print help in detail' if ( $help ) then echo2 ' (level 2)' echo2 ' -W W : width of the graph <100mm> [0.25]' echo2 ' -H H : height of the graph <100mm> [1.5]' echo2 ' -z z : moving width [False]' echo2 ' (if -z option does not exist, z is the same as F)' echo2 ' -o xo yo : origin of the graph [30, 65]' echo2 ' (if -o option exists, -O is not effective)' echo2 ' -g g : type of the graph [0]' echo2 ' 0 (no frame)' echo2 ' 1 (half frame)' echo2 ' 2 (with frame)' echo2 ' -cy cy : first comment position [-8]' echo2 ' -cy2 cy2 : second comment position [-14]' echo2 ' -cy3 cy3 : third comment position [-20]' echo2 ' -cs cs : comment size [1]' echo2 ' -f f : additional data file for fig [NULL]' endif echo2 ' infile:' echo2 " log spectrum (float) [stdin]" echo2 ' stdout:' echo2 ' XY-plotter command' echo2 '' echo2 " SPTK: version $sptkver" echo2 " CVS Info: $cvsid" echo2 '' exit 0 main: if ($?on) then @ xo = $on_x[$on] endif set xo = `echo "$xo * $F" | bc -l` set yo = `echo "$yo * $F" | bc -l` set cs = `echo "$cs * $F" | bc -l` @ yy[1] = $ymin @ yy[2] = $yy[1] + $yscale * 10 set ww = $w if( $trans ) then set T = "-t" set xxo = $xo set xo = $yo set yo = $xxo set yo = `echo "$yo + 100" | bc -l` set w = $h set h = -$ww else set T = "" endif if ($?ccc) then if ($trans ) then set xoc = `echo "$xo + ($cyyy - 5) * $F" | bc -l` set yoc = $yo else set xoc = $xo set yoc = `echo "$yo + $cyyy * $F" | bc -l` endif fig $T -W $w -H $h -o $xoc $yoc -g 0 -F $F << EOF csize $cs xname "$ccc" EOF endif if ($?cc) then if ($trans ) then set xoc = `echo "$xo + ($cyy - 5) * $F" | bc -l` set yoc = $yo else set xoc = $xo set yoc = `echo "$yo + $cyy * $F" | bc -l` endif fig $T -W $w -H $h -o $xoc $yoc -g 0 -F $F << EOF csize $cs xname "$cc" EOF endif if ($?c) then if ($trans ) then set xoc = `echo "$xo + ($cy - 5) * $F" | bc -l` set yoc = $yo else set xoc = $xo set yoc = `echo "$yo + $cy * $F" | bc -l` endif fig $T -W $w -H $h -o $xoc $yoc -g 0 -F $F << EOF csize $cs xname "$c" EOF endif fig $T -W $w -H $h -o $xo $yo -g $g -F $F<< EOF x $xx[$x] xscale $xs[$x] xname "$xname[$x]" EOF if ($?f) then fig $f -W $w -H $h -o $xo $yo -g 0 -F $F endif @ lhi = $l / 2 + 1 @ s = $s * $lhi set z = `echo "$z * $F" | bc -l` if ($?n) then @ e = $s + $n * $lhi - 1 set ee = "-e $e" else if ($?e) then @ e = $e * $lhi - 1 if( $e < $s ) then echo2 "${cmnd} : Invalid start or end frame number!" exit 1 endif set ee = "-e $e" else set ee = "" endif if ($trans) set T = "-t -1" bcut +f -s $s $ee "$file" |\ fdrw $T -W $ww -o $xo $yo -g 0 -y $yy -n $lhi -p $p -m $ln -z $z -F $F rm -fr /tmp/sptk-grlogsp-$uid-$$ SPTK-3.9/script/gwave.in0000644001051300105040000002450312633453604012040 00000000000000#!@csh@ -f # ----------------------------------------------------------------- # # The Speech Signal Processing Toolkit (SPTK) # # developed by SPTK Working Group # # http://sp-tk.sourceforge.net/ # # ----------------------------------------------------------------- # # # # Copyright (c) 1984-2007 Tokyo Institute of Technology # # Interdisciplinary Graduate School of # # Science and Engineering # # # # 1996-2015 Nagoya Institute of Technology # # Department of Computer Science # # # # All rights reserved. # # # # Redistribution and use in source and binary forms, with or # # without modification, are permitted provided that the following # # conditions are met: # # # # - Redistributions of source code must retain the above copyright # # notice, this list of conditions and the following disclaimer. # # - Redistributions in binary form must reproduce the above # # copyright notice, this list of conditions and the following # # disclaimer in the documentation and/or other materials provided # # with the distribution. # # - Neither the name of the SPTK working group nor the names of its # # contributors may be used to endorse or promote products derived # # from this software without specific prior written permission. # # # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND # # CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, # # INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS # # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, # # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED # # TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON # # ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, # # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY # # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # # POSSIBILITY OF SUCH DAMAGE. # # ----------------------------------------------------------------- # ######################################################################### # # # Draw a Waveform # # # # 1997.1 K.Koishida # # 2010.6 T.Sawada # # # ######################################################################### onintr clean set path = ( @bindir@ $path ) set sptkver = '@package_version@' set cvsid = '$Id: gwave.in,v 1.24 2015/12/14 05:45:40 uratec Exp $' set cmnd = $0 set cmnd = $cmnd:t set file @ start = 0 @ term = -1 @ numscreen = 5 @ numdata = 2000 set ymax = 2000 set pen = 1 set F = 1 set type = f set flagy2 = 0 set flagfile = 0 set flagnumdata = 0 set flagy = 0 @ i = 0 while ($i < $#argv) @ i++ switch ("$argv[$i]") case -s: @ i++ set start = $argv[$i] breaksw case -e: @ i++ set term = $argv[$i] breaksw case -n: @ i++ @ numdata = $argv[$i] set flagnumdata = 1 breaksw case -i: @ i++ set numscreen = $argv[$i] breaksw case -y: @ i++ set ymax = $argv[$i] set flagy = 1 breaksw case -y2: @ i++ set ymin = $argv[$i] set flagy = 1 set flagy2 = 1 breaksw case -p: @ i++ set pen = $argv[$i] breaksw case -F: @ i++ set F = $argv[$i] breaksw case +c: set type = c breaksw case +s: set type = s breaksw case +i3: set type = i3 breaksw case +i: set type = i breaksw case +l: set type = l breaksw case +le: set type = le breaksw case +C: set type = C breaksw case +S: set type = S breaksw case +I: set type = I breaksw case +I3: set type = I3 breaksw case +L: set type = L breaksw case +LE: set type = LE breaksw case +f: set type = f breaksw case +d: set type = d breaksw case +de: set type = de breaksw case -h: set exit_status = 0 goto usage breaksw default: set file = "$argv[$i]" set flagfile = 1 if ( ! -f "$file" ) then echo2 "${cmnd} : Cannot open file ${file}\!" set exit_status = 1 goto usage endif breaksw endsw end # when input stream is stdin if ("$file" == "") then rm -fr /tmp/sptk-gwave-$uid-$$ cat > /tmp/sptk-gwave-$uid-$$ set file=/tmp/sptk-gwave-$uid-$$ endif goto main usage: echo2 '' echo2 " $cmnd - draw a waveform" echo2 '' echo2 ' usage:' echo2 " $cmnd [ options ] [ infile ] > stdout" echo2 ' options:' echo2 ' -F F : factor [1]' echo2 ' -s s : start point [0]' echo2 ' -e e : end point [EOF]' echo2 ' -n n : data number of one screen [N/A]' echo2 ' -i i : number of screen [5]' echo2 ' -y ymax : maximum amplitude [N/A]' echo2 ' -y2 ymin : minimum amplitude [-ymax]' echo2 ' -p p : pen number [1]' echo2 ' +type : input data type [f]' echo2 ' c (char) C (unsigned char) ' echo2 ' s (short) S (unsigned short)' echo2 ' i3 (int, 3byte) I3 (unsigned int, 3byte)' echo2 ' i (int) I (unsigned int)' echo2 ' l (long) L (unsigned long)' echo2 ' le (long long) LE (unsigned long) ' echo2 ' f (float) d (double)' echo2 ' de (long double)' echo2 ' -h : print this message' echo2 ' infile:' echo2 ' waveform [stdin]' echo2 ' stdout:' echo2 ' XY-plotter command' echo2 ' notice:' echo2 ' If options of amplitude are not used,' echo2 ' value of amplitude is automatically determined.' echo2 ' If -n option is not used,' echo2 ' entire waveform is displayed.' echo2 '' echo2 " SPTK: version $sptkver" echo2 " CVS Info: $cvsid" echo2 '' exit $exit_status main: if ( ! $flagnumdata ) then if ( $term > 0 ) then @ wc = $term else set wc = ` x2x +${type}a $file | wc -l ` endif @ wc = $wc - $start @ rest = $wc % $numscreen @ wc /= $numscreen if ($rest) @ wc++ @ numdata = $wc endif if ( ! $flagy ) then set val = (`x2x +${type}f < $file | sopr -ABS | minmax -o 2 | x2x +fa`) set ymax = $val set ymin = -$val endif if ( ! $flagy2 ) then set ymin = -$ymax endif set width = 1.7 set height = 0.4 @ n1 = $numdata - 1 @ end = $start + $n1 set ox = `echo "20 * $F" | bc -l` set oy = `echo "225 * $F" | bc -l` @ xs = $start @ xe = $xs + $n1 if ( $numdata < 10 ) then @ dx = 1 else @ dx = $numdata / 10 endif while ( $numscreen > 0 ) @ i = 0 set xscale = () set x = 0 while (1) @ x = $dx * $i + $xs if ( $x <= $xe - $dx ) then set xscale = ($xscale $x) @ i++ else set xscale = ($xscale $x) break endif end fig -o $ox $oy -W $width -H $height -p $pen -F $F<< EOF x $xs $xe y $ymin $ymax xscale $xscale yscale $ymin $ymax EOF x2x +${type}f $file |\ bcut +f -s $start -e $end |\ fdrw -o $ox $oy -W $width -H $height -p $pen -g 0 \ -y $ymin $ymax -n $numdata -F $F @ numscreen-- set oy = `echo "$oy - 50 * $F" | bc -l` @ xs += $numdata @ xe += $numdata @ start += $numdata @ end += $numdata end clean: rm -fr /tmp/sptk-gwave-$uid-$$ SPTK-3.9/script/mgc2mgclsp.in0000644001051300105040000001550312633453604012765 00000000000000#!@csh@ -f # ----------------------------------------------------------------- # # The Speech Signal Processing Toolkit (SPTK) # # developed by SPTK Working Group # # http://sp-tk.sourceforge.net/ # # ----------------------------------------------------------------- # # # # Copyright (c) 1984-2007 Tokyo Institute of Technology # # Interdisciplinary Graduate School of # # Science and Engineering # # # # 1996-2015 Nagoya Institute of Technology # # Department of Computer Science # # # # All rights reserved. # # # # Redistribution and use in source and binary forms, with or # # without modification, are permitted provided that the following # # conditions are met: # # # # - Redistributions of source code must retain the above copyright # # notice, this list of conditions and the following disclaimer. # # - Redistributions in binary form must reproduce the above # # copyright notice, this list of conditions and the following # # disclaimer in the documentation and/or other materials provided # # with the distribution. # # - Neither the name of the SPTK working group nor the names of its # # contributors may be used to endorse or promote products derived # # from this software without specific prior written permission. # # # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND # # CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, # # INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS # # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, # # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED # # TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON # # ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, # # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY # # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # # POSSIBILITY OF SUCH DAMAGE. # # ----------------------------------------------------------------- # ######################################################################### # # # Convert MGC to MGC-LSP # # # # 2011.11 T.Sawada # # # ######################################################################### set path = ( @bindir@ $path ) set sptkver = '@package_version@' set cvsid = '$Id: mgc2mgclsp.in,v 1.12 2015/12/14 05:45:40 uratec Exp $' set cmnd = $0 set cmnd = $cmnd:t set a = 0.35 set d = 1E-06 set g = -1 set k = " " set m = 25 set n = 128 set lg = " " set o = 0 set p = 4 set s = 10 set file @ i = 0 while ($i < $#argv) @ i++ switch ("$argv[$i]") case -a: @ i++ set a = $argv[$i] breaksw case -c: @ i++ set c = $argv[$i] breaksw case -d: @ i++ set d = $argv[$i] breaksw case -g: @ i++ set g = $argv[$i] breaksw case -k: set k = "-k" breaksw case -m: @ i++ set m = $argv[$i] breaksw case -n: @ i++ set n = $argv[$i] breaksw case -l: case -L: set lg = "-L" breaksw case -o: @ i++ set o = $argv[$i] breaksw case -p: @ i++ set p = $argv[$i] breaksw case -s: @ i++ set s = $argv[$i] breaksw case -h: set exit_status = 0 goto usage breaksw default: set file = "$argv[$i]" if ( ! -f "$file" ) then echo2 "${cmnd} : Cannot open file ${file}\!" set exit_status = 1 goto usage endif breaksw endsw end # when input stream is stdin if ("$file" == "") then rm -fr /tmp/sptk-mgc2mgclsp-$uid-$$ cat > /tmp/sptk-mgc2mgclsp-$uid-$$ set file=/tmp/sptk-mgc2mgclsp-$uid-$$ endif goto main usage: echo2 '' echo2 " $cmnd - mgc to mgc-lsp" echo2 '' echo2 ' usage:' echo2 " $cmnd [ options ] [ infile ] > stdout" echo2 ' options:' echo2 ' -m m : order of mel-generalized cepstrum [25]' echo2 ' -a a : alpha of mel-generalized cepstrum [0.35]' echo2 ' -g g : gamma of mel-generalized cepstrum [-1]' echo2 ' -c c : gamma of mel-generalized cepstrum = -1 / (int) c (input) ' echo2 ' -o o : output format [0]' echo2 ' 0 (normalized frequency [0...pi])' echo2 ' 1 (normalized frequency [0...0.5])' echo2 ' 2 (frequency [kHz])' echo2 ' 3 (frequency [Hz])' echo2 ' -s s : sampling frequency [10kHz]' echo2 ' -k : output gain [TRUE]' echo2 ' -L : output log gain rater than linear gain [FALSE]' echo2 ' (level 2)' echo2 ' -n n : split number of unit circle [128]' echo2 ' -p p : maximum number of interpolation [4]' echo2 ' -d d : end condition of interpolation [1e-06]' echo2 ' -h : print this message' echo2 ' infile(s):' echo2 ' mel-grneralized cepstrum (float) [stdin]' echo2 ' output:' echo2 " mgc-lsp (float)" echo2 '' echo2 " SPTK: version $sptkver" echo2 " CVS Info: $cvsid" echo2 '' exit $exit_status main: if ($?c) then mgc2mgc -m $m -M $m -a $a -A $a -c $c -C $c -N -U "$file" |\ lpc2lsp -m $m -s $s -o $o $k $lg -n $n -p $p -d $d else mgc2mgc -m $m -M $m -a $a -A $a -g $g -G $g -N -U "$file" |\ lpc2lsp -m $m -s $s -o $o $k $lg -n $n -p $p -d $d endif rm -fr /tmp/sptk-mgc2mgclsp-$uid-$$ SPTK-3.9/script/mgclsp2mgc.in0000644001051300105040000001445312633453604012770 00000000000000#!@csh@ -f # ----------------------------------------------------------------- # # The Speech Signal Processing Toolkit (SPTK) # # developed by SPTK Working Group # # http://sp-tk.sourceforge.net/ # # ----------------------------------------------------------------- # # # # Copyright (c) 1984-2007 Tokyo Institute of Technology # # Interdisciplinary Graduate School of # # Science and Engineering # # # # 1996-2015 Nagoya Institute of Technology # # Department of Computer Science # # # # All rights reserved. # # # # Redistribution and use in source and binary forms, with or # # without modification, are permitted provided that the following # # conditions are met: # # # # - Redistributions of source code must retain the above copyright # # notice, this list of conditions and the following disclaimer. # # - Redistributions in binary form must reproduce the above # # copyright notice, this list of conditions and the following # # disclaimer in the documentation and/or other materials provided # # with the distribution. # # - Neither the name of the SPTK working group nor the names of its # # contributors may be used to endorse or promote products derived # # from this software without specific prior written permission. # # # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND # # CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, # # INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS # # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, # # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED # # TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON # # ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, # # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY # # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # # POSSIBILITY OF SUCH DAMAGE. # # ----------------------------------------------------------------- # ######################################################################### # # # Convert MGC to MGC-LSP # # # # 2011.11 T.Sawada # # # ######################################################################### set path = ( @bindir@ $path ) set sptkver = '@package_version@' set cvsid = '$Id: mgclsp2mgc.in,v 1.11 2015/12/14 05:45:40 uratec Exp $' set cmnd = $0 set cmnd = $cmnd:t set a = 0.35 set g = -1 set m = 25 set lg = " " set in = 0 set s = 10 set file @ i = 0 while ($i < $#argv) @ i++ switch ("$argv[$i]") case -a: @ i++ set a = $argv[$i] breaksw case -c: @ i++ set c = $argv[$i] breaksw case -g: @ i++ set g = $argv[$i] breaksw case -m: @ i++ set m = $argv[$i] breaksw case -l: case -L: set lg = "-L" breaksw case -i: case -q: @ i++ set in = $argv[$i] breaksw case -s: @ i++ set s = $argv[$i] breaksw case -h: set exit_status = 0 goto usage breaksw default: set file = "$argv[$i]" if ( ! -f "$file" ) then echo2 "${cmnd} : Cannot open file ${file}\!" set exit_status = 1 goto usage endif breaksw endsw end # when input stream is stdin if ("$file" == "") then rm -fr /tmp/sptk-mgclsp2mgc-$uid-$$ cat > /tmp/sptk-mgclsp2mgc-$uid-$$ set file=/tmp/sptk-mgclsp2mgc-$uid-$$ endif goto main usage: echo2 '' echo2 " $cmnd - mgc-lsp to mgc" echo2 '' echo2 ' usage:' echo2 " $cmnd [ options ] [ infile ] > stdout" echo2 ' options:' echo2 ' -m m : order of mel-generalized cepstrum [25]' echo2 ' -a a : alpha of mel-generalized cepstrum [0.35]' echo2 ' -g g : gamma of mel-generalized cepstrum [-1]' echo2 ' -c c : gamma of mel-generalized cepstrum = -1 / (int) c (input) ' echo2 ' -q q : input format [0]' echo2 ' 0 (normalized frequency [0...pi])' echo2 ' 1 (normalized frequency [0...0.5])' echo2 ' 2 (frequency [kHz])' echo2 ' 3 (frequency [Hz])' echo2 ' -s s : sampling frequency [10kHz]' echo2 ' -L : regard output aslog gain rater than linear gain [FALSE]' echo2 ' -h : print this message' echo2 ' infile(s):' echo2 " mgc-lsp (float) [stdin]" echo2 ' output:' echo2 ' mel-grneralized cepstrum (float)' echo2 '' echo2 " SPTK: version $sptkver" echo2 " CVS Info: $cvsid" echo2 '' exit $exit_status main: if ($?c) then lsp2lpc -m $m -s $s -i $in $lg "$file" |\ mgc2mgc -m $m -M $m -a $a -A $a -c $c -C $c -n -u else lsp2lpc -m $m -s $s -i $in $lg "$file" |\ mgc2mgc -m $m -M $m -a $a -A $a -g $g -G $g -n -u endif rm -fr /tmp/sptk-mgclsp2mgc-$uid-$$ SPTK-3.9/script/raw2wav.in0000755001051300105040000002745612633453604012335 00000000000000#!@csh@ -f # ----------------------------------------------------------------- # # The Speech Signal Processing Toolkit (SPTK) # # developed by SPTK Working Group # # http://sp-tk.sourceforge.net/ # # ----------------------------------------------------------------- # # # # Copyright (c) 1984-2007 Tokyo Institute of Technology # # Interdisciplinary Graduate School of # # Science and Engineering # # # # 1996-2015 Nagoya Institute of Technology # # Department of Computer Science # # # # All rights reserved. # # # # Redistribution and use in source and binary forms, with or # # without modification, are permitted provided that the following # # conditions are met: # # # # - Redistributions of source code must retain the above copyright # # notice, this list of conditions and the following disclaimer. # # - Redistributions in binary form must reproduce the above # # copyright notice, this list of conditions and the following # # disclaimer in the documentation and/or other materials provided # # with the distribution. # # - Neither the name of the SPTK working group nor the names of its # # contributors may be used to endorse or promote products derived # # from this software without specific prior written permission. # # # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND # # CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, # # INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS # # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, # # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED # # TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON # # ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, # # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY # # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # # POSSIBILITY OF SUCH DAMAGE. # # ----------------------------------------------------------------- # # # # Jan. 2005 K. Tokuda # # Aug. 2009 A. Saito # onintr clean set path = ( @bindir@ $path ) set sptkver = '@package_version@' set cvsid = '$Id: raw2wav.in,v 1.19 2015/12/14 05:45:40 uratec Exp $' set cmnd = $0 set cmnd = $cmnd:t set file @ flagfile = 0 set directory @ flagdirectory = 0 @ swab = 0 @ normalization = 0 @ normalization_all = 0 @ frequency = 16 set type1 = s set type2 = $type1 set input = 0 set bit = 16 set _argv set white set whitespace = 0 set index @ i = 0 while ($i < $#argv) @ i++ set whitespace = 0 if ( "$argv[$i]" == '-n') then set _argv = '-n' else set _argv = `echo $argv[$i] | sed -e 's/ /_/g'` if ( "$_argv" != "$argv[$i]" ) then @ whitespace = 1 endif endif switch ($_argv) case -swab: set swab = 1 breaksw case -s: @ i++ set frequency = $argv[$i] set cond = `echo "$frequency > 192" | bc` if ( $cond == 1 ) then echo2 "$cmnd : sampling frequency exceeds 192 kHz!" endif set cond = `echo "$frequency > 2147483647" | bc` if ( $cond == 1 ) then echo2 "$cmnd : sampling frequency is too large!" exit 1 endif breaksw case +c: if ($input) then set type2 = c set bit = 8 else set type1 = c set input = 1 endif breaksw case +s: if ($input) then set type2 = s set bit = 16 else set type1 = s set input = 1 endif breaksw case +i3: if ($input) then set type2 = i3 set bit = 24 else set type1 = i3 set input = 1 endif breaksw case +i: if ($input) then set type2 = i set bit = 32 else set type1 = i set input = 1 endif breaksw case +l: if ($input) then set type2 = l set bit = 32 else set type1 = l set input = 1 endif breaksw case +le: if ($input) then set type2 = le set bit = 64 else set type1 = le set input = 1 endif breaksw case +C: if ($input) then set type2 = C set bit = 8 else set type1 = C set input = 1 endif breaksw case +S: if ($input) then set type2 = S set bit = 16 else set type1 = S set input = 1 endif breaksw case +I3 if ($input) then set type2 = I3 set bit = 24 else set type1 = I3 set input = 1 endif breaksw case +I: if ($input) then set type2 = I set bit = 32 else set type1 = I set input = 1 endif breaksw case +L: if ($input) then set type2 = L set bit = 32 else set type1 = L set input = 1 endif breaksw case +LE: if ($input) then set type2 = LE set bit = 64 else set type1 = LE set input = 1 endif breaksw case +f: if ($input) then set type2 = f set bit = 32 else set type1 = f set input = 1 endif breaksw case +d: if ($input) then set type2 = d set bit = 64 else set type1 = d set input = 1 endif breaksw case +de: if ($input) then set type2 = de set bit = 96 else set type1 = de set input = 1 endif breaksw case -d: @ i++ set directory = $argv[$i] set flagdirectory = 1 if ( ! -d $argv[$i] ) then echo2 "${cmnd}: Can't find directory "'"'"$directory"'"'" \!" set exit_status = 1 goto usage endif breaksw case -n: @ normalization = 1 breaksw case -N: @ normalization = 1 @ normalization_all = 1 breaksw case -h: set exit_status = 0 goto usage breaksw default: set file = ( $file $_argv ) set white = ( $white $whitespace ) set index = ( $index $i ) set flagfile = 1 if ( $whitespace == 1 ) then if ( ! -f "$argv[$i]" ) then echo2 "${cmnd}: Can't open file "'"'"$argv[$i]"'"'" \!" set exit_status = 1 goto usage endif endif breaksw endsw end goto main usage: echo2 '' echo2 " $cmnd - raw to wav (RIFF)" echo2 '' echo2 ' usage:' echo2 " $cmnd [ options ] [ infile(s) ]" echo2 ' options:' echo2 ' -swab : change endian [FALSE]' echo2 ' -s s : sampling frequency (kHz) [16.0]' echo2 ' -d d : destination directory [N/A]' echo2 ' -n : normalization ' echo2 ' with the maximum value' echo2 ' if max >= 32767 [FALSE]' echo2 ' -N : normalization ' echo2 ' with the maximum value [FALSE]' echo2 ' +type1 : input data type [s]' echo2 ' +type2 : output data type [type1]' echo2 ' c (char) C (unsigned char) ' echo2 ' s (short) S (unsigned short)' echo2 ' i3 (int, 3byte) I3 (unsigned int, 3byte)' echo2 ' i (int) I (unsigned int)' echo2 ' l (long) L (unsigned long)' echo2 ' le (long long) LE (unsigned long long)' echo2 ' f (float) d (double)' echo2 ' de (long double)' echo2 ' -h : print this message' echo2 ' infile(s):' echo2 ' waveform [N/A]' echo2 ' output:' echo2 " $cmnd attaches RIFF header(s) to input raw file(s)." echo2 ' ' echo2 ' The outfile has an extention ".wav", e.g.,' echo2 ' sample.m15 ---> sample.m15.wav' echo2 ' ' echo2 ' If the infile has an extention ".raw",' echo2 ' the extention is removed, e.g.,' echo2 ' sample.m15.raw ---> sample.m15.wav' echo2 ' ' echo2 ' The outfile is stored in the same directory' echo2 ' as the infile.' echo2 ' However, once a destination directory is specified,' echo2 ' all wav files are stored in that directory.' echo2 '' echo2 " SPTK: version $sptkver" echo2 " CVS Info: $cvsid" echo2 '' exit $exit_status main: @ i = 1 while ( $i <= $#file ) set f = $file[$i] if ( $white[$i] ) then /bin/ln -f -s "$argv[$index[$i]]" $f endif if ( $normalization ) then if ( $swab ) then swab +$type1 < $f |\ x2x +{$type1}f > /tmp/sptk-raw2wav-$uid-$$.tmp else x2x +{$type1}f < $f > /tmp/sptk-raw2wav-$uid-$$.tmp endif set max = `minmax < /tmp/sptk-raw2wav-$uid-$$.tmp | sopr -ABS | minmax | bcut -s 1 | x2x +fa %.100f` if ( $normalization_all || `echo "$max < 0" | bc -l` ) then sopr -m 32767 -d $max < /tmp/sptk-raw2wav-$uid-$$.tmp |\ x2x +f{$type2} > /tmp/sptk-raw2wav-$uid-$$.raw else x2x +f{$type2} < /tmp/sptk-raw2wav-$uid-$$.tmp > /tmp/sptk-raw2wav-$uid-$$.raw endif else if ( $swab ) then swab +$type1 < $f |\ x2x +{$type1}{$type2} > /tmp/sptk-raw2wav-$uid-$$.raw else x2x +{$type1}{$type2} < $f > /tmp/sptk-raw2wav-$uid-$$.raw endif endif if ( $f:e == "raw" ) then if ( $flagdirectory ) then set outfile = $directory/"$argv[$index[$i]]:t:r".wav else set outfile = "$argv[$index[$i]]:r".wav endif else if ( $flagdirectory ) then set outfile = $directory/"$argv[$index[$i]]:t".wav else set outfile = "$argv[$index[$i]]".wav endif endif set frequency = `echo "$frequency * 1000" | bc` rawtowav $frequency $bit /tmp/sptk-raw2wav-$uid-$$.raw /tmp/raw2wav /bin/mv /tmp/raw2wav "$outfile" if ( $white[$i] ) then /bin/rm -f $f endif @ i++ rm -fr /tmp/sptk-raw2wav-$uid-$$.raw end clean: rm -fr /tmp/sptk-raw2wav-$uid-$$.raw /tmp/sptk-raw2wav-$uid-$$.tmp SPTK-3.9/script/wav2raw.in0000755001051300105040000004372712633453604012334 00000000000000#!@csh@ -f # ----------------------------------------------------------------- # # The Speech Signal Processing Toolkit (SPTK) # # developed by SPTK Working Group # # http://sp-tk.sourceforge.net/ # # ----------------------------------------------------------------- # # # # Copyright (c) 1984-2007 Tokyo Institute of Technology # # Interdisciplinary Graduate School of # # Science and Engineering # # # # 1996-2015 Nagoya Institute of Technology # # Department of Computer Science # # # # All rights reserved. # # # # Redistribution and use in source and binary forms, with or # # without modification, are permitted provided that the following # # conditions are met: # # # # - Redistributions of source code must retain the above copyright # # notice, this list of conditions and the following disclaimer. # # - Redistributions in binary form must reproduce the above # # copyright notice, this list of conditions and the following # # disclaimer in the documentation and/or other materials provided # # with the distribution. # # - Neither the name of the SPTK working group nor the names of its # # contributors may be used to endorse or promote products derived # # from this software without specific prior written permission. # # # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND # # CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, # # INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS # # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, # # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED # # TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON # # ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, # # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY # # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # # POSSIBILITY OF SUCH DAMAGE. # # ----------------------------------------------------------------- # # # # Mar. 2010 A. Tamamori # onintr clean set path = ( @bindir@ $path ) set sptkver = '@package_version@' set cvsid = '$Id: wav2raw.in,v 1.23 2015/12/14 05:45:40 uratec Exp $' set cmnd = $0 set cmnd = $cmnd:t set file set flagfile = 0 set directory set flagdirectory = 0 set swab = 0 set normalization = 0 set normalization_all = 0 set OutputType = s set OutMaxVal = 32767 set data_position set read_fmt = 0 set enter_datachunk = 0 set read_data = 0 set left = 0 set right = 0 set decimate_start = 0 set Channels = 1 set _argv set white set whitespace = 0 set index @ i = 0 while ($i < $#argv) @ i++ set whitespace = 0 set _argv = `echo $argv[$i] | sed -e 's/ /_/g'` if ( "$_argv" != "$argv[$i]" ) then @ whitespace = 1 endif switch ($_argv) case -swab: set swab = 1 breaksw case +c: set OutputType = c set OutMaxVal = 127 breaksw case +s: set OutputType = s set OutMaxVal = 32767 breaksw case +i3: set OutputType = i3 set OutMaxVal = 8388067 breaksw case +i: set OutputType = i set OutMaxVal = 2147483647 breaksw case +l: set OutputType = l set OutMaxVal = 2147483647 breaksw case +C: set OutputType = C set OutMaxVal = 255 breaksw case +S: set OutputType = S set OutMaxVal = 65535 breaksw case +I3: set OutputType = I3 set OutMaxVal = 16776135 breaksw case +I: set OutputType = I set OutMaxVal = 4294967296 breaksw case +L: set OutputType = L set OutMaxVal = 4294967296 breaksw case +f: set OutputType = f set OutMaxVal = 1 breaksw case +d: set OutputType = d set OutMaxVal = 1 breaksw case +a: set OutputType = a breaksw case -d: @ i++ set directory = $argv[$i] set flagdirectory = 1 if ( ! -d $argv[$i] ) then echo2 "${cmnd}: Can't find directory "'"'"$directory"'"'" \!" set exit_status = 1 goto usage endif breaksw case -n: set normalization = 1 breaksw case -N: set normalization = 1 set normalization_all = 1 breaksw case -L: if ( $right == 1 ) then echo2 "${cmnd}: Can't convert left and right sounds at the same time\!" set exit_status = 1 goto usage endif set left = 1 set decimate_start = 0 breaksw case -R: if ( $left == 1 ) then echo2 "${cmnd}: Can't convert left and right sounds at the same time\!" set exit_status = 1 goto usage endif set right = 1 set decimate_start = 1 breaksw case -h: set exit_status = 0 goto usage breaksw default: set file = ( $file $_argv ) set white = ( $white $whitespace ) set index = ( $index $i ) set flagfile = 1 if ( $whitespace == 1 ) then if ( ! -f "$argv[$i]" ) then echo2 "${cmnd}: Can't open file "'"'"$argv[$i]"'"'" \!" set exit_status = 1 goto usage endif endif breaksw endsw end goto main usage: echo2 '' echo2 " $cmnd - wav to raw " echo2 '' echo2 ' usage:' echo2 " $cmnd [ options ] [ infile(s) ]" echo2 ' options:' echo2 ' -swab : change endian [FALSE]' echo2 ' -d d : destination directory [N/A]' echo2 ' -n : normalization with the maximum value' echo2 ' according to bit/sample of the wav file' echo2 ' if max >= 255 (8bit), 32767 (16bit),' echo2 ' 8388067 (24bit), 2147483647 (32bit).' echo2 ' -N : normalization with the maximum value [FALSE]' echo2 ' -L : convert left sound from stereo wav file [FALSE]' echo2 ' -R : convert right sound from stereo wav file [FALSE]' echo2 ' +type : output data type [s]' echo2 ' c (char) C (unsigned char) ' echo2 ' s (short) S (unsigned short)' echo2 ' i3 (int, 3byte) I3 (unsigned int, 3byte)' echo2 ' i (int) I (unsigned int)' echo2 ' l (long) L (unsigned long)' echo2 ' f (float) d (double)' echo2 ' a (ascii)' echo2 ' -h : print this message' echo2 ' infile(s):' echo2 ' wavfile [N/A]' echo2 ' output:' echo2 " $cmnd removes RIFF header(s) from input wav file(s)." echo2 ' ' echo2 ' The outfile has an extention ".raw", e.g.,' echo2 ' sample.m15 ---> sample.m15.raw' echo2 ' ' echo2 ' If the infile has an extention ".wav",' echo2 ' the extention is converted into ".raw", e.g.,' echo2 ' sample.m15.wav ---> sample.m15.raw' echo2 ' ' echo2 ' The outfile is stored in the same directory' echo2 ' as the infile.' echo2 ' However, once a destination directory is specified,' echo2 ' all raw files are stored in that directory.' echo2 '' echo2 " SPTK: version $sptkver" echo2 " CVS Info: $cvsid" echo2 '' exit $exit_status main: @ j = 1 while ( $j <= $#file ) set f = $file[$j] if ( $white[$j] ) then /bin/ln -f -s "$argv[$index[$j]]" $f endif set tmp = `bcut +c -s 4 -e 7 $f | x2x +Ia` @ FileSize = $tmp + 8 @ Current = 12 @ Rest = $FileSize while( $Rest > 0 ) #Read the chunk ID (4byte) set i = 0; set tmp = $Current; set ChunkID while( $i < 4 ) set tmp2 = `bcut +c -s $tmp -e $tmp $f | x2x +Ca` set ChunkID = ${ChunkID}`printf "%X" $tmp2` @ i++; @ tmp++ end @ Current = $Current + 4 #Read the chunk size (4byte) @ tmp = $Current + 3 set ChunkSize = `bcut +c -s $Current -e $tmp $f | x2x +Ia` @ Current = $Current + 4 switch( $ChunkID ) case 666D7420: #The chunk ID is "fmt " (ASCII code, hexadecimal number) set fmt_start = $Current @ tmp = $Current + 1 set FormatID = `bcut +c -s $Current -e $tmp $f | x2x +Sa` @ Current = $Current + 2 #Read the channels (2byte) @ tmp = $Current + 1 set Channels = `bcut +c -s $Current -e $tmp $f | x2x +Sa` @ Current = $Current + 12 @ tmp = $Current + 1 set BitPerSample = `bcut +c -s $Current -e $tmp $f | x2x +Sa` switch( $BitPerSample ) case 8: set InputType = c breaksw case 16: set InputType = s breaksw case 24: set InputType = i3 breaksw case 32: if ( $FormatID == 1 ) then # PCM set InputType = i else if ( $FormatID == 3 ) then # IEEE float set InputType = f else echo2 "Format id $FormatID is not acceptable!" exit endif breaksw endsw @ Current = $fmt_start + $ChunkSize set read_fmt = 1 # enable to read "data" chunk if ( $enter_datachunk == 0) then breaksw else # if "data" chunk has been read @ Current = $data_position # immediately read "data" chunk. no need to use 'breaksw'. endif case 64617461: #The chunk ID is "data" (ASCII code, hexadecimal number) if ( $read_fmt == 0 ) then set enter_datachunk = 1 set data_position = $Current breaksw endif @ tmp = $Current + $ChunkSize if ( $normalization ) then if ( $FormatID == 3) then if ( $swab ) then if ( $Channels == 2 && ( $left == 1 || $right == 1 ) ) then bcut +c -s $Current -e $tmp $f | swab | decimate -p 2 -s $decimate_start |\ sopr -m ${OutMaxVal} > /tmp/sptk-wav2raw-$uid-$$.tmp else bcut +c -s $Current -e $tmp $f | swab |\ sopr -m ${OutMaxVal} > /tmp/sptk-wav2raw-$uid-$$.tmp endif else if ( $Channels == 2 && ( $left == 1 || $right == 1 ) ) then bcut +c -s $Current -e $tmp $f | decimate -p 2 -s $decimate_start |\ sopr -m ${OutMaxVal} > /tmp/sptk-wav2raw-$uid-$$.tmp else bcut +c -s $Current -e $tmp $f |\ sopr -m ${OutMaxVal} > /tmp/sptk-wav2raw-$uid-$$.tmp endif endif set max = `minmax < /tmp/sptk-wav2raw-$uid-$$.tmp | sopr -ABS |\ minmax | bcut -s 1 | x2x +fa %.100f` if ( $normalization_all || `echo "$max > ${OutMaxVal}" | bc -l` ) then sopr -m ${OutMaxVal} -d $max < /tmp/sptk-wav2raw-$uid-$$.tmp |\ x2x -r +f${OutputType} > /tmp/sptk-wav2raw-$uid-$$.raw else x2x -r +f${OutputType} < /tmp/sptk-wav2raw-$uid-$$.tmp \ > /tmp/sptk-wav2raw-$uid-$$.raw endif else #FormatID is not 3 if ( $swab ) then if ( $Channels == 2 && ( $left == 1 || $right == 1 ) ) then bcut +c -s $Current -e $tmp $f | swab +$InputType |\ x2x +${InputType}f | decimate -p 2 -s $decimate_start > /tmp/sptk-wav2raw-$uid-$$.tmp else bcut +c -s $Current -e $tmp $f | swab +$InputType |\ x2x +${InputType}f > /tmp/sptk-wav2raw-$uid-$$.tmp endif else if ( $Channels == 2 && ( $left == 1 || $right == 1 ) ) then bcut +c -s $Current -e $tmp $f |\ x2x +${InputType}f | decimate -p 2 -s $decimate_start > /tmp/sptk-wav2raw-$uid-$$.tmp else bcut +c -s $Current -e $tmp $f |\ x2x +${InputType}f > /tmp/sptk-wav2raw-$uid-$$.tmp endif endif set max = `minmax < /tmp/sptk-wav2raw-$uid-$$.tmp | sopr -ABS |\ minmax | bcut -s 1 | x2x +fa %.100f` if ( $normalization_all || `echo "$max > ${OutMaxVal}" | bc -l` ) then sopr -m ${OutMaxVal} -d $max < /tmp/sptk-wav2raw-$uid-$$.tmp |\ x2x -r +f${OutputType} > /tmp/sptk-wav2raw-$uid-$$.raw else x2x -r +f${OutputType} < /tmp/sptk-wav2raw-$uid-$$.tmp \ > /tmp/sptk-wav2raw-$uid-$$.raw endif endif rm -fr /tmp/sptk-wav2raw-$uid-$$.tmp else #No normalization if ( $FormatID == 3) then if ( $swab ) then if ( $Channels == 2 && ( $left == 1 || $right == 1 ) ) then bcut +c -s $Current -e $tmp $f | swab | decimate -p 2 -s $decimate_start |\ sopr -m ${OutMaxVal} |\ x2x -r +f${OutputType} > /tmp/sptk-wav2raw-$uid-$$.raw else bcut +c -s $Current -e $tmp $f | swab |\ sopr -m ${OutMaxVal} |\ x2x -r +f${OutputType} > /tmp/sptk-wav2raw-$uid-$$.raw endif else if ( $Channels == 2 && ( $left == 1 || $right == 1 ) ) then bcut +c -s $Current -e $tmp $f | decimate -p 2 -s $decimate_start |\ sopr -m ${OutMaxVal} |\ x2x -r +f${OutputType} > /tmp/sptk-wav2raw-$uid-$$.raw else bcut +c -s $Current -e $tmp $f |\ sopr -m ${OutMaxVal} |\ x2x -r +f${OutputType} > /tmp/sptk-wav2raw-$uid-$$.raw endif endif else #FormatID is not 3 if ( $swab ) then if ( $Channels == 2 && ( $left == 1 || $right == 1 ) ) then bcut +c -s $Current -e $tmp $f | swab +$InputType | x2x +${InputType}f |\ decimate -p 2 -s $decimate_start | x2x -r +f${OutputType} > /tmp/sptk-wav2raw-$uid-$$.raw else bcut +c -s $Current -e $tmp $f | swab +$InputType |\ x2x -r +${InputType}${OutputType} > /tmp/sptk-wav2raw-$uid-$$.raw endif else if ( $Channels == 2 && ( $left == 1 || $right == 1 ) ) then bcut +c -s $Current -e $tmp $f | x2x +${InputType}f |\ decimate -p 2 -s $decimate_start | x2x -r +f${OutputType} > /tmp/sptk-wav2raw-$uid-$$.raw else bcut +c -s $Current -e $tmp $f |\ x2x -r +${InputType}${OutputType} > /tmp/sptk-wav2raw-$uid-$$.raw endif endif endif endif if ( $f:e == "wav" ) then if ( $flagdirectory ) then set outfile = $directory/"$argv[$index[$j]]:t:r".raw else set outfile = "$argv[$index[$j]]:r".raw endif else if ( $flagdirectory ) then set outfile = $directory/"$argv[$index[$j]]:t".raw else set outfile = "$argv[$index[$j]]".raw endif endif /bin/mv /tmp/sptk-wav2raw-$uid-$$.raw "$outfile" if ( $white[$j] ) then /bin/rm -f $f endif set read_data = 1 @ Current = $Current + $ChunkSize breaksw default: @ Current = $Current + $ChunkSize breaksw endsw # end of switch($ChunkID) if (($read_fmt == 1) && ($read_data == 1)) then break endif @ Rest = $FileSize - $Current end # end of while( $Rest > 0 ) @ j++ end # end of while ($j <= $#file) clean: rm -fr /tmp/sptk-wav2raw-$uid-$$.raw /tmp/sptk-wav2raw-$uid-$$.tmp