mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-08-09 18:12:19 +00:00
* Add modified transducer for aishell. * Minor fixes. * Add extra data in transducer training. The extra data is from http://www.openslr.org/62/ * Update export.py and pretrained.py * Update CI to install pretrained models with aishell. * Update results. * Update results. * Update README. * Use symlinks to avoid copies.
60 lines
1.7 KiB
Bash
Executable File
60 lines
1.7 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -eou pipefail
|
|
|
|
stage=-1
|
|
stop_stage=100
|
|
|
|
# We assume dl_dir (download dir) contains the following
|
|
# directories and files. If not, they will be downloaded
|
|
# by this script automatically.
|
|
#
|
|
# - $dl_dir/aidatatang_200zh
|
|
# You can find "corpus" and "transcript" inside it.
|
|
# You can download it at
|
|
# https://openslr.org/62/
|
|
|
|
dl_dir=$PWD/download
|
|
|
|
. shared/parse_options.sh || exit 1
|
|
|
|
# All files generated by this script are saved in "data".
|
|
# You can safely remove "data" and rerun this script to regenerate it.
|
|
mkdir -p data
|
|
|
|
log() {
|
|
# This function is from espnet
|
|
local fname=${BASH_SOURCE[1]##*/}
|
|
echo -e "$(date '+%Y-%m-%d %H:%M:%S') (${fname}:${BASH_LINENO[0]}:${FUNCNAME[1]}) $*"
|
|
}
|
|
|
|
log "dl_dir: $dl_dir"
|
|
|
|
if [ $stage -le 0 ] && [ $stop_stage -ge 0 ]; then
|
|
log "Stage 0: Download data"
|
|
|
|
if [ ! -f $dl_dir/aidatatang_200zh/transcript/aidatatang_200_zh_transcript.txt ]; then
|
|
lhotse download aidatatang-200zh $dl_dir
|
|
fi
|
|
fi
|
|
|
|
if [ $stage -le 1 ] && [ $stop_stage -ge 1 ]; then
|
|
log "Stage 1: Prepare manifest"
|
|
# We assume that you have downloaded the aidatatang_200zh corpus
|
|
# to $dl_dir/aidatatang_200zh
|
|
if [ ! -f data/manifests/aidatatang_200zh/.manifests.done ]; then
|
|
mkdir -p data/manifests/aidatatang_200zh
|
|
lhotse prepare aidatatang-200zh $dl_dir data/manifests/aidatatang_200zh
|
|
touch data/manifests/aidatatang_200zh/.manifests.done
|
|
fi
|
|
fi
|
|
|
|
if [ $stage -le 2 ] && [ $stop_stage -ge 2 ]; then
|
|
log "Stage 2: Process aidatatang_200zh"
|
|
if [ ! -f data/fbank/aidatatang_200zh/.fbank.done ]; then
|
|
mkdir -p data/fbank/aidatatang_200zh
|
|
lhotse prepare aidatatang-200zh $dl_dir data/manifests/aidatatang_200zh
|
|
touch data/fbank/aidatatang_200zh/.fbank.done
|
|
fi
|
|
fi
|