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.

dictionary.test 3.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. #!/bin/sh
  2. test_dict() {
  3. TEST_LANG=$1
  4. MESSAGE=$2
  5. EXPECTED=$3
  6. TEST_TEXT=$4
  7. TEST_BROKEN=${5:-false}
  8. if [ "x$MESSAGE" = x- ] ; then
  9. echo "testing ${TEST_LANG}"
  10. else
  11. echo "testing ${TEST_LANG} ($MESSAGE)"
  12. fi
  13. ESPEAK_DATA_PATH=`pwd` LD_LIBRARY_PATH=src:${LD_LIBRARY_PATH} \
  14. src/espeak-ng ${OPTIONS} -xq -v ${TEST_LANG} "${TEST_TEXT}" > actual.txt
  15. echo "${EXPECTED}" > expected.txt
  16. if [ x$TEST_BROKEN = xbroken ] ; then
  17. diff expected.txt actual.txt || (echo "... ignoring error (broken)" && true)
  18. else
  19. diff expected.txt actual.txt || exit 1
  20. fi
  21. }
  22. ##### Dictionary flags
  23. # missing tests: only, only, stem, alt1..alt7, dot, hasdot, text, verbsf, accent_before, sentence, native
  24. test_dict en "\$1 - \$7" "'adbl0k adv'3:s ,abs@nt'i: g,astroUInt'EstIn@L" "adblock adverse absentee gastrointestinal"
  25. test_dict en "\$u and \$u+" "fO@ ju:_:_: and Di:; aI k@mp'e@ D'i:" "for you and thee I compare thee"
  26. test_dict en "\$u1 and \$u1+" "aI w,oUnta#v_:_: b,Vt ju: S,Ud@v_:_: and DeI S'Udhav" "I won't have but you should have and they should have"
  27. test_dict en "\$u2 and \$u2+" "@p,0n DIs aIvh,ad w0t aIvh'ad" "Upon this I've had what I've had"
  28. test_dict ro "\$u3 and \$u3+" ",anum,ite d,umneat,a d'umneat,a" "anumite dumneata dumneata"
  29. test_dict en "\$pause" "ju: n'oU It_:_: bIk'0z DIs ha#z_:_: s'Ins b,i:n" "you know it because this has since been"
  30. test_dict en "\$brk" "_!wID,In_! wID,In_! wID,In wID'In" "within within within within"
  31. test_dict de "\$strend" "maR'i:A: l'i:st t'o:mA:s de:n ts'aIt_|,Ungzart,i:k@l f'Or" "Maria liest Thomas den Zeitungsartikel vor"
  32. test_dict de "\$strend2" "j'Etst _|,EtvA:" "jetzt etwa"
  33. test_dict hu "\$unstressend" "m'EgfiJEle:Se:hEz" "megfigyeléséhez"
  34. test_dict en "\$abbrev" ",Em,oUt,i:d'i:; 0vDI2; ,aI;,A@s'i:; ,Em,Em'oU,A@p,i:dZ'i:" "motd of the irc mmorpg"
  35. test_dict fi "\$double" "t'ule t:'&nne_:_: ja s'yYr r'uoka:" "tule tänne ja syö ruokaa"
  36. test_dict en "\$max3" "'ast@r,Iska#st@r,Iska#st@r,Isk" "*****"
  37. test_dict sk "\$combine" "n'aobed b'esjedla" "na obed bez jedla"
  38. test_dict en "\$verb and \$verbf \(not $verbsf\)" "O:lt'3:n@t s'u:n 'O:lt3n,eIt_:_: and '0lt3n,eIts s'u:n 'O:lt3n,eIts" "alternate soon alternate and alternates soon alternates"
  39. test_dict en "\$noun and \$nounf" "It Iz n,0t@ d'aIdZEst t@ daIdZ'Est" "it is not a digest to digest"
  40. test_dict en "\$verbextend" "a# d'aIdZEst t@ n,0t 'adI2d 'Ekstr@ w'3:dz h'i@3 daIdZ'Est" "a digest to not added extra words here digest"
  41. test_dict en "\$pastf and \$past" "r'i:d t@bi r'Ed" "read to be read"
  42. test_dict en "\$capital" "D@ p'oUlIS p'0lIS" "The Polish polish"
  43. test_dict en "\$allcaps" ",aIt'i: h'az j,u:'Es v,i:;'Es It ha#z ,Vs" "IT HAS US vs it has us"
  44. test_dict af "\$accent" "d'e@lte@k@n_|'o@ k'api_|'o@ _|ak'yt_|'o@" "ö ô ó"
  45. test_dict it "\$atstart" "fig'uRatI v,U'Esse figUR'atI" "figurati vs figurati"
  46. test_dict it "\$atend" "s,Ents2a v,U'Esse s'Entsa" "senza vs senza"
  47. test_dict en ".replace" "m'eIlstr0m m'eIlstr0m" "mælstrom maelstrom"
  48. # rest of the numbers are tested in other test files
  49. test_dict en "_dpt" "z'i@roU pOInt n'aIn n'aIn" "0.99"
  50. test_dict ru "_dpt2" "ojd;'in _:'i_: n'ojl n'ojl_d;Is;'AtYx" "1,00"
  51. test_dict en "_0and" "t'u:h'VndrI2d@n tw'Enti" "220"
  52. test_dict af "_^_" "(fr)avinj'O~(en) b'0st@n(af) S'ina" "avignon boston china"
  53. test_dict en "(multiple words)" "s'VtS _a#z" "such as"