From 75d833a85400b13c215c77dfe949eeaa9c1d69ce Mon Sep 17 00:00:00 2001 From: ronanki Date: Fri, 4 Nov 2016 11:56:30 +0000 Subject: [PATCH] script to test presence of nan in training data --- .../s1/scripts/test_nan.sh | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 egs/build_your_own_voice/s1/scripts/test_nan.sh diff --git a/egs/build_your_own_voice/s1/scripts/test_nan.sh b/egs/build_your_own_voice/s1/scripts/test_nan.sh new file mode 100644 index 00000000..41a52768 --- /dev/null +++ b/egs/build_your_own_voice/s1/scripts/test_nan.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +if test "$#" -ne 3; then + echo "bash scripts/test_nan.sh " + 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