trunk: convert link path to absolute path in wav.scp for fisher setup

git-svn-id: https://svn.code.sf.net/p/kaldi/code/trunk@4651 5e6a8d80-dfce-4ca6-a32a-6e07a63d50c8
This commit is contained in:
Minhua Wu 2014-11-24 20:21:11 +00:00
Родитель f8cbb8873b
Коммит a84e64e64e
5 изменённых файлов: 32 добавлений и 11 удалений

Просмотреть файл

@ -41,7 +41,7 @@ cd $dir
# Make directory of links to the WSJ disks such as 11-13.1. This relies on the command
# line arguments being absolute pathnames.
#rm -r links/ 2>/dev/null
mkdir links/
mkdir -p links/
ln -s $* links
# Basic spot checks to see if we got the data that we needed
@ -157,7 +157,12 @@ if [ $stage -le 2 ]; then
fi
if [ $stage -le 3 ]; then
cat $tmpdir/callhome_train_sph.flist | perl -ane 'm:/([^/]+)\.SPH$: || die "bad line $_; "; print lc($1)," $_"; ' > $tmpdir/callhome_sph.scp
for f in `cat $tmpdir/callhome_train_sph.flist`; do
# convert to absolute path
readlink -e $f
done > $tmpdir/callhome_train_sph_abs.flist
cat $tmpdir/callhome_train_sph_abs.flist | perl -ane 'm:/([^/]+)\.SPH$: || die "bad line $_; "; print lc($1)," $_"; ' > $tmpdir/callhome_sph.scp
cat $tmpdir/callhome_sph.scp | awk -v sph2pipe=$sph2pipe '{printf("%s-A %s -f wav -p -c 1 %s |\n", $1, sph2pipe, $2); printf("%s-B %s -f wav -p -c 2 %s |\n", $1, sph2pipe, $2);}' | \
sort -k1,1 -u > $dir/callhome_train_all/callhome_wav.scp || exit 1;
fi

Просмотреть файл

@ -146,7 +146,12 @@ if [ $stage -le 2 ]; then
fi
if [ $stage -le 3 ]; then
cat $tmpdir/train_sph.flist | perl -ane 'm:/([^/]+)\.sph$: || die "bad line $_; "; print "$1 $_"; ' > $tmpdir/sph.scp
for f in `cat $tmpdir/train_sph.flist`; do
# convert to absolute path
readlink -e $f
done > $tmpdir/train_sph_abs.flist
cat $tmpdir/train_sph_abs.flist | perl -ane 'm:/([^/]+)\.sph$: || die "bad line $_; "; print "$1 $_"; ' > $tmpdir/sph.scp
cat $tmpdir/sph.scp | awk -v sph2pipe=$sph2pipe '{printf("%s-A %s -f wav -p -c 1 %s |\n", $1, sph2pipe, $2); printf("%s-B %s -f wav -p -c 2 %s |\n", $1, sph2pipe, $2);}' | \
sort -k1,1 -u > $dir/train_all/wav.scp || exit 1;
fi

Просмотреть файл

@ -165,8 +165,12 @@ if [ $stage -le 2 ]; then
fi
if [ $stage -le 3 ]; then
cat $tmpdir/sph.flist | perl -ane 'm:/([^/]+)\.sph$: || die "bad line $_; "; print "$1 $_"; ' > $tmpdir/sph.scp
for f in `cat $tmpdir/sph.flist`; do
# convert to absolute path
readlink -e $f
done > $tmpdir/sph_abs.flist
cat $tmpdir/sph_abs.flist | perl -ane 'm:/([^/]+)\.sph$: || die "bad line $_; "; print "$1 $_"; ' > $tmpdir/sph.scp
cat $tmpdir/sph.scp | awk -v sph2pipe=$sph2pipe '{printf("%s-A %s -f wav -p -c 1 %s |\n", $1, sph2pipe, $2);
printf("%s-B %s -f wav -p -c 2 %s |\n", $1, sph2pipe, $2);}' | \
sort -k1,1 -u > data/train_all/wav.scp || exit 1;

Просмотреть файл

@ -35,9 +35,9 @@ for subdir in fe_03_p1_sph1 fe_03_p1_sph3 fe_03_p1_sph5 fe_03_p1_sph7 \
fe_03_p2_sph6 fe_03_p2_tran; do
found_subdir=false
for dir in $*; do
if [ -f $dir/$subdir ]; then
if [ -d $dir/$subdir ]; then
found_subdir=true
ln -s $dir data/local/data_fisher/links/$subdir
ln -s $dir/$subdir data/local/data_fisher/links/$subdir
else
new_style_subdir=$(echo $subdir | sed s/fe_03_p2_sph/fisher_eng_tr_sp_d/)
if [ -d $dir/$new_style_subdir ]; then
@ -154,7 +154,12 @@ if [ $stage -le 2 ]; then
fi
if [ $stage -le 3 ]; then
cat $tmpdir/sph.flist | perl -ane 'm:/([^/]+)\.sph$: || die "bad line $_; "; print "$1 $_"; ' > $tmpdir/sph.scp
for f in `cat $tmpdir/sph.flist`; do
# convert to absolute path
readlink -e $f
done > $tmpdir/sph_abs.flist
cat $tmpdir/sph_abs.flist | perl -ane 'm:/([^/]+)\.sph$: || die "bad line $_; "; print "$1 $_"; ' > $tmpdir/sph.scp
cat $tmpdir/sph.scp | awk -v sph2pipe=$sph2pipe '{printf("%s-A %s -f wav -p -c 1 %s |\n", $1, sph2pipe, $2);
printf("%s-B %s -f wav -p -c 2 %s |\n", $1, sph2pipe, $2);}' | \

Просмотреть файл

@ -42,9 +42,11 @@ local/fisher_create_test_lang.sh
# Prepare Eval2000 and RT-03 test sets
local/eval2000_data_prep.sh /scail/group/deeplearning/speech/datasets/LDC2002S09/hub5e_00/ /scail/group/deeplearning/speech/datasets/LDC2002T43 || exit 1
local/rt03_data_prep.sh /scail/group/deeplearning/speech/datasets/rt_03 || exit 1
#local/eval2000_data_prep.sh /scail/group/deeplearning/speech/datasets/LDC2002S09/hub5e_00/ /scail/group/deeplearning/speech/datasets/LDC2002T43 || exit 1
local/eval2000_data_prep.sh /export/corpora/LDC/LDC2002S09/hub5e_00 /export/corpora/LDC/LDC2002T43 || exit 1
#local/rt03_data_prep.sh /scail/group/deeplearning/speech/datasets/rt_03 || exit 1
local/rt03_data_prep.sh /export/corpora/LDC/LDC2007S10 || exit 1
utils/fix_data_dir.sh data/train_all