ruby_speech 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +7 -0
- data/.rspec +3 -0
- data/CHANGELOG.md +2 -0
- data/Gemfile +4 -0
- data/LICENSE.md +20 -0
- data/README.md +76 -0
- data/Rakefile +22 -0
- data/assets/synthesis-core.xsd +442 -0
- data/assets/synthesis.xsd +63 -0
- data/assets/xml.xsd +287 -0
- data/lib/ruby_speech.rb +15 -0
- data/lib/ruby_speech/ssml.rb +24 -0
- data/lib/ruby_speech/ssml/break.rb +71 -0
- data/lib/ruby_speech/ssml/element.rb +26 -0
- data/lib/ruby_speech/ssml/emphasis.rb +53 -0
- data/lib/ruby_speech/ssml/prosody.rb +180 -0
- data/lib/ruby_speech/ssml/say_as.rb +109 -0
- data/lib/ruby_speech/ssml/speak.rb +57 -0
- data/lib/ruby_speech/ssml/voice.rb +125 -0
- data/lib/ruby_speech/version.rb +3 -0
- data/lib/ruby_speech/xml.rb +7 -0
- data/lib/ruby_speech/xml/language.rb +13 -0
- data/ruby_speech.gemspec +31 -0
- data/spec/ruby_speech/ssml/break_spec.rb +85 -0
- data/spec/ruby_speech/ssml/emphasis_spec.rb +100 -0
- data/spec/ruby_speech/ssml/prosody_spec.rb +286 -0
- data/spec/ruby_speech/ssml/say_as_spec.rb +61 -0
- data/spec/ruby_speech/ssml/speak_spec.rb +123 -0
- data/spec/ruby_speech/ssml/voice_spec.rb +188 -0
- data/spec/ruby_speech/ssml_spec.rb +65 -0
- data/spec/spec_helper.rb +20 -0
- data/spec/support/matchers.rb +45 -0
- metadata +232 -0
data/.gitignore
ADDED
data/.rspec
ADDED
data/CHANGELOG.md
ADDED
data/Gemfile
ADDED
data/LICENSE.md
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2011 Ben Langfeld
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,76 @@
|
|
1
|
+
# RubySpeech
|
2
|
+
RubySpeech is a library for constructing and parsing Text to Speech (TTS) and Automatic Speech Recognition (ASR) documents such as [SSML](http://www.w3.org/TR/speech-synthesis) and [GRXML](http://www.w3.org/TR/speech-grammar/). The primary use case is for construction of these documents to be processed by TTS and ASR engines.
|
3
|
+
|
4
|
+
## Installation
|
5
|
+
gem install ruby_speech
|
6
|
+
|
7
|
+
## Library
|
8
|
+
RubySpeech provides a DSL for constructing SSML documents like so:
|
9
|
+
|
10
|
+
```ruby
|
11
|
+
require 'ruby_speech'
|
12
|
+
|
13
|
+
RubySpeech::SSML.draw do
|
14
|
+
voice gender: :male, name: 'fred' do
|
15
|
+
string "Hi, I'm Fred. The time is currently "
|
16
|
+
say_as 'date', format: 'dmy' do
|
17
|
+
"01/02/1960"
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
```
|
22
|
+
|
23
|
+
becomes:
|
24
|
+
|
25
|
+
```xml
|
26
|
+
<?xml version="1.0"?>
|
27
|
+
<speak xmlns="http://www.w3.org/2001/10/synthesis" version="1.0" xml:lang="en-US">
|
28
|
+
<voice gender="male" name="fred">
|
29
|
+
Hi, I'm Fred. The time is currently <say-as format="dmy" interpret-as="date">01/02/1960</say-as>
|
30
|
+
</voice>
|
31
|
+
</speak>
|
32
|
+
```
|
33
|
+
|
34
|
+
Check out the [YARD documentation](http://rdoc.info/github/benlangfeld/ruby_speech/master/frames) for more
|
35
|
+
|
36
|
+
## Features:
|
37
|
+
### SSML
|
38
|
+
* Document construction
|
39
|
+
* `<voice/>`
|
40
|
+
* `<prosody/>`
|
41
|
+
* `<emphasis/>`
|
42
|
+
* `<say-as/>`
|
43
|
+
* `<break/>`
|
44
|
+
|
45
|
+
## TODO:
|
46
|
+
### SSML
|
47
|
+
#### Document Structure
|
48
|
+
* `<p/>` and `<s/>`
|
49
|
+
* `<phoneme/>`
|
50
|
+
* `<sub/>`
|
51
|
+
* `<lexicon/>`
|
52
|
+
* `<meta/>` and `<metadata/>`
|
53
|
+
|
54
|
+
#### Misc
|
55
|
+
* `<audio/>`
|
56
|
+
* `<mark/>`
|
57
|
+
* `<desc/>`
|
58
|
+
|
59
|
+
|
60
|
+
## Links:
|
61
|
+
* [Source](https://github.com/benlangfeld/ruby_speech)
|
62
|
+
* [Documentation](http://rdoc.info/github/benlangfeld/ruby_speech/master/frames)
|
63
|
+
* [Bug Tracker](https://github.com/benlangfeld/ruby_speech/issues)
|
64
|
+
|
65
|
+
## Note on Patches/Pull Requests
|
66
|
+
|
67
|
+
* Fork the project.
|
68
|
+
* Make your feature addition or bug fix.
|
69
|
+
* Add tests for it. This is important so I don't break it in a future version unintentionally.
|
70
|
+
* Commit, do not mess with rakefile, version, or history.
|
71
|
+
* If you want to have your own version, that is fine but bump version in a commit by itself so I can ignore when I pull
|
72
|
+
* Send me a pull request. Bonus points for topic branches.
|
73
|
+
|
74
|
+
## Copyright
|
75
|
+
|
76
|
+
Copyright (c) 2011 Ben Langfeld. MIT licence (see LICENSE for details).
|
data/Rakefile
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'bundler/gem_tasks'
|
2
|
+
Bundler::GemHelper.install_tasks
|
3
|
+
|
4
|
+
require 'rspec/core'
|
5
|
+
require 'rspec/core/rake_task'
|
6
|
+
require 'ci/reporter/rake/rspec'
|
7
|
+
RSpec::Core::RakeTask.new(:spec) do |spec|
|
8
|
+
spec.pattern = 'spec/**/*_spec.rb'
|
9
|
+
spec.rspec_opts = '--color'
|
10
|
+
end
|
11
|
+
|
12
|
+
RSpec::Core::RakeTask.new(:rcov) do |spec|
|
13
|
+
spec.pattern = 'spec/**/*_spec.rb'
|
14
|
+
spec.rcov = true
|
15
|
+
spec.rspec_opts = '--color'
|
16
|
+
end
|
17
|
+
|
18
|
+
task :default => :spec
|
19
|
+
task :ci => ['ci:setup:rspec', :spec]
|
20
|
+
|
21
|
+
require 'yard'
|
22
|
+
YARD::Rake::YardocTask.new
|
@@ -0,0 +1,442 @@
|
|
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="http://www.w3.org/2001/xml.xsd"/>
|
24
|
+
<xsd:annotation>
|
25
|
+
<xsd:documentation>General Datatypes</xsd:documentation>
|
26
|
+
</xsd:annotation>
|
27
|
+
|
28
|
+
<xsd:simpleType name="duration">
|
29
|
+
<xsd:annotation>
|
30
|
+
<xsd:documentation>Duration follows "Times" in CCS
|
31
|
+
specification; e.g. "25ms", "3s"
|
32
|
+
</xsd:documentation>
|
33
|
+
</xsd:annotation>
|
34
|
+
<xsd:restriction base="xsd:string">
|
35
|
+
<xsd:pattern value="(\+)?([0-9]*\.)?[0-9]+(ms|s)"/>
|
36
|
+
</xsd:restriction>
|
37
|
+
</xsd:simpleType>
|
38
|
+
|
39
|
+
|
40
|
+
<xsd:simpleType name="number">
|
41
|
+
<xsd:annotation>
|
42
|
+
<xsd:documentation>number: e.g. 10, 5.5, 1.5, 9., .45
|
43
|
+
</xsd:documentation>
|
44
|
+
</xsd:annotation>
|
45
|
+
<xsd:restriction base="xsd:decimal">
|
46
|
+
<xsd:minInclusive value="0"/>
|
47
|
+
</xsd:restriction>
|
48
|
+
</xsd:simpleType>
|
49
|
+
|
50
|
+
<xsd:simpleType name="relative">
|
51
|
+
<xsd:annotation>
|
52
|
+
<xsd:documentation>Modeled on number datatype: e.g. +4.5, -.45
|
53
|
+
</xsd:documentation>
|
54
|
+
</xsd:annotation>
|
55
|
+
<xsd:restriction base="xsd:string">
|
56
|
+
<xsd:pattern value="[+\-]([0-9]+|[0-9]+.[0-9]*|[0-9]*.[0-9]+)"/>
|
57
|
+
</xsd:restriction>
|
58
|
+
</xsd:simpleType>
|
59
|
+
|
60
|
+
<xsd:simpleType name="percent">
|
61
|
+
<xsd:annotation>
|
62
|
+
<xsd:documentation>Modeled on number datatype: e.g. +4.5%, -.45%
|
63
|
+
</xsd:documentation>
|
64
|
+
</xsd:annotation>
|
65
|
+
<xsd:restriction base="xsd:string">
|
66
|
+
<xsd:pattern value="[+\-]?([0-9]+|[0-9]+.[0-9]*|[0-9]*.[0-9]+)%"/>
|
67
|
+
</xsd:restriction>
|
68
|
+
</xsd:simpleType>
|
69
|
+
|
70
|
+
<xsd:simpleType name="semitone">
|
71
|
+
<xsd:annotation>
|
72
|
+
<xsd:documentation>Modeled on relative datatype: e.g. +4.5st, -.45st
|
73
|
+
</xsd:documentation>
|
74
|
+
</xsd:annotation>
|
75
|
+
<xsd:restriction base="xsd:string">
|
76
|
+
<xsd:pattern value="[+\-]([0-9]+|[0-9]+.[0-9]*|[0-9]*.[0-9]+)st"/>
|
77
|
+
</xsd:restriction>
|
78
|
+
</xsd:simpleType>
|
79
|
+
|
80
|
+
|
81
|
+
<xsd:simpleType name="hertz.number">
|
82
|
+
<xsd:annotation>
|
83
|
+
<xsd:documentation>number Hertz: e.g. 10Hz, 5.5Hz, 1.5Hz,, 9.Hz,, .45Hz
|
84
|
+
</xsd:documentation>
|
85
|
+
</xsd:annotation>
|
86
|
+
<xsd:restriction base="xsd:string">
|
87
|
+
<xsd:pattern value="([0-9]+|[0-9]+.[0-9]*|[0-9]*.[0-9]+)Hz"/>
|
88
|
+
</xsd:restriction>
|
89
|
+
</xsd:simpleType>
|
90
|
+
|
91
|
+
<xsd:simpleType name="hertz.relative">
|
92
|
+
<xsd:annotation>
|
93
|
+
<xsd:documentation>relative Hertz: e.g. +10Hz, -5.5Hz, +1.5Hz, +9.Hz,+.45Hz
|
94
|
+
</xsd:documentation>
|
95
|
+
</xsd:annotation>
|
96
|
+
<xsd:restriction base="xsd:string">
|
97
|
+
<xsd:pattern value="[+\-]([0-9]+|[0-9]+.[0-9]*|[0-9]*.[0-9]+)Hz"/>
|
98
|
+
</xsd:restriction>
|
99
|
+
</xsd:simpleType>
|
100
|
+
|
101
|
+
<xsd:simpleType name="volume.number">
|
102
|
+
<xsd:annotation>
|
103
|
+
<xsd:documentation>Modeled on number datatype: 0.0 - 100.0
|
104
|
+
</xsd:documentation>
|
105
|
+
</xsd:annotation>
|
106
|
+
<xsd:restriction base="number">
|
107
|
+
<xsd:minInclusive value="0.0"/>
|
108
|
+
<xsd:maxInclusive value="100.0"/>
|
109
|
+
</xsd:restriction>
|
110
|
+
</xsd:simpleType>
|
111
|
+
|
112
|
+
<xsd:simpleType name="height.scale">
|
113
|
+
<xsd:annotation>
|
114
|
+
<xsd:documentation>descriptive values for height</xsd:documentation>
|
115
|
+
</xsd:annotation>
|
116
|
+
<xsd:restriction base="xsd:string">
|
117
|
+
<xsd:enumeration value="x-high"/>
|
118
|
+
<xsd:enumeration value="high"/>
|
119
|
+
<xsd:enumeration value="medium"/>
|
120
|
+
<xsd:enumeration value="low"/>
|
121
|
+
<xsd:enumeration value="x-low"/>
|
122
|
+
<xsd:enumeration value="default"/>
|
123
|
+
</xsd:restriction>
|
124
|
+
</xsd:simpleType>
|
125
|
+
|
126
|
+
<xsd:simpleType name="speed.scale">
|
127
|
+
<xsd:annotation>
|
128
|
+
<xsd:documentation>descriptive values for speed</xsd:documentation>
|
129
|
+
</xsd:annotation>
|
130
|
+
<xsd:restriction base="xsd:string">
|
131
|
+
<xsd:enumeration value="x-fast"/>
|
132
|
+
<xsd:enumeration value="fast"/>
|
133
|
+
<xsd:enumeration value="medium"/>
|
134
|
+
<xsd:enumeration value="slow"/>
|
135
|
+
<xsd:enumeration value="x-slow"/>
|
136
|
+
<xsd:enumeration value="default"/>
|
137
|
+
</xsd:restriction>
|
138
|
+
</xsd:simpleType>
|
139
|
+
|
140
|
+
<xsd:simpleType name="volume.scale">
|
141
|
+
<xsd:annotation>
|
142
|
+
<xsd:documentation>descriptive values for volume</xsd:documentation>
|
143
|
+
</xsd:annotation>
|
144
|
+
<xsd:restriction base="xsd:string">
|
145
|
+
<xsd:enumeration value="silent"/>
|
146
|
+
<xsd:enumeration value="x-soft"/>
|
147
|
+
<xsd:enumeration value="soft"/>
|
148
|
+
<xsd:enumeration value="medium"/>
|
149
|
+
<xsd:enumeration value="loud"/>
|
150
|
+
<xsd:enumeration value="x-loud"/>
|
151
|
+
<xsd:enumeration value="default"/>
|
152
|
+
</xsd:restriction>
|
153
|
+
</xsd:simpleType>
|
154
|
+
|
155
|
+
<xsd:simpleType name="pitch.datatype">
|
156
|
+
<xsd:union memberTypes="hertz.number hertz.relative percent semitone height.scale"/>
|
157
|
+
</xsd:simpleType>
|
158
|
+
|
159
|
+
<xsd:simpleType name="range.datatype">
|
160
|
+
<xsd:union memberTypes="hertz.number hertz.relative percent semitone height.scale"/>
|
161
|
+
</xsd:simpleType>
|
162
|
+
|
163
|
+
<xsd:simpleType name="rate.datatype">
|
164
|
+
<xsd:union memberTypes="number percent speed.scale"/>
|
165
|
+
</xsd:simpleType>
|
166
|
+
|
167
|
+
<xsd:simpleType name="volume.datatype">
|
168
|
+
<xsd:union memberTypes="volume.number relative percent volume.scale"/>
|
169
|
+
</xsd:simpleType>
|
170
|
+
|
171
|
+
<xsd:simpleType name="contourpoint.datatype">
|
172
|
+
<xsd:annotation>
|
173
|
+
<xsd:documentation>(Number%,pitch.datatype) </xsd:documentation>
|
174
|
+
</xsd:annotation>
|
175
|
+
<xsd:restriction base="xsd:string">
|
176
|
+
<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)\)"/>
|
177
|
+
</xsd:restriction>
|
178
|
+
</xsd:simpleType>
|
179
|
+
|
180
|
+
|
181
|
+
<xsd:simpleType name="contour.datatype">
|
182
|
+
<xsd:annotation>
|
183
|
+
<xsd:documentation>list of whitespace separated contourpoints </xsd:documentation>
|
184
|
+
</xsd:annotation>
|
185
|
+
<xsd:list itemType="contourpoint.datatype"/>
|
186
|
+
</xsd:simpleType>
|
187
|
+
|
188
|
+
<xsd:simpleType name="gender.datatype">
|
189
|
+
<xsd:restriction base="xsd:string">
|
190
|
+
<xsd:enumeration value="male"/>
|
191
|
+
<xsd:enumeration value="female"/>
|
192
|
+
<xsd:enumeration value="neutral"/>
|
193
|
+
</xsd:restriction>
|
194
|
+
</xsd:simpleType>
|
195
|
+
|
196
|
+
|
197
|
+
<xsd:simpleType name="level.datatype">
|
198
|
+
<xsd:restriction base="xsd:string">
|
199
|
+
<xsd:enumeration value="strong"/>
|
200
|
+
<xsd:enumeration value="moderate"/>
|
201
|
+
<xsd:enumeration value="none"/>
|
202
|
+
<xsd:enumeration value="reduced"/>
|
203
|
+
</xsd:restriction>
|
204
|
+
</xsd:simpleType>
|
205
|
+
|
206
|
+
<xsd:simpleType name="strength.datatype">
|
207
|
+
<xsd:restriction base="xsd:string">
|
208
|
+
<xsd:enumeration value="none"/>
|
209
|
+
<xsd:enumeration value="x-weak"/>
|
210
|
+
<xsd:enumeration value="weak"/>
|
211
|
+
<xsd:enumeration value="medium"/>
|
212
|
+
<xsd:enumeration value="strong"/>
|
213
|
+
<xsd:enumeration value="x-strong"/>
|
214
|
+
|
215
|
+
</xsd:restriction>
|
216
|
+
</xsd:simpleType>
|
217
|
+
|
218
|
+
<xsd:simpleType name="version.datatype">
|
219
|
+
<xsd:restriction base="xsd:NMTOKEN"/>
|
220
|
+
</xsd:simpleType>
|
221
|
+
|
222
|
+
|
223
|
+
<xsd:simpleType name="voicename.datatype">
|
224
|
+
<xsd:restriction base="xsd:token">
|
225
|
+
<xsd:pattern value="\S+"/>
|
226
|
+
</xsd:restriction>
|
227
|
+
</xsd:simpleType>
|
228
|
+
|
229
|
+
<xsd:simpleType name="voicenames.datatype">
|
230
|
+
<xsd:list itemType="voicename.datatype"/>
|
231
|
+
</xsd:simpleType>
|
232
|
+
|
233
|
+
<xsd:simpleType name="alphabet.datatype">
|
234
|
+
<xsd:restriction base="xsd:string">
|
235
|
+
<xsd:pattern value="(ipa|x-.*)"/>
|
236
|
+
</xsd:restriction>
|
237
|
+
</xsd:simpleType>
|
238
|
+
|
239
|
+
|
240
|
+
<xsd:annotation>
|
241
|
+
<xsd:documentation>Attributes and Groups</xsd:documentation>
|
242
|
+
</xsd:annotation>
|
243
|
+
|
244
|
+
|
245
|
+
|
246
|
+
<xsd:attributeGroup name="speak.attribs">
|
247
|
+
<xsd:attribute name="version" type="version.datatype"/>
|
248
|
+
<xsd:attribute ref="xml:lang"/>
|
249
|
+
<xsd:attribute ref="xml:base"/>
|
250
|
+
</xsd:attributeGroup>
|
251
|
+
|
252
|
+
|
253
|
+
<xsd:annotation>
|
254
|
+
<xsd:documentation>Content Models</xsd:documentation>
|
255
|
+
</xsd:annotation>
|
256
|
+
|
257
|
+
<xsd:group name="allowed-within-sentence">
|
258
|
+
<xsd:choice>
|
259
|
+
<xsd:element ref="aws"/>
|
260
|
+
</xsd:choice>
|
261
|
+
</xsd:group>
|
262
|
+
|
263
|
+
|
264
|
+
<xsd:group name="paragraph.class">
|
265
|
+
<xsd:sequence>
|
266
|
+
<xsd:choice minOccurs="0" maxOccurs="unbounded">
|
267
|
+
<xsd:group ref="allowed-within-sentence"/>
|
268
|
+
<xsd:element ref="s"/>
|
269
|
+
</xsd:choice>
|
270
|
+
</xsd:sequence>
|
271
|
+
</xsd:group>
|
272
|
+
|
273
|
+
<xsd:group name="sentence.class">
|
274
|
+
<xsd:sequence>
|
275
|
+
<xsd:choice minOccurs="0" maxOccurs="unbounded">
|
276
|
+
<xsd:group ref="allowed-within-sentence"/>
|
277
|
+
</xsd:choice>
|
278
|
+
</xsd:sequence>
|
279
|
+
</xsd:group>
|
280
|
+
|
281
|
+
<xsd:group name="sentenceAndStructure.class">
|
282
|
+
<xsd:sequence>
|
283
|
+
<xsd:choice minOccurs="0" maxOccurs="unbounded">
|
284
|
+
<xsd:group ref="allowed-within-sentence"/>
|
285
|
+
<xsd:group ref="structure"/>
|
286
|
+
</xsd:choice>
|
287
|
+
</xsd:sequence>
|
288
|
+
</xsd:group>
|
289
|
+
|
290
|
+
<xsd:group name="descAndSentenceAndStructure.class">
|
291
|
+
<xsd:sequence>
|
292
|
+
<xsd:choice minOccurs="0" maxOccurs="unbounded">
|
293
|
+
<xsd:group ref="sentenceAndStructure.class"/>
|
294
|
+
<xsd:element ref="desc"/>
|
295
|
+
</xsd:choice>
|
296
|
+
</xsd:sequence>
|
297
|
+
</xsd:group>
|
298
|
+
|
299
|
+
<xsd:group name="speak.class">
|
300
|
+
<xsd:sequence>
|
301
|
+
<xsd:choice minOccurs="0" maxOccurs="unbounded">
|
302
|
+
<xsd:element name="meta" type="ssml-meta"/>
|
303
|
+
<xsd:element name="metadata" type="ssml-metadata"/>
|
304
|
+
<xsd:element name="lexicon" type="ssml-lexicon"/>
|
305
|
+
</xsd:choice>
|
306
|
+
<xsd:group ref="sentenceAndStructure.class" minOccurs="0" maxOccurs="unbounded"/>
|
307
|
+
</xsd:sequence>
|
308
|
+
</xsd:group>
|
309
|
+
|
310
|
+
<xsd:annotation>
|
311
|
+
<xsd:documentation>Elements</xsd:documentation>
|
312
|
+
</xsd:annotation>
|
313
|
+
<xsd:element name="aws" abstract="true">
|
314
|
+
<xsd:annotation>
|
315
|
+
<xsd:documentation>The 'allowed-within-sentence' group uses this abstract element.</xsd:documentation>
|
316
|
+
</xsd:annotation>
|
317
|
+
</xsd:element>
|
318
|
+
|
319
|
+
<xsd:element name="struct" abstract="true"/>
|
320
|
+
<xsd:group name="structure">
|
321
|
+
<xsd:choice>
|
322
|
+
<xsd:element ref="struct"/>
|
323
|
+
</xsd:choice>
|
324
|
+
</xsd:group>
|
325
|
+
|
326
|
+
<xsd:element name="speak" type="speak"/>
|
327
|
+
|
328
|
+
<xsd:complexType name="speak" mixed="true">
|
329
|
+
<xsd:group ref="speak.class"/>
|
330
|
+
<xsd:attributeGroup ref="speak.attribs"/>
|
331
|
+
</xsd:complexType>
|
332
|
+
|
333
|
+
<xsd:element name="p" type="paragraph" substitutionGroup="struct"/>
|
334
|
+
|
335
|
+
<xsd:complexType name="paragraph" mixed="true">
|
336
|
+
<xsd:group ref="paragraph.class"/>
|
337
|
+
<xsd:attribute ref="xml:lang"/>
|
338
|
+
</xsd:complexType>
|
339
|
+
|
340
|
+
<xsd:element name="s" type="sentence" substitutionGroup="struct"/>
|
341
|
+
<xsd:complexType name="sentence" mixed="true">
|
342
|
+
<xsd:group ref="sentence.class"/>
|
343
|
+
<xsd:attribute ref="xml:lang"/>
|
344
|
+
</xsd:complexType>
|
345
|
+
|
346
|
+
<xsd:element name="voice" type="voice" substitutionGroup="aws"/>
|
347
|
+
|
348
|
+
<xsd:complexType name="voice" mixed="true">
|
349
|
+
<xsd:group ref="sentenceAndStructure.class"/>
|
350
|
+
<xsd:attribute name="gender" type="gender.datatype"/>
|
351
|
+
<xsd:attribute name="age" type="xsd:nonNegativeInteger"/>
|
352
|
+
<xsd:attribute name="variant" type="xsd:positiveInteger"/>
|
353
|
+
<xsd:attribute name="name" type="voicenames.datatype"/>
|
354
|
+
<xsd:attribute ref="xml:lang"/>
|
355
|
+
</xsd:complexType>
|
356
|
+
|
357
|
+
<xsd:element name="prosody" type="prosody" substitutionGroup="aws"/>
|
358
|
+
<xsd:complexType name="prosody" mixed="true">
|
359
|
+
<xsd:group ref="sentenceAndStructure.class"/>
|
360
|
+
<xsd:attribute name="pitch" type="pitch.datatype"/>
|
361
|
+
<xsd:attribute name="contour" type="contour.datatype"/>
|
362
|
+
<xsd:attribute name="range" type="range.datatype"/>
|
363
|
+
<xsd:attribute name="rate" type="rate.datatype"/>
|
364
|
+
<xsd:attribute name="duration" type="duration"/>
|
365
|
+
<xsd:attribute name="volume" type="volume.datatype" default="100.0"/>
|
366
|
+
</xsd:complexType>
|
367
|
+
|
368
|
+
<xsd:element name="audio" type="audio" substitutionGroup="aws"/>
|
369
|
+
<xsd:complexType name="audio" mixed="true">
|
370
|
+
<xsd:group ref="descAndSentenceAndStructure.class"/>
|
371
|
+
<xsd:attribute name="src" type="xsd:anyURI"/>
|
372
|
+
</xsd:complexType>
|
373
|
+
|
374
|
+
<xsd:element name="desc" type="desc"/>
|
375
|
+
<xsd:complexType name="desc">
|
376
|
+
<xsd:simpleContent>
|
377
|
+
<xsd:extension base="xsd:string">
|
378
|
+
<xsd:attribute ref="xml:lang"/>
|
379
|
+
</xsd:extension>
|
380
|
+
</xsd:simpleContent>
|
381
|
+
</xsd:complexType>
|
382
|
+
|
383
|
+
<xsd:element name="emphasis" type="emphasis" substitutionGroup="aws"/>
|
384
|
+
<xsd:complexType name="emphasis" mixed="true">
|
385
|
+
<xsd:group ref="sentence.class"/>
|
386
|
+
<xsd:attribute name="level" type="level.datatype" default="moderate"/>
|
387
|
+
</xsd:complexType>
|
388
|
+
|
389
|
+
<xsd:element name="sub" type="sub" substitutionGroup="aws"/>
|
390
|
+
<xsd:complexType name="sub">
|
391
|
+
<xsd:simpleContent>
|
392
|
+
<xsd:extension base="xsd:string">
|
393
|
+
<xsd:attribute name="alias" type="xsd:string" use="required"/>
|
394
|
+
</xsd:extension>
|
395
|
+
</xsd:simpleContent>
|
396
|
+
</xsd:complexType>
|
397
|
+
|
398
|
+
|
399
|
+
<xsd:element name="say-as" type="say-as" substitutionGroup="aws"/>
|
400
|
+
<xsd:complexType name="say-as" mixed="true">
|
401
|
+
<xsd:attribute name="interpret-as" type="xsd:NMTOKEN"
|
402
|
+
use="required"/>
|
403
|
+
<xsd:attribute name="format" type="xsd:NMTOKEN"/>
|
404
|
+
<xsd:attribute name="detail" type="xsd:NMTOKEN"/>
|
405
|
+
</xsd:complexType>
|
406
|
+
|
407
|
+
<xsd:element name="phoneme" type="phoneme" substitutionGroup="aws"/>
|
408
|
+
<xsd:complexType name="phoneme" mixed="true">
|
409
|
+
<xsd:attribute name="ph" type="xsd:string" use="required"/>
|
410
|
+
<xsd:attribute name="alphabet" type="alphabet.datatype"/>
|
411
|
+
</xsd:complexType>
|
412
|
+
|
413
|
+
<xsd:element name="break" type="break" substitutionGroup="aws"/>
|
414
|
+
<xsd:complexType name="break">
|
415
|
+
<xsd:attribute name="time" type="duration"/>
|
416
|
+
<xsd:attribute name="strength" type="strength.datatype" default="medium"/>
|
417
|
+
</xsd:complexType>
|
418
|
+
|
419
|
+
<xsd:element name="mark" type="mark" substitutionGroup="aws"/>
|
420
|
+
<xsd:complexType name="mark">
|
421
|
+
<xsd:attribute name="name" type="xsd:token"/>
|
422
|
+
</xsd:complexType>
|
423
|
+
|
424
|
+
<xsd:complexType name="ssml-metadata">
|
425
|
+
<xsd:choice minOccurs="0" maxOccurs="unbounded">
|
426
|
+
<xsd:any namespace="##other" processContents="lax"/>
|
427
|
+
</xsd:choice>
|
428
|
+
<xsd:anyAttribute namespace="##any" processContents="strict"/>
|
429
|
+
</xsd:complexType>
|
430
|
+
|
431
|
+
<xsd:complexType name="ssml-meta">
|
432
|
+
<xsd:attribute name="name" type="xsd:NMTOKEN"/>
|
433
|
+
<xsd:attribute name="content" type="xsd:string" use="required"/>
|
434
|
+
<xsd:attribute name="http-equiv" type="xsd:NMTOKEN"/>
|
435
|
+
</xsd:complexType>
|
436
|
+
|
437
|
+
<xsd:complexType name="ssml-lexicon">
|
438
|
+
<xsd:attribute name="uri" type="xsd:anyURI" use="required"/>
|
439
|
+
<xsd:attribute name="type" type="xsd:string"/>
|
440
|
+
</xsd:complexType>
|
441
|
+
|
442
|
+
</xsd:schema>
|