Browse Source

Merge remote-tracking branch 'brawer/ssml-test'

master
Reece H. Dunn 7 years ago
parent
commit
c50010e046

+ 1
- 0
.gitignore View File

!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



+ 1
- 0
Makefile.am View File

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:

+ 13
- 0
tests/ssml.test View File

#!/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


+ 3
- 0
tests/ssml/billion-laughs.expected View File

lˈɑːl ænd lˈɑːl nˈa͡ɪn
lˈɑːl


+ 20
- 0
tests/ssml/billion-laughs.ssml View File

<?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>

+ 9
- 0
tests/ssml/external-entity.expected View File



hˈɪɹ ɑː͡ɹ ðə pˈæswɜːdz


ænd ˈɛkszˈiːɾæk




+ 12
- 0
tests/ssml/external-entity.ssml View File

<?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>

+ 10
- 0
tests/ssml/language-switch.expected View File


bˈuːhuː

bˈoːhuː

booˈɔo

bˌooˈoo



+ 7
- 0
tests/ssml/language-switch.ssml View File

<?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>

+ 12
- 0
tests/ssml/spec-example-1.expected View File




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




+ 18
- 0
tests/ssml/spec-example-1.ssml View File

<?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>

Loading…
Cancel
Save