Makefile
1.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
BEST_LINE=18
MODEL_PREFIX_URL=https://vystadial.ms.mff.cuni.cz/download/pykaldi/egs/vystadial/online_demo
DATA_PREFIX_URL=https://vystadial.ms.mff.cuni.cz/download/pykaldi/egs/vystadial/online_demo
# Czech language models
LANG=cs
HCLG=models/HCLG_tri2b_bmmi.fst
AM=models/tri2b_bmmi.mdl
MAT=models/tri2b_bmmi.mat # matrix trained in tri2b models
WST=models/words.txt
MFCC=models/mfcc.conf
SILENCE=models/silence.csl
$(MFCC):
wget $(MODEL_PREFIX_URL)/$@ -O $@
$(SILENCE):
wget $(MODEL_PREFIX_URL)/$@ -O $@
$(HCLG):
wget $(MODEL_PREFIX_URL)/$@ -O $@
$(AM):
wget $(MODEL_PREFIX_URL)/$@ -O $@
$(MAT):
wget $(MODEL_PREFIX_URL)/$@ -O $@
$(WST):
wget $(MODEL_PREFIX_URL)/$@ -O $@
data/vystadial-sample-$(LANG).tar.gz:
wget $(DATA_PREFIX_URL)/$@ -O $@
data/vystadial-sample-$(LANG)/README.rst: data/vystadial-sample-$(LANG).tar.gz
tar xf $< -C data
touch $@
data/vystadial-sample-$(LANG)/test/input.scp: data/vystadial-sample-$(LANG)/README.rst
for f in `dirname $@`/*.wav ; do echo "`basename $$f`" "`pwd`/$$f" ; done > $@
data/vystadial-sample-$(LANG)/test/input_best.scp: data/vystadial-sample-$(LANG)/test/input.scp
sed -n '$(BEST_LINE)p' < $< > $@
build_scp: data/vystadial-sample-$(LANG)/test/input_best.scp data/vystadial-sample-$(LANG)/test/input.scp
download_models: $(SILENCE) $(WST) $(HCLG) $(AM) $(MAT) $(MFCC)
pyonline-recogniser: build_scp download_models
bash run_pyonline-latgen-recogniser.sh
online-recogniser: build_scp download_models
bash run_online-latgen-recogniser.sh
gmm-latgen-faster: build_scp download_models
bash run_gmm-latgen-faster.sh
live: download_models
bash run_live-demo.sh
clean:
rm -rf *.pyc data/* models/* decode/*
.PHONY: live pyonline-recogniser online-recogniser gmm-latgen-faster clean