mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-08-09 01:52:41 +00:00
* add whisper fbank for wenetspeech * add whisper fbank for other dataset * add str to bool * add decode for wenetspeech * add requirments.txt * add original model decode with 30s * test feature extractor speed * add aishell2 feat * change compute feature batch * fix overwrite * fix executor * regression * add kaldifeatwhisper fbank * fix io issue * parallel jobs * use multi machines * add wenetspeech fine-tune scripts * add monkey patch codes * remove useless file * fix subsampling factor * fix too long audios * add remove long short * fix whisper version to support multi batch beam * decode all wav files * remove utterance more than 30s in test_net * only test net * using soft links * add kespeech whisper feats * fix index error * add manifests for whisper * change to licomchunky writer * add missing option * decrease cpu usage * add speed perturb for kespeech * fix kespeech speed perturb * add dataset * load checkpoint from specific path * add speechio * add speechio results --------- Co-authored-by: zr_jin <peter.jin.cn@gmail.com>
68 lines
1.8 KiB
Bash
68 lines
1.8 KiB
Bash
#!/usr/bin/env bash
|
|
|
|
set -eou pipefail
|
|
|
|
stage=3
|
|
stop_stage=3
|
|
|
|
# We assume dl_dir (download dir) contains the following
|
|
# directories and files. If not, they will be downloaded
|
|
# by this script automatically.
|
|
#
|
|
# - $dl_dir/SPEECHIO_ASR_ZH00000
|
|
# This directory contains the following files downloaded from
|
|
# https://github.com/SpeechColab/Leaderboard
|
|
#
|
|
# - metadata.tsv
|
|
# - wav
|
|
# - wav.scp
|
|
# - trans.txt
|
|
#
|
|
|
|
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 1 ] && [ $stop_stage -ge 1 ]; then
|
|
log "Stage 1: Prepare speechio manifest"
|
|
# We assume that you have downloaded the speechio dataset
|
|
# to $dl_dir
|
|
mkdir -p data/manifests
|
|
if [ ! -e data/manifests/.speechio.done ]; then
|
|
lhotse prepare speechio $dl_dir data/manifests
|
|
touch data/manifests/.speechio.done
|
|
fi
|
|
fi
|
|
|
|
whisper_mel_bins=80
|
|
if [ $stage -le 2 ] && [ $stop_stage -ge 2 ]; then
|
|
log "Stage 2: Compute whisper fbank for speechio"
|
|
if [ ! -f data/fbank/.speechio.done ]; then
|
|
mkdir -p data/fbank
|
|
./local/compute_fbank_speechio.py --num-mel-bins ${whisper_mel_bins} --whisper-fbank true
|
|
touch data/fbank/.speechio.done
|
|
fi
|
|
fi
|
|
|
|
if [ $stage -le 3 ] && [ $stop_stage -ge 3 ]; then
|
|
log "Stage 3: Compute kaldi fbank for speechio"
|
|
if [ ! -f data/fbank/.speechio.kaldi.done ]; then
|
|
fbank_dir=data/fbank_kaldi
|
|
mkdir -p $fbank_dir
|
|
./local/compute_fbank_speechio.py --fbank-dir $fbank_dir
|
|
touch data/fbank/.speechio.kaldi.done
|
|
fi
|
|
fi
|