mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-04 14:33:31 +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
|
||||
|
||||
+6
-5
@@ -5,10 +5,11 @@
|
||||
is_hash
|
||||
is_klatt
|
||||
# call actual test functions
|
||||
test_wav en+klatt 2d910bd0bf0735e479166302ad68ca245360b6f4 "The quick brown fox jumps over the lazy dog"
|
||||
test_wav en+klatt2 d986302f525b455222f7cb77d70425ad9e524207 "The quick brown fox jumps over the lazy dog"
|
||||
test_wav en+klatt3 71487b8cd764bbbffeee4545c9e742540d381fec "The quick brown fox jumps over the lazy dog"
|
||||
test_wav en+klatt4 377767780368115863cde5cc11c0203cfdd48476 "The quick brown fox jumps over the lazy dog"
|
||||
test_wav en+klatt5 62f7afeb70d83b9a934b3be71c8ab89bd562079d "The quick brown fox jumps over the lazy dog"
|
||||
test_wav_grep en+klatt "4b91f47e4be93993e53bbc04cbee7378118f990a" "The quick brown fox jumps over the lazy dog"
|
||||
test_wav_grep en+klatt2 "bc99291590ff83b1e877688633adf3c20a65cd9c" "The quick brown fox jumps over the lazy dog"
|
||||
test_wav_grep en+klatt3 "b6e89f4027d173166f49e4d933361651b43f4ca8|2bcc5a6e6c2fc4cd43f41c6a4bdf026c370a1fe9" "The quick brown fox jumps over the lazy dog"
|
||||
# this voice seems to make random sound/hashes
|
||||
#test_wav en+klatt4 "377767780368115863cde5cc11c0203cfdd48476" "The quick brown fox jumps over the lazy dog"
|
||||
test_wav_grep en+klatt5 "6665329b413244b9846533ce207f0ee3d6e55094" "The quick brown fox jumps over the lazy dog"
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user