English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

CSS reference manual

CSS @rules (RULES)

CSS attributes大全

CSS Audio Reference Manual

The auditory attributes define the auditory presentation of the document.

Auditory style sheets

Auditory style sheets are part of CSS, combining speech synthesis and sound effects to make it easier for visually impaired people and screen readers to access web documents.

Auditory demonstrations can be used:

  • Blind people

  • In cars

  • In devices such as home entertainment

  • Industrial and medical document systems

  • Helps learning to read or users with reading difficulties

When using auditory attributes, the canvas consists of three-dimensional physical space (surround sound) and time space (a space where other sounds can be specified before, during, and after). CSS attributes also allow you to change the quality of the synthesized voice (voice type, frequency, pitch, etc.).

Example of an auditory style sheet:

h1, h2, h3, h4, h5, h6 {
 voice-family: male;
 stress: 20;
 richness: 90;
 cue-before: url("pop.au");
}
p {
  azimuth: center-left;
}
quotes {
  volume: x-soft;
}
Test to see‹/›

This will guide the speech synthesizer to speak the title with a very rich male voice (a kind of 'audio font'), and the sound sample will be played from the given URL.

The paragraph seems to come from the left front (if the sound system has spatial audio functionality), and the quotes will be softer.

Attribute

Attribute Value

Description
azimuthazimuthSet the position from which the sound should emit horizontally.
cuecueAbbreviation for setting the cue attribute (i.e., cue)-before and cue-Abbreviation for after).
cue-aftercue-afterSpecify the sound to be played after speaking the element content to separate it from other elements.
cue-beforecue-beforeSpecify the sound to be played before speaking the element content to separate it from other elements.
elevationelevationSet the position from which the sound should emit vertically.
pausepauseAbbreviation for setting the pause attribute (i.e., pre-pause and post-pause) in a declaration.
pause-afterpause-afterSpecify the pause to be observed after speaking the element content.
pause-beforepause-beforeSpecify the pause to be observed before speaking the element content.
pitchpitchSpecify the average pitch (frequency) of the voice. The average pitch of the voice depends on the voice series.
pitch-rangepitch-rangeSpecify the change in average pitch.
play-duringplay-duringSpecify the sound played as background when the element content is spoken.
richnessrichnessSpecify the richness of the voice.
speakspeakSpecify whether the text is presented as voice, and if so, how it is presented.
speak-headerspeak-headerSpecify whether the header is spoken before each cell or only before the cell when it is associated with a header different from the previous cell.
speak-numeralspeak-numeralSpecify how numbers are spoken.
speak-punctuationspeak-punctuationSpecify how punctuation is spoken.
speech-ratespeech-rateSpecify the speaking rate, that is, the number of words spoken per minute.
StressStressSpecify the 'stress' in the voice.
voice-familyvoice-familySpecify a comma-separated priority list of voice surnames.
volumevolumeSpecify the volume of the specified voice.