Skip to content

Commit bcf31bf

Browse files
committed
introduced "relative-change" for pitch alterations, using Hz and semitones.
1 parent 3248d20 commit bcf31bf

2 files changed

Lines changed: 69 additions & 28 deletions

File tree

css3-speech/Overview.html

Lines changed: 40 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1749,8 +1749,8 @@ <h2 id=voice-char-props><span class=secno>10. </span>Voice characteristic
17491749
<tr>
17501750
<td width="20%"><em>Value:</em>
17511751

1752-
<td>&lt;number&gt; | &lt;percentage&gt; | x-low | low | medium | high |
1753-
x-high | inherit
1752+
<td>&lt;number&gt; | &lt;percentage&gt; | &lt;relative-change&gt; |
1753+
x-low | low | medium | high | x-high | inherit
17541754

17551755
<tr>
17561756
<td width="20%"><em>Initial:</em>
@@ -1794,7 +1794,21 @@ <h2 id=voice-char-props><span class=secno>10. </span>Voice characteristic
17941794

17951795
<dt><strong>&lt;percentage&gt;</strong>
17961796

1797-
<dd>Specifies a relative change to the inherited value.
1797+
<dd>Specifies a multiplicative change to the inherited value. Thus 150%
1798+
means one and a half times the inherited average pitch for this voice.
1799+
1800+
<dt><strong>&lt;relative-change&gt;</strong>
1801+
1802+
<dd>Specifies a relative change (decrement or increment) to the inherited
1803+
value. The syntax of allowed values is a &lt;number&gt; preceded by "-"
1804+
or "+", and followed by either of "Hz" (for Hertz) or "st" (for
1805+
semitones). A semitone is half of a tone (a half step) on the standard
1806+
diatonic scale. Note that a semitone doesn't correspond to a fixed value
1807+
in Hertz: instead, the ratio between two consecutive frequencies
1808+
separated by exactly one semitone is approximately 1.05946 (the actual
1809+
arithmetics involved are beyond the scope of this specification, please
1810+
refer to existing literature on that subject). Examples of valid values:
1811+
"+0.5st", "+5st", "-2st", "+10Hz", "-5.5Hz".
17981812

17991813
<dt><strong>x-low</strong>, <strong>low</strong>, <strong>medium</strong>,
18001814
<strong>high</strong>, <strong>x-high</strong>
@@ -1803,10 +1817,6 @@ <h2 id=voice-char-props><span class=secno>10. </span>Voice characteristic
18031817
implementation and voice specific.
18041818
</dl>
18051819

1806-
<p class=issue>ISSUE: should we also allow for relative changes in terms of
1807-
semitones as permitted by SSML? (this would require adapting both "number"
1808-
and "percentage" to disambiguate uses of "st" and "Hz" values)
1809-
18101820
<table class=propdef summary="name: syntax">
18111821
<tbody>
18121822
<tr>
@@ -1817,8 +1827,8 @@ <h2 id=voice-char-props><span class=secno>10. </span>Voice characteristic
18171827
<tr>
18181828
<td width="20%"><em>Value:</em>
18191829

1820-
<td>&lt;number&gt; | &lt;percentage&gt; | x-low | low | medium | high |
1821-
x-high | inherit
1830+
<td>&lt;number&gt; | &lt;percentage&gt; | &lt;relative-change&gt; |
1831+
x-low | low | medium | high | x-high | inherit
18221832

18231833
<tr>
18241834
<td width="20%"><em>Initial:</em>
@@ -1866,7 +1876,21 @@ <h2 id=voice-char-props><span class=secno>10. </span>Voice characteristic
18661876

18671877
<dt><strong>&lt;percentage&gt;</strong>
18681878

1869-
<dd>Specifies a relative change to the inherited value.
1879+
<dd>Specifies a multiplicative change to the inherited value. Thus 25%
1880+
means a quarter of the inherited pitch range for this voice.
1881+
1882+
<dt><strong>&lt;relative-change&gt;</strong>
1883+
1884+
<dd>Specifies a relative change (decrement or increment) to the inherited
1885+
value. The syntax of allowed values is a &lt;number&gt; preceded by "-"
1886+
or "+", and followed by either of "Hz" (for Hertz) or "st" (for
1887+
semitones). A semitone is half of a tone (a half step) on the standard
1888+
diatonic scale. Note that a semitone doesn't correspond to a fixed value
1889+
in Hertz: instead, the ratio between two consecutive frequencies
1890+
separated by exactly one semitone is approximately 1.05946 (the actual
1891+
arithmetics involved are beyond the scope of this specification, please
1892+
refer to existing literature on that subject). Examples of valid values:
1893+
"+0.5st", "+5st", "-2st", "+10Hz", "-5.5Hz".
18701894

18711895
<dt><strong>x-low</strong>, <strong>low</strong>, <strong>medium</strong>,
18721896
<strong>high</strong> and <strong>x-high</strong>
@@ -1875,10 +1899,6 @@ <h2 id=voice-char-props><span class=secno>10. </span>Voice characteristic
18751899
implementation and language dependent.
18761900
</dl>
18771901

1878-
<p class=issue>ISSUE: should we also allow for relative changes in terms of
1879-
semitones as permitted by SSML? (this would require adapting both "number"
1880-
and "percentage" to disambiguate uses of "st" and "Hz" values)
1881-
18821902
<table class=propdef summary="name: syntax">
18831903
<tbody>
18841904
<tr>
@@ -2581,8 +2601,8 @@ <h2 class=no-num id=property-index>Appendix B &mdash; Property index</h2>
25812601
<tr valign=baseline>
25822602
<td><a class=property href="#voice-pitch">voice-pitch</a>
25832603

2584-
<td>&lt;number&gt; | &lt;percentage&gt; | x-low | low | medium | high |
2585-
x-high | inherit
2604+
<td>&lt;number&gt; | &lt;percentage&gt; | &lt;relative-change&gt; |
2605+
x-low | low | medium | high | x-high | inherit
25862606

25872607
<td>medium
25882608

@@ -2597,8 +2617,8 @@ <h2 class=no-num id=property-index>Appendix B &mdash; Property index</h2>
25972617
<tr valign=baseline>
25982618
<td><a class=property href="#voice-pitch-range">voice-pitch-range</a>
25992619

2600-
<td>&lt;number&gt; | &lt;percentage&gt; | x-low | low | medium | high |
2601-
x-high | inherit
2620+
<td>&lt;number&gt; | &lt;percentage&gt; | &lt;relative-change&gt; |
2621+
x-low | low | medium | high | x-high | inherit
26022622

26032623
<td>implementation dependent
26042624

@@ -3043,6 +3063,8 @@ <h2 class=no-num id=changes>Appendix F &mdash; Changes from previous draft</h2>
30433063
SSML element given that the CSS "content" replacement functionality
30443064
addresses the same requirement.
30453065

3066+
<li>Added support for semitones in pitch alterations.
3067+
30463068
<li>Added reference to "time" values syntax (s, ms) for &lsquo;<a
30473069
href="#voice-duration"><code
30483070
class=property>voice-duration</code></a>&rsquo;.

css3-speech/Overview.src.html

Lines changed: 29 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1338,7 +1338,7 @@ <h2 id="voice-char-props"><span class="secno">10. </span>Voice
13381338
</tr>
13391339
<tr>
13401340
<td width="20%"><em>Value:</em></td>
1341-
<td>&lt;number&gt; | &lt;percentage&gt; | x-low | low | medium
1341+
<td>&lt;number&gt; | &lt;percentage&gt; | &lt;relative-change&gt; | x-low | low | medium
13421342
| high | x-high | inherit</td>
13431343
</tr>
13441344
<tr>
@@ -1379,7 +1379,19 @@ <h2 id="voice-char-props"><span class="secno">10. </span>Voice
13791379

13801380
<dt><strong>&lt;percentage&gt;</strong></dt>
13811381

1382-
<dd>Specifies a relative change to the inherited value.</dd>
1382+
<dd>Specifies a multiplicative change to the inherited value. Thus 150% means one and a half times the inherited average pitch for this voice.</dd>
1383+
1384+
<dt><strong>&lt;relative-change&gt;</strong></dt>
1385+
1386+
<dd>Specifies a relative change (decrement or increment) to the inherited value.
1387+
The syntax of allowed values is a &lt;number&gt; preceded by "-" or "+", and followed by either of "Hz" (for Hertz) or "st" (for semitones).
1388+
A semitone is half of a tone (a half step) on the standard diatonic scale.
1389+
Note that a semitone doesn't correspond to a fixed value in Hertz: instead,
1390+
the ratio between two consecutive frequencies separated by exactly one semitone
1391+
is approximately 1.05946 (the actual arithmetics involved are beyond the scope of this specification,
1392+
please refer to existing literature on that subject).
1393+
Examples of valid values: "+0.5st", "+5st", "-2st", "+10Hz", "-5.5Hz".
1394+
</dd>
13831395

13841396
<dt><strong>x-low</strong>, <strong>low</strong>,
13851397
<strong>medium</strong>, <strong>high</strong>,
@@ -1389,9 +1401,6 @@ <h2 id="voice-char-props"><span class="secno">10. </span>Voice
13891401
that are implementation and voice specific.</dd>
13901402
</dl>
13911403

1392-
<p class="issue">ISSUE: should we also allow for relative
1393-
changes in terms of semitones as permitted by SSML? (this would require adapting both "number" and "percentage" to disambiguate uses of "st" and "Hz" values)</p>
1394-
13951404
<table class="propdef" summary="name: syntax">
13961405
<tbody>
13971406
<tr>
@@ -1400,7 +1409,7 @@ <h2 id="voice-char-props"><span class="secno">10. </span>Voice
14001409
</tr>
14011410
<tr>
14021411
<td width="20%"><em>Value:</em></td>
1403-
<td>&lt;number&gt; | &lt;percentage&gt; | x-low | low | medium
1412+
<td>&lt;number&gt; | &lt;percentage&gt; | &lt;relative-change&gt; | x-low | low | medium
14041413
| high | x-high | inherit</td>
14051414
</tr>
14061415
<tr>
@@ -1447,7 +1456,19 @@ <h2 id="voice-char-props"><span class="secno">10. </span>Voice
14471456

14481457
<dt><strong>&lt;percentage&gt;</strong></dt>
14491458

1450-
<dd>Specifies a relative change to the inherited value.</dd>
1459+
<dd>Specifies a multiplicative change to the inherited value. Thus 25% means a quarter of the inherited pitch range for this voice.</dd>
1460+
1461+
<dt><strong>&lt;relative-change&gt;</strong></dt>
1462+
1463+
<dd>Specifies a relative change (decrement or increment) to the inherited value.
1464+
The syntax of allowed values is a &lt;number&gt; preceded by "-" or "+", and followed by either of "Hz" (for Hertz) or "st" (for semitones).
1465+
A semitone is half of a tone (a half step) on the standard diatonic scale.
1466+
Note that a semitone doesn't correspond to a fixed value in Hertz: instead,
1467+
the ratio between two consecutive frequencies separated by exactly one semitone
1468+
is approximately 1.05946 (the actual arithmetics involved are beyond the scope of this specification,
1469+
please refer to existing literature on that subject).
1470+
Examples of valid values: "+0.5st", "+5st", "-2st", "+10Hz", "-5.5Hz".
1471+
</dd>
14511472

14521473
<dt><strong>x-low</strong>,
14531474
<strong>low</strong>,
@@ -1459,9 +1480,6 @@ <h2 id="voice-char-props"><span class="secno">10. </span>Voice
14591480
that are implementation and language dependent.</dd>
14601481
</dl>
14611482

1462-
<p class="issue">ISSUE: should we also allow for relative
1463-
changes in terms of semitones as permitted by SSML? (this would require adapting both "number" and "percentage" to disambiguate uses of "st" and "Hz" values)</p>
1464-
14651483
<table class="propdef" summary="name: syntax">
14661484
<tbody>
14671485
<tr>
@@ -2083,6 +2101,7 @@ <h2 class="no-num" id="changes">Appendix F &mdash; Changes from previous draft</
20832101
XML to speech" in the abstract.</li>
20842102
<li>Removed unused normative links to CSS3 Modules (actually moved to informative references), now the only dependency is CSS3 Values and Units.</li>
20852103
<li>Removed issue about the 'sub' SSML element given that the CSS "content" replacement functionality addresses the same requirement.</li>
2104+
<li>Added support for semitones in pitch alterations.</li>
20862105
<li>Added reference to "time" values syntax (s, ms) for 'voice-duration'.</li>
20872106
<li>Moved "content" outside of "phonetics", as the ::before and ::after use-cases do not relate to pronunciation rules (this is actually more similar to audio cues, only applied with text rather than audio files)</li>
20882107
<li>Added prose to explicitly support alphabet other than IPA, via the "x-" vendor-specific prefix.</li>

0 commit comments

Comments
 (0)