Commit 84827422 authored by Daniel Povey's avatar Daniel Povey
Browse files

Merge pull request #34 from vesis84/change_tmpdir_root3

change 'tmpdir' root to /tmp/kaldi.XXXX
parents 1d24e8c9 4f1d8969
......@@ -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
......
......@@ -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 |\
......
......@@ -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
......@@ -108,4 +108,4 @@ done < "$INLIST"
echo "sox: error converting following $nsoxerr file(s):" >&2
[ -f "$soxerr" ] && cat "$soxerr" >&2
exit 0;
\ No newline at end of file
exit 0;
......@@ -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' \
......
......@@ -21,7 +21,7 @@
mode=$1
tmp="$(mktemp -d)"
tmp="$(mktemp -d /tmp/kaldi.XXXX)"
dir=$(pwd)/local/norm_dk
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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 ] && \
......
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment