mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-10-31 05:35:35 +00:00
Add phoneme output tests.
This commit is contained in:
@@ -98,6 +98,7 @@ src/speak-ng
|
||||
|
||||
tests/*.test
|
||||
!tests/languages.test
|
||||
!tests/phoneme-output.test
|
||||
|
||||
espeak-ng.pc
|
||||
|
||||
|
||||
@@ -250,6 +250,7 @@ tests_api_test_SOURCES = tests/api.c
|
||||
check: tests/encoding.check \
|
||||
tests/readclause.check \
|
||||
tests/api.check \
|
||||
tests/phoneme-output.check \
|
||||
tests/languages.check
|
||||
|
||||
##### phoneme data:
|
||||
|
||||
Executable
+23
@@ -0,0 +1,23 @@
|
||||
#!/bin/sh
|
||||
|
||||
test_phonemes() {
|
||||
TEST_LANG=$1
|
||||
EXPECTED=$2
|
||||
TEST_TEXT=$3
|
||||
|
||||
echo "testing ${TEST_LANG} \"${TEST_TEXT}\""
|
||||
ESPEAK_DATA_PATH=`pwd` LD_LIBRARY_PATH=src:${LD_LIBRARY_PATH} \
|
||||
src/espeak-ng -xq -v ${TEST_LANG} "${TEST_TEXT}" > actual.txt
|
||||
echo "${EXPECTED}" > expected.txt
|
||||
diff expected.txt actual.txt || exit 1
|
||||
}
|
||||
|
||||
# word lookup
|
||||
test_phonemes en " h@l'oU" "hello"
|
||||
|
||||
# correct word stress
|
||||
test_phonemes en " s'VmTIN Imp'o@t@nt" "something important"
|
||||
|
||||
# spelling rules for suffices (-mas, -mu)
|
||||
test_phonemes lv " nev'ie:na no\`_ 'eiRo:pas v'a>lsti:m nek,ad nav p'a:Rga:jusi no\`_ 'univERsa::la:s_:_: no\` visp'aRe:jiem n'uoduok}l^iem f'inansE:tas_:_: s'iste:mas uz 'obliga:ta:s 'apdRuoSina:Sanas s'iste:mu b'eigas" "Neviena no Eiropas valstīm nekad nav pārgājusi no universālās (no visparējiem nodokļiem finansētas) sistēmas uz obligātās apdrošināšanas sistēmu Beigas."
|
||||
|
||||
Reference in New Issue
Block a user