Skip to content

Commit

Permalink
Merge pull request espnet#3810 from espnet/ftshijt-patch-1
Browse files Browse the repository at this point in the history
Some minor fixes for commonvoice recipe
  • Loading branch information
ftshijt authored Nov 23, 2021
2 parents 288a5c1 + a20138b commit 0d8cd47
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion egs/commonvoice/asr1/local/data_prep.pl
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,6 @@
die "Error creating spk2utt file in directory $out_dir";
}
system("env LC_COLLATE=C utils/fix_data_dir.sh $out_dir");
if (system("env LC_COLLATE=C utils/validate_data_dir.sh --no-feats $out_dir") != 0) {
if (system("env LC_COLLATE=C utils/validate_data_dir.sh --non-print --no-feats $out_dir") != 0) {
die "Error validating directory $out_dir";
}
3 changes: 2 additions & 1 deletion egs2/commonvoice/asr1/conf/tuning/train_asr_transformer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,5 @@ best_model_criterion:
- max
keep_nbest_models: 10

init: chainer
init: xavier_uniform # Our empirical studies shows that this initialization
# is very important to low-resource ASR training
5 changes: 3 additions & 2 deletions egs2/commonvoice/asr1/local/data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ log() {
echo -e "$(date '+%Y-%m-%dT%H:%M:%S') (${fname}:${BASH_LINENO[0]}:${FUNCNAME[1]}) $*"
}

mkdir ${COMMONVOICE}
mkdir -p ${COMMONVOICE}
if [ -z "${COMMONVOICE}" ]; then
log "Fill the value of 'COMMONVOICE' of db.sh"
exit 1
Expand All @@ -44,7 +44,8 @@ log "data preparation started"

if [ ${stage} -le 0 ] && [ ${stop_stage} -ge 0 ]; then
log "stage1: Download data to ${COMMONVOICE}"
mkdir -p ${COMMONVOICE}
log "The default data of this recipe is from commonvoice 5.1, for newer version, you need to register at \
https://commonvoice.mozilla.org/"
local/download_and_untar.sh ${COMMONVOICE} ${data_url} ${lang}.tar.gz
fi

Expand Down
5 changes: 4 additions & 1 deletion tools/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ endif

#########################################

bc.done: activate_python.sh
. ./activate_python.sh && { command -v bc || conda install -y bc -c conda-forge; }
touch bc.done
cmake.done: activate_python.sh
. ./activate_python.sh && { command -v cmake || conda install -y cmake; }
touch cmake.done
Expand All @@ -73,7 +76,7 @@ sndfile.done: activate_python.sh
. ./activate_python.sh && { python3 -c "from ctypes.util import find_library as F; assert F('sndfile') is not None" || conda install -y libsndfile=1.0.28 -c conda-forge; }
touch sndfile.done
ifneq ($(strip $(USE_CONDA)),)
conda_packages.done: cmake.done flac.done ffmpeg.done sox.done sndfile.done
conda_packages.done: bc.done cmake.done flac.done ffmpeg.done sox.done sndfile.done
else
conda_packages.done:
endif
Expand Down

0 comments on commit 0d8cd47

Please sign in to comment.