-
Notifications
You must be signed in to change notification settings - Fork 0
/
create_australian_lexicon_ipa.sh
29 lines (20 loc) · 1.13 KB
/
create_australian_lexicon_ipa.sh
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
# with reference to http://spirit.blau.in/simon/speech-model/
# sudo apt-get install unzip myspell-tools espeak
# cd /mnt/g/Dropbox/dictionary/ta_ozdict_wsl
# create directory for the dictionary files
mkdir pronunciation_lexicon
cd pronunciation_lexicon
# get newest dictionary (and update the name) from http://extensions.libreoffice.org/extension-center/english-dictionaries
wget https://downloads.sourceforge.net/project/aoo-extensions/17102/70/dict-en-20211001.oxt
unzip dict-en*
unmunch en_AU.dic en_AU.aff > australian-wordlist.txt
# wrap each line in "<audio>" tags and the whole file in a "<speak>" tag
sed -f ../ta_sed_script1 australian-wordlist.txt > australian-wordlist.xml
# the following espeak command takes some time to run (a couple of minutes)
#espeak -f australian-wordlist.xml -m -v en -q -x --ipa --phonout="australian-espeak"
espeak -f australian-wordlist.xml -m -v en -q -x --phonout="australian-espeak"
# remove blank lines
grep . australian-espeak > australian-espeak.txt
paste australian-wordlist.txt australian-espeak.txt > australian-english-lexicon.txt
mkdir --p ../output
cp australian-english-lexicon.txt ../output