language-pronunciation.test 4.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. #!/bin/sh
  2. test_phonemes() {
  3. TEST_LANG=$1
  4. EXPECTED=$2
  5. TEST_TEXT=$3
  6. echo "testing ${TEST_LANG}"
  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. test_phonemes de \
  13. " dr'Uk3 l'amp@ (en)k@mpj'u:t3(de) St'Ern St'Ern@" \
  14. "drucker lampe computer stern sterne"
  15. test_phonemes en \
  16. " k'It dr'Es tr'ap l'0t str'Vt f'Ut fl'i:s p'A:m T'O:t g'u:s n'3:s st'A@t n'O@T f'o@s kj'U@ n,i@3 skw'e@ t'3:m b'3:d h'api k'0m@ l'Et3r- Ekspl'o@ r'oUzI2z r'abIt f'eIs pr'aIs tS'OIs g'oUt m'aUT b'aaT kl'0T m'Ili@n dI2v'aIdI2d" \
  17. "kit dress trap lot strut foot fleece palm thought goose nurse start north force cure near square term bird happy comma letter explore roses rabbit face price choice goat mouth bath cloth million divided"
  18. test_phonemes en-029 \
  19. " k'It dr'Es tr'ap l'0t str'Vt f'Ut fl'i:s p'A:m t['O:t g'u:s n'3:s st'A@t n'O@t[ f'o@s kj'o@ n,i@3 skw'e@ t'3:m b'3:d h'api k'0ma# l'Eta# Ekspl'o@ r'oUzI2z r'abIt f'eIs pr'aIs tS'OIs g'oUt m'aUt[ b'aat[ kl'0t[ m'Ili@n dI2v'aIdI2d" \
  20. "kit dress trap lot strut foot fleece palm thought goose nurse start north force cure near square term bird happy comma letter explore roses rabbit face price choice goat mouth bath cloth million divided"
  21. test_phonemes en-GB-scotland \
  22. " k'It dr'Es tr'ap l'0t str'Vt f'Ut fl'i:s p'A:m T'O:t g'u:s n'VRs st'A@rt n'O@rT f'o@rs kj'U@ n,i@3r skw'e@r t'3:m b'IRd h'api k'0mV l'Et@r- Ekspl'o@r r'oUzI2z r'abIt f'eIs pr'aIs tS'OIs g'oUt m'aUT b'aaT kl'0T m'Ili@n d'I2vaId,I2d" \
  23. "kit dress trap lot strut foot fleece palm thought goose nurse start north force cure near square term bird happy comma letter explore roses rabbit face price choice goat mouth bath cloth million divided"
  24. test_phonemes en-GB-x-gbclan \
  25. " k'It dr'Es tr'ap l'0t str'Vt f'Ut fl'i:s p'A:m T'O:t g'u:s n'3:s st'A@t n'O@T f'o@s kj'U@ n,i@3 skw'e@ t'3:m b'3:d h'apI2 k'0m@ l'Et3r- Ekspl'o@ r'oUzI2z r'abIt f'eIs pr'aIs tS'OIs g'oUt m'aUT b'aaT kl'0T m'Ili@n dI2v'aIdI2d" \
  26. "kit dress trap lot strut foot fleece palm thought goose nurse start north force cure near square term bird happy comma letter explore roses rabbit face price choice goat mouth bath cloth million divided"
  27. test_phonemes en-GB-x-gbcwmd \
  28. " k'It dr'Es tr'ap l'0t str'Vt f'Ut fl'i:s p'A:m T'O:t g'u:s n'3:s st'A@t n'O@T f'O@s kj'U@ n,i@3 skw'e@ t'3:m b'3:d'api k'0m@ l'Et3r- Ekspl'O@ r'oUzI2z r'abIt f'eIs pr'aIs tS'OIs g'oUt m'aUT b'aaT kl'0T m'Ili@n dI2v'aIdI2d" \
  29. "kit dress trap lot strut foot fleece palm thought goose nurse start north force cure near square term bird happy comma letter explore roses rabbit face price choice goat mouth bath cloth million divided"
  30. test_phonemes en-GB-x-rp \
  31. " k'It dr'Es tr'ap l'0t str'Vt f'Ut fl'i:s p'A:m T'O:t g'u:s n'3:s st'A@t n'O@T f'O@s kj'U@ n,i@3 skw'e@ t'3:m b'3:d h'api k'0ma# l'Eta#r- Ikspl'O@ r'oUzI2z r'abIt f'eIs pr'aIs tS'OIs g'oUt m'aUT b'aaT kl'0T m'Ili@n dI2v'aIdI2d" \
  32. "kit dress trap lot strut foot fleece palm thought goose nurse start north force cure near square term bird happy comma letter explore roses rabbit face price choice goat mouth bath cloth million divided"
  33. test_phonemes en-US \
  34. " k'It dr'Es tr'ap l'0t str'Vt f'Ut fl'i:s p'A:m T'O:t g'u:s n'3:s st'A@t n'O@T f'o@s kj'U@ n,i@3 skw'e@ t'3:m b'3:d h'api k'0m@ l'Et#3r- Ekspl'o@ r'oUzI#z r'abIt f'eIs pr'aIs tS'OIs g'oUt m'aUT b'aaT kl'O2T m'Ili@n dI#v'aIdI#d" \
  35. "kit dress trap lot strut foot fleece palm thought goose nurse start north force cure near square term bird happy comma letter explore roses rabbit face price choice goat mouth bath cloth million divided"
  36. test_phonemes ja \
  37. " k'a k'i k'u k'e k'o" \
  38. "か き く け こ"
  39. test_phonemes lv \
  40. " nev'ie:na nuo\`_ 'eiRo:pas v'al>sti:m nek,ad nav p'a:Rga:jusi nuo\`_ 'univERsa:la:s_:_: nuo\` v'ispa:Re:jiem n'uoduok}l^iem f'inanse:tas_:_: s'iste:mas uz 'obliga:ta:s 'apdRuoSina:Sanas s'iste:mu b'eigas" \
  41. "Neviena no Eiropas valstīm nekad nav pārgājusi no universālās (no vispārējiem nodokļiem finansētas) sistēmas uz obligātās apdrošināšanas sistēmu Beigas."
  42. # Languages with non-Latin characters fall back to en when speaking Latin characters.
  43. # TODO: Include words in their native script and move to the main tests above.
  44. test_phonemes bg \
  45. " (en)f'Ut str'Vt(bg)" \
  46. "foot strut"
  47. test_phonemes fa \
  48. " (en)f'Ut str'Vt(fa)" \
  49. "foot strut"
  50. test_phonemes ka \
  51. " (en)f'Ut str'Vt(ka)" \
  52. "foot strut"