voice-volume property CSS Reference



Definition and Usage

The 'voice-volume' property allows authors to control the amplitude of the audio waveform generated by the speech synthesiser, and is also used to adjust the relative volume level of audio cues within the aural box model of the selected element.

Name: voice-volume
Value: silent | [[x-soft | soft | medium | loud | x-loud] || <decibel>]
Initial: medium
Applies to: all elements
Inherited: yes
Percentages: N/A
Media: speech
Computed value: 'silent', or a keyword value and optionally also a decibel offset (if not zero)

Syntax

voice-volume : silent | [[x-soft | soft | medium | loud | x-loud] || <decibel>];

Values

silent

Specifies that no sound is generated (the text is read "silently").

Note that this has the same effect as using negative infinity decibels. Also note that there is a difference between an element whose 'voice-volume' property has a value of 'silent', and an element whose 'speak' property has the value 'none'. With the former, the selected element takes up the same time as if it was spoken, including any pause before and after the element, but no sound is generated (descendants within the aural box model of the selected element can override the 'voice-volume' value, and may therefore generate audio output). With the latter, the selected element is not rendered in the aural dimension and no time is allocated for playback (descendants within the aural box model of the selected element can override the 'speak' value, and may therefore generate audio output).

x-soft, soft, medium, loud, x-loud

This sequence of keywords corresponds to monotonically non-decreasing volume levels, mapped to implementation-dependent values that meet the listener's requirements with regards to perceived loudness. These audio levels are typically provided via a preference mechanism that allow users to calibrate sound options according to their auditory environment. The keyword 'x-soft' maps to the user's minimum audible volume level, 'x-loud' maps to the user's maximum tolerable volume level, 'medium' maps to the user's preferred volume level, 'soft' and 'loud' map to intermediary values.

<decibel>

A number immediately followed by "dB" (decibel unit). This represents a change (positive or negative) relative to the given keyword value (see enumeration above), or to the default value for the root element, or otherwise to the inherited volume level (which may itself be a combination of a keyword value and of a decibel offset, in which case the decibel values are combined additively). When the inherited volume level is 'silent', this 'voice-volume' resolves to 'silent' too, regardless of the specified <decibel> value. Decibels represent the ratio of the squares of the new signal amplitude (a1) and the current amplitude (a0), as per the following logarithmic equation: volume(dB) = 20 log10 (a1 / a0)

Note that -6.0dB is approximately half the amplitude of the audio signal, and +6.0dB is approximately twice the amplitude.


Examples

.class {
voice-volume: loud;
} 

Relative articles