mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-30 14:22:29 +00:00
Allow several pipe delimited hash values for Klatt tests
This commit is contained in:
@@ -84,6 +84,23 @@ test_wav () {
|
||||
fi
|
||||
}
|
||||
|
||||
# Check generated wav file from processed text, where $EXPECTED is grep string
|
||||
test_wav_grep () {
|
||||
VOICE=$1
|
||||
EXPECTED=$2
|
||||
TEST_TEXT=$3
|
||||
MESSAGE=$4
|
||||
echo "testing ${VOICE}${MESSAGE}"
|
||||
ESPEAK_DATA_PATH=`pwd` LD_LIBRARY_PATH=src:${LD_LIBRARY_PATH} \
|
||||
src/espeak-ng --stdout -v ${VOICE} "${TEST_TEXT}" | \
|
||||
$sha1sum | awk '{ print $1 }' > actual.txt
|
||||
if [ "$MESSAGE" = "Ignore" ] ; then
|
||||
cat actual.txt | grep -E "$EXPECTED" || (echo "... ignoring error" && true)
|
||||
else
|
||||
cat actual.txt | grep -E "$EXPECTED" || { printf "wrong hash: "; cat actual.txt; exit 1; }
|
||||
fi
|
||||
}
|
||||
|
||||
# Check generated wav file from list of phonemes
|
||||
test_phwav() {
|
||||
TEST_LANG=$1
|
||||
|
||||
Reference in New Issue
Block a user