-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.in
126 lines (91 loc) · 3.78 KB
/
Makefile.in
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
#!/usr/bin/make
# Meta Information:
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_URL = @PACKAGE_URL@
INST=@INST@
LANG=ca
VOX=@VOX@
TYPE=@TYPE@
PROMPTS=@PROMPTS@
WAVDIR=@WAVDIR@
FESTIVALBIN=@FESTIVALBIN@
ESTDIR=@ESTDIR@
FESTVOXDIR=@FESTVOXDIR@
VOICENAME=$(INST)_$(LANG)_$(VOX)
FULLVOICENAME=$(VOICENAME)_$(TYPE)
# FIXME: One day these export will not be needed:
export ESTDIR
export FESTVOXDIR
CLEAN=
MKDIR_P = @MKDIR_P@
all: setup prompts labs utts pm mcep clunits
all-cross-dialect: setup prompts prompts-dialect labs pre-utts-dialect utts pm mcep clunits
FROM_FESTVOXGENERALBIN_TO_ETC = emu_lab.tpl emu_pm.tpl emu_f0.tpl emu_hier.tpl
FROM_FESTVOXGENERALBIN_TO_BIN = make_labs prompt_them make_lpc make_pm make_pm_wave make_pmlab_pm make_pm_pmlab make_pm_fix make_f0 get_lars get_wavs do_build find_powerfactors simple_powernormalize find_powercontours contour_powernormalize make_dist make_cmn traintest make_samples reduce_prompts synthfile
FROM_FESTVOXST_TO_BIN= sphinxtrain sphinx_lab
FROM_FESTVOXST_TO_FESTVOX= build_st.scm
FROM_FESTVOXUNITSEL_TO_BIN = make_mcep
COPYTOBIN = $(addprefix $(FESTVOXDIR)/src/general/,$(FROM_FESTVOXGENERALBIN_TO_BIN))
COPYTOBIN += $(addprefix $(FESTVOXDIR)/src/st/,$(FROM_FESTVOXST_TO_BIN))
COPYTOBIN += $(addprefix $(FESTVOXDIR)/src/unitsel/,$(FROM_FESTVOXUNITSEL_TO_BIN))
SAVEDATBIN = $(addprefix bin/,$(FROM_FESTVOXGENERALBIN_TO_BIN) $(FROM_FESTVOXST_TO_BIN) $(FROM_FESTVOXUNITSEL_TO_BIN))
SAVEDATETC = $(addprefix etc/,$(FROM_FESTVOXGENERALBIN_TO_ETC))
setup: festvox/$(FULLVOICENAME).scm etc/$(VOICENAME).data wav
$(MKDIR_P) "bin" "etc" "festvox"
cp -p $(COPYTOBIN) bin
cp -p $(addprefix $(FESTVOXDIR)/src/general/,$(FROM_FESTVOXGENERALBIN_TO_ETC)) etc
cp -p $(addprefix $(FESTVOXDIR)/src/st/,$(FROM_FESTVOXST_TO_FESTVOX)) festvox
CLEAN += $(SAVEDATBIN) $(SAVEDATETC) festvox/build_st.scm
wav:
cp -pr $(WAVDIR) "$@"
etc/$(VOICENAME).data:
cp -p $(PROMPTS) "$@"
CLEAN+=etc/$(VOICENAME).data
festvox/$(FULLVOICENAME).scm: festvox/CLUNITS_clunits.scm
cp -p "$<" "$@"
CLEAN+= festvox/$(FULLVOICENAME).scm
PROMPTDIRS="prompt-utt" "prompt-lab" "prompt-wav"
prompts:
$(MKDIR_P) $(PROMPTDIRS)
$(FESTIVALBIN) -b festvox/build_clunits.scm '(build_prompts "etc/'$(VOICENAME).data'")' || exit 1
CLEAN+= $(PROMPTDIRS)
PROMPTDIRSDIALECT="prompt-utt-dialect" "prompt-lab-dialect"
prompts-dialect:
$(MKDIR_P) $(PROMPTDIRSDIALECT)
$(FESTIVALBIN) -b festvox/build_clunits.scm '(build_prompts_no_wave_dialect "etc/'$(VOICENAME).data'")' || exit 1
CLEAN+= $(PROMPTDIRSDIALECT)
labs:
$(MKDIR_P) "prompt-cep" "cep" "lab"
bin/make_labs prompt-wav/*wav || exit 1
CLEAN += "cep" "lab" "prompt-cep"
#utts-dialect:
# $(MKDIR_P) "festival/utts"
# $(FESTIVALBIN) -b festvox/build_clunits.scm '(build_utts_dialect "etc/'$(VOICENAME).data'")' || exit 1
pre-utts-dialect:
mv "prompt-utt" "prompt-utt_orig" || exit 1
mv "prompt-utt-dialect" "prompt-utt" || exit 1
utts:
$(MKDIR_P) "festival/utts"
$(FESTIVALBIN) -b festvox/build_clunits.scm '(build_utts "etc/'$(VOICENAME).data'")' || exit 1
pm:
$(MKDIR_P) "pm"
cp "etc/$(VOICENAME).data" etc/txt.done.data
bin/make_pm_wave wav/*.wav
bin/make_pm_fix pm/*.pm
CLEAN += "etc/txt.done.data" "pm"
mcep:
bin/simple_powernormalize wav/*wav
bin/make_mcep wav/*wav
CLEAN += "wavn"
clunits:
$(MKDIR_P) "festival/feats" "festival/disttabs" "festival/trees"
$(FESTIVALBIN) --heap 2000000 -b festvox/build_clunits.scm '(build_clunits "etc/'$(VOICENAME).data'")' || exit 1
CLEAN += "festival/disttabs"
clean:
rm -rf $(CLEAN)
distclean: clean
rm -rf festvox/CLUNITS_clunits.scm festvox/build_clunits.scm etc/voice.defs Makefile wav mcep festival/clunits/$(VOICENAME).catalogue festival/feats festival/trees festival/utts