You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
1014 B
37 lines
1014 B
4 years ago
|
#!/usr/bin/env bash
|
||
4 years ago
|
|
||
4 years ago
|
source path.sh
|
||
|
|
||
|
stage=-1
|
||
|
stop_stage=100
|
||
|
|
||
4 years ago
|
exp_dir=exp
|
||
3 years ago
|
data=data
|
||
4 years ago
|
|
||
4 years ago
|
source ${MAIN_ROOT}/utils/parse_options.sh || exit -1
|
||
4 years ago
|
|
||
4 years ago
|
mkdir -p ${exp_dir}
|
||
4 years ago
|
|
||
3 years ago
|
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
|
||
4 years ago
|
|
||
|
if [ $stage -le 0 ] && [ $stop_stage -ge 0 ];then
|
||
|
echo "stage 0: Extracting Prosody Labeling"
|
||
3 years ago
|
bash local/prepare_dataset.sh --exp-dir ${exp_dir} --data-dir ${data}
|
||
4 years ago
|
fi
|
||
4 years ago
|
|
||
|
# convert transcription in chinese into pinyin with pypinyin or jieba+pypinyin
|
||
|
filename="000001-010000.txt"
|
||
|
|
||
4 years ago
|
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
|
||
4 years ago
|
|
||
|
echo "done"
|
||
|
exit 0
|