pub struct ProsodyAttributes {
pub pitch: Option<PitchRange>,
pub contour: Option<PitchContour>,
pub range: Option<PitchRange>,
pub rate: Option<RateRange>,
pub duration: Option<TimeDesignation>,
pub volume: Option<VolumeRange>,
}Expand description
“Speech Synthesis Markup Language (SSML) Version 1.1” Copyright © 2010 W3C® (MIT, ERCIM, Keio), All Rights Reserved.
Fields§
§pitch: Option<PitchRange>pitch: the baseline pitch for the contained text. Although the exact meaning of “baseline pitch” will vary across synthesis processors, increasing/decreasing this value will typically increase/decrease the approximate pitch of the output. Legal values are: a number followed by “Hz”, a relative change or “x-low”, “low”, “medium”, “high”, “x-high”, or “default”. Labels “x-low” through “x-high” represent a sequence of monotonically non-decreasing pitch levels.
contour: Option<PitchContour>The pitch contour is defined as a set of white space-separated targets at specified time positions in the speech output. The algorithm for interpolating between the targets is processor-specific. In each pair of the form (time position,target), the first value is a percentage of the period of the contained text (a number followed by “%”) and the second value is the value of the pitch attribute (a number followed by “Hz”, a relative change, or a label value). Time position values outside 0% to 100% are ignored. If a pitch value is not defined for 0% or 100% then the nearest pitch target is copied. All relative values for the pitch are relative to the pitch value just before the contained text.
range: Option<PitchRange>the pitch range (variability) for the contained text. Although the exact meaning of “pitch range” will vary across synthesis processors, increasing/decreasing this value will typically increase/decrease the dynamic range of the output pitch. Legal values are: a number followed by “Hz”, a relative change or “x-low”, “low”, “medium”, “high”, “x-high”, or “default”. Labels “x-low” through “x-high” represent a sequence of monotonically non-decreasing pitch ranges.
rate: Option<RateRange>a change in the speaking rate for the contained text. Legal values are: a non-negative percentage or “x-slow”, “slow”, “medium”, “fast”, “x-fast”, or “default”. Labels “x-slow” through “x-fast” represent a sequence of monotonically non-decreasing speaking rates. When the value is a non-negative percentage it acts as a multiplier of the default rate. For example, a value of 100% means no change in speaking rate, a value of 200% means a speaking rate twice the default rate, and a value of 50% means a speaking rate of half the default rate. The default rate for a voice depends on the language and dialect and on the personality of the voice. The default rate for a voice should be such that it is experienced as a normal speaking rate for the voice when reading aloud text. Since voices are processor-specific, the default rate will be as well.
duration: Option<TimeDesignation>duration: a value in seconds or milliseconds for the desired time to take to read the contained text. Follows the time value format from the Cascading Style Sheet Level 2 Recommendation [CSS2], e.g. “250ms”, “3s”.
volume: Option<VolumeRange>the volume for the contained text. Legal values are: a number preceded by “+” or “-” and immediately followed by “dB”; or “silent”, “x-soft”, “soft”, “medium”, “loud”, “x-loud”, or “default”. The default is +0.0dB. Specifying a value of “silent” amounts to specifying minus infinity decibels (dB). Labels “silent” through “x-loud” represent a sequence of monotonically non-decreasing volume levels. When the value is a signed number (dB), it specifies the ratio of the squares of the new signal amplitude (a1) and the current amplitude (a0), and is defined in terms of dB:
Trait Implementations§
Source§impl Clone for ProsodyAttributes
impl Clone for ProsodyAttributes
Source§fn clone(&self) -> ProsodyAttributes
fn clone(&self) -> ProsodyAttributes
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more