Skip to content

Commit

Permalink
Fix schellcheck errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
ShigekiKarita committed Sep 19, 2020
1 parent 916b7b8 commit 3034504
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 25 deletions.
2 changes: 1 addition & 1 deletion ci/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ ${CXX:-g++} -v
if ${USE_CONDA}; then
./setup_anaconda.sh venv espnet ${ESPNET_PYTHON_VERSION}
else
./setup_python.sh $(which python3) venv
./setup_python.sh "$(which python3)" venv
fi
make TH_VERSION="${TH_VERSION}"

Expand Down
31 changes: 15 additions & 16 deletions egs/reverb/asr1_multich/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -378,21 +378,20 @@ if [ ${stage} -le 7 ] && [ ${stop_stage} -ge 7 ]; then
echo "stage 7: Score enhanced speech"
if ${compute_se}; then
pesqdir=${PWD}/local
for rtask in "et"; do
simu_scp=${expdir}/enhance_${rtask}_simu_${nch_se}ch_multich/enhance.scp
real_scp=${expdir}/enhance_${rtask}_real_${nch_se}ch_multich/enhance.scp
enhancement_simu_scp=${PWD}/$simu_scp
enhancement_real_scp=${PWD}/$real_scp
local/compute_se_scores_multich.sh --nch ${nch_se} --enable_pesq ${enable_pesq} \
${enhancement_simu_scp} \
${enhancement_real_scp} \
${reverb} \
${PWD}/data/${rtask}_cln/wav.scp \
${pesqdir} \
${expdir}/enhanced_${rtask}_${nch_se}ch_metrics

cat ${expdir}/enhanced_${rtask}_metrics/scores/score_SimData
cat ${expdir}/enhanced_${rtask}_metrics/scores/score_RealData
done
rtask="et"
simu_scp=${expdir}/enhance_${rtask}_simu_${nch_se}ch_multich/enhance.scp
real_scp=${expdir}/enhance_${rtask}_real_${nch_se}ch_multich/enhance.scp
enhancement_simu_scp=${PWD}/$simu_scp
enhancement_real_scp=${PWD}/$real_scp
local/compute_se_scores_multich.sh --nch ${nch_se} --enable_pesq ${enable_pesq} \
${enhancement_simu_scp} \
${enhancement_real_scp} \
${reverb} \
${PWD}/data/${rtask}_cln/wav.scp \
${pesqdir} \
${expdir}/enhanced_${rtask}_${nch_se}ch_metrics

cat ${expdir}/enhanced_${rtask}_metrics/scores/score_SimData
cat ${expdir}/enhanced_${rtask}_metrics/scores/score_RealData
fi
fi
4 changes: 2 additions & 2 deletions egs/timit_ssc/ssr1/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ set -u
set -o pipefail

train_set=train
train_dev=test
train_dev="test"
recog_set="test"
# Available directories:
# DCT_Features/features/{5,10,20,30}-dct
Expand Down Expand Up @@ -146,7 +146,7 @@ if [ ${stage} -le 3 ] && [ ${stop_stage} -ge 3 ]; then
### Removed wsj texts. By default we use the 65000 words pretrained wsj LM.
### This is because the SSC training set transcripts are from TIMIT while
### test transcripts are from WSJ0.
### You can still add your corpus to train the LM.
### You can still add your corpus to train the LM.
if [ ${use_wordlm} = true ]; then
lmdatadir=data/local/wordlm_train
lmdict=${lmdatadir}/wordlist_${lm_vocabsize}.txt
Expand Down
2 changes: 1 addition & 1 deletion tools/extra_path.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env bash
TOOL_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
if [ -z "${TOOL_DIR}" ]; then
echo "ERROR: Cannot derive the directory path of espnet/tools. This might be a bug."
Expand All @@ -12,4 +13,3 @@ export PATH="${TOOL_DIR}"/nkf/nkf-2.1.4:"${PATH:-}"
export PATH="${TOOL_DIR}"/PESQ/P862_annex_A_2005_CD/source:"${PATH:-}"
export PATH="${TOOL_DIR}"/kenlm/build/bin:"${PATH:-}"
export LD_LIBRARY_PATH="${TOOL_DIR}"/lib:"${TOOL_DIR}"/lib64:"${LD_LIBRARY_PATH:-}"

7 changes: 2 additions & 5 deletions utils/asr_align_wav.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ stage=-1 # start from -1 if you need to start from model download
stop_stage=100
ngpu=0 # number of gpus ("0" uses cpu, otherwise use gpu)
debugmode=1
dumpdir=dump # directory to dump full features
verbose=2 # verbose option

# feature configuration
Expand Down Expand Up @@ -92,7 +91,6 @@ EOF

# make shellcheck happy
train_cmd=
decode_cmd=

. ./cmd.sh

Expand Down Expand Up @@ -203,7 +201,7 @@ if [ ! -f "${wav}" ]; then
echo "No such WAV file: ${wav}"
exit 1
fi
if [ ! -n "${text}" ]; then
if [ -z "${text}" ]; then
echo "Text is empty: ${text}"
exit 1
fi
Expand Down Expand Up @@ -237,7 +235,7 @@ if [ ${stage} -le 2 ] && [ ${stop_stage} -ge 2 ]; then
echo "stage 2: Json Data Preparation"

nlsyms_opts=""
if [ ! -z ${nlsyms} ]; then
if [[ -n ${nlsyms} ]]; then
nlsyms_opts="--nlsyms ${nlsyms}"
fi

Expand All @@ -249,7 +247,6 @@ fi

if [ ${stage} -le 3 ] && [ ${stop_stage} -ge 3 ]; then
echo "stage 3: Aligning"
align_opts=""
feat_align_dir=${align_dir}/dump

${python} -m espnet.bin.asr_align \
Expand Down

0 comments on commit 3034504

Please sign in to comment.