You need to sign in or sign up before continuing.
run.sh 1014 字节
Newer Older
F
Feiyu Chan 已提交
1
#!/usr/bin/env bash
H
Hui Zhang 已提交
2

F
Feiyu Chan 已提交
3 4 5 6 7
source path.sh

stage=-1
stop_stage=100

H
Hui Zhang 已提交
8
exp_dir=exp
H
Hui Zhang 已提交
9
data=data
H
Hui Zhang 已提交
10

F
Feiyu Chan 已提交
11
source ${MAIN_ROOT}/utils/parse_options.sh || exit -1
H
Hui Zhang 已提交
12

F
Feiyu Chan 已提交
13
mkdir -p ${exp_dir}
H
Hui Zhang 已提交
14

H
Hui Zhang 已提交
15 16 17
if [ $stage -le -1 ] && [ $stop_stage -ge -1 ];then
    test -e ${data}/BZNSYP.rar || { echo "Please download BZNSYP.rar and put it in ${data}; exit -1; }
fi
H
Hui Zhang 已提交
18 19 20

if [ $stage -le 0 ] && [ $stop_stage -ge 0 ];then
    echo "stage 0: Extracting Prosody Labeling"
H
Hui Zhang 已提交
21
    bash local/prepare_dataset.sh --exp-dir ${exp_dir} --data-dir ${data}
H
Hui Zhang 已提交
22
fi
F
Feiyu Chan 已提交
23 24 25 26

# convert transcription in chinese into pinyin with pypinyin or jieba+pypinyin
filename="000001-010000.txt"

H
Hui Zhang 已提交
27 28 29 30 31 32 33
if [ $stage -le 1 ] && [ $stop_stage -ge 1 ]; then
    echo "stage 1: Processing transcriptions..."
    python3 local/extract_pinyin_label.py ${exp_dir}/${filename} ${exp_dir}/ref.pinyin

    python3 local/convert_transcription.py ${exp_dir}/${filename} ${exp_dir}/trans.pinyin
    python3 local/convert_transcription.py --use-jieba ${exp_dir}/${filename} ${exp_dir}/trans.jieba.pinyin
fi
F
Feiyu Chan 已提交
34 35 36

echo "done"
exit 0