1# ==================================================================== 2# Copyright (c) 2004 Carnegie Mellon University. All rights reserved. 3# 4# Redistribution and use in source and binary forms, with or without 5# modification, are permitted provided that the following conditions 6# are met: 7# 8# 1. Redistributions of source code must retain the above copyright 9# notice, this list of conditions and the following disclaimer. 10# 11# 2. Redistributions in binary form must reproduce the above copyright 12# notice, this list of conditions and the following disclaimer in 13# the documentation and/or other materials provided with the 14# distribution. 15# 16# This work was supported in part by funding from the Defense Advanced 17# Research Projects Agency and the National Science Foundation of the 18# United States of America, and the CMU Sphinx Speech Consortium. 19# 20# THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY ``AS IS'' AND 21# ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 22# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 23# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY 24# NOR ITS EMPLOYEES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 26# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31# 32# ==================================================================== 33# 34# Sphinx III 35# 36# ==================================================================== 37 38INCLUDES = -I$(top_srcdir) \ 39 -I$(top_builddir)/include 40 41 42LDADD = $(top_builddir)/src/libs3decoder/libs3decoder.la \ 43 $(top_builddir)/src/libs3audio/libs3audio.la \ 44 $(top_builddir)/src/libutil/libs3util.la \ 45 -lm @ad_libs@ 46 47DATAPATH = /lab/speech/sphinx4/data/ti46/ti20/test/test/ 48TI46RAWPATH = $(DATAPATH)/raw16k 49TI46CEPPATH = $(DATAPATH)/cepstra 50TI46RESULTPATH = ${top_builddir}/src/tests/performance/ti46/ 51PROGRAMDIR = ${top_builddir}/src/programs 52BMBIN = ${top_builddir}/src/test/programs/batchmetrics 53LPBIN = $(PROGRAMDIR)/sphinx3_livepretend 54DECODEBIN = $(PROGRAMDIR)/sphinx3_decode 55DECANYBIN = $(PROGRAMDIR)/sphinx3_decode_anytopo 56# Add 57# "/afs/cs.cmu.edu/user/robust/archive/third_party_packages/NIST_scoring_tools/sctk-1.2c/linux/bin" 58# to your path if you have alinux machine 59ALIGNBIN = sclite -i wsj -o sum rsum -f 0 60 61ALLTARGET=ti46-lp ti46-quick-lp ti46-decode ti46-quick-decode 62 63#legacy targets, For ti46, batchmetric doesn't work at all. 64#ti46-bm ti46-quick-bm: 65# rm -f $@.results $@.ctl 66# cat ARGS ARGS.live > ARGS.$@ 67# $(BMBIN) $(subst -bm,,$@).batch $(TI46RAWPATH) ARGS.$@ > $@.results 2>&1 68 69#all : $(ALLTARGET) 70quick : ti46-quick-lp ti46-quick-decode ti46-quick-decany 71slow : ti46-lp ti46-decode ti46-decany 72 73CLEANFILES = *.ctl *.sent *.lex *.results *.match *.match.* ARGS.ti46-* 74 75#Targets which we are actively using. 76ti46-lp ti46-quick-lp : 77 -rm -f $@.results $@.match $@.match.* 78 awk '{print $$1}' $(subst -lp,,$@).batch | sed "s/\.wav\.raw//" > ./$@.ctl 79 cat ARGS ARGS.live > ARGS.$@ 80 echo "-hyp $@.match" >> ARGS.$@ 81 echo "-rawext .wav.raw" >> ARGS.$@ 82 $(LPBIN) ./$@.ctl $(TI46RAWPATH) ARGS.$@ > $@.results 2>&1 83 awk '{for(i=2;i<=NF;i++){printf("%s ",$$i)}; printf("(%s)\n",$$1)}' $(subst -lp,,$@).batch | sed "s/\.wav\.raw//" > $@.sent 84 $(ALIGNBIN) -r $@.sent -h $@.match 85 86ti46-decode ti46-quick-decode: 87 -rm -f $@.results $@.match $@.match.* 88 awk '{print $$1}' $(subst -decode,,$@).batch | sed "s/\.wav\.raw//" > ./$@.ctl 89 /bin/cp ARGS ARGS.$@ 90 echo "-ctl $@.ctl" >> ARGS.$@ 91 echo "-cepdir $(TI46CEPPATH)" >> ARGS.$@ 92 echo "-hyp $@.match" >> ARGS.$@ 93 $(DECODEBIN) ARGS.$@ > $@.results 2>&1 94 awk '{for(i=2;i<=NF;i++){printf("%s ",$$i)}; printf("(%s)\n",$$1)}' $(subst -decode,,$@).batch | sed "s/\.wav\.raw//" > $@.sent 95 $(ALIGNBIN) -r $@.sent -h $@.match 96 97ti46-decany ti46-quick-decany: 98 -rm -f $@.results $@.match $@.match.* 99 awk '{print $$1}' $(subst -decany,,$@).batch | sed "s/\.wav\.raw//" > ./$@.ctl 100 /bin/cp ARGS.decany ARGS.$@ 101 echo "-ctl $@.ctl" >> ARGS.$@ 102 echo "-cepdir $(TI46CEPPATH)" >> ARGS.$@ 103 echo "-hyp $@.match" >> ARGS.$@ 104 $(DECANYBIN) ARGS.$@ > $@.results 2>&1 105 awk '{for(i=2;i<=NF;i++){printf("%s ",$$i)}; printf("(%s)\n",$$1)}' $(subst -decany,,$@).batch | sed "s/\.wav\.raw//" > $@.sent 106 $(ALIGNBIN) -r $@.sent -h $@.match 107