Skip to content

Commit

Permalink
script to test presence of nan in training data
Browse files Browse the repository at this point in the history
  • Loading branch information
ronanki committed Nov 4, 2016
1 parent 3332ebb commit 75d833a
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions egs/build_your_own_voice/s1/scripts/test_nan.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash

if test "$#" -ne 3; then
echo "bash scripts/test_nan.sh <input_dir> <file_list> <ext: .cmp/.lab/.lf0/.mgc/.bap>"
exit 1
fi

global_config_file="conf/global_settings.cfg"
if [ ! -f $global_config_file ]; then
echo "Global config file doesn't exist"
exit 1
else
source $global_config_file
fi

x2x=${MerlinDir}/tools/bin/SPTK-3.9/x2x

ext=$3

IFS=''
while read sentence
do
nlines=`$x2x +fa $1/$sentence$ext | grep "nan" | wc -l`
z=0
if test $nlines -gt $z
then
echo $sentence
echo $nlines
fi
done < $2

0 comments on commit 75d833a

Please sign in to comment.