Commit 18e4ff2c authored by Vassil Panayotov's avatar Vassil Panayotov
Browse files

trunk: Minor changes to VoxForge scripts to improve the recipe's compatibility w/

       Unix-y OSes other than Linux (e.g. OS X) 


git-svn-id: https://svn.code.sf.net/p/kaldi/code/trunk@4200 5e6a8d80-dfce-4ca6-a32a-6e07a63d50c8
parent 1b4c7309
......@@ -35,8 +35,8 @@ mkdir -p $loctmp
# names don't follow the "speaker-YYYYMMDD-<random_3letter_suffix>" convention.
# The ";tx;d;:x" part of the expression is to filter out the directories,
# not matched by the expression
find $DATA/* -maxdepth 0 |\
perl -ane ' s:./((.+)-[0-9]{8,10}[a-z]([_-].)?):$2: && print; ' | \
find $DATA/ -mindepth 1 -maxdepth 1 |\
perl -ane ' s:.*/((.+)\-[0-9]{8,10}[a-z]*([_\-].*)?):$2: && print; ' | \
sort -u > $loctmp/speakers_all.txt
nspk_all=$(wc -l <$loctmp/speakers_all.txt)
......@@ -82,8 +82,8 @@ for s in test train; do
echo "No README file for $d - skipping this directory ..."
continue
fi
spkgender=`sed -e 's:.*Gender\:[^[:alpha:]]\+\(.\).*:\L\1:gi;tx;d;:x' <$rdm`
if [ $spkgender != "f" -a $spkgender != "m" ]; then
spkgender=$(perl -ane ' s/.*gender\:\W*(.).*/lc($1)/ei && print; ' <$rdm)
if [ "$spkgender" != "f" -a "$spkgender" != "m" ]; then
echo "Illegal or empty gender ($spkgender) for \"$d\" - assuming m(ale) ..."
spkgender="m"
fi
......@@ -147,7 +147,7 @@ for s in test train; do
END {for (k in names) {print k, names[k];}}' | sort -k1 > $locdata/${s}.spk2utt
done;
trans_err=`wc -l ${logdir}/make_trans.log | cut -f1 -d" "`
trans_err=$(wc -l <${logdir}/make_trans.log)
if [ "${trans_err}" -ge 1 ]; then
echo -n "$trans_err errors detected in the transcripts."
echo " Check ${logdir}/make_trans.log for details!"
......
......@@ -31,7 +31,7 @@ if [ ! -f "tools/mitlm-svn/bin/estimate-ngram" ]; then
mkdir -p tools
command -v svn >/dev/null 2>&1 ||\
{ echo "SVN client is needed but not found" ; exit 1; }
svn checkout http://mitlm.googlecode.com/svn/trunk/ tools/mitlm-svn
svn checkout -r103 http://mitlm.googlecode.com/svn/trunk/ tools/mitlm-svn
cd tools/mitlm-svn/
F77=gfortran ./autogen.sh
./configure --prefix=`pwd`
......
File mode changed from 100644 to 100755
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