forked from chenyuntc/pytorch-book
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun.sh
executable file
·44 lines (30 loc) · 1.2 KB
/
run.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
#!/bin/bash
#顶层脚本 训练和测试测试集
stage=0
CONF_FILE='./conf/ctc_model_setting.conf'
TIMIT_dir='/home/fan/Audio_data/TIMIT'
if [ ! -z $1 ]; then
stage=$1
fi
if [ $stage -le 0 ]; then
echo =======================================================
echo " TIMIT Data Processing "
echo =======================================================
bash ./timit_data_prep.sh $TIMIT_dir || exit 1
fi
if [ $stage -le 1 ]; then
echo ========================================================
echo " Training "
echo ========================================================
python train.py --conf $CONF_FILE || exit 1;
fi
if [ $stage -le 2 ]; then
echo ========================================================
echo " Decoding "
echo ========================================================
python test.py --conf $CONF_FILE || exit 1
fi
###############################################################
#将字符作为标签训练CTC的声学模型在TIMIT上测试集的识别率为:
#Greedy decoder: 61.4831%
#Beam decoder : 62.1029%