Skip to content

Commit 665dfd6

Browse files
committed
voice-rate "computed value" fix, made consistent with voice-volume by allowing combination of keyword and percentage, added example.
1 parent 39b19ae commit 665dfd6

2 files changed

Lines changed: 148 additions & 45 deletions

File tree

css3-speech/Overview.html

Lines changed: 78 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ <h3 id=mixing-props-voice-volume><span class=secno>5.1. </span>The
548548
<tr>
549549
<td> <em>Computed value:</em>
550550

551-
<td>keyword value, and decibel offset (if not zero)
551+
<td>a keyword value, and optionally also a decibel offset (if not zero)
552552
</table>
553553

554554
<p>The &lsquo;<a href="#voice-volume"><code
@@ -618,15 +618,16 @@ <h3 id=mixing-props-voice-volume><span class=secno>5.1. </span>The
618618
(decibel unit). This represents a change (positive or negative) relative
619619
to the given keyword value (see enumeration above), or to the default
620620
value for the root element, or otherwise to the inherited volume level
621-
(which may itself be be a combination of a keyword value and of a
622-
decibel offset). When the inherited volume level is &lsquo;<code
621+
(which may itself be a combination of a keyword value and of a decibel
622+
offset, in which case the decibel values are combined additively). When
623+
the inherited volume level is &lsquo;<code
623624
class=property>silent</code>&rsquo;, this &lsquo;<a
624625
href="#voice-volume"><code class=property>voice-volume</code></a>&rsquo;
625626
resolves to &lsquo;<code class=property>silent</code>&rsquo; too,
626-
regardless of the specified &lt;decibel&gt; value. Decibels express the
627-
ratio of the squares of the new signal amplitude (a1) and the current
628-
amplitude (a0), as per the following logarithmic equation: volume(dB) =
629-
20 log10 (a1 / a0)</p>
627+
regardless of the specified &lt;decibel&gt; value. Decibels represent
628+
the ratio of the squares of the new signal amplitude (a1) and the
629+
current amplitude (a0), as per the following logarithmic equation:
630+
volume(dB) = 20 log10 (a1 / a0)</p>
630631

631632
<p class=note> Note that -6.0dB is approximately half the amplitude of
632633
the audio signal, and +6.0dB is approximately twice the amplitude.</p>
@@ -691,7 +692,9 @@ <h3 id=mixing-props-voice-balance><span class=secno>5.2. </span>The
691692
<tr>
692693
<td> <em>Computed value:</em>
693694

694-
<td>specified value
695+
<td>the specified value resolved to a &lt;number&gt; between
696+
&lsquo;<code class=css>-100</code>&rsquo; and &lsquo;<code
697+
class=css>100</code>&rsquo; (inclusive)
695698
</table>
696699

697700
<p> The &lsquo;<a href="#voice-balance"><code
@@ -2033,8 +2036,8 @@ <h3 id=voice-props-voice-rate><span class=secno>10.2. </span>The &lsquo;<a
20332036
<tr>
20342037
<td> <em>Value:</em>
20352038

2036-
<td>normal | &lt;percentage&gt; | x-slow | slow | medium | fast | x-fast
2037-
2039+
<td>[normal | x-slow | slow | medium | fast | x-fast] ||
2040+
&lt;percentage&gt;
20382041

20392042
<tr>
20402043
<td> <em>Initial:</em>
@@ -2064,7 +2067,8 @@ <h3 id=voice-props-voice-rate><span class=secno>10.2. </span>The &lsquo;<a
20642067
<tr>
20652068
<td> <em>Computed value:</em>
20662069

2067-
<td>specified value
2070+
<td>a keyword value, and optionally also a percentage relative to the
2071+
keyword (if not 100%)
20682072
</table>
20692073

20702074
<p>The &lsquo;<a href="#voice-rate"><code
@@ -2085,26 +2089,69 @@ <h3 id=voice-props-voice-rate><span class=secno>10.2. </span>The &lsquo;<a
20852089
currently active voice. This is processor-specific and depends on the
20862090
language, dialect and on the "personality" of the voice.</p>
20872091

2088-
<dt> <strong>&lt;percentage&gt;</strong>
2089-
2090-
<dd>
2091-
<p>Only non-negative <a href="#percentage-def">percentage</a> values are
2092-
allowed. Computed values are calculated relative to the default speaking
2093-
rate for the voice (the "normal" computed value). For example, 50% means
2094-
that the default value gets multiplied by 0.5, which results in half the
2095-
default rate of the voice.</p>
2096-
20972092
<dt><strong>x-slow</strong>, <strong>slow</strong>,
20982093
<strong>medium</strong>, <strong>fast</strong> and
20992094
<strong>x-fast</strong>
21002095

21012096
<dd>
21022097
<p>A sequence of monotonically non-decreasing speaking rates that are
2103-
implementation and voice specific. For example, typical values for the
2098+
implementation and voice -specific. For example, typical values for the
21042099
English language are (in words per minute) x-slow = 80, slow = 120,
21052100
medium = between 180 and 200, fast = 500.</p>
2101+
2102+
<dt> <strong>&lt;percentage&gt;</strong>
2103+
2104+
<dd>
2105+
<p>Only non-negative <a href="#percentage-def">percentage</a> values are
2106+
allowed. This represents a change relative to the given keyword value
2107+
(see enumeration above), or to the default value for the root element,
2108+
or otherwise to the inherited speaking rate (which may itself be a
2109+
combination of a keyword value and of a percentage, in which case
2110+
percentages are combined multiplicatively). For example, 50% means that
2111+
the speaking rate gets multiplied by 0.5 (half the value).</p>
21062112
</dl>
21072113

2114+
<div class=example>
2115+
<p>Examples of inherited values:</p>
2116+
2117+
<pre>
2118+
&lt;body&gt;
2119+
&lt;e1&gt;
2120+
&lt;e2&gt;
2121+
&lt;e3&gt;
2122+
...
2123+
&lt;/e3&gt;
2124+
&lt;/e2&gt;
2125+
&lt;/e1&gt;
2126+
&lt;/body&gt;
2127+
2128+
2129+
2130+
2131+
body { voice-rate: inherit; } /* the initial value is 'normal'
2132+
(the actual speaking rate value
2133+
depends on the active voice) */
2134+
2135+
e1 { voice-rate: +50%; } /* the computed value is
2136+
['normal' and 50%], which will resolve
2137+
to the rate corresponding to 'normal'
2138+
multiplied by 0.5 (half the speaking rate) */
2139+
2140+
e2 { voice-rate: fast 120%; } /* the computed value is
2141+
['fast' and 120%], which will resolve
2142+
to the rate corresponding to 'fast'
2143+
multiplied by 1.2 (one and a half times the speaking rate) */
2144+
2145+
e3 { voice-rate: normal; /* "resets" the speaking rate to the intrinsic voice value,
2146+
the computed value is 'normal' (see comment below for actual value) */
2147+
2148+
voice-family: "another-voice"; } /* because the voice is different,
2149+
the calculated speaking rate may vary
2150+
compared to "body" (even though the computed
2151+
'voice-rate' value is the same) */
2152+
</pre>
2153+
</div>
2154+
21082155
<h3 id=voice-props-voice-pitch><span class=secno>10.3. </span>The &lsquo;<a
21092156
href="#voice-pitch"><code class=property>voice-pitch</code></a>&rsquo;
21102157
property</h3>
@@ -2152,7 +2199,7 @@ <h3 id=voice-props-voice-pitch><span class=secno>10.3. </span>The &lsquo;<a
21522199

21532200
<td>an absolute frequency, or a keyword value and potentially also a
21542201
frequency, semitone, and/or percentage representing any non-zero
2155-
offsets
2202+
offsets (relative to the keyword)
21562203
</table>
21572204

21582205
<p>The &lsquo;<a href="#voice-pitch"><code
@@ -2294,7 +2341,7 @@ <h3 id=voice-props-voice-range><span class=secno>10.4. </span>The &lsquo;<a
22942341

22952342
<td>an absolute frequency, or a keyword value and potentially also a
22962343
frequency, semitone, and/or percentage representing any non-zero
2297-
offsets
2344+
offsets (relative to the keyword)
22982345
</table>
22992346

23002347
<p> The &lsquo;<a href="#voice-range"><code
@@ -3098,7 +3145,8 @@ <h2 class=no-num id=property-index>Appendix A &mdash; Property index</h2>
30983145
<tr>
30993146
<td><a class=property href="#voice-rate">voice-rate</a>
31003147

3101-
<td>normal | &lt;percentage&gt; | x-slow | slow | medium | fast | x-fast
3148+
<td>[normal | x-slow | slow | medium | fast | x-fast] ||
3149+
&lt;percentage&gt;
31023150

31033151
<td>normal
31043152

@@ -3634,6 +3682,12 @@ <h2 class=no-num id=changes>Appendix D &mdash; Changes from previous draft</h2>
36343682
<li>Added the &lsquo;<code class=property>normal</code>&rsquo; value for
36353683
voice-rate ("default" in SSML 1.1).
36363684

3685+
<li>Fixed the "computed value" for voice-rate, and added the possibility
3686+
to combine keywords and percentages (to be consistent with &lsquo;<a
3687+
href="#voice-volume"><code
3688+
class=property>voice-volume</code></a>&rsquo;). Added an example to
3689+
illustrate inheritance and value resolution.
3690+
36373691
<li>Renamed voice-family fields to be consistent with SSML.
36383692

36393693
<li>Improved the &lsquo;<a href="#voice-family"><code

css3-speech/Overview.src.html

Lines changed: 70 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ <h3 id="mixing-props-voice-volume">The 'voice-volume' property</h3>
292292
<td>
293293
<em>Computed value:</em>
294294
</td>
295-
<td>keyword value, and decibel offset (if not zero)</td>
295+
<td>a keyword value, and optionally also a decibel offset (if not zero)</td>
296296
</tr>
297297
</tbody>
298298
</table>
@@ -342,11 +342,12 @@ <h3 id="mixing-props-voice-volume">The 'voice-volume' property</h3>
342342
<p>A <a href="#number-def">number</a> immediately followed by "dB" (decibel unit). This
343343
represents a change (positive or negative) relative to the given keyword value (see
344344
enumeration above), or to the default value for the root element, or otherwise to the
345-
inherited volume level (which may itself be be a combination of a keyword value and of a
346-
decibel offset). When the inherited volume level is 'silent', this 'voice-volume' resolves
347-
to 'silent' too, regardless of the specified &lt;decibel&gt; value. Decibels express the
348-
ratio of the squares of the new signal amplitude (a1) and the current amplitude (a0), as
349-
per the following logarithmic equation: volume(dB) = 20 log10 (a1 / a0) </p>
345+
inherited volume level (which may itself be a combination of a keyword value and of a
346+
decibel offset, in which case the decibel values are combined additively). When the
347+
inherited volume level is 'silent', this 'voice-volume' resolves to 'silent' too,
348+
regardless of the specified &lt;decibel&gt; value. Decibels represent the ratio of the
349+
squares of the new signal amplitude (a1) and the current amplitude (a0), as per the
350+
following logarithmic equation: volume(dB) = 20 log10 (a1 / a0) </p>
350351
<p class="note"> Note that -6.0dB is approximately half the amplitude of the audio signal,
351352
and +6.0dB is approximately twice the amplitude.</p>
352353
</dd>
@@ -408,7 +409,8 @@ <h3 id="mixing-props-voice-balance">The 'voice-balance' property</h3>
408409
<td>
409410
<em>Computed value:</em>
410411
</td>
411-
<td>specified value</td>
412+
<td>the specified value resolved to a &lt;number&gt; between '-100' and '100'
413+
(inclusive)</td>
412414
</tr>
413415
</tbody>
414416
</table>
@@ -1582,7 +1584,7 @@ <h3 id="voice-props-voice-rate">The 'voice-rate' property</h3>
15821584
<td>
15831585
<em>Value:</em>
15841586
</td>
1585-
<td>normal | &lt;percentage&gt; | x-slow | slow | medium | fast | x-fast </td>
1587+
<td>[normal | x-slow | slow | medium | fast | x-fast] || &lt;percentage&gt;</td>
15861588
</tr>
15871589
<tr>
15881590
<td>
@@ -1618,7 +1620,8 @@ <h3 id="voice-props-voice-rate">The 'voice-rate' property</h3>
16181620
<td>
16191621
<em>Computed value:</em>
16201622
</td>
1621-
<td>specified value</td>
1623+
<td>a keyword value, and optionally also a percentage relative to the keyword (if not
1624+
100%)</td>
16221625
</tr>
16231626
</tbody>
16241627
</table>
@@ -1636,23 +1639,66 @@ <h3 id="voice-props-voice-rate">The 'voice-rate' property</h3>
16361639
voice. This is processor-specific and depends on the language, dialect and on the
16371640
"personality" of the voice. </p>
16381641
</dd>
1639-
<dt>
1640-
<strong>&lt;percentage&gt;</strong>
1641-
</dt>
1642-
<dd>
1643-
<p>Only non-negative <a href="#percentage-def">percentage</a> values are allowed. Computed
1644-
values are calculated relative to the default speaking rate for the voice (the "normal"
1645-
computed value). For example, 50% means that the default value gets multiplied by 0.5,
1646-
which results in half the default rate of the voice.</p>
1647-
</dd>
16481642
<dt><strong>x-slow</strong>, <strong>slow</strong>, <strong>medium</strong>,
16491643
<strong>fast</strong> and <strong>x-fast</strong></dt>
16501644
<dd>
16511645
<p>A sequence of monotonically non-decreasing speaking rates that are implementation and
1652-
voice specific. For example, typical values for the English language are (in words per
1646+
voice -specific. For example, typical values for the English language are (in words per
16531647
minute) x-slow = 80, slow = 120, medium = between 180 and 200, fast = 500. </p>
16541648
</dd>
1649+
<dt>
1650+
<strong>&lt;percentage&gt;</strong>
1651+
</dt>
1652+
<dd>
1653+
<p>Only non-negative <a href="#percentage-def">percentage</a> values are allowed. This
1654+
represents a change relative to the given keyword value (see enumeration above), or to the
1655+
default value for the root element, or otherwise to the inherited speaking rate (which may
1656+
itself be a combination of a keyword value and of a percentage, in which case percentages
1657+
are combined multiplicatively). For example, 50% means that the speaking rate gets
1658+
multiplied by 0.5 (half the value).</p>
1659+
</dd>
16551660
</dl>
1661+
1662+
<div class="example">
1663+
<p>Examples of inherited values:</p>
1664+
<pre>
1665+
&lt;body&gt;
1666+
&lt;e1&gt;
1667+
&lt;e2&gt;
1668+
&lt;e3&gt;
1669+
...
1670+
&lt;/e3&gt;
1671+
&lt;/e2&gt;
1672+
&lt;/e1&gt;
1673+
&lt;/body&gt;
1674+
1675+
1676+
1677+
1678+
body { voice-rate: inherit; } /* the initial value is 'normal'
1679+
(the actual speaking rate value
1680+
depends on the active voice) */
1681+
1682+
e1 { voice-rate: +50%; } /* the computed value is
1683+
['normal' and 50%], which will resolve
1684+
to the rate corresponding to 'normal'
1685+
multiplied by 0.5 (half the speaking rate) */
1686+
1687+
e2 { voice-rate: fast 120%; } /* the computed value is
1688+
['fast' and 120%], which will resolve
1689+
to the rate corresponding to 'fast'
1690+
multiplied by 1.2 (one and a half times the speaking rate) */
1691+
1692+
e3 { voice-rate: normal; /* "resets" the speaking rate to the intrinsic voice value,
1693+
the computed value is 'normal' (see comment below for actual value) */
1694+
1695+
voice-family: "another-voice"; } /* because the voice is different,
1696+
the calculated speaking rate may vary
1697+
compared to "body" (even though the computed
1698+
'voice-rate' value is the same) */
1699+
</pre>
1700+
</div>
1701+
16561702
<h3 id="voice-props-voice-pitch">The 'voice-pitch' property</h3>
16571703
<table class="propdef" summary="name: syntax">
16581704
<tbody>
@@ -1704,7 +1750,7 @@ <h3 id="voice-props-voice-pitch">The 'voice-pitch' property</h3>
17041750
<em>Computed value:</em>
17051751
</td>
17061752
<td>an absolute frequency, or a keyword value and potentially also a frequency, semitone,
1707-
and/or percentage representing any non-zero offsets </td>
1753+
and/or percentage representing any non-zero offsets (relative to the keyword)</td>
17081754
</tr>
17091755
</tbody>
17101756
</table>
@@ -1839,7 +1885,7 @@ <h3 id="voice-props-voice-range">The 'voice-range' property</h3>
18391885
<em>Computed value:</em>
18401886
</td>
18411887
<td>an absolute frequency, or a keyword value and potentially also a frequency, semitone,
1842-
and/or percentage representing any non-zero offsets </td>
1888+
and/or percentage representing any non-zero offsets (relative to the keyword) </td>
18431889
</tr>
18441890
</tbody>
18451891
</table>
@@ -2568,6 +2614,9 @@ <h2 class="no-num" id="changes">Appendix D &mdash; Changes from previous draft</
25682614
axis and three-dimensional sound stage (azimuth support in future versions of
25692615
CSS-Speech).</li>
25702616
<li>Added the 'normal' value for voice-rate ("default" in SSML 1.1).</li>
2617+
<li>Fixed the "computed value" for voice-rate, and added the possibility to combine keywords
2618+
and percentages (to be consistent with 'voice-volume'). Added an example to illustrate
2619+
inheritance and value resolution.</li>
25712620
<li>Renamed voice-family fields to be consistent with SSML.</li>
25722621
<li>Improved the 'voice-family' selection algorithm to cater for language changes.</li>
25732622
<li>Separated definition of semitones (pitch properties).</li>

0 commit comments

Comments
 (0)