-
Notifications
You must be signed in to change notification settings - Fork 440
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
script to test presence of nan in training data
- Loading branch information
Showing
1 changed file
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |