Skip to content

Commit

Permalink
[egs] TIMIT: fix mac compatibility of sed command (#2874)
Browse files Browse the repository at this point in the history
  • Loading branch information
nithinraok authored and danpovey committed Nov 27, 2018
1 parent 8a87f53 commit 70aba21
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:i' ${x}_sph.flist \
sed -e 's:.*/\(.*\)/\(.*\).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:i' $tmpdir/${x}_phn.flist \
sed -e 's:.*/\(.*\)/\(.*\).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 70aba21

Please sign in to comment.