!tests/languages.test | !tests/languages.test | ||||
!tests/phoneme-output.test | !tests/phoneme-output.test | ||||
!tests/phoneme-audio.test | !tests/phoneme-audio.test | ||||
!tests/ssml.test | |||||
espeak-ng.pc | espeak-ng.pc | ||||
tests/api.check \ | tests/api.check \ | ||||
tests/phoneme-output.check \ | tests/phoneme-output.check \ | ||||
tests/phoneme-audio.check \ | tests/phoneme-audio.check \ | ||||
tests/ssml.check \ | |||||
tests/languages.check | tests/languages.check | ||||
##### phoneme data: | ##### phoneme data: |
#!/bin/sh | |||||
test_ssml() { | |||||
INPUT=$1 | |||||
echo "testing ${INPUT}" | |||||
cp $(dirname $INPUT)/$(basename ${INPUT%.*}).expected expected.txt | |||||
ESPEAK_DATA_PATH=`pwd` LD_LIBRARY_PATH=src:${LD_LIBRARY_PATH} \ | |||||
src/espeak-ng -m -v en-US --ipa=2 -f ${INPUT} > actual.txt | |||||
diff expected.txt actual.txt || exit 1 | |||||
} | |||||
for i in `ls tests/ssml/*.ssml` ; do test_ssml $i ; done | |||||
lˈɑːl ænd lˈɑːl nˈa͡ɪn | |||||
lˈɑːl | |||||
<?xml version="1.0"?> | |||||
<!-- SSML version of the “Billion laughs” attack | |||||
https://en.wikipedia.org/wiki/Billion_laughs_attack | |||||
--> | |||||
<!DOCTYPE lolz [ | |||||
<!ENTITY lol "lol"> | |||||
<!ELEMENT lolz (#PCDATA)> | |||||
<!ENTITY lol1 "&lol;&lol;&lol;&lol;&lol;&lol;&lol;&lol;&lol;&lol;"> | |||||
<!ENTITY lol2 "&lol1;&lol1;&lol1;&lol1;&lol1;&lol1;&lol1;&lol1;&lol1;&lol1;"> | |||||
<!ENTITY lol3 "&lol2;&lol2;&lol2;&lol2;&lol2;&lol2;&lol2;&lol2;&lol2;&lol2;"> | |||||
<!ENTITY lol4 "&lol3;&lol3;&lol3;&lol3;&lol3;&lol3;&lol3;&lol3;&lol3;&lol3;"> | |||||
<!ENTITY lol5 "&lol4;&lol4;&lol4;&lol4;&lol4;&lol4;&lol4;&lol4;&lol4;&lol4;"> | |||||
<!ENTITY lol6 "&lol5;&lol5;&lol5;&lol5;&lol5;&lol5;&lol5;&lol5;&lol5;&lol5;"> | |||||
<!ENTITY lol7 "&lol6;&lol6;&lol6;&lol6;&lol6;&lol6;&lol6;&lol6;&lol6;&lol6;"> | |||||
<!ENTITY lol8 "&lol7;&lol7;&lol7;&lol7;&lol7;&lol7;&lol7;&lol7;&lol7;&lol7;"> | |||||
<!ENTITY lol9 "&lol8;&lol8;&lol8;&lol8;&lol8;&lol8;&lol8;&lol8;&lol8;&lol8;"> | |||||
]> | |||||
<speak version="1.1" xmlns="http://www.w3.org/2001/10/synthesis"> | |||||
lol &lol9; lol | |||||
</speak> |
hˈɪɹ ɑː͡ɹ ðə pˈæswɜːdz | |||||
ænd ˈɛkszˈiːɾæk | |||||
<?xml version="1.0"?> | |||||
<!-- SSML version of the “XML External Entity” attack | |||||
https://en.wikipedia.org/wiki/XML_external_entity_attack | |||||
--> | |||||
<!DOCTYPE test [ | |||||
<!ENTITY xxeattack SYSTEM "file:///etc/passwd"> | |||||
]> | |||||
<speak version="1.1" xmlns="http://www.w3.org/2001/10/synthesis" | |||||
xml:lang="en-US"> | |||||
<p>Here are the passwords:</p> | |||||
<p>&xxeattack;</p> | |||||
</speak> |
bˈuːhuː | |||||
bˈoːhuː | |||||
booˈɔo | |||||
bˌooˈoo | |||||
<?xml version="1.0"?> | |||||
<speak version="1.1" xmlns="http://www.w3.org/2001/10/synthesis"> | |||||
<p xml:lang="en">Boohoo</p> | |||||
<p xml:lang="de">Boohoo</p> | |||||
<p xml:lang="it">Boohoo</p> | |||||
<p xml:lang="es">Boohoo</p> | |||||
</speak> |
juː hæv fˈoː͡ɹ nˈuː mˈɛsɪd͡ʒᵻz | |||||
ðə fˈɜːst ɪz fɹʌm stˈɛfəni wˈɪljəmz ænd ɚɹˈa͡ɪvd æt | |||||
θɹˈiː fˈoː͡ɹɾi fˈa͡ɪv pˌiːˈɛm | |||||
ðə sˈʌbd͡ʒɛkt ɪz skˈiː tɹˈɪp | |||||
<?xml version="1.0"?> | |||||
<!-- Example from SSML 1.1 specification, Appendix E | |||||
https://www.w3.org/TR/speech-synthesis11/#AppE | |||||
--> | |||||
<speak version="1.1" | |||||
xmlns="http://www.w3.org/2001/10/synthesis" | |||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |||||
xsi:schemaLocation="http://www.w3.org/2001/10/synthesis | |||||
http://www.w3.org/TR/speech-synthesis11/synthesis.xsd" | |||||
xml:lang="en-US"> | |||||
<p> | |||||
<s>You have 4 new messages.</s> | |||||
<s>The first is from Stephanie Williams and arrived at <break/> 3:45pm.</s> | |||||
<s> | |||||
The subject is <prosody rate="-20%">ski trip</prosody> | |||||
</s> | |||||
</p> | |||||
</speak> |