-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathMakefile
52 lines (36 loc) · 2.2 KB
/
Makefile
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
ESPEAK=espeak/src/espeak-ng
all: espeak-data/en_dict espeak-data/ko_dict
espeak-data/phontab: espeak-data/phsource/ph_korean espeak-data/phsource/phonemes.append espeak-data/voices/ko espeak-data/voices/mb/mb-hn1
rsync -aCv espeak/espeak-data/ ${HOME}/espeak-data/
rsync -aCv espeak/phsource/ ${HOME}/espeak-data/phsource/
cp espeak-data/phsource/ph_korean ${HOME}/espeak-data/phsource/
cp espeak-data/voices/ko ${HOME}/espeak-data/voices/
cp espeak-data/voices/mb/mb-hn1 ${HOME}/espeak-data/voices/mb/
cat espeak-data/phsource/phonemes.append >> ${HOME}/espeak-data/phsource/phonemes
$(ESPEAK) --compile
cp ${HOME}/espeak-data/phontab espeak-data/
cp ${HOME}/espeak-data/phonindex espeak-data/
cp ${HOME}/espeak-data/phondata espeak-data/
cp ${HOME}/espeak-data/intonations espeak-data/
# cannot compile mbrola phoneme translation data from command line
#espeak-data/mbrola_ph/hn1_phtrans:
# cp espeak-data/phsource/mbrola/hn1 ${HOME}/espeak-data/phsource/mbrola/
# espeakedit
# if [ ! -d espeak-data/mbrola_ph/ ]; then mkdir -p espeak-data/mbrola_ph/; fi
# cp ${HOME}/espeak-data/mbrola/hn1_phtrans espeak-data/mbrola/
espeak-data/en_dict: espeak-data/phontab
cd espeak/dictsource/; ../../$(ESPEAK) --compile=en
cp ${HOME}/espeak-data/en_dict espeak-data/
espeak-data/dictsource/ko_list: espeak-data/dictsource/ko_list.orig
if [ -x `command -v python3` ]; then \
python3 -c "import sys,unicodedata;sys.stdout.write(unicodedata.normalize('NFKD', sys.stdin.read()).replace('\u110B',''))" < espeak-data/dictsource/ko_list.orig > espeak-data/dictsource/ko_list; \
else python -c "import sys,unicodedata;sys.stdout.write(unicodedata.normalize('NFKD', sys.stdin.read().decode('utf8')).replace(u'\u110B',u'').encode('utf8'))" < espeak-data/dictsource/ko_list.orig > espeak-data/dictsource/ko_list; \
fi
espeak-data/ko_dict: espeak-data/phontab espeak-data/dictsource/ko_list espeak-data/dictsource/ko_rules
cd espeak-data/dictsource/; ../../$(ESPEAK) --compile=ko --path=../..
speak:
espeak -v ko -X --path=. '안녕하세요 보이스 피싱입니다'
clean:
rm -R espeak-data/phontab espeak-data/phonindex espeak-data/phondata
rm -R espeak-data/en_dict espeak-data/ko_dict
rm espeak-data/dictsource/ko_list