Skip to content
Snippets Groups Projects
Commit 3560e483 authored by Vimal Manohar's avatar Vimal Manohar
Browse files

trunk: Fixed inconsistency in validating reco2file_and_channel by...

trunk: Fixed inconsistency in validating reco2file_and_channel by validate_data_dir.sh with vs without segments

git-svn-id: https://svn.code.sf.net/p/kaldi/code/trunk@5013 5e6a8d80-dfce-4ca6-a32a-6e07a63d50c8
parent 7d33e7bf
Branches
No related tags found
No related merge requests found
......@@ -188,8 +188,19 @@ if [ -f $data/wav.scp ]; then
# this file is needed only for ctm scoring; it's indexed by recording-id.
check_sorted_and_uniq $data/reco2file_and_channel
! cat $data/reco2file_and_channel | \
awk '{if (NF != 3 || ($3 != "A" && $3 != "B")) { print "Bad line ", $0; exit 1; }}' && \
echo "$0: badly formatted reco2file_and_channel file" && exit 1;
awk '{if (NF != 3 || ($3 != "A" && $3 != "B" )) {
if ( NF == 3 && $3 == "1" ) {
warning_issued = 1;
} else {
print "Bad line ", $0; exit 1;
}
}
}
END {
if (warning_issued == 1) {
print "The channel should be marked as A or B, not 1! You should change it ASAP! "
}
}' && echo "$0: badly formatted reco2file_and_channel file" && exit 1;
cat $data/reco2file_and_channel | awk '{print $1}' > $tmpdir/utts.r2fc
if ! cmp -s $tmpdir/utts{,.r2fc}; then
echo "$0: Error: in $data, utterance-ids extracted from segments and reco2file_and_channel"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment