Browse Source

Add language.tests for de, en and jp to test the phoneme generation.

master
Reece H. Dunn 8 years ago
parent
commit
6ec3e85007
3 changed files with 37 additions and 1 deletions
  1. 1
    0
      .gitignore
  2. 2
    1
      Makefile.am
  3. 34
    0
      tests/languages.test

+ 1
- 0
.gitignore View File

src/speak-ng src/speak-ng


tests/*.test tests/*.test
!tests/languages.test


espeak-ng.pc espeak-ng.pc



+ 2
- 1
Makefile.am View File

src/libespeak-ng/tokenizer.c \ src/libespeak-ng/tokenizer.c \
tests/tokenizer.c tests/tokenizer.c


check: tests/encoding.test tests/tokenizer.test
check: tests/encoding.test tests/tokenizer.test tests/languages.test
tests/encoding.test tests/encoding.test
tests/tokenizer.test tests/tokenizer.test
tests/languages.test


##### phoneme data: ##### phoneme data:



+ 34
- 0
tests/languages.test View File

#!/bin/sh

test() {
TEST_LANG=$1
EXPECTED=$2
TEST_TEXT=$3

echo "testing ${TEST_LANG}"
ESPEAK_DATA_PATH=`pwd` LD_LIBRARY_PATH=src:${LD_LIBRARY_PATH} \
src/espeak-ng --stdout -v ${TEST_LANG} "${TEST_TEXT}" | \
sha1sum | awk '{ print $1 }' > actual.txt
echo "${EXPECTED}" > expected.txt
diff expected.txt actual.txt || exit 1
}

# To add a new test:
# 1. add a test line for the language with an appropriate test string, using a placeholder hash;
# 2. run the tests to determine the correct hash;
# 3. copy the correct hash onto the test line;
# 4. re-run the tests to ensure they pass.

test de 8f9bd0211a8d0d7a4f78970b8ac8ed7a50242bb0 "drucker lampe computer stern sterne"

test en 13464f360acc31b7d266164245c15b11e2fb6145 "foot strut north force cure thought lot cloth trap bath"
test en-029 7587e73b30806a360d40088d4f00fa158472fbab "foot strut north force cure thought lot cloth trap bath"
test en-GB-scotland c2a65df79d0da41a4590a0ba6e231e13bc4439b3 "foot strut north force cure thought lot cloth trap bath"
test en-GB-x-gbclan da12c9fd6bfad8aed5644918fc97e683b01b2386 "foot strut north force cure thought lot cloth trap bath"
test en-GB-x-gbcwmd 480e4c024cc06224f1352618e57d0ec4bf223e9a "foot strut north force cure thought lot cloth trap bath"
test en-GB-x-rp 8f1f36267f10c88ca822355ecd9d4ee37faa8228 "foot strut north force cure thought lot cloth trap bath"
test en-US 1653355ef008d67d315aa20e630e00614472a045 "foot strut north force cure thought lot cloth trap bath"

test jp a3651d81da9158ee8b76bd6a31025220b4d84932 "か き く け こ"

echo "done"

Loading…
Cancel
Save