<prosody>
Controls the speaking rate and volume of speech output.
Note that when a <break> is nested within a <prosody> element, the prosody changes do not apply to text that appears after the <break>. This is expected behavior.
This section describes the attributes you can set for the <prosody> element.
Name |
Data type |
Default |
---|---|---|
contour |
CDATA |
optional |
duration |
CDATA |
optional |
pitch |
CDATA |
optional |
range | CDATA | optional |
rate | CDATA | optional |
volume | CDATA | medium |
contour
Ignored.
duration
Ignored.
pitch
Ignored.
range
Ignored.
rate
The rate attribute specifies the speaking rate. This may be expressed as a number representing a multiplier of the default rate (for example, 2 to indicate a speaking rate of twice the default rate), or one of the following symbolic values:
-
x-slow: Speak at half the default rate (-50%).
-
slow: Speak at 70% of the default rate.
-
medium: Speak at the default rate.
-
fast: Speak at 160% of the default rate.
-
x-fast: Speak at 250% of the default rate.
-
If not specified, the rate defaults to medium.
volume
The volume attribute specifies the volume of speech output. This can be expressed as a number from 0 (silent) to 100 (medium), as a relative change (up to 200 total), or as one of the following symbolic values:
-
silent: no sound (equivalent to number 0)
-
x-soft: -15 decibels (equivalent to number 18)
-
soft: -6 decibels (equivalent to number 50)
-
medium: 0 decibels (equivalent to number 100)
-
loud: +3 decibels (equivalent to number 141)
-
x-loud: +6 decibels (equivalent to number 200)
-
If not specified, the volume defaults to medium (100, or 0 decibels).
Children
- Parsed character data
- <prosody>
Parents
Sample code
<prompt> We represent
<prosody rate="+20%" volume="+25%">the lollipop guild.</prosody>
</prompt>