"prosody" Element
Description
Designates the prosodic attributes (pitch, speed, volume) of the text surrounded with tags.
Syntax
<prosody
pitch = "x-low" | "low" | "medium" | "high" | "x-high" | "default" | relative change (unit: Hz)
contour = (X1%,pitch1)(X2%,pitch2)...(Xn%,pitchn)
range = "x-low" | "low" | "medium" | "high" | "x-high" | "default" | relative change (unit: Hz)
rate = "x-slow" | "slow" | "medium" | "fast" | "x-fast" | "default" | relative change
duration = time interval (unit: s | ms)
volume = "silent" | "x-soft" | "soft" | "medium" | "loud" | "x-loud" | "default" | relative change>
child elements
</prosody>Attributes
| Attribute | Description |
| pitch | Pitch of the sound. Optional field. |
| contour | Contour of the sound pitch. Optional field. |
| range | Range of the sound. Optional field. |
| rate | Speaking rate. Optional field. |
| duration | Duration of the time it takes for the text to play. Optional field. |
| volume | Volume. Optional field. |
Parent
<audio>, <emphasis>, <p>, <prosody>, <s>, <speak>, <voice>
Children
<audio>, <break>, <emphasis>, <mark>, <p>, <phoneme>, <prosody>, <say-as>, <sub>, <s>, <voice>, #TEXT, #CDATA-SECTION
Limitations/Restrictions
The contour, range, and duration attributes are not supported and are disregarded.
Prosody Attribute Values
Pitch:
- Absolute: "x-high", "high", "medium", "low", "x-low", "default"
- Relative: -99% to +99%
Rate:
- Absolute: "x-fast", "fast", "medium", "slow", "x-slow", "default", or 0.5–4.0 (default: 1.0)
- Relative: -99% to +99%
Volume:
- Absolute: "silent", "x-soft", "soft", "medium", "loud", "x-loud", "default", or 0.0–100 (default: 50)
- Relative: -99 to +99 or -99% to +99% (+50 and +50% have the same meaning)
- Any value below 0 is set to 0, and any value above 100 is set to 100.
Example
<?xml version="1.0"?>
<speak version="1.0" xmlns="http://www.w3.org/2001/10/synthesis"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.w3.org/2001/10/synthesis
http://www.w3.org/TR/speech-synthesis/synthesis.xsd"
xml:lang="en-US">
<prosody pitch="high" rate="+50%">Hello, World!</prosody>
</speak>