parent
075635d2b4
commit
1b0eb378b6
@ -0,0 +1,2 @@
|
|||||||
|
data
|
||||||
|
exp
|
@ -1,22 +1,33 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
source path.sh
|
source path.sh
|
||||||
|
|
||||||
stage=-1
|
stage=-1
|
||||||
stop_stage=100
|
stop_stage=100
|
||||||
|
|
||||||
exp_dir="exp"
|
exp_dir=exp
|
||||||
data_dir="data"
|
data_dir=data
|
||||||
|
|
||||||
source ${MAIN_ROOT}/utils/parse_options.sh || exit -1
|
source ${MAIN_ROOT}/utils/parse_options.sh || exit -1
|
||||||
|
|
||||||
mkdir -p ${exp_dir}
|
mkdir -p ${exp_dir}
|
||||||
bash local/prepare_dataset.sh --exp-dir ${exp_dir} --data-dir ${data_dir}
|
|
||||||
|
|
||||||
|
if [ $stage -le 0 ] && [ $stop_stage -ge 0 ];then
|
||||||
|
echo "stage 0: Extracting Prosody Labeling"
|
||||||
|
bash local/prepare_dataset.sh --exp-dir ${exp_dir} --data-dir ${data_dir}
|
||||||
|
fi
|
||||||
|
|
||||||
# convert transcription in chinese into pinyin with pypinyin or jieba+pypinyin
|
# convert transcription in chinese into pinyin with pypinyin or jieba+pypinyin
|
||||||
filename="000001-010000.txt"
|
filename="000001-010000.txt"
|
||||||
echo "Processing transcriptions..."
|
|
||||||
|
|
||||||
python3 local/extract_pinyin_label.py ${exp_dir}/${filename} ${exp_dir}/"pinyin_baker.py"
|
if [ $stage -le 1 ] && [ $stop_stage -ge 1 ]; then
|
||||||
python3 local/convert_transcription.py ${exp_dir}/${filename} ${exp_dir}/"result_pypinyin.txt"
|
echo "stage 1: Processing transcriptions..."
|
||||||
python3 local/convert_transcription.py --use-jieba ${exp_dir}/${filename} ${exp_dir}/"result_pypinyin_with_jieba.txt"
|
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
|
||||||
|
|
||||||
echo "done"
|
echo "done"
|
||||||
exit 0
|
exit 0
|
||||||
|
Loading…
Reference in new issue