eSpeak NG is an open source speech synthesizer that supports more than hundred languages and accents.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

translate.test 1.3KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #!/bin/sh
  2. test_phonemes() {
  3. TEST_LANG=$1
  4. EXPECTED=$2
  5. TEST_TEXT=$3
  6. echo "testing ${TEST_LANG} \"${TEST_TEXT}\""
  7. ESPEAK_DATA_PATH=`pwd` LD_LIBRARY_PATH=src:${LD_LIBRARY_PATH} \
  8. src/espeak-ng -xq -v ${TEST_LANG} "${TEST_TEXT}" > actual.txt
  9. echo "${EXPECTED}" > expected.txt
  10. diff expected.txt actual.txt || exit 1
  11. }
  12. # word lookup
  13. test_phonemes en " h@l'oU" "hello"
  14. # correct word stress
  15. test_phonemes en " s'VmTIN Imp'o@t@nt" "something important"
  16. # bug: https://github.com/nvaccess/nvda/issues/7805
  17. test_phonemes hi " r'UcI" "रुचि"
  18. test_phonemes hi " dUk'a:n" "दुकान"
  19. test_phonemes hi " ka:n'u:n" "कानून"
  20. #----- Emoji [http://www.unicode.org/reports/tr51/tr51-12.html] -----
  21. # ED-3 - emoji_character
  22. # TODO: Fix adjacent emoji without whitespace so the pronunciation is separated by a space.
  23. test_phonemes en " 'e@ri:z" "♈"
  24. test_phonemes en " 'e@ri:zr'eInboU" "♈🌈"
  25. test_phonemes en " 'e@ri:z r'eInboU" "♈ 🌈"
  26. # multi-word
  27. test_phonemes en " Ekskla#m'eIS@N kw'EstS@n m'A@k" "⁉"
  28. test_phonemes en " Ekskla#m'eIS@N kw'EstS@n m'A@k r'eInboU" "⁉ 🌈"
  29. # A list entry that uses '$text' to map to another list entry crashes 1.49.2 multi-word support:
  30. test_phonemes en " d'eIbju:tI2d" "débuted"
  31. test_phonemes en-US " d'eIbju:t#I#d" "débuted"