Skip to content

Commit

Permalink
change 'tmpdir' root to /tmp/kaldi.XXXX
Browse files Browse the repository at this point in the history
  • Loading branch information
KarelVesely84 committed Jul 29, 2015
1 parent 1d24e8c commit 4f1d896
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion egs/babel/s5c/local/show_lattice.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ uttid=$1
lat=$2
words=$3

tmpdir=$(mktemp -d); trap "rm -r $tmpdir" EXIT # cleanup
tmpdir=$(mktemp -d /tmp/kaldi.XXXX); trap "rm -r $tmpdir" EXIT # cleanup

gunzip -c $lat | lattice-to-fst ark:- ark,scp:$tmpdir/fst.ark,$tmpdir/fst.scp || exit 1
! grep "^$uttid " $tmpdir/fst.scp && echo "ERROR : Missing utterance '$uttid' from gzipped lattice ark '$lat'" && exit 1
Expand Down
2 changes: 1 addition & 1 deletion egs/farsdat/s5/local/farsdat_data_prep.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ if [ -d $*/CD1 ]; then
cd2_dir=CD2
fi

tmpdir=$(mktemp -d);
tmpdir=$(mktemp -d /tmp/kaldi.XXXX);
trap 'rm -rf "$tmpdir"' EXIT

find $*/{$cd1_dir/SENTENCE/,$cd2_dir/SENTENCE/} -iname '*.SNT' -print |\
Expand Down
4 changes: 2 additions & 2 deletions egs/gp/s5/local/gp_convert_audio.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ OLIST=${OLIST:-/dev/null} # Default for output list
which shorten > /dev/null
which sox > /dev/null

tmpdir=$(mktemp -d);
tmpdir=$(mktemp -d /tmp/kaldi.XXXX);
trap 'rm -rf "$tmpdir"' EXIT

mkdir -p $tmpdir/raw $ODIR
Expand Down Expand Up @@ -108,4 +108,4 @@ done < "$INLIST"
echo "sox: error converting following $nsoxerr file(s):" >&2
[ -f "$soxerr" ] && cat "$soxerr" >&2

exit 0;
exit 0;
2 changes: 1 addition & 1 deletion egs/gp/s5/local/gp_prep_flists.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ done

[ -f path.sh ] && . path.sh # Sets the PATH to contain necessary executables

tmpdir=$(mktemp -d);
tmpdir=$(mktemp -d /tmp/kaldi.XXXX);
trap 'rm -rf "$tmpdir"' EXIT

grep "^$LCODE" $DEVSPK | cut -f2- | tr ' ' '\n' \
Expand Down
2 changes: 1 addition & 1 deletion egs/sprakbanken/s5/local/norm_dk/format_text.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

mode=$1

tmp="$(mktemp -d)"
tmp="$(mktemp -d /tmp/kaldi.XXXX)"

dir=$(pwd)/local/norm_dk

Expand Down
2 changes: 1 addition & 1 deletion egs/timit/s4/local/timit_prep_flists.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ if [ ! -d "$CORPUS/train" -a ! -d "$CORPUS/TRAIN" ]; then
exit 1;
fi

tmpdir=$(mktemp -d);
tmpdir=$(mktemp -d /tmp/kaldi.XXXX);
trap 'rm -rf "$tmpdir"' EXIT

# Get the list of speakers. The list of speakers in the 24-speaker core test
Expand Down
2 changes: 1 addition & 1 deletion egs/timit/s5/local/timit_data_prep.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ if [ -d $*/TRAIN ]; then
test_dir=TEST
fi

tmpdir=$(mktemp -d);
tmpdir=$(mktemp -d /tmp/kaldi.XXXX);
trap 'rm -rf "$tmpdir"' EXIT

# Get the list of speakers. The list of speakers in the 24-speaker core test
Expand Down
2 changes: 1 addition & 1 deletion egs/wsj/s5/utils/fix_data_dir.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ mkdir -p $data/.backup

[ ! -f $data/utt2spk ] && echo "$0: no such file $data/utt2spk" && exit 1;

tmpdir=$(mktemp -d kaldi.XXXX);
tmpdir=$(mktemp -d /tmp/kaldi.XXXX);
trap 'rm -rf "$tmpdir"' EXIT HUP INT PIPE TERM

export LC_ALL=C
Expand Down
2 changes: 1 addition & 1 deletion egs/wsj/s5/utils/format_lm_sri.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ if [ -z $loc ]; then
fi

echo "Converting '$lm' to FST"
tmpdir=$(mktemp -d kaldi.XXXX);
tmpdir=$(mktemp -d /tmp/kaldi.XXXX);
trap 'rm -rf "$tmpdir"' EXIT

mkdir -p $out_dir
Expand Down
2 changes: 1 addition & 1 deletion egs/wsj/s5/utils/show_lattice.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ uttid=$1
lat=$2
words=$3

tmpdir=$(mktemp -d kaldi.XXXX); # trap "rm -r $tmpdir" EXIT # cleanup
tmpdir=$(mktemp -d /tmp/kaldi.XXXX); # trap "rm -r $tmpdir" EXIT # cleanup

gunzip -c $lat | lattice-to-fst --lm-scale=$lm_scale --acoustic-scale=$acoustic_scale ark:- "scp,p:echo $uttid $tmpdir/$uttid.fst|" || exit 1;
! [ -s $tmpdir/$uttid.fst ] && \
Expand Down
2 changes: 1 addition & 1 deletion egs/wsj/s5/utils/validate_data_dir.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ if [ "$ns" == 1 ]; then
fi


tmpdir=$(mktemp -d kaldi.XXXX);
tmpdir=$(mktemp -d /tmp/kaldi.XXXX);
trap 'rm -rf "$tmpdir"' EXIT HUP INT PIPE TERM

export LC_ALL=C
Expand Down

0 comments on commit 4f1d896

Please sign in to comment.