Skip to content

Commit ed05f17

Browse files
xikunlun001danpovey
authored andcommitted
[egs] thchs-30: fix Mac compatibility issue (#2258)
1 parent e74b918 commit ed05f17

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

egs/thchs30/s5/local/thchs-30_data_prep.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ for x in train dev test; do
2121
cd $dir/data/$x
2222
rm -rf wav.scp utt2spk spk2utt word.txt phone.txt text
2323
echo "preparing scps and text in data/$x"
24-
for nn in `find $corpus_dir/$x/*.wav | sort -u | xargs -i basename {} .wav`; do
24+
#updated new "for loop" figured out the compatibility issue with Mac created by Xi Chen, in 03/06/2018
25+
#for nn in `find $corpus_dir/$x/*.wav | sort -u | xargs -i basename {} .wav`; do
26+
for nn in `find $corpus_dir/$x -name "*.wav" | sort -u | xargs -I {} basename {} .wav`; do
2527
spkid=`echo $nn | awk -F"_" '{print "" $1}'`
2628
spk_char=`echo $spkid | sed 's/\([A-Z]\).*/\1/'`
2729
spk_num=`echo $spkid | sed 's/[A-Z]\([0-9]\)/\1/'`

0 commit comments

Comments
 (0)