Skip to content

Commit

Permalink
[egs] Fix to BSD compatibility of TIMIT data prep (#2966)
Browse files Browse the repository at this point in the history
  • Loading branch information
danpovey authored Jan 5, 2019
1 parent fef6909 commit b9d4b76
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions egs/timit/s5/local/timit_data_prep.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ for x in train dev test; do
find $*/{$train_dir,$test_dir} -not \( -iname 'SA*' \) -iname '*.WAV' \
| grep -f $tmpdir/${x}_spk > ${x}_sph.flist

sed -e 's:.*/\(.*\)/\(.*\).WAV$:\1_\2:' ${x}_sph.flist \
sed -e 's:.*/\(.*\)/\(.*\).\(WAV\|wav\)$:\1_\2:' ${x}_sph.flist \
> $tmpdir/${x}_sph.uttids
paste $tmpdir/${x}_sph.uttids ${x}_sph.flist \
| sort -k1,1 > ${x}_sph.scp
Expand All @@ -82,7 +82,7 @@ for x in train dev test; do
# ID followed by the transcript.
find $*/{$train_dir,$test_dir} -not \( -iname 'SA*' \) -iname '*.PHN' \
| grep -f $tmpdir/${x}_spk > $tmpdir/${x}_phn.flist
sed -e 's:.*/\(.*\)/\(.*\).PHN$:\1_\2:' $tmpdir/${x}_phn.flist \
sed -e 's:.*/\(.*\)/\(.*\).\(PHN\|phn\)$:\1_\2:' $tmpdir/${x}_phn.flist \
> $tmpdir/${x}_phn.uttids
while read line; do
[ -f $line ] || error_exit "Cannot find transcription file '$line'";
Expand Down

0 comments on commit b9d4b76

Please sign in to comment.