Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions egs/wsj/s5/utils/fix_data_dir.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
# It puts the original contents of data-dir into
# data-dir/.backup

cmd="$@"

utt_extra_files=
spk_extra_files=

Expand All @@ -21,6 +23,12 @@ if [ $# != 1 ]; then
fi

data=$1

if [ -f $data/images.scp ]; then
image/fix_data_dir.sh $cmd
exit $?
fi

mkdir -p $data/.backup

[ ! -d $data ] && echo "$0: no such directory $data" && exit 1;
Expand Down
7 changes: 7 additions & 0 deletions egs/wsj/s5/utils/validate_data_dir.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash

cmd="$@"

no_feats=false
no_wav=false
Expand Down Expand Up @@ -44,6 +45,12 @@ if [ ! -d $data ]; then
exit 1;
fi

if [ -f $data/images.scp ]; then
cmd=${cmd/--no-wav/} # remove --no-wav if supplied
image/validate_data_dir.sh $cmd
exit $?
fi

for f in spk2utt utt2spk; do
if [ ! -f $data/$f ]; then
echo "$0: no such file $f"
Expand Down