Skip to content

Commit

Permalink
[egs] Fix to LibriSpeech download script [affects 2nd run] (kaldi-asr…
Browse files Browse the repository at this point in the history
  • Loading branch information
psmit authored and xiaohui-zhang committed Aug 11, 2018
1 parent a403c03 commit 887723c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions egs/librispeech/s5/local/download_and_untar.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,28 +67,29 @@ if [ -f $data/$part.tar.gz ]; then
fi
fi

if [ ! -f $data/$part.tar.gz ]; then
pushd $data

if [ ! -f $part.tar.gz ]; then
if ! which wget >/dev/null; then
echo "$0: wget is not installed."
exit 1;
fi
full_url=$url/$part.tar.gz
echo "$0: downloading data from $full_url. This may take some time, please be patient."

cd $data
if ! wget --no-check-certificate $full_url; then
echo "$0: error executing wget $full_url"
exit 1;
fi
fi

cd $data

if ! tar -xvzf $part.tar.gz; then
echo "$0: error un-tarring archive $data/$part.tar.gz"
exit 1;
fi

popd >&/dev/null

touch $data/LibriSpeech/$part/.complete

echo "$0: Successfully downloaded and un-tarred $data/$part.tar.gz"
Expand Down

0 comments on commit 887723c

Please sign in to comment.