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.

phoneme-audio.test 1.2KB

123456789101112131415161718192021222324252627282930313233343536
  1. #!/bin/sh
  2. # Test a command for presence and ability to output the sha1 hash of a file.
  3. check_hashcmd() {
  4. which $1 &>/dev/null &&
  5. $1 </dev/null 2>/dev/null |
  6. awk '{if ($1 != "da39a3ee5e6b4b0d3255bfef95601890afd80709") { exit 1; }}'
  7. }
  8. # Test some common commands to find the correct one for the system being tested on.
  9. if check_hashcmd sha1sum; then
  10. sha1sum=sha1sum
  11. elif check_hashcmd sha1; then
  12. sha1sum=sha1
  13. elif check_hashcmd shasum; then
  14. sha1sum=shasum
  15. else
  16. echo "No hashing commands found."
  17. exit 1
  18. fi
  19. test_lang() {
  20. TEST_LANG=$1
  21. EXPECTED=$2
  22. TEST_TEXT=$3
  23. echo "testing ${TEST_LANG}"
  24. ESPEAK_DATA_PATH=`pwd` LD_LIBRARY_PATH=src:${LD_LIBRARY_PATH} \
  25. src/espeak-ng --stdout -v ${TEST_LANG} "[[${TEST_TEXT}]]" | \
  26. $sha1sum | awk '{ print $1 }' > actual.txt
  27. echo "${EXPECTED}" > expected.txt
  28. diff expected.txt actual.txt || exit 1
  29. }
  30. test_lang af c71ab424d045d9fa82d2a23b9be4542aee3ed15e "ma na Na pa ta ka tSa ba da ga dZa fa sa x2a Sa va za Za ca la ja ra r/a _:_ m@ ma mE mI mO mW mu m& m&: m@L mA: me@ mi mo@ my miu m@U maI mAI meI mOI moI muI mYy mY@ maU me: mO: m3: mA~ me~ mo~"
  31. test_lang am 4fcdb9bb68b72c06e4cadf91b2c1e244ea14ac21 "ma na Na pa ta ka ?a ba da ga p\`a t\`a k\`a tSa dZa tS\`a Ba sa za Sa Za xa ha la ja wa ra _:_ mi me my ma m@ mo mu"