ruby_speech 2.1.0-java

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. data/.gitignore +12 -0
  2. data/.rspec +3 -0
  3. data/.travis.yml +17 -0
  4. data/CHANGELOG.md +144 -0
  5. data/Gemfile +3 -0
  6. data/Guardfile +9 -0
  7. data/LICENSE.md +20 -0
  8. data/README.md +314 -0
  9. data/Rakefile +34 -0
  10. data/assets/grammar-core.xsd +317 -0
  11. data/assets/grammar.xsd +37 -0
  12. data/assets/synthesis-core.xsd +445 -0
  13. data/assets/synthesis.xsd +63 -0
  14. data/assets/xml.xsd +287 -0
  15. data/ext/ruby_speech/RubySpeechGRXMLMatcher.java +64 -0
  16. data/ext/ruby_speech/RubySpeechService.java +23 -0
  17. data/ext/ruby_speech/extconf.rb +7 -0
  18. data/ext/ruby_speech/ruby_speech.c +97 -0
  19. data/lib/ruby_speech/generic_element.rb +169 -0
  20. data/lib/ruby_speech/grxml/element.rb +29 -0
  21. data/lib/ruby_speech/grxml/grammar.rb +189 -0
  22. data/lib/ruby_speech/grxml/item.rb +144 -0
  23. data/lib/ruby_speech/grxml/match.rb +16 -0
  24. data/lib/ruby_speech/grxml/matcher.rb +126 -0
  25. data/lib/ruby_speech/grxml/max_match.rb +6 -0
  26. data/lib/ruby_speech/grxml/no_match.rb +10 -0
  27. data/lib/ruby_speech/grxml/one_of.rb +31 -0
  28. data/lib/ruby_speech/grxml/potential_match.rb +10 -0
  29. data/lib/ruby_speech/grxml/rule.rb +73 -0
  30. data/lib/ruby_speech/grxml/ruleref.rb +69 -0
  31. data/lib/ruby_speech/grxml/tag.rb +29 -0
  32. data/lib/ruby_speech/grxml/token.rb +31 -0
  33. data/lib/ruby_speech/grxml.rb +39 -0
  34. data/lib/ruby_speech/nlsml/builder.rb +34 -0
  35. data/lib/ruby_speech/nlsml/document.rb +120 -0
  36. data/lib/ruby_speech/nlsml.rb +18 -0
  37. data/lib/ruby_speech/ruby_speech.jar +0 -0
  38. data/lib/ruby_speech/ssml/audio.rb +47 -0
  39. data/lib/ruby_speech/ssml/break.rb +62 -0
  40. data/lib/ruby_speech/ssml/desc.rb +24 -0
  41. data/lib/ruby_speech/ssml/element.rb +23 -0
  42. data/lib/ruby_speech/ssml/emphasis.rb +44 -0
  43. data/lib/ruby_speech/ssml/mark.rb +43 -0
  44. data/lib/ruby_speech/ssml/p.rb +25 -0
  45. data/lib/ruby_speech/ssml/phoneme.rb +72 -0
  46. data/lib/ruby_speech/ssml/prosody.rb +172 -0
  47. data/lib/ruby_speech/ssml/s.rb +25 -0
  48. data/lib/ruby_speech/ssml/say_as.rb +100 -0
  49. data/lib/ruby_speech/ssml/speak.rb +27 -0
  50. data/lib/ruby_speech/ssml/sub.rb +42 -0
  51. data/lib/ruby_speech/ssml/voice.rb +108 -0
  52. data/lib/ruby_speech/ssml.rb +39 -0
  53. data/lib/ruby_speech/version.rb +3 -0
  54. data/lib/ruby_speech/xml/language.rb +13 -0
  55. data/lib/ruby_speech/xml.rb +11 -0
  56. data/lib/ruby_speech.rb +36 -0
  57. data/ruby_speech.gemspec +42 -0
  58. data/spec/ruby_speech/grxml/grammar_spec.rb +341 -0
  59. data/spec/ruby_speech/grxml/item_spec.rb +192 -0
  60. data/spec/ruby_speech/grxml/match_spec.rb +15 -0
  61. data/spec/ruby_speech/grxml/matcher_spec.rb +688 -0
  62. data/spec/ruby_speech/grxml/max_match_spec.rb +17 -0
  63. data/spec/ruby_speech/grxml/no_match_spec.rb +17 -0
  64. data/spec/ruby_speech/grxml/one_of_spec.rb +49 -0
  65. data/spec/ruby_speech/grxml/potential_match_spec.rb +17 -0
  66. data/spec/ruby_speech/grxml/rule_spec.rb +125 -0
  67. data/spec/ruby_speech/grxml/ruleref_spec.rb +55 -0
  68. data/spec/ruby_speech/grxml/tag_spec.rb +41 -0
  69. data/spec/ruby_speech/grxml/token_spec.rb +62 -0
  70. data/spec/ruby_speech/grxml_spec.rb +339 -0
  71. data/spec/ruby_speech/nlsml_spec.rb +353 -0
  72. data/spec/ruby_speech/ssml/audio_spec.rb +121 -0
  73. data/spec/ruby_speech/ssml/break_spec.rb +100 -0
  74. data/spec/ruby_speech/ssml/desc_spec.rb +57 -0
  75. data/spec/ruby_speech/ssml/emphasis_spec.rb +110 -0
  76. data/spec/ruby_speech/ssml/mark_spec.rb +53 -0
  77. data/spec/ruby_speech/ssml/p_spec.rb +96 -0
  78. data/spec/ruby_speech/ssml/phoneme_spec.rb +65 -0
  79. data/spec/ruby_speech/ssml/prosody_spec.rb +309 -0
  80. data/spec/ruby_speech/ssml/s_spec.rb +92 -0
  81. data/spec/ruby_speech/ssml/say_as_spec.rb +71 -0
  82. data/spec/ruby_speech/ssml/speak_spec.rb +166 -0
  83. data/spec/ruby_speech/ssml/sub_spec.rb +57 -0
  84. data/spec/ruby_speech/ssml/voice_spec.rb +200 -0
  85. data/spec/ruby_speech/ssml_spec.rb +285 -0
  86. data/spec/ruby_speech_spec.rb +124 -0
  87. data/spec/spec_helper.rb +21 -0
  88. data/spec/support/match_examples.rb +43 -0
  89. data/spec/support/matchers.rb +46 -0
  90. metadata +405 -0
@@ -0,0 +1,445 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
3
+ elementFormDefault="qualified">
4
+ <xsd:annotation>
5
+ <xsd:documentation>SSML 1.0 Core Schema (20040615)</xsd:documentation>
6
+ </xsd:annotation>
7
+ <xsd:annotation>
8
+ <xsd:documentation>
9
+ Copyright 1998-2004 W3C (MIT, ERCIM, Keio),
10
+ All Rights Reserved. Permission to use, copy, modify and
11
+ distribute the SSML core schema and its accompanying documentation
12
+ for any purpose and without fee is hereby granted in
13
+ perpetuity, provided that the above copyright notice and this
14
+ paragraph appear in all copies. The copyright holders make no
15
+ representation about the suitability of the schema for any purpose.
16
+ It is provided "as is" without expressed or implied warranty.
17
+ </xsd:documentation>
18
+ </xsd:annotation>
19
+ <xsd:annotation>
20
+ <xsd:documentation>Importing dependent namespaces</xsd:documentation>
21
+ </xsd:annotation>
22
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace"
23
+ schemaLocation="xml.xsd"/>
24
+
25
+ <!--<xsd:import namespace="http://www.w3.org/XML/1998/namespace"
26
+ schemaLocation="http://www.w3.org/2001/xml.xsd"/>-->
27
+ <xsd:annotation>
28
+ <xsd:documentation>General Datatypes</xsd:documentation>
29
+ </xsd:annotation>
30
+
31
+ <xsd:simpleType name="duration">
32
+ <xsd:annotation>
33
+ <xsd:documentation>Duration follows "Times" in CCS
34
+ specification; e.g. "25ms", "3s"
35
+ </xsd:documentation>
36
+ </xsd:annotation>
37
+ <xsd:restriction base="xsd:string">
38
+ <xsd:pattern value="(\+)?([0-9]*\.)?[0-9]+(ms|s)"/>
39
+ </xsd:restriction>
40
+ </xsd:simpleType>
41
+
42
+
43
+ <xsd:simpleType name="number">
44
+ <xsd:annotation>
45
+ <xsd:documentation>number: e.g. 10, 5.5, 1.5, 9., .45
46
+ </xsd:documentation>
47
+ </xsd:annotation>
48
+ <xsd:restriction base="xsd:decimal">
49
+ <xsd:minInclusive value="0"/>
50
+ </xsd:restriction>
51
+ </xsd:simpleType>
52
+
53
+ <xsd:simpleType name="relative">
54
+ <xsd:annotation>
55
+ <xsd:documentation>Modeled on number datatype: e.g. +4.5, -.45
56
+ </xsd:documentation>
57
+ </xsd:annotation>
58
+ <xsd:restriction base="xsd:string">
59
+ <xsd:pattern value="[+\-]([0-9]+|[0-9]+.[0-9]*|[0-9]*.[0-9]+)"/>
60
+ </xsd:restriction>
61
+ </xsd:simpleType>
62
+
63
+ <xsd:simpleType name="percent">
64
+ <xsd:annotation>
65
+ <xsd:documentation>Modeled on number datatype: e.g. +4.5%, -.45%
66
+ </xsd:documentation>
67
+ </xsd:annotation>
68
+ <xsd:restriction base="xsd:string">
69
+ <xsd:pattern value="[+\-]?([0-9]+|[0-9]+.[0-9]*|[0-9]*.[0-9]+)%"/>
70
+ </xsd:restriction>
71
+ </xsd:simpleType>
72
+
73
+ <xsd:simpleType name="semitone">
74
+ <xsd:annotation>
75
+ <xsd:documentation>Modeled on relative datatype: e.g. +4.5st, -.45st
76
+ </xsd:documentation>
77
+ </xsd:annotation>
78
+ <xsd:restriction base="xsd:string">
79
+ <xsd:pattern value="[+\-]([0-9]+|[0-9]+.[0-9]*|[0-9]*.[0-9]+)st"/>
80
+ </xsd:restriction>
81
+ </xsd:simpleType>
82
+
83
+
84
+ <xsd:simpleType name="hertz.number">
85
+ <xsd:annotation>
86
+ <xsd:documentation>number Hertz: e.g. 10Hz, 5.5Hz, 1.5Hz,, 9.Hz,, .45Hz
87
+ </xsd:documentation>
88
+ </xsd:annotation>
89
+ <xsd:restriction base="xsd:string">
90
+ <xsd:pattern value="([0-9]+|[0-9]+.[0-9]*|[0-9]*.[0-9]+)Hz"/>
91
+ </xsd:restriction>
92
+ </xsd:simpleType>
93
+
94
+ <xsd:simpleType name="hertz.relative">
95
+ <xsd:annotation>
96
+ <xsd:documentation>relative Hertz: e.g. +10Hz, -5.5Hz, +1.5Hz, +9.Hz,+.45Hz
97
+ </xsd:documentation>
98
+ </xsd:annotation>
99
+ <xsd:restriction base="xsd:string">
100
+ <xsd:pattern value="[+\-]([0-9]+|[0-9]+.[0-9]*|[0-9]*.[0-9]+)Hz"/>
101
+ </xsd:restriction>
102
+ </xsd:simpleType>
103
+
104
+ <xsd:simpleType name="volume.number">
105
+ <xsd:annotation>
106
+ <xsd:documentation>Modeled on number datatype: 0.0 - 100.0
107
+ </xsd:documentation>
108
+ </xsd:annotation>
109
+ <xsd:restriction base="number">
110
+ <xsd:minInclusive value="0.0"/>
111
+ <xsd:maxInclusive value="100.0"/>
112
+ </xsd:restriction>
113
+ </xsd:simpleType>
114
+
115
+ <xsd:simpleType name="height.scale">
116
+ <xsd:annotation>
117
+ <xsd:documentation>descriptive values for height</xsd:documentation>
118
+ </xsd:annotation>
119
+ <xsd:restriction base="xsd:string">
120
+ <xsd:enumeration value="x-high"/>
121
+ <xsd:enumeration value="high"/>
122
+ <xsd:enumeration value="medium"/>
123
+ <xsd:enumeration value="low"/>
124
+ <xsd:enumeration value="x-low"/>
125
+ <xsd:enumeration value="default"/>
126
+ </xsd:restriction>
127
+ </xsd:simpleType>
128
+
129
+ <xsd:simpleType name="speed.scale">
130
+ <xsd:annotation>
131
+ <xsd:documentation>descriptive values for speed</xsd:documentation>
132
+ </xsd:annotation>
133
+ <xsd:restriction base="xsd:string">
134
+ <xsd:enumeration value="x-fast"/>
135
+ <xsd:enumeration value="fast"/>
136
+ <xsd:enumeration value="medium"/>
137
+ <xsd:enumeration value="slow"/>
138
+ <xsd:enumeration value="x-slow"/>
139
+ <xsd:enumeration value="default"/>
140
+ </xsd:restriction>
141
+ </xsd:simpleType>
142
+
143
+ <xsd:simpleType name="volume.scale">
144
+ <xsd:annotation>
145
+ <xsd:documentation>descriptive values for volume</xsd:documentation>
146
+ </xsd:annotation>
147
+ <xsd:restriction base="xsd:string">
148
+ <xsd:enumeration value="silent"/>
149
+ <xsd:enumeration value="x-soft"/>
150
+ <xsd:enumeration value="soft"/>
151
+ <xsd:enumeration value="medium"/>
152
+ <xsd:enumeration value="loud"/>
153
+ <xsd:enumeration value="x-loud"/>
154
+ <xsd:enumeration value="default"/>
155
+ </xsd:restriction>
156
+ </xsd:simpleType>
157
+
158
+ <xsd:simpleType name="pitch.datatype">
159
+ <xsd:union memberTypes="hertz.number hertz.relative percent semitone height.scale"/>
160
+ </xsd:simpleType>
161
+
162
+ <xsd:simpleType name="range.datatype">
163
+ <xsd:union memberTypes="hertz.number hertz.relative percent semitone height.scale"/>
164
+ </xsd:simpleType>
165
+
166
+ <xsd:simpleType name="rate.datatype">
167
+ <xsd:union memberTypes="number percent speed.scale"/>
168
+ </xsd:simpleType>
169
+
170
+ <xsd:simpleType name="volume.datatype">
171
+ <xsd:union memberTypes="volume.number relative percent volume.scale"/>
172
+ </xsd:simpleType>
173
+
174
+ <xsd:simpleType name="contourpoint.datatype">
175
+ <xsd:annotation>
176
+ <xsd:documentation>(Number%,pitch.datatype) </xsd:documentation>
177
+ </xsd:annotation>
178
+ <xsd:restriction base="xsd:string">
179
+ <xsd:pattern value="\(([0-9]+|[0-9]+.[0-9]*|[0-9]*.[0-9]+)%,(([0-9]+|[0-9]+.[0-9]*|[0-9]*.[0-9]+)Hz|[+\-]([0-9]+|[0-9]+.[0-9]*|[0-9]*.[0-9]+)Hz|[+\-]?([0-9]+|[0-9]+.[0-9]*|[0-9]*.[0-9]+)%|[+\-]([0-9]+|[0-9]+.[0-9]*|[0-9]*.[0-9]+)st|x-high|high|medium|low|x-low|default)\)"/>
180
+ </xsd:restriction>
181
+ </xsd:simpleType>
182
+
183
+
184
+ <xsd:simpleType name="contour.datatype">
185
+ <xsd:annotation>
186
+ <xsd:documentation>list of whitespace separated contourpoints </xsd:documentation>
187
+ </xsd:annotation>
188
+ <xsd:list itemType="contourpoint.datatype"/>
189
+ </xsd:simpleType>
190
+
191
+ <xsd:simpleType name="gender.datatype">
192
+ <xsd:restriction base="xsd:string">
193
+ <xsd:enumeration value="male"/>
194
+ <xsd:enumeration value="female"/>
195
+ <xsd:enumeration value="neutral"/>
196
+ </xsd:restriction>
197
+ </xsd:simpleType>
198
+
199
+
200
+ <xsd:simpleType name="level.datatype">
201
+ <xsd:restriction base="xsd:string">
202
+ <xsd:enumeration value="strong"/>
203
+ <xsd:enumeration value="moderate"/>
204
+ <xsd:enumeration value="none"/>
205
+ <xsd:enumeration value="reduced"/>
206
+ </xsd:restriction>
207
+ </xsd:simpleType>
208
+
209
+ <xsd:simpleType name="strength.datatype">
210
+ <xsd:restriction base="xsd:string">
211
+ <xsd:enumeration value="none"/>
212
+ <xsd:enumeration value="x-weak"/>
213
+ <xsd:enumeration value="weak"/>
214
+ <xsd:enumeration value="medium"/>
215
+ <xsd:enumeration value="strong"/>
216
+ <xsd:enumeration value="x-strong"/>
217
+
218
+ </xsd:restriction>
219
+ </xsd:simpleType>
220
+
221
+ <xsd:simpleType name="version.datatype">
222
+ <xsd:restriction base="xsd:NMTOKEN"/>
223
+ </xsd:simpleType>
224
+
225
+
226
+ <xsd:simpleType name="voicename.datatype">
227
+ <xsd:restriction base="xsd:token">
228
+ <xsd:pattern value="\S+"/>
229
+ </xsd:restriction>
230
+ </xsd:simpleType>
231
+
232
+ <xsd:simpleType name="voicenames.datatype">
233
+ <xsd:list itemType="voicename.datatype"/>
234
+ </xsd:simpleType>
235
+
236
+ <xsd:simpleType name="alphabet.datatype">
237
+ <xsd:restriction base="xsd:string">
238
+ <xsd:pattern value="(ipa|x-.*)"/>
239
+ </xsd:restriction>
240
+ </xsd:simpleType>
241
+
242
+
243
+ <xsd:annotation>
244
+ <xsd:documentation>Attributes and Groups</xsd:documentation>
245
+ </xsd:annotation>
246
+
247
+
248
+
249
+ <xsd:attributeGroup name="speak.attribs">
250
+ <xsd:attribute name="version" type="version.datatype"/>
251
+ <xsd:attribute ref="xml:lang"/>
252
+ <xsd:attribute ref="xml:base"/>
253
+ </xsd:attributeGroup>
254
+
255
+
256
+ <xsd:annotation>
257
+ <xsd:documentation>Content Models</xsd:documentation>
258
+ </xsd:annotation>
259
+
260
+ <xsd:group name="allowed-within-sentence">
261
+ <xsd:choice>
262
+ <xsd:element ref="aws"/>
263
+ </xsd:choice>
264
+ </xsd:group>
265
+
266
+
267
+ <xsd:group name="paragraph.class">
268
+ <xsd:sequence>
269
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
270
+ <xsd:group ref="allowed-within-sentence"/>
271
+ <xsd:element ref="s"/>
272
+ </xsd:choice>
273
+ </xsd:sequence>
274
+ </xsd:group>
275
+
276
+ <xsd:group name="sentence.class">
277
+ <xsd:sequence>
278
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
279
+ <xsd:group ref="allowed-within-sentence"/>
280
+ </xsd:choice>
281
+ </xsd:sequence>
282
+ </xsd:group>
283
+
284
+ <xsd:group name="sentenceAndStructure.class">
285
+ <xsd:sequence>
286
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
287
+ <xsd:group ref="allowed-within-sentence"/>
288
+ <xsd:group ref="structure"/>
289
+ </xsd:choice>
290
+ </xsd:sequence>
291
+ </xsd:group>
292
+
293
+ <xsd:group name="descAndSentenceAndStructure.class">
294
+ <xsd:sequence>
295
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
296
+ <xsd:group ref="sentenceAndStructure.class"/>
297
+ <xsd:element ref="desc"/>
298
+ </xsd:choice>
299
+ </xsd:sequence>
300
+ </xsd:group>
301
+
302
+ <xsd:group name="speak.class">
303
+ <xsd:sequence>
304
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
305
+ <xsd:element name="meta" type="ssml-meta"/>
306
+ <xsd:element name="metadata" type="ssml-metadata"/>
307
+ <xsd:element name="lexicon" type="ssml-lexicon"/>
308
+ </xsd:choice>
309
+ <xsd:group ref="sentenceAndStructure.class" minOccurs="0" maxOccurs="unbounded"/>
310
+ </xsd:sequence>
311
+ </xsd:group>
312
+
313
+ <xsd:annotation>
314
+ <xsd:documentation>Elements</xsd:documentation>
315
+ </xsd:annotation>
316
+ <xsd:element name="aws" abstract="true">
317
+ <xsd:annotation>
318
+ <xsd:documentation>The 'allowed-within-sentence' group uses this abstract element.</xsd:documentation>
319
+ </xsd:annotation>
320
+ </xsd:element>
321
+
322
+ <xsd:element name="struct" abstract="true"/>
323
+ <xsd:group name="structure">
324
+ <xsd:choice>
325
+ <xsd:element ref="struct"/>
326
+ </xsd:choice>
327
+ </xsd:group>
328
+
329
+ <xsd:element name="speak" type="speak"/>
330
+
331
+ <xsd:complexType name="speak" mixed="true">
332
+ <xsd:group ref="speak.class"/>
333
+ <xsd:attributeGroup ref="speak.attribs"/>
334
+ </xsd:complexType>
335
+
336
+ <xsd:element name="p" type="paragraph" substitutionGroup="struct"/>
337
+
338
+ <xsd:complexType name="paragraph" mixed="true">
339
+ <xsd:group ref="paragraph.class"/>
340
+ <xsd:attribute ref="xml:lang"/>
341
+ </xsd:complexType>
342
+
343
+ <xsd:element name="s" type="sentence" substitutionGroup="struct"/>
344
+ <xsd:complexType name="sentence" mixed="true">
345
+ <xsd:group ref="sentence.class"/>
346
+ <xsd:attribute ref="xml:lang"/>
347
+ </xsd:complexType>
348
+
349
+ <xsd:element name="voice" type="voice" substitutionGroup="aws"/>
350
+
351
+ <xsd:complexType name="voice" mixed="true">
352
+ <xsd:group ref="sentenceAndStructure.class"/>
353
+ <xsd:attribute name="gender" type="gender.datatype"/>
354
+ <xsd:attribute name="age" type="xsd:nonNegativeInteger"/>
355
+ <xsd:attribute name="variant" type="xsd:positiveInteger"/>
356
+ <xsd:attribute name="name" type="voicenames.datatype"/>
357
+ <xsd:attribute ref="xml:lang"/>
358
+ </xsd:complexType>
359
+
360
+ <xsd:element name="prosody" type="prosody" substitutionGroup="aws"/>
361
+ <xsd:complexType name="prosody" mixed="true">
362
+ <xsd:group ref="sentenceAndStructure.class"/>
363
+ <xsd:attribute name="pitch" type="pitch.datatype"/>
364
+ <xsd:attribute name="contour" type="contour.datatype"/>
365
+ <xsd:attribute name="range" type="range.datatype"/>
366
+ <xsd:attribute name="rate" type="rate.datatype"/>
367
+ <xsd:attribute name="duration" type="duration"/>
368
+ <xsd:attribute name="volume" type="volume.datatype" default="100.0"/>
369
+ </xsd:complexType>
370
+
371
+ <xsd:element name="audio" type="audio" substitutionGroup="aws"/>
372
+ <xsd:complexType name="audio" mixed="true">
373
+ <xsd:group ref="descAndSentenceAndStructure.class"/>
374
+ <xsd:attribute name="src" type="xsd:anyURI"/>
375
+ </xsd:complexType>
376
+
377
+ <xsd:element name="desc" type="desc"/>
378
+ <xsd:complexType name="desc">
379
+ <xsd:simpleContent>
380
+ <xsd:extension base="xsd:string">
381
+ <xsd:attribute ref="xml:lang"/>
382
+ </xsd:extension>
383
+ </xsd:simpleContent>
384
+ </xsd:complexType>
385
+
386
+ <xsd:element name="emphasis" type="emphasis" substitutionGroup="aws"/>
387
+ <xsd:complexType name="emphasis" mixed="true">
388
+ <xsd:group ref="sentence.class"/>
389
+ <xsd:attribute name="level" type="level.datatype" default="moderate"/>
390
+ </xsd:complexType>
391
+
392
+ <xsd:element name="sub" type="sub" substitutionGroup="aws"/>
393
+ <xsd:complexType name="sub">
394
+ <xsd:simpleContent>
395
+ <xsd:extension base="xsd:string">
396
+ <xsd:attribute name="alias" type="xsd:string" use="required"/>
397
+ </xsd:extension>
398
+ </xsd:simpleContent>
399
+ </xsd:complexType>
400
+
401
+
402
+ <xsd:element name="say-as" type="say-as" substitutionGroup="aws"/>
403
+ <xsd:complexType name="say-as" mixed="true">
404
+ <xsd:attribute name="interpret-as" type="xsd:NMTOKEN"
405
+ use="required"/>
406
+ <xsd:attribute name="format" type="xsd:NMTOKEN"/>
407
+ <xsd:attribute name="detail" type="xsd:NMTOKEN"/>
408
+ </xsd:complexType>
409
+
410
+ <xsd:element name="phoneme" type="phoneme" substitutionGroup="aws"/>
411
+ <xsd:complexType name="phoneme" mixed="true">
412
+ <xsd:attribute name="ph" type="xsd:string" use="required"/>
413
+ <xsd:attribute name="alphabet" type="alphabet.datatype"/>
414
+ </xsd:complexType>
415
+
416
+ <xsd:element name="break" type="break" substitutionGroup="aws"/>
417
+ <xsd:complexType name="break">
418
+ <xsd:attribute name="time" type="duration"/>
419
+ <xsd:attribute name="strength" type="strength.datatype" default="medium"/>
420
+ </xsd:complexType>
421
+
422
+ <xsd:element name="mark" type="mark" substitutionGroup="aws"/>
423
+ <xsd:complexType name="mark">
424
+ <xsd:attribute name="name" type="xsd:token"/>
425
+ </xsd:complexType>
426
+
427
+ <xsd:complexType name="ssml-metadata">
428
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
429
+ <xsd:any namespace="##other" processContents="lax"/>
430
+ </xsd:choice>
431
+ <xsd:anyAttribute namespace="##any" processContents="strict"/>
432
+ </xsd:complexType>
433
+
434
+ <xsd:complexType name="ssml-meta">
435
+ <xsd:attribute name="name" type="xsd:NMTOKEN"/>
436
+ <xsd:attribute name="content" type="xsd:string" use="required"/>
437
+ <xsd:attribute name="http-equiv" type="xsd:NMTOKEN"/>
438
+ </xsd:complexType>
439
+
440
+ <xsd:complexType name="ssml-lexicon">
441
+ <xsd:attribute name="uri" type="xsd:anyURI" use="required"/>
442
+ <xsd:attribute name="type" type="xsd:string"/>
443
+ </xsd:complexType>
444
+
445
+ </xsd:schema>
@@ -0,0 +1,63 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <xsd:schema targetNamespace="http://www.w3.org/2001/10/synthesis"
3
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
4
+ xmlns="http://www.w3.org/2001/10/synthesis" elementFormDefault="qualified">
5
+ <xsd:annotation>
6
+ <xsd:documentation>SSML 1.0 Schema (20040615)</xsd:documentation>
7
+ </xsd:annotation>
8
+ <xsd:annotation>
9
+ <xsd:documentation>Copyright 1998-2004 W3C (MIT, ERCIM, Keio),
10
+ All Rights Reserved. Permission to use, copy, modify and
11
+ distribute the SSML schema and its accompanying documentation
12
+ for any purpose and without fee is hereby granted in
13
+ perpetuity, provided that the above copyright notice and this
14
+ paragraph appear in all copies. The copyright holders make no
15
+ representation about the suitability of the schema for any purpose.
16
+ It is provided "as is" without expressed or implied warranty.
17
+ </xsd:documentation>
18
+ </xsd:annotation>
19
+
20
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace"
21
+ schemaLocation="xml.xsd"/>
22
+ <xsd:redefine schemaLocation="synthesis-core.xsd">
23
+
24
+ <xsd:annotation>
25
+ <xsd:documentation>restriction: version and attributes on speak mandatory</xsd:documentation>
26
+ </xsd:annotation>
27
+ <xsd:complexType name="speak" mixed="true">
28
+ <xsd:complexContent>
29
+ <xsd:restriction base="speak">
30
+ <xsd:group ref="speak.class"/>
31
+ <xsd:attribute name="version" type="version.datatype" use="required"/>
32
+ <xsd:attribute ref="xml:lang" use="required"/>
33
+ </xsd:restriction>
34
+ </xsd:complexContent>
35
+ </xsd:complexType>
36
+
37
+ <xsd:annotation>
38
+ <xsd:documentation>restriction: src attribute on audio is mandatory</xsd:documentation>
39
+ </xsd:annotation>
40
+ <xsd:complexType name="audio" mixed="true">
41
+ <xsd:complexContent>
42
+ <xsd:restriction base="audio">
43
+ <xsd:group ref="descAndSentenceAndStructure.class"/>
44
+ <xsd:attribute name="src" type="xsd:anyURI" use="required"/>
45
+ </xsd:restriction>
46
+ </xsd:complexContent>
47
+ </xsd:complexType>
48
+
49
+
50
+ <xsd:annotation>
51
+ <xsd:documentation>restriction: name attribute on mark is mandatory</xsd:documentation>
52
+ </xsd:annotation>
53
+ <xsd:complexType name="mark">
54
+ <xsd:complexContent>
55
+ <xsd:restriction base="mark">
56
+ <xsd:attribute name="name" type="xsd:token" use="required"/>
57
+ </xsd:restriction>
58
+ </xsd:complexContent>
59
+ </xsd:complexType>
60
+
61
+ </xsd:redefine>
62
+
63
+ </xsd:schema>