-
Notifications
You must be signed in to change notification settings - Fork 2
/
run-phoneme-orig-lm.sh
144 lines (128 loc) · 6.97 KB
/
run-phoneme-orig-lm.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
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
#!/usr/bin/env bash
# Set this to somewhere where you want to put your data, or where
# someone else has already put it. You'll want to change this
# if you're not on the CLSP grid.
data="/scratch/elec/puhe/c/librispeech/"
# base url for downloads.
data_url=www.openslr.org/resources/12
lm_url=www.openslr.org/resources/11
mfccdir=mfcc
stage=1
. ./cmd.sh
. ./path.sh
. parse_options.sh
# you might not want to do this for interactive shells.
set -e
if [ $stage -le 4 ]; then
$basic_cmd --time 1-0:0:0 --mem 128G exp/phoneme/tri6b/graph_3gram_phoneme/log/mkgraph.log utils/mkgraph.sh \
data/lang_phoneme_test_tgmed/ exp/phoneme/tri6b/ exp/phoneme/tri6b/graph_3gram_pruned_phoneme
fi
if [ $stage -le 5 ]; then
steps/decode_fmllr.sh --cmd "$basic_cmd" --nj 8 --scoring-opts "--hyp_filtering_cmd cat" \
exp/phoneme/tri6b/graph_3gram_pruned_phoneme data/dev_clean exp/phoneme/tri6b/decode_dev_clean_3gram_pruned_phoneme
steps/decode_fmllr.sh --cmd "$basic_cmd" --nj 8 --scoring-opts "--hyp_filtering_cmd cat" \
exp/phoneme/tri6b/graph_3gram_pruned_phoneme data/dev_other exp/phoneme/tri6b/decode_dev_other_3gram_pruned_phoneme
fi
#if [ $stage -le 6 ]; then
#utils/build_const_arpa_lm.sh data/local/lm/4-gram.arpa.gz \
# data/lang_phoneme_test_tgmed/ data/lang_4gram_phoneme_const
#fi
if [ $stage -le 7 ]; then
steps/lmrescore_const_arpa.sh --scoring-opts "--hyp_filtering_cmd cat" \
--cmd "$basic_cmd" data/lang_phoneme_test_tgmed/ data/lang_phoneme_test_fglarge/ \
data/dev_clean exp/phoneme/tri6b/decode_dev_clean_3gram_pruned_phoneme exp/phoneme/tri6b/decode_dev_clean_4gram_phoneme_rescored
steps/lmrescore_const_arpa.sh --scoring-opts "--hyp_filtering_cmd cat" \
--cmd "$basic_cmd" data/lang_phoneme_test_tgmed/ data/lang_phoneme_test_fglarge/ \
data/dev_other exp/phoneme/tri6b/decode_dev_other_3gram_pruned_phoneme exp/phoneme/tri6b/decode_dev_other_4gram_phoneme_rescored
fi
# Neural models:
if [ $stage -le 8 ]; then
$basic_cmd --time 1-0:0:0 --mem 128G exp/phoneme/chain/graph/graph_3gram_phoneme/log/mkgraph.log utils/mkgraph.sh \
--self-loop-scale 1.0 \
data/lang_phoneme_test_tgmed/ exp/phoneme/chain/tree exp/phoneme/chain/graph/graph_phoneme_test_tgmed
fi
if [ $stage -le 9 ]; then
# Note temporare stage 2
local/chain/decode.sh \
--stage 2 \
--skip_scoring true \
--hparams "hyperparams/chain/New-CRDNN-J-phoneme.yaml --expname libriphoneme" \
--tree exp/phoneme/chain/tree/ \
--graphdir "exp/phoneme/chain/graph/graph_phoneme_test_tgmed" \
--decodedir "exp/phoneme/chain/New-CRDNN-J/2602-2256units/decode_dev_clean_phoneme_test_tgmed_acwt1.0"
local/chain/decode.sh \
--stage 2 \
--skip_scoring true \
--hparams "hyperparams/chain/New-CRDNN-J-phoneme.yaml --expname libriphoneme" \
--tree exp/phoneme/chain/tree/ \
--graphdir "exp/phoneme/chain/graph/graph_phoneme_test_tgmed" \
--datadir "data/dev_other" \
--decodedir "exp/phoneme/chain/New-CRDNN-J/2602-2256units/decode_dev_other_phoneme_test_tgmed_acwt1.0"
fi
if [ $stage -le 10 ]; then
steps/lmrescore_const_arpa.sh --scoring-opts "--hyp_filtering_cmd cat" \
--cmd "$basic_cmd" data/lang_phoneme_test_tgmed/ data/lang_phoneme_test_fglarge \
data/dev_clean exp/phoneme/chain/New-CRDNN-J/2602-2256units/decode_dev_clean_phoneme_test_tgmed_acwt1.0 \
exp/phoneme/chain/New-CRDNN-J/2602-2256units/decode_dev_clean_4gram_phoneme_rescored_acwt1.0
steps/lmrescore_const_arpa.sh --scoring-opts "--hyp_filtering_cmd cat" \
--cmd "$basic_cmd" data/lang_phoneme_test_tgmed/ data/lang_phoneme_test_fglarge \
data/dev_other exp/phoneme/chain/New-CRDNN-J/2602-2256units/decode_dev_other_phoneme_test_tgmed_acwt1.0 \
exp/phoneme/chain/New-CRDNN-J/2602-2256units/decode_dev_other_4gram_phoneme_rescored_acwt1.0
fi
if [ $stage -le 11 ]; then
# Note temporare stage 2
local/chain/decode.sh \
--stage 2 \
--skip_scoring true \
--hparams "hyperparams/chain/New-CRDNN-J-phoneme-contd.yaml --expname libriphoneme" \
--tree exp/phoneme/chain/tree/ \
--graphdir "exp/phoneme/chain/graph/graph_phoneme_test_tgmed" \
--decodedir "exp/phoneme/chain/New-CRDNN-J-contd/2602-2096units/decode_dev_clean_phoneme_test_tgmed_acwt1.0"
local/chain/decode.sh \
--stage 2 \
--skip_scoring true \
--hparams "hyperparams/chain/New-CRDNN-J-phoneme-contd.yaml --expname libriphoneme" \
--tree exp/phoneme/chain/tree/ \
--graphdir "exp/phoneme/chain/graph/graph_phoneme_test_tgmed" \
--datadir "data/dev_other" \
--decodedir "exp/phoneme/chain/New-CRDNN-J-contd/2602-2096units/decode_dev_other_phoneme_test_tgmed_acwt1.0"
fi
if [ $stage -le 12 ]; then
steps/lmrescore_const_arpa.sh --scoring-opts "--hyp_filtering_cmd cat" \
--cmd "$basic_cmd" data/lang_phoneme_test_tgmed/ data/lang_phoneme_test_fglarge \
data/dev_clean exp/phoneme/chain/New-CRDNN-J-contd/2602-2096units//decode_dev_clean_phoneme_test_tgmed_acwt1.0 \
exp/phoneme/chain/New-CRDNN-J-contd/2602-2096units/decode_dev_clean_4gram_phoneme_rescored_acwt1.0
steps/lmrescore_const_arpa.sh --scoring-opts "--hyp_filtering_cmd cat" \
--cmd "$basic_cmd" data/lang_phoneme_test_tgmed/ data/lang_phoneme_test_fglarge \
data/dev_other exp/phoneme/chain/New-CRDNN-J-contd/2602-2096units/decode_dev_other_phoneme_test_tgmed_acwt1.0 \
exp/phoneme/chain/New-CRDNN-J-contd/2602-2096units/decode_dev_other_4gram_phoneme_rescored_acwt1.0
fi
if [ $stage -le 13 ]; then
# Note temporare stage 2
local/chain/decode.sh \
--stage 2 \
--skip_scoring true \
--hparams "hyperparams/chain/New-CRDNN-J-phoneme-contd.yaml --expname libriphoneme" \
--tree exp/phoneme/chain/tree/ \
--datadir "data/test_clean" \
--graphdir "exp/phoneme/chain/graph/graph_phoneme_test_tgmed" \
--decodedir "exp/phoneme/chain/New-CRDNN-J-contd/2602-2096units/decode_test_clean_phoneme_test_tgmed_acwt1.0"
local/chain/decode.sh \
--stage 2 \
--skip_scoring true \
--hparams "hyperparams/chain/New-CRDNN-J-phoneme-contd.yaml --expname libriphoneme" \
--tree exp/phoneme/chain/tree/ \
--graphdir "exp/phoneme/chain/graph/graph_phoneme_test_tgmed" \
--datadir "data/test_other" \
--decodedir "exp/phoneme/chain/New-CRDNN-J-contd/2602-2096units/decode_test_other_phoneme_test_tgmed_acwt1.0"
fi
if [ $stage -le 14 ]; then
steps/lmrescore_const_arpa.sh --scoring-opts "--hyp_filtering_cmd cat" \
--cmd "$basic_cmd" data/lang_phoneme_test_tgmed/ data/lang_phoneme_test_fglarge \
data/test_clean exp/phoneme/chain/New-CRDNN-J-contd/2602-2096units//decode_test_clean_phoneme_test_tgmed_acwt1.0 \
exp/phoneme/chain/New-CRDNN-J-contd/2602-2096units/decode_test_clean_4gram_phoneme_rescored_acwt1.0
steps/lmrescore_const_arpa.sh --scoring-opts "--hyp_filtering_cmd cat" \
--cmd "$basic_cmd" data/lang_phoneme_test_tgmed/ data/lang_phoneme_test_fglarge \
data/test_other exp/phoneme/chain/New-CRDNN-J-contd/2602-2096units/decode_test_other_phoneme_test_tgmed_acwt1.0 \
exp/phoneme/chain/New-CRDNN-J-contd/2602-2096units/decode_test_other_4gram_phoneme_rescored_acwt1.0
fi