Skip to content

Commit d7c7b34

Browse files
committed
renamed voice-pitch-range to voice-range
fixed clamping for out-of-range (actual user agent) values
1 parent 4019fc3 commit d7c7b34

2 files changed

Lines changed: 142 additions & 94 deletions

File tree

css3-speech/Overview.html

Lines changed: 79 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -308,8 +308,8 @@ <h2 class="no-num no-toc" id=contents>Table of contents</h2>
308308
</span>The &lsquo;<code class=property>voice-pitch</code>&rsquo;
309309
property</a>
310310

311-
<li><a href="#voice-props-voice-pitch-range"><span class=secno>10.4.
312-
</span>The &lsquo;<code class=property>voice-pitch-range</code>&rsquo;
311+
<li><a href="#voice-props-voice-range"><span class=secno>10.4.
312+
</span>The &lsquo;<code class=property>voice-range</code>&rsquo;
313313
property</a>
314314
</ul>
315315

@@ -2162,6 +2162,13 @@ <h3 id=voice-props-voice-pitch><span class=secno>10.3. </span>The &lsquo;<a
21622162
pitch of the output). For example, the common pitch for a male voice is
21632163
around 120Hz, whereas it is around 210Hz for a female voice.
21642164

2165+
<p> Speech-capable user agents are likely to support a specific range of
2166+
values rather than the full range of possible computed numerical values
2167+
for frequencies. The actual values in user agents may therefore be clamped
2168+
to implementation-dependent minimum and maximum boundaries. For example:
2169+
although the 0Hz frequency can be legitimately computed, it may be clamped
2170+
to a more meaningful value in the context of the speech synthesizer.
2171+
21652172
<p class=note> Note that the functionality provided by this property is
21662173
related to the <a
21672174
href="http://www.w3.org/TR/speech-synthesis11/#edef_prosody"><code>pitch</code>
@@ -2175,43 +2182,47 @@ <h3 id=voice-props-voice-pitch><span class=secno>10.3. </span>The &lsquo;<a
21752182
<p> A value in <a href="#frequency-def">frequency</a> units (Hertz or
21762183
kiloHertz, e.g. "100Hz", "+2kHz"). Values are restricted to positive
21772184
numbers when the &lsquo;<code class=property>absolute</code>&rsquo;
2178-
keyword is used. Otherwise, a negative value represents an decrement,
2179-
and a positive value represents an increment (relative to the inherited
2180-
frequency value). For example, "2kHz" is a positive offset (strictly
2181-
equivalent to "+2kHz"), unlike "+2kHz absolute" which is an absolute
2182-
frequency value (strictly equivalent to "2kHz absolute"). Computed
2183-
frequency values that are negative numbers result in the property being
2184-
ignored.</p>
2185+
keyword is used. Otherwise (when the &lsquo;<code
2186+
class=property>absolute</code>&rsquo; keyword is not used), a negative
2187+
value represents an decrement, and a positive value represents an
2188+
increment (relative to the inherited value). For example, "2kHz" is a
2189+
positive offset (strictly equivalent to "+2kHz"), and "+2kHz absolute"
2190+
is an absolute frequency (strictly equivalent to "2kHz absolute").
2191+
Computed absolute frequency values that are negative are clamped to zero
2192+
Hertz.</p>
21852193

21862194
<dt> <strong>absolute</strong>
21872195

21882196
<dd>
2189-
<p> This keyword specifies that the provided frequency value is expressed
2190-
as a positive absolute value.</p>
2197+
<p> This keyword specifies that the provided frequency is expressed as an
2198+
absolute, positive value. When a negative value is provided, it is
2199+
clamped to zero.</p>
21912200

21922201
<dt> <strong>&lt;semitones&gt;</strong>
21932202

21942203
<dd>
21952204
<p> Specifies a relative change (decrement or increment) to the inherited
2196-
frequency value. The syntax of allowed values is a &lt;<a
2205+
value. The syntax of allowed values is a &lt;<a
21972206
href="#number-def">number</a>&gt; followed immediately by "st"
21982207
(semitones). A semitone is half of a tone (a half step) on the standard
21992208
diatonic scale. As such, a semitone doesn't correspond to a fixed
22002209
frequency: the ratio between two consecutive frequencies separated by
22012210
exactly one semitone is the twelfth root of two (approximately 1.05946).
2202-
</p>
2211+
Computed absolute frequency values that are negative are clamped to zero
2212+
Hertz.</p>
22032213

22042214
<dt> <strong>&lt;percentage&gt;</strong>
22052215

22062216
<dd>
22072217
<p> Positive and negative <a href="#percentage-def">percentage</a> values
22082218
are allowed, to represent an increment or decrement (respectively)
2209-
relative to the inherited frequency value. Computed values are
2210-
calculated by adding (or subtracting) the specified fraction of the
2211-
inherited frequency value, to (from) the inherited frequency value. For
2212-
example, 50% (which is equivalent to +50%) with a inherited value of
2213-
200Hz results in <code>200 + (200*0.5)</code> = 300Hz. Conversely, -50%
2214-
results in <code>200-(200*0.5)</code> = 100Hz.</p>
2219+
relative to the inherited value. Computed values are calculated by
2220+
adding (or subtracting) the specified fraction of the inherited value,
2221+
to (from) the inherited value. For example, 50% (which is equivalent to
2222+
+50%) with a inherited value of 200Hz results in <code>200 +
2223+
(200*0.5)</code> = 300Hz. Conversely, -50% results in
2224+
<code>200-(200*0.5)</code> = 100Hz. Computed absolute frequency values
2225+
that are negative are clamped to zero Hertz.</p>
22152226

22162227
<dt><strong>x-low</strong>, <strong>low</strong>, <strong>medium</strong>,
22172228
<strong>high</strong>, <strong>x-high</strong>
@@ -2237,16 +2248,16 @@ <h3 id=voice-props-voice-pitch><span class=secno>10.3. </span>The &lsquo;<a
22372248
</pre>
22382249
</div>
22392250

2240-
<h3 id=voice-props-voice-pitch-range><span class=secno>10.4. </span>The
2241-
&lsquo;<a href="#voice-pitch-range"><code
2242-
class=property>voice-pitch-range</code></a>&rsquo; property</h3>
2251+
<h3 id=voice-props-voice-range><span class=secno>10.4. </span>The &lsquo;<a
2252+
href="#voice-range"><code class=property>voice-range</code></a>&rsquo;
2253+
property</h3>
22432254

22442255
<table class=propdef summary="name: syntax">
22452256
<tbody>
22462257
<tr>
22472258
<td>Name:
22482259

2249-
<td> <dfn id=voice-pitch-range>voice-pitch-range</dfn>
2260+
<td> <dfn id=voice-range>voice-range</dfn>
22502261

22512262
<tr>
22522263
<td> <em>Value:</em>
@@ -2285,15 +2296,22 @@ <h3 id=voice-props-voice-pitch-range><span class=secno>10.4. </span>The
22852296
<td>specified value
22862297
</table>
22872298

2288-
<p> The &lsquo;<a href="#voice-pitch-range"><code
2289-
class=property>voice-pitch-range</code></a>&rsquo; property specifies the
2299+
<p> The &lsquo;<a href="#voice-range"><code
2300+
class=property>voice-range</code></a>&rsquo; property specifies the
22902301
variability in the "baseline" pitch, i.e. how much the fundamental
22912302
frequency may deviate from the average pitch of the speech output. The
22922303
dynamic pitch range of the generated speech generally increases for a
22932304
highly animated voice, for example when variations in inflection are used
22942305
to convey meaning and emphasis in speech. Typically, a low range produces
22952306
a flat, monotonic voice, whereas a high range produces an animated voice.
22962307

2308+
<p> Speech-capable user agents are likely to support a specific range of
2309+
values rather than the full range of possible computed numerical values
2310+
for frequencies. The actual values in user agents may therefore be clamped
2311+
to implementation-dependent minimum and maximum boundaries. For example:
2312+
although the 0Hz frequency can be legitimately computed, it may be clamped
2313+
to a more meaningful value in the context of the speech synthesizer.
2314+
22972315
<p class=note> Note that the functionality provided by this property is
22982316
related to the <a
22992317
href="http://www.w3.org/TR/speech-synthesis11/#edef_prosody"><code>range</code>
@@ -2307,42 +2325,47 @@ <h3 id=voice-props-voice-pitch-range><span class=secno>10.4. </span>The
23072325
<p> A value in <a href="#frequency-def">frequency</a> units (Hertz or
23082326
kiloHertz, e.g. "100Hz", "+2kHz"). Values are restricted to positive
23092327
numbers when the &lsquo;<code class=property>absolute</code>&rsquo;
2310-
keyword is used. Otherwise, a negative value represents an decrement,
2311-
and a positive value represents an increment (relative to the inherited
2312-
frequency value). For example, "2kHz" is a positive offset (strictly
2313-
equivalent to "+2kHz"), unlike "+2kHz absolute" which is an absolute
2314-
frequency value (strictly equivalent to "2kHz absolute"). Computed
2315-
frequency values that are negative numbers result in the property being
2316-
ignored.</p>
2328+
keyword is used. Otherwise (when the &lsquo;<code
2329+
class=property>absolute</code>&rsquo; keyword is not used), a negative
2330+
value represents an decrement, and a positive value represents an
2331+
increment (relative to the inherited value). For example, "2kHz" is a
2332+
positive offset (strictly equivalent to "+2kHz"), and "+2kHz absolute"
2333+
is an absolute frequency (strictly equivalent to "2kHz absolute").
2334+
Computed absolute frequency values that are negative are clamped to zero
2335+
Hertz.</p>
23172336

23182337
<dt> <strong>absolute</strong>
23192338

23202339
<dd>
2321-
<p> This keyword specifies that the provided frequency value is expressed
2322-
as a positive absolute value.</p>
2340+
<p> This keyword specifies that the provided frequency is expressed as an
2341+
absolute, positive value. When a negative value is provided, it is
2342+
clamped to zero.</p>
23232343

23242344
<dt> <strong>&lt;semitones&gt;</strong>
23252345

23262346
<dd>
23272347
<p> Specifies a relative change (decrement or increment) to the inherited
2328-
frequency value. The syntax of allowed values is a &lt;<a
2348+
value. The syntax of allowed values is a &lt;<a
23292349
href="#number-def">number</a>&gt; followed immediately by "st"
23302350
(semitones). A semitone is half of a tone (a half step) on the standard
23312351
diatonic scale. As such, a semitone doesn't correspond to a fixed
23322352
frequency: the ratio between two consecutive frequencies separated by
2333-
exactly one semitone is the twelfth root of two (approximately 1.05946).</p>
2353+
exactly one semitone is the twelfth root of two (approximately 1.05946).
2354+
Computed absolute frequency values that are negative are clamped to zero
2355+
Hertz.</p>
23342356

23352357
<dt> <strong>&lt;percentage&gt;</strong>
23362358

23372359
<dd>
23382360
<p> Positive and negative <a href="#percentage-def">percentage</a> values
23392361
are allowed, to represent an increment or decrement (respectively)
2340-
relative to the inherited frequency value. Computed values are
2341-
calculated by adding (or subtracting) the specified fraction of the
2342-
inherited frequency value, to (from) the inherited frequency value. For
2343-
example, 50% (which is equivalent to +50%) with a inherited value of
2344-
200Hz results in <code>200 + (200*0.5)</code> = 300Hz. Conversely, -50%
2345-
results in <code>200-(200*0.5)</code> = 100Hz.</p>
2362+
relative to the inherited value. Computed values are calculated by
2363+
adding (or subtracting) the specified fraction of the inherited value,
2364+
to (from) the inherited frequency value. For example, 50% (which is
2365+
equivalent to +50%) with a inherited value of 200Hz results in <code>200
2366+
+ (200*0.5)</code> = 300Hz. Conversely, -50% results in
2367+
<code>200-(200*0.5)</code> = 100Hz. Computed absolute frequency values
2368+
that are negative are clamped to zero Hertz.</p>
23462369

23472370
<dt><strong>x-low</strong>, <strong>low</strong>, <strong>medium</strong>,
23482371
<strong>high</strong> and <strong>x-high</strong>
@@ -2992,7 +3015,7 @@ <h2 class=no-num id=property-index>Appendix A &mdash; Property index</h2>
29923015
<td>speech
29933016

29943017
<tr>
2995-
<td><a class=property href="#voice-pitch-range">voice-pitch-range</a>
3018+
<td><a class=property href="#voice-range">voice-range</a>
29963019

29973020
<td>&lt;frequency&gt; &amp;&amp; absolute? | &lt;semitones&gt; |
29983021
&lt;percentage&gt; | x-low | low | medium | high | x-high
@@ -3263,8 +3286,8 @@ <h2 class=no-num id=index>Appendix B &mdash; Index</h2>
32633286
<li>voice-pitch, <a href="#voice-pitch"
32643287
title=voice-pitch><strong>10.3.</strong></a>
32653288

3266-
<li>voice-pitch-range, <a href="#voice-pitch-range"
3267-
title=voice-pitch-range><strong>10.4.</strong></a>
3289+
<li>voice-range, <a href="#voice-range"
3290+
title=voice-range><strong>10.4.</strong></a>
32683291

32693292
<li>voice-rate, <a href="#voice-rate"
32703293
title=voice-rate><strong>10.2.</strong></a>
@@ -3481,6 +3504,13 @@ <h2 class=no-num id=changes>Appendix D &mdash; Changes from previous draft</h2>
34813504
list of changes</a>, which - for succinctness - is not repeated here.
34823505

34833506
<ul>
3507+
<li>Renamed &lsquo;<code class=property>voice-pitch-range</code>&rsquo; to
3508+
&lsquo;<a href="#voice-range"><code
3509+
class=property>voice-range</code></a>&rsquo;, which is compatible with
3510+
SSML's notation, and removes the possibility to interpret this property
3511+
as being a subset of &lsquo;<a href="#voice-pitch"><code
3512+
class=property>voice-pitch</code></a>&rsquo;.
3513+
34843514
<li>Removed the "phonemes" property (and its associated "@alphabet"
34853515
at-rule).
34863516

@@ -3507,9 +3537,8 @@ <h2 class=no-num id=changes>Appendix D &mdash; Changes from previous draft</h2>
35073537
class=property>rest</code></a>&rsquo;, which should be zero (were
35083538
"implementation-dependent").
35093539

3510-
<li>Corrected the [initial] values for &lsquo;<a
3511-
href="#voice-pitch-range"><code
3512-
class=property>voice-pitch-range</code></a>&rsquo; and &lsquo;<a
3540+
<li>Corrected the [initial] values for &lsquo;<a href="#voice-range"><code
3541+
class=property>voice-range</code></a>&rsquo; and &lsquo;<a
35133542
href="#voice-pitch"><code class=property>voice-pitch</code></a>&rsquo; to
35143543
"medium".
35153544

@@ -3571,8 +3600,8 @@ <h2 class=no-num id=changes>Appendix D &mdash; Changes from previous draft</h2>
35713600

35723601
<li>Separated the &lsquo;<code class=property>absolute</code>&rsquo;
35733602
keyword for &lsquo;<a href="#voice-pitch"><code
3574-
class=property>voice-pitch</code></a>&rsquo; and &lsquo;<code
3575-
class=property>voice-range</code>&rsquo;.
3603+
class=property>voice-pitch</code></a>&rsquo; and &lsquo;<a
3604+
href="#voice-range"><code class=property>voice-range</code></a>&rsquo;.
35763605

35773606
<li>Improved document structure by adding sub-sections.
35783607

0 commit comments

Comments
 (0)